Kargi-Sitesi/.angular/cache/16.2.16/babel-webpack/559da9dc0ad4d6d3c809059006526779af8aec6453ba8381b917e2ecfa64ff88.json

1 line
No EOL
3.1 MiB
Raw Blame History

{"ast":null,"code":"/**\n * @license Angular v16.2.12\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nconst _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' +\n// 1: \":not(\"\n'(([\\\\.\\\\#]?)[-\\\\w]+)|' +\n// 2: \"tag\"; 3: \".\"/\"#\";\n// \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n// 4: attribute; 5: attribute_string; 6: attribute_value\n'(?:\\\\[([-.\\\\w*\\\\\\\\$]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' +\n// \"[name]\", \"[name=value]\",\n// \"[name=\"value\"]\",\n// \"[name='value']\"\n'(\\\\))|' +\n// 7: \")\"\n'(\\\\s*,\\\\s*)',\n// 8: \",\"\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 */\nclass CssSelector {\n constructor() {\n this.element = null;\n this.classNames = [];\n /**\n * The selectors are encoded in pairs where:\n * - even locations are attribute names\n * - odd locations are attribute values.\n *\n * Example:\n * Selector: `[key1=value1][key2]` would parse to:\n * ```\n * ['key1', 'value1', 'key2', '']\n * ```\n */\n this.attrs = [];\n this.notSelectors = [];\n }\n static parse(selector) {\n const results = [];\n const _addResult = (res, cssSel) => {\n if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 && cssSel.attrs.length == 0) {\n cssSel.element = '*';\n }\n res.push(cssSel);\n };\n let cssSelector = new CssSelector();\n let match;\n let current = cssSelector;\n let inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1 /* SelectorRegexp.NOT */]) {\n if (inNot) {\n throw new Error('Nesting :not in a selector is not allowed');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n const tag = match[2 /* SelectorRegexp.TAG */];\n if (tag) {\n const prefix = match[3 /* SelectorRegexp.PREFIX */];\n if (prefix === '#') {\n // #hash\n current.addAttribute('id', tag.slice(1));\n } else if (prefix === '.') {\n // Class\n current.addClassName(tag.slice(1));\n } else {\n // Element\n current.setElement(tag);\n }\n }\n const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];\n if (attribute) {\n current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);\n }\n if (match[7 /* SelectorRegexp.NOT_END */]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8 /* SelectorRegexp.SEPARATOR */]) {\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 * Unescape `\\$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * but we might want to match an attribute that contains `$`.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to unescape.\n * @returns the unescaped string.\n */\n unescapeAttribute(attr) {\n let result = '';\n let escaping = false;\n for (let i = 0; i < attr.length; i++) {\n const char = attr.charAt(i);\n if (char === '\\\\') {\n escaping = true;\n continue;\n }\n if (char === '$' && !escaping) {\n throw new Error(`Error in attribute selector \"${attr}\". ` + `Unescaped \"$\" is not supported. Please escape with \"\\\\$\".`);\n }\n escaping = false;\n result += char;\n }\n return result;\n }\n /**\n * Escape `$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * with this method we are escaping `$` with `\\$'.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to escape.\n * @returns the escaped string.\n */\n escapeAttribute(attr) {\n return attr.replace(/\\\\/g, '\\\\\\\\').replace(/\\$/g, '\\\\$');\n }\n isElementSelector() {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 && this.notSelectors.length === 0;\n }\n hasElementSelector() {\n return !!this.element;\n }\n setElement(element = null) {\n this.element = element;\n }\n getAttrs() {\n const result = [];\n if (this.classNames.length > 0) {\n result.push('class', this.classNames.join(' '));\n }\n return result.concat(this.attrs);\n }\n addAttribute(name, value = '') {\n this.attrs.push(name, value && value.toLowerCase() || '');\n }\n addClassName(name) {\n this.classNames.push(name.toLowerCase());\n }\n toString() {\n let res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(klass => res += `.${klass}`);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length; i += 2) {\n const name = this.escapeAttribute(this.attrs[i]);\n const value = this.attrs[i + 1];\n res += `[${name}${value ? '=' + value : ''}]`;\n }\n }\n this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`);\n return res;\n }\n}\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nclass SelectorMatcher {\n constructor() {\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 static createNotMatcher(notSelectors) {\n const notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n }\n addSelectables(cssSelectors, callbackCtxt) {\n let listContext = null;\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (let 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 */\n _addSelectable(cssSelector, callbackCtxt, listContext) {\n let matcher = this;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n const isTerminal = attrs.length === 0 && classNames.length === 0;\n if (isTerminal) {\n this._addTerminal(matcher._elementMap, element, selectable);\n } else {\n matcher = this._addPartial(matcher._elementPartialMap, element);\n }\n }\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const isTerminal = attrs.length === 0 && i === classNames.length - 1;\n const className = classNames[i];\n if (isTerminal) {\n this._addTerminal(matcher._classMap, className, selectable);\n } else {\n matcher = this._addPartial(matcher._classPartialMap, className);\n }\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const isTerminal = i === attrs.length - 2;\n const name = attrs[i];\n const value = attrs[i + 1];\n if (isTerminal) {\n const terminalMap = matcher._attrValueMap;\n let terminalValuesMap = terminalMap.get(name);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n } else {\n const partialMap = matcher._attrValuePartialMap;\n let partialValuesMap = partialMap.get(name);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n }\n _addTerminal(map, name, selectable) {\n let terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n }\n _addPartial(map, name) {\n let 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 match(cssSelector, matchedCallback) {\n let result = false;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n for (let 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) || result;\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const className = classNames[i];\n result = this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n result = this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) || result;\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const name = attrs[i];\n const value = attrs[i + 1];\n const terminalValuesMap = this._attrValueMap.get(name);\n if (value) {\n result = this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result = this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n const partialValuesMap = this._attrValuePartialMap.get(name);\n if (value) {\n result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result = this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n }\n }\n return result;\n }\n /** @internal */\n _matchTerminal(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n let selectables = map.get(name) || [];\n const starSelectables = map.get('*');\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n let selectable;\n let result = false;\n for (let 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 _matchPartial(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n const 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}\nclass SelectorListContext {\n constructor(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n}\n// Store context to pass back selector and context when a selector is matched\nclass SelectorContext {\n constructor(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n finalize(cssSelector, callback) {\n let result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n const 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}\n\n// Attention:\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nconst Type$1 = Function;\nvar SecurityContext;\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\nfunction parserSelectorToSimpleSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ? [8 /* SelectorFlags.CLASS */, ...selector.classNames] : [];\n const elementName = selector.element && selector.element !== '*' ? selector.element : '';\n return [elementName, ...selector.attrs, ...classes];\n}\nfunction parserSelectorToNegativeSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ? [8 /* SelectorFlags.CLASS */, ...selector.classNames] : [];\n if (selector.element) {\n return [1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes];\n } else if (selector.attrs.length) {\n return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];\n } else {\n return selector.classNames && selector.classNames.length ? [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] : [];\n }\n}\nfunction parserSelectorToR3Selector(selector) {\n const positive = parserSelectorToSimpleSelector(selector);\n const negative = selector.notSelectors && selector.notSelectors.length ? selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) : [];\n return positive.concat(...negative);\n}\nfunction parseSelectorToR3Selector(selector) {\n return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\nvar core = /*#__PURE__*/Object.freeze({\n __proto__: null,\n emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,\n get ViewEncapsulation() {\n return ViewEncapsulation;\n },\n get ChangeDetectionStrategy() {\n return ChangeDetectionStrategy;\n },\n CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n Type: Type$1,\n get SecurityContext() {\n return SecurityContext;\n },\n get MissingTranslationStrategy() {\n return MissingTranslationStrategy;\n },\n parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n\n/**\n * Represents a big integer using a buffer of its individual digits, with the least significant\n * digit stored at the beginning of the array (little endian).\n *\n * For performance reasons, each instance is mutable. The addition operation can be done in-place\n * to reduce memory pressure of allocation for the digits array.\n */\nclass BigInteger {\n static zero() {\n return new BigInteger([0]);\n }\n static one() {\n return new BigInteger([1]);\n }\n /**\n * Creates a big integer using its individual digits in little endian storage.\n */\n constructor(digits) {\n this.digits = digits;\n }\n /**\n * Creates a clone of this instance.\n */\n clone() {\n return new BigInteger(this.digits.slice());\n }\n /**\n * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate\n * `this` but instead returns a new instance, unlike `addToSelf`.\n */\n add(other) {\n const result = this.clone();\n result.addToSelf(other);\n return result;\n }\n /**\n * Adds `other` to the instance itself, thereby mutating its value.\n */\n addToSelf(other) {\n const maxNrOfDigits = Math.max(this.digits.length, other.digits.length);\n let carry = 0;\n for (let i = 0; i < maxNrOfDigits; i++) {\n let digitSum = carry;\n if (i < this.digits.length) {\n digitSum += this.digits[i];\n }\n if (i < other.digits.length) {\n digitSum += other.digits[i];\n }\n if (digitSum >= 10) {\n this.digits[i] = digitSum - 10;\n carry = 1;\n } else {\n this.digits[i] = digitSum;\n carry = 0;\n }\n }\n // Apply a remaining carry if needed.\n if (carry > 0) {\n this.digits[maxNrOfDigits] = 1;\n }\n }\n /**\n * Builds the decimal string representation of the big integer. As this is stored in\n * little endian, the digits are concatenated in reverse order.\n */\n toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[i];\n }\n return res;\n }\n}\n/**\n * Represents a big integer which is optimized for multiplication operations, as its power-of-twos\n * are memoized. See `multiplyBy()` for details on the multiplication algorithm.\n */\nclass BigIntForMultiplication {\n constructor(value) {\n this.powerOfTwos = [value];\n }\n /**\n * Returns the big integer itself.\n */\n getValue() {\n return this.powerOfTwos[0];\n }\n /**\n * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The\n * value for `b` is represented by a storage model that is optimized for this computation.\n *\n * This operation is implemented in N(log2(num)) by continuous halving of the number, where the\n * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is\n * used as exponent into the power-of-two multiplication of `b`.\n *\n * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the\n * algorithm unrolls into the following iterations:\n *\n * Iteration | num | LSB | b * 2^iter | Add? | product\n * -----------|------------|------|------------|------|--------\n * 0 | 0b00101010 | 0 | 1337 | No | 0\n * 1 | 0b00010101 | 1 | 2674 | Yes | 2674\n * 2 | 0b00001010 | 0 | 5348 | No | 2674\n * 3 | 0b00000101 | 1 | 10696 | Yes | 13370\n * 4 | 0b00000010 | 0 | 21392 | No | 13370\n * 5 | 0b00000001 | 1 | 42784 | Yes | 56154\n * 6 | 0b00000000 | 0 | 85568 | No | 56154\n *\n * The computed product of 56154 is indeed the correct result.\n *\n * The `BigIntForMultiplication` representation for a big integer provides memoized access to the\n * power-of-two values to reduce the workload in computing those values.\n */\n multiplyBy(num) {\n const product = BigInteger.zero();\n this.multiplyByAndAddTo(num, product);\n return product;\n }\n /**\n * See `multiplyBy()` for details. This function allows for the computed product to be added\n * directly to the provided result big integer.\n */\n multiplyByAndAddTo(num, result) {\n for (let exponent = 0; num !== 0; num = num >>> 1, exponent++) {\n if (num & 1) {\n const value = this.getMultipliedByPowerOfTwo(exponent);\n result.addToSelf(value);\n }\n }\n }\n /**\n * Computes and memoizes the big integer value for `this.number * 2^exponent`.\n */\n getMultipliedByPowerOfTwo(exponent) {\n // Compute the powers up until the requested exponent, where each value is computed from its\n // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.\n // added to itself) to reach `this.number * 2^exponent`.\n for (let i = this.powerOfTwos.length; i <= exponent; i++) {\n const previousPower = this.powerOfTwos[i - 1];\n this.powerOfTwos[i] = previousPower.add(previousPower);\n }\n return this.powerOfTwos[exponent];\n }\n}\n/**\n * Represents an exponentiation operation for the provided base, of which exponents are computed and\n * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for\n * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix\n * representation that is lazily computed upon request.\n */\nclass BigIntExponentiation {\n constructor(base) {\n this.base = base;\n this.exponents = [new BigIntForMultiplication(BigInteger.one())];\n }\n /**\n * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for\n * further multiplication operations.\n */\n toThePowerOf(exponent) {\n // Compute the results up until the requested exponent, where every value is computed from its\n // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`\n // to reach `this.base^exponent`.\n for (let i = this.exponents.length; i <= exponent; i++) {\n const value = this.exponents[i - 1].multiplyBy(this.base);\n this.exponents[i] = new BigIntForMultiplication(value);\n }\n return this.exponents[exponent];\n }\n}\n\n/**\n * A lazily created TextEncoder instance for converting strings into UTF-8 bytes\n */\nlet textEncoder;\n/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\nfunction digest$1(message) {\n return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\nfunction computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\nfunction decimalDigest(message) {\n return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message) {\n const visitor = new _SerializerIgnoreIcuExpVisitor();\n const parts = message.nodes.map(a => 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 */\nclass _SerializerVisitor {\n visitText(text, context) {\n return text.value;\n }\n visitContainer(container, context) {\n return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n }\n visitIcu(icu, context) {\n const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n }\n visitTagPlaceholder(ph, context) {\n return ph.isVoid ? `<ph tag name=\"${ph.startName}\"/>` : `<ph tag name=\"${ph.startName}\">${ph.children.map(child => child.visit(this)).join(', ')}</ph name=\"${ph.closeName}\">`;\n }\n visitPlaceholder(ph, context) {\n return ph.value ? `<ph name=\"${ph.name}\">${ph.value}</ph>` : `<ph name=\"${ph.name}\"/>`;\n }\n visitIcuPlaceholder(ph, context) {\n return `<ph icu name=\"${ph.name}\">${ph.value.visit(this)}</ph>`;\n }\n}\nconst serializerVisitor$1 = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(a => a.visit(serializerVisitor$1, 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 */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n visitIcu(icu, context) {\n let strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n // Do not take the expression into account\n return `{${icu.type}, ${strCases.join(', ')}}`;\n }\n}\n/**\n * Compute the SHA1 of the given string\n *\n * see https://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 */\nfunction sha1(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = [...textEncoder.encode(str)];\n const words32 = bytesToWords32(utf8, Endian.Big);\n const len = utf8.length * 8;\n const w = new Uint32Array(80);\n let a = 0x67452301,\n b = 0xefcdab89,\n c = 0x98badcfe,\n d = 0x10325476,\n e = 0xc3d2e1f0;\n words32[len >> 5] |= 0x80 << 24 - len % 32;\n words32[(len + 64 >> 9 << 4) + 15] = len;\n for (let i = 0; i < words32.length; i += 16) {\n const h0 = a,\n h1 = b,\n h2 = c,\n h3 = d,\n h4 = e;\n for (let j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n } else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n const fkVal = fk(j, b, c, d);\n const f = fkVal[0];\n const k = fkVal[1];\n const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n e = d;\n d = c;\n c = rol32(b, 30);\n b = a;\n a = temp;\n }\n a = add32(a, h0);\n b = add32(b, h1);\n c = add32(c, h2);\n d = add32(d, h3);\n e = add32(e, h4);\n }\n // Convert the output parts to a 160-bit hexadecimal string\n return toHexU32(a) + toHexU32(b) + toHexU32(c) + toHexU32(d) + toHexU32(e);\n}\n/**\n * Convert and format a number as a string representing a 32-bit unsigned hexadecimal number.\n * @param value The value to format as a string.\n * @returns A hexadecimal string representing the value.\n */\nfunction toHexU32(value) {\n // unsigned right shift of zero ensures an unsigned 32-bit number\n return (value >>> 0).toString(16).padStart(8, '0');\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 */\nfunction fingerprint(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = textEncoder.encode(str);\n const view = new DataView(utf8.buffer, utf8.byteOffset, utf8.byteLength);\n let hi = hash32(view, utf8.length, 0);\n let lo = hash32(view, utf8.length, 102072);\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n const meaningFingerprint = fingerprint(meaning);\n msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);\n }\n const hi = msgFingerprint[0];\n const lo = msgFingerprint[1];\n return wordsToDecimalString(hi & 0x7fffffff, lo);\n}\nfunction hash32(view, length, c) {\n let a = 0x9e3779b9,\n b = 0x9e3779b9;\n let index = 0;\n const end = length - 12;\n for (; index <= end; index += 12) {\n a += view.getUint32(index, true);\n b += view.getUint32(index + 4, true);\n c += view.getUint32(index + 8, true);\n const res = mix(a, b, c);\n a = res[0], b = res[1], c = res[2];\n }\n const remainder = length - index;\n // the first byte of c is reserved for the length\n c += length;\n if (remainder >= 4) {\n a += view.getUint32(index, true);\n index += 4;\n if (remainder >= 8) {\n b += view.getUint32(index, true);\n index += 4;\n // Partial 32-bit word for c\n if (remainder >= 9) {\n c += view.getUint8(index++) << 8;\n }\n if (remainder >= 10) {\n c += view.getUint8(index++) << 16;\n }\n if (remainder === 11) {\n c += view.getUint8(index++) << 24;\n }\n } else {\n // Partial 32-bit word for b\n if (remainder >= 5) {\n b += view.getUint8(index++);\n }\n if (remainder >= 6) {\n b += view.getUint8(index++) << 8;\n }\n if (remainder === 7) {\n b += view.getUint8(index++) << 16;\n }\n }\n } else {\n // Partial 32-bit word for a\n if (remainder >= 1) {\n a += view.getUint8(index++);\n }\n if (remainder >= 2) {\n a += view.getUint8(index++) << 8;\n }\n if (remainder === 3) {\n a += view.getUint8(index++) << 16;\n }\n }\n return mix(a, b, c)[2];\n}\n// clang-format off\nfunction mix(a, b, c) {\n a -= b;\n a -= c;\n a ^= c >>> 13;\n b -= c;\n b -= a;\n b ^= a << 8;\n c -= a;\n c -= b;\n c ^= b >>> 13;\n a -= b;\n a -= c;\n a ^= c >>> 12;\n b -= c;\n b -= a;\n b ^= a << 16;\n c -= a;\n c -= b;\n c ^= b >>> 5;\n a -= b;\n a -= c;\n a ^= c >>> 3;\n b -= c;\n b -= a;\n b ^= a << 10;\n c -= a;\n c -= b;\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n const low = (a & 0xffff) + (b & 0xffff);\n const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, high << 16 | low & 0xffff];\n}\nfunction add64(a, b) {\n const ah = a[0],\n al = a[1];\n const bh = b[0],\n bl = b[1];\n const result = add32to64(al, bl);\n const carry = result[0];\n const l = result[1];\n const h = add32(add32(ah, bh), carry);\n return [h, l];\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return a << count | a >>> 32 - count;\n}\n// Rotate a 64b number left `count` position\nfunction rol64(num, count) {\n const hi = num[0],\n lo = num[1];\n const h = hi << count | lo >>> 32 - count;\n const l = lo << count | hi >>> 32 - count;\n return [h, l];\n}\nfunction bytesToWords32(bytes, endian) {\n const size = bytes.length + 3 >>> 2;\n const words32 = [];\n for (let i = 0; i < size; i++) {\n words32[i] = wordAt(bytes, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(bytes, index) {\n return index >= bytes.length ? 0 : bytes[index];\n}\nfunction wordAt(bytes, index, endian) {\n let word = 0;\n if (endian === Endian.Big) {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 24 - 8 * i;\n }\n } else {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 8 * i;\n }\n }\n return word;\n}\n/**\n * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized\n * power-of-256 results with memoized power-of-two computations for efficient multiplication.\n *\n * For our purposes, this can be safely stored as a global without memory concerns. The reason is\n * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)\n * exponent.\n */\nconst base256 = new BigIntExponentiation(256);\n/**\n * Represents two 32-bit words as a single decimal number. This requires a big integer storage\n * model as JS numbers are not accurate enough to represent the 64-bit number.\n *\n * Based on https://www.danvk.org/hex2dec.html\n */\nfunction wordsToDecimalString(hi, lo) {\n // Encode the four bytes in lo in the lower digits of the decimal number.\n // Note: the multiplication results in lo itself but represented by a big integer using its\n // decimal digits.\n const decimal = base256.toThePowerOf(0).multiplyBy(lo);\n // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why\n // this multiplication factor is applied.\n base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);\n return decimal.toString();\n}\n\n//// Types\nvar TypeModifier;\n(function (TypeModifier) {\n TypeModifier[TypeModifier[\"None\"] = 0] = \"None\";\n TypeModifier[TypeModifier[\"Const\"] = 1] = \"Const\";\n})(TypeModifier || (TypeModifier = {}));\nclass Type {\n constructor(modifiers = TypeModifier.None) {\n this.modifiers = modifiers;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n}\nvar BuiltinTypeName;\n(function (BuiltinTypeName) {\n BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n BuiltinTypeName[BuiltinTypeName[\"None\"] = 7] = \"None\";\n})(BuiltinTypeName || (BuiltinTypeName = {}));\nclass BuiltinType extends Type {\n constructor(name, modifiers) {\n super(modifiers);\n this.name = name;\n }\n visitType(visitor, context) {\n return visitor.visitBuiltinType(this, context);\n }\n}\nclass ExpressionType extends Type {\n constructor(value, modifiers, typeParams = null) {\n super(modifiers);\n this.value = value;\n this.typeParams = typeParams;\n }\n visitType(visitor, context) {\n return visitor.visitExpressionType(this, context);\n }\n}\nclass ArrayType extends Type {\n constructor(of, modifiers) {\n super(modifiers);\n this.of = of;\n }\n visitType(visitor, context) {\n return visitor.visitArrayType(this, context);\n }\n}\nclass MapType extends Type {\n constructor(valueType, modifiers) {\n super(modifiers);\n this.valueType = valueType || null;\n }\n visitType(visitor, context) {\n return visitor.visitMapType(this, context);\n }\n}\nclass TransplantedType extends Type {\n constructor(type, modifiers) {\n super(modifiers);\n this.type = type;\n }\n visitType(visitor, context) {\n return visitor.visitTransplantedType(this, context);\n }\n}\nconst DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nconst INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nconst BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nconst INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nconst NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nconst STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nconst FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\nconst NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\n///// Expressions\nvar UnaryOperator;\n(function (UnaryOperator) {\n UnaryOperator[UnaryOperator[\"Minus\"] = 0] = \"Minus\";\n UnaryOperator[UnaryOperator[\"Plus\"] = 1] = \"Plus\";\n})(UnaryOperator || (UnaryOperator = {}));\nvar BinaryOperator;\n(function (BinaryOperator) {\n BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 16] = \"NullishCoalesce\";\n})(BinaryOperator || (BinaryOperator = {}));\nfunction nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\nfunction areAllEquivalentPredicate(base, other, equivalentPredicate) {\n const len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (!equivalentPredicate(base[i], other[i])) {\n return false;\n }\n }\n return true;\n}\nfunction areAllEquivalent(base, other) {\n return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));\n}\nclass Expression {\n constructor(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n prop(name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n }\n key(index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n }\n callFn(params, sourceSpan, pure) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);\n }\n instantiate(params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n }\n conditional(trueCase, falseCase = null, sourceSpan) {\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n }\n equals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n }\n notEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n }\n identical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n }\n notIdentical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n }\n minus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n }\n plus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n }\n divide(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n }\n multiply(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n }\n modulo(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n }\n and(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n }\n bitwiseAnd(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n }\n or(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n }\n lower(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n }\n lowerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n }\n bigger(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n }\n biggerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n }\n isBlank(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 nullishCoalesce(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);\n }\n toStmt() {\n return new ExpressionStatement(this, null);\n }\n}\nclass ReadVarExpr extends Expression {\n constructor(name, type, sourceSpan) {\n super(type, sourceSpan);\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadVarExpr && this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n }\n clone() {\n return new ReadVarExpr(this.name, this.type, this.sourceSpan);\n }\n set(value) {\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n }\n}\nclass TypeofExpr extends Expression {\n constructor(expr, type, sourceSpan) {\n super(type, sourceSpan);\n this.expr = expr;\n }\n visitExpression(visitor, context) {\n return visitor.visitTypeofExpr(this, context);\n }\n isEquivalent(e) {\n return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n clone() {\n return new TypeofExpr(this.expr.clone());\n }\n}\nclass WrappedNodeExpr extends Expression {\n constructor(node, type, sourceSpan) {\n super(type, sourceSpan);\n this.node = node;\n }\n isEquivalent(e) {\n return e instanceof WrappedNodeExpr && this.node === e.node;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWrappedNodeExpr(this, context);\n }\n clone() {\n return new WrappedNodeExpr(this.node, this.type, this.sourceSpan);\n }\n}\nclass WriteVarExpr extends Expression {\n constructor(name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n }\n clone() {\n return new WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan);\n }\n toDeclStmt(type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n }\n toConstDecl() {\n return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);\n }\n}\nclass WriteKeyExpr extends Expression {\n constructor(receiver, index, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n }\n clone() {\n return new WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);\n }\n}\nclass WritePropExpr extends Expression {\n constructor(receiver, name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n }\n clone() {\n return new WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);\n }\n}\nclass InvokeFunctionExpr extends Expression {\n constructor(fn, args, type, sourceSpan, pure = false) {\n super(type, sourceSpan);\n this.fn = fn;\n this.args = args;\n this.pure = pure;\n }\n // An alias for fn, which allows other logic to handle calls and property reads together.\n get receiver() {\n return this.fn;\n }\n isEquivalent(e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) && areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n }\n clone() {\n return new InvokeFunctionExpr(this.fn.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan, this.pure);\n }\n}\nclass TaggedTemplateExpr extends Expression {\n constructor(tag, template, type, sourceSpan) {\n super(type, sourceSpan);\n this.tag = tag;\n this.template = template;\n }\n isEquivalent(e) {\n return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) && areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) && areAllEquivalent(this.template.expressions, e.template.expressions);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitTaggedTemplateExpr(this, context);\n }\n clone() {\n return new TaggedTemplateExpr(this.tag.clone(), this.template.clone(), this.type, this.sourceSpan);\n }\n}\nclass InstantiateExpr extends Expression {\n constructor(classExpr, args, type, sourceSpan) {\n super(type, sourceSpan);\n this.classExpr = classExpr;\n this.args = args;\n }\n isEquivalent(e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) && areAllEquivalent(this.args, e.args);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n }\n clone() {\n return new InstantiateExpr(this.classExpr.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan);\n }\n}\nclass LiteralExpr extends Expression {\n constructor(value, type, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof LiteralExpr && this.value === e.value;\n }\n isConstant() {\n return true;\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n }\n clone() {\n return new LiteralExpr(this.value, this.type, this.sourceSpan);\n }\n}\nclass TemplateLiteral {\n constructor(elements, expressions) {\n this.elements = elements;\n this.expressions = expressions;\n }\n clone() {\n return new TemplateLiteral(this.elements.map(el => el.clone()), this.expressions.map(expr => expr.clone()));\n }\n}\nclass TemplateLiteralElement {\n constructor(text, sourceSpan, rawText) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n // If `rawText` is not provided, try to extract the raw string from its\n // associated `sourceSpan`. If that is also not available, \"fake\" the raw\n // string instead by escaping the following control sequences:\n // - \"\\\" would otherwise indicate that the next character is a control character.\n // - \"`\" and \"${\" are template string control sequences that would otherwise prematurely\n // indicate the end of the template literal element.\n this.rawText = rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text));\n }\n clone() {\n return new TemplateLiteralElement(this.text, this.sourceSpan, this.rawText);\n }\n}\nclass LiteralPiece {\n constructor(text, sourceSpan) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n }\n}\nclass PlaceholderPiece {\n /**\n * Create a new instance of a `PlaceholderPiece`.\n *\n * @param text the name of this placeholder (e.g. `PH_1`).\n * @param sourceSpan the location of this placeholder in its localized message the source code.\n * @param associatedMessage reference to another message that this placeholder is associated with.\n * The `associatedMessage` is mainly used to provide a relationship to an ICU message that has\n * been extracted out from the message containing the placeholder.\n */\n constructor(text, sourceSpan, associatedMessage) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n this.associatedMessage = associatedMessage;\n }\n}\nconst MEANING_SEPARATOR$1 = '|';\nconst ID_SEPARATOR$1 = '@@';\nconst LEGACY_ID_INDICATOR = '␟';\nclass LocalizedString extends Expression {\n constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {\n super(STRING_TYPE, sourceSpan);\n this.metaBlock = metaBlock;\n this.messageParts = messageParts;\n this.placeHolderNames = placeHolderNames;\n this.expressions = expressions;\n }\n isEquivalent(e) {\n // return e instanceof LocalizedString && this.message === e.message;\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitLocalizedString(this, context);\n }\n clone() {\n return new LocalizedString(this.metaBlock, this.messageParts, this.placeHolderNames, this.expressions.map(expr => expr.clone()), this.sourceSpan);\n }\n /**\n * Serialize the given `meta` and `messagePart` into \"cooked\" and \"raw\" strings that can be used\n * in a `$localize` tagged string. The format of the metadata is the same as that parsed by\n * `parseI18nMeta()`.\n *\n * @param meta The metadata to serialize\n * @param messagePart The first part of the tagged string\n */\n serializeI18nHead() {\n let metaBlock = this.metaBlock.description || '';\n if (this.metaBlock.meaning) {\n metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR$1}${metaBlock}`;\n }\n if (this.metaBlock.customId) {\n metaBlock = `${metaBlock}${ID_SEPARATOR$1}${this.metaBlock.customId}`;\n }\n if (this.metaBlock.legacyIds) {\n this.metaBlock.legacyIds.forEach(legacyId => {\n metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`;\n });\n }\n return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));\n }\n getMessagePartSourceSpan(i) {\n return this.messageParts[i]?.sourceSpan ?? this.sourceSpan;\n }\n getPlaceholderSourceSpan(i) {\n return this.placeHolderNames[i]?.sourceSpan ?? this.expressions[i]?.sourceSpan ?? this.sourceSpan;\n }\n /**\n * Serialize the given `placeholderName` and `messagePart` into \"cooked\" and \"raw\" strings that\n * can be used in a `$localize` tagged string.\n *\n * The format is `:<placeholder-name>[@@<associated-id>]:`.\n *\n * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder\n * refers.\n *\n * @param partIndex The index of the message part to serialize.\n */\n serializeI18nTemplatePart(partIndex) {\n const placeholder = this.placeHolderNames[partIndex - 1];\n const messagePart = this.messageParts[partIndex];\n let metaBlock = placeholder.text;\n if (placeholder.associatedMessage?.legacyIds.length === 0) {\n metaBlock += `${ID_SEPARATOR$1}${computeMsgId(placeholder.associatedMessage.messageString, placeholder.associatedMessage.meaning)}`;\n }\n return createCookedRawString(metaBlock, messagePart.text, this.getMessagePartSourceSpan(partIndex));\n }\n}\nconst escapeSlashes = str => str.replace(/\\\\/g, '\\\\\\\\');\nconst escapeStartingColon = str => str.replace(/^:/, '\\\\:');\nconst escapeColons = str => str.replace(/:/g, '\\\\:');\nconst escapeForTemplateLiteral = str => str.replace(/`/g, '\\\\`').replace(/\\${/g, '$\\\\{');\n/**\n * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.\n *\n * The `raw` text must have various character sequences escaped:\n * * \"\\\" would otherwise indicate that the next character is a control character.\n * * \"`\" and \"${\" are template string control sequences that would otherwise prematurely indicate\n * the end of a message part.\n * * \":\" inside a metablock would prematurely indicate the end of the metablock.\n * * \":\" at the start of a messagePart with no metablock would erroneously indicate the start of a\n * metablock.\n *\n * @param metaBlock Any metadata that should be prepended to the string\n * @param messagePart The message part of the string\n */\nfunction createCookedRawString(metaBlock, messagePart, range) {\n if (metaBlock === '') {\n return {\n cooked: messagePart,\n raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),\n range\n };\n } else {\n return {\n cooked: `:${metaBlock}:${messagePart}`,\n raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`),\n range\n };\n }\n}\nclass ExternalExpr extends Expression {\n constructor(value, type, typeParams = null, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n this.typeParams = typeParams;\n }\n isEquivalent(e) {\n return e instanceof ExternalExpr && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitExternalExpr(this, context);\n }\n clone() {\n return new ExternalExpr(this.value, this.type, this.typeParams, this.sourceSpan);\n }\n}\nclass ExternalReference {\n constructor(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n}\nclass ConditionalExpr extends Expression {\n constructor(condition, trueCase, falseCase = null, type, sourceSpan) {\n super(type || trueCase.type, sourceSpan);\n this.condition = condition;\n this.falseCase = falseCase;\n this.trueCase = trueCase;\n }\n isEquivalent(e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n }\n clone() {\n return new ConditionalExpr(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);\n }\n}\nclass DynamicImportExpr extends Expression {\n constructor(url, sourceSpan) {\n super(null, sourceSpan);\n this.url = url;\n }\n isEquivalent(e) {\n return e instanceof DynamicImportExpr && this.url === e.url;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitDynamicImportExpr(this, context);\n }\n clone() {\n return new DynamicImportExpr(this.url, this.sourceSpan);\n }\n}\nclass NotExpr extends Expression {\n constructor(condition, sourceSpan) {\n super(BOOL_TYPE, sourceSpan);\n this.condition = condition;\n }\n isEquivalent(e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitNotExpr(this, context);\n }\n clone() {\n return new NotExpr(this.condition.clone(), this.sourceSpan);\n }\n}\nclass FnParam {\n constructor(name, type = null) {\n this.name = name;\n this.type = type;\n }\n isEquivalent(param) {\n return this.name === param.name;\n }\n clone() {\n return new FnParam(this.name, this.type);\n }\n}\nclass FunctionExpr extends Expression {\n constructor(params, statements, type, sourceSpan, name) {\n super(type, sourceSpan);\n this.params = params;\n this.statements = statements;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) && areAllEquivalent(this.statements, e.statements);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n }\n clone() {\n // TODO: Should we deep clone statements?\n return new FunctionExpr(this.params.map(p => p.clone()), this.statements, this.type, this.sourceSpan, this.name);\n }\n}\nclass UnaryOperatorExpr extends Expression {\n constructor(operator, expr, type, sourceSpan, parens = true) {\n super(type || NUMBER_TYPE, sourceSpan);\n this.operator = operator;\n this.expr = expr;\n this.parens = parens;\n }\n isEquivalent(e) {\n return e instanceof UnaryOperatorExpr && this.operator === e.operator && this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitUnaryOperatorExpr(this, context);\n }\n clone() {\n return new UnaryOperatorExpr(this.operator, this.expr.clone(), this.type, this.sourceSpan, this.parens);\n }\n}\nclass BinaryOperatorExpr extends Expression {\n constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {\n super(type || lhs.type, sourceSpan);\n this.operator = operator;\n this.rhs = rhs;\n this.parens = parens;\n this.lhs = lhs;\n }\n isEquivalent(e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n }\n clone() {\n return new BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan, this.parens);\n }\n}\nclass ReadPropExpr extends Expression {\n constructor(receiver, name, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n }\n // An alias for name, which allows other logic to handle property reads and keyed reads together.\n get index() {\n return this.name;\n }\n isEquivalent(e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n }\n set(value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n }\n clone() {\n return new ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);\n }\n}\nclass ReadKeyExpr extends Expression {\n constructor(receiver, index, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n }\n isEquivalent(e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n }\n set(value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n }\n clone() {\n return new ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);\n }\n}\nclass LiteralArrayExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n }\n isConstant() {\n return this.entries.every(e => e.isConstant());\n }\n isEquivalent(e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n }\n clone() {\n return new LiteralArrayExpr(this.entries.map(e => e.clone()), this.type, this.sourceSpan);\n }\n}\nclass LiteralMapEntry {\n constructor(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n isEquivalent(e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n }\n clone() {\n return new LiteralMapEntry(this.key, this.value.clone(), this.quoted);\n }\n}\nclass LiteralMapExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n this.valueType = null;\n if (type) {\n this.valueType = type.valueType;\n }\n }\n isEquivalent(e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n }\n isConstant() {\n return this.entries.every(e => e.value.isConstant());\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n }\n clone() {\n const entriesClone = this.entries.map(entry => entry.clone());\n return new LiteralMapExpr(entriesClone, this.type, this.sourceSpan);\n }\n}\nclass CommaExpr extends Expression {\n constructor(parts, sourceSpan) {\n super(parts[parts.length - 1].type, sourceSpan);\n this.parts = parts;\n }\n isEquivalent(e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitCommaExpr(this, context);\n }\n clone() {\n return new CommaExpr(this.parts.map(p => p.clone()));\n }\n}\nconst NULL_EXPR = new LiteralExpr(null, null, null);\nconst TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n//// Statements\nvar StmtModifier;\n(function (StmtModifier) {\n StmtModifier[StmtModifier[\"None\"] = 0] = \"None\";\n StmtModifier[StmtModifier[\"Final\"] = 1] = \"Final\";\n StmtModifier[StmtModifier[\"Private\"] = 2] = \"Private\";\n StmtModifier[StmtModifier[\"Exported\"] = 4] = \"Exported\";\n StmtModifier[StmtModifier[\"Static\"] = 8] = \"Static\";\n})(StmtModifier || (StmtModifier = {}));\nclass LeadingComment {\n constructor(text, multiline, trailingNewline) {\n this.text = text;\n this.multiline = multiline;\n this.trailingNewline = trailingNewline;\n }\n toString() {\n return this.multiline ? ` ${this.text} ` : this.text;\n }\n}\nclass JSDocComment extends LeadingComment {\n constructor(tags) {\n super('', /* multiline */true, /* trailingNewline */true);\n this.tags = tags;\n }\n toString() {\n return serializeTags(this.tags);\n }\n}\nclass Statement {\n constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {\n this.modifiers = modifiers;\n this.sourceSpan = sourceSpan;\n this.leadingComments = leadingComments;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n addLeadingComment(leadingComment) {\n this.leadingComments = this.leadingComments ?? [];\n this.leadingComments.push(leadingComment);\n }\n}\nclass DeclareVarStmt extends Statement {\n constructor(name, value, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.value = value;\n this.type = type || value && value.type || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name && (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n }\n}\nclass DeclareFunctionStmt extends Statement {\n constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.params = params;\n this.statements = statements;\n this.type = type || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) && areAllEquivalent(this.statements, stmt.statements);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n }\n}\nclass ExpressionStatement extends Statement {\n constructor(expr, sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.expr = expr;\n }\n isEquivalent(stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n }\n visitStatement(visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n }\n}\nclass ReturnStatement extends Statement {\n constructor(value, sourceSpan = null, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.value = value;\n }\n isEquivalent(stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitReturnStmt(this, context);\n }\n}\nclass IfStmt extends Statement {\n constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.condition = condition;\n this.trueCase = trueCase;\n this.falseCase = falseCase;\n }\n isEquivalent(stmt) {\n return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) && areAllEquivalent(this.trueCase, stmt.trueCase) && areAllEquivalent(this.falseCase, stmt.falseCase);\n }\n visitStatement(visitor, context) {\n return visitor.visitIfStmt(this, context);\n }\n}\nclass RecursiveAstVisitor$1 {\n visitType(ast, context) {\n return ast;\n }\n visitExpression(ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n }\n visitBuiltinType(type, context) {\n return this.visitType(type, context);\n }\n visitExpressionType(type, context) {\n type.value.visitExpression(this, context);\n if (type.typeParams !== null) {\n type.typeParams.forEach(param => this.visitType(param, context));\n }\n return this.visitType(type, context);\n }\n visitArrayType(type, context) {\n return this.visitType(type, context);\n }\n visitMapType(type, context) {\n return this.visitType(type, context);\n }\n visitTransplantedType(type, context) {\n return type;\n }\n visitWrappedNodeExpr(ast, context) {\n return ast;\n }\n visitTypeofExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitReadVarExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitWriteVarExpr(ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWriteKeyExpr(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 visitWritePropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitDynamicImportExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitInvokeFunctionExpr(ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitTaggedTemplateExpr(ast, context) {\n ast.tag.visitExpression(this, context);\n this.visitAllExpressions(ast.template.expressions, context);\n return this.visitExpression(ast, context);\n }\n visitInstantiateExpr(ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitLocalizedString(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitExternalExpr(ast, context) {\n if (ast.typeParams) {\n ast.typeParams.forEach(type => type.visitType(this, context));\n }\n return this.visitExpression(ast, context);\n }\n visitConditionalExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context);\n ast.falseCase.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitNotExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitFunctionExpr(ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n }\n visitUnaryOperatorExpr(ast, context) {\n ast.expr.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitBinaryOperatorExpr(ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadPropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralArrayExpr(ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralMapExpr(ast, context) {\n ast.entries.forEach(entry => entry.value.visitExpression(this, context));\n return this.visitExpression(ast, context);\n }\n visitCommaExpr(ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n }\n visitAllExpressions(exprs, context) {\n exprs.forEach(expr => expr.visitExpression(this, context));\n }\n visitDeclareVarStmt(stmt, context) {\n if (stmt.value) {\n stmt.value.visitExpression(this, context);\n }\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitDeclareFunctionStmt(stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitExpressionStmt(stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n }\n visitReturnStmt(stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n }\n visitIfStmt(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 visitAllStatements(stmts, context) {\n stmts.forEach(stmt => stmt.visitStatement(this, context));\n }\n}\nfunction leadingComment(text, multiline = false, trailingNewline = true) {\n return new LeadingComment(text, multiline, trailingNewline);\n}\nfunction jsDocComment(tags = []) {\n return new JSDocComment(tags);\n}\nfunction variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\nfunction importExpr(id, typeParams = null, sourceSpan) {\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\nfunction importType(id, typeParams, typeModifiers) {\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\nfunction expressionType(expr, typeModifiers, typeParams) {\n return new ExpressionType(expr, typeModifiers, typeParams);\n}\nfunction transplantedType(type, typeModifiers) {\n return new TransplantedType(type, typeModifiers);\n}\nfunction typeofExpr(expr) {\n return new TypeofExpr(expr);\n}\nfunction literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\nfunction literalMap(values, type = null) {\n return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);\n}\nfunction unary(operator, expr, type, sourceSpan) {\n return new UnaryOperatorExpr(operator, expr, type, sourceSpan);\n}\nfunction not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\nfunction fn(params, body, type, sourceSpan, name) {\n return new FunctionExpr(params, body, type, sourceSpan, name);\n}\nfunction ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {\n return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);\n}\nfunction taggedTemplate(tag, template, type, sourceSpan) {\n return new TaggedTemplateExpr(tag, template, type, sourceSpan);\n}\nfunction literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\nfunction localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {\n return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);\n}\nfunction isNull(exp) {\n return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag) {\n let out = '';\n if (tag.tagName) {\n out += ` @${tag.tagName}`;\n }\n if (tag.text) {\n if (tag.text.match(/\\/\\*|\\*\\//)) {\n throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n }\n out += ' ' + tag.text.replace(/@/g, '\\\\@');\n }\n return out;\n}\nfunction serializeTags(tags) {\n if (tags.length === 0) return '';\n if (tags.length === 1 && tags[0].tagName && !tags[0].text) {\n // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.\n return `*${tagToString(tags[0])} `;\n }\n let out = '*\\n';\n for (const tag of tags) {\n out += ' *';\n // If the tagToString is multi-line, insert \" * \" prefixes on lines.\n out += tagToString(tag).replace(/\\n/g, '\\n * ');\n out += '\\n';\n }\n out += ' ';\n return out;\n}\nvar output_ast = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get TypeModifier() {\n return TypeModifier;\n },\n Type: Type,\n get BuiltinTypeName() {\n return BuiltinTypeName;\n },\n BuiltinType: BuiltinType,\n ExpressionType: ExpressionType,\n ArrayType: ArrayType,\n MapType: MapType,\n TransplantedType: TransplantedType,\n DYNAMIC_TYPE: DYNAMIC_TYPE,\n INFERRED_TYPE: INFERRED_TYPE,\n BOOL_TYPE: BOOL_TYPE,\n INT_TYPE: INT_TYPE,\n NUMBER_TYPE: NUMBER_TYPE,\n STRING_TYPE: STRING_TYPE,\n FUNCTION_TYPE: FUNCTION_TYPE,\n NONE_TYPE: NONE_TYPE,\n get UnaryOperator() {\n return UnaryOperator;\n },\n get BinaryOperator() {\n return BinaryOperator;\n },\n nullSafeIsEquivalent: nullSafeIsEquivalent,\n areAllEquivalent: areAllEquivalent,\n Expression: Expression,\n ReadVarExpr: ReadVarExpr,\n TypeofExpr: TypeofExpr,\n WrappedNodeExpr: WrappedNodeExpr,\n WriteVarExpr: WriteVarExpr,\n WriteKeyExpr: WriteKeyExpr,\n WritePropExpr: WritePropExpr,\n InvokeFunctionExpr: InvokeFunctionExpr,\n TaggedTemplateExpr: TaggedTemplateExpr,\n InstantiateExpr: InstantiateExpr,\n LiteralExpr: LiteralExpr,\n TemplateLiteral: TemplateLiteral,\n TemplateLiteralElement: TemplateLiteralElement,\n LiteralPiece: LiteralPiece,\n PlaceholderPiece: PlaceholderPiece,\n LocalizedString: LocalizedString,\n ExternalExpr: ExternalExpr,\n ExternalReference: ExternalReference,\n ConditionalExpr: ConditionalExpr,\n DynamicImportExpr: DynamicImportExpr,\n NotExpr: NotExpr,\n FnParam: FnParam,\n FunctionExpr: FunctionExpr,\n UnaryOperatorExpr: UnaryOperatorExpr,\n BinaryOperatorExpr: BinaryOperatorExpr,\n ReadPropExpr: ReadPropExpr,\n ReadKeyExpr: ReadKeyExpr,\n LiteralArrayExpr: LiteralArrayExpr,\n LiteralMapEntry: LiteralMapEntry,\n LiteralMapExpr: LiteralMapExpr,\n CommaExpr: CommaExpr,\n NULL_EXPR: NULL_EXPR,\n TYPED_NULL_EXPR: TYPED_NULL_EXPR,\n get StmtModifier() {\n return StmtModifier;\n },\n LeadingComment: LeadingComment,\n JSDocComment: JSDocComment,\n Statement: Statement,\n DeclareVarStmt: DeclareVarStmt,\n DeclareFunctionStmt: DeclareFunctionStmt,\n ExpressionStatement: ExpressionStatement,\n ReturnStatement: ReturnStatement,\n IfStmt: IfStmt,\n RecursiveAstVisitor: RecursiveAstVisitor$1,\n leadingComment: leadingComment,\n jsDocComment: jsDocComment,\n variable: variable,\n importExpr: importExpr,\n importType: importType,\n expressionType: expressionType,\n transplantedType: transplantedType,\n typeofExpr: typeofExpr,\n literalArr: literalArr,\n literalMap: literalMap,\n unary: unary,\n not: not,\n fn: fn,\n ifStmt: ifStmt,\n taggedTemplate: taggedTemplate,\n literal: literal,\n localizedString: localizedString,\n isNull: isNull\n});\nconst CONSTANT_PREFIX = '_c';\n/**\n * `ConstantPool` tries to reuse literal factories when two or more literals are identical.\n * We determine whether literals are identical by creating a key out of their AST using the\n * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely\n * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what\n * the result of `bar` will be, we create a key that looks like `{foo: <unknown>}`. Note\n * that we use a variable, rather than something like `null` in order to avoid collisions.\n */\nconst UNKNOWN_VALUE_KEY = variable('<unknown>');\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nconst KEY_CONTEXT = {};\n/**\n * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion\n * for strings that reach a certain length threshold. This constant defines the length threshold for\n * strings.\n */\nconst POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nclass FixupExpression extends Expression {\n constructor(resolved) {\n super(resolved.type);\n this.resolved = resolved;\n this.shared = false;\n this.original = resolved;\n }\n visitExpression(visitor, context) {\n if (context === KEY_CONTEXT) {\n // When producing a key we want to traverse the constant not the\n // variable used to refer to it.\n return this.original.visitExpression(visitor, context);\n } else {\n return this.resolved.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n }\n isConstant() {\n return true;\n }\n clone() {\n throw new Error(`Not supported.`);\n }\n fixup(expression) {\n this.resolved = expression;\n this.shared = true;\n }\n}\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nclass ConstantPool {\n constructor(isClosureCompilerEnabled = false) {\n this.isClosureCompilerEnabled = isClosureCompilerEnabled;\n this.statements = [];\n this.literals = new Map();\n this.literalFactories = new Map();\n this.sharedConstants = new Map();\n this.nextNameIndex = 0;\n }\n getConstLiteral(literal, forceShared) {\n if (literal instanceof LiteralExpr && !isLongStringLiteral(literal) || literal instanceof FixupExpression) {\n // Do no put simple literals into the constant pool or try to produce a constant for a\n // reference to a constant.\n return literal;\n }\n const key = GenericKeyFn.INSTANCE.keyOf(literal);\n let fixup = this.literals.get(key);\n let newValue = false;\n if (!fixup) {\n fixup = new FixupExpression(literal);\n this.literals.set(key, fixup);\n newValue = true;\n }\n if (!newValue && !fixup.shared || newValue && forceShared) {\n // Replace the expression with a variable\n const name = this.freshName();\n let definition;\n let usage;\n if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {\n // For string literals, Closure will **always** inline the string at\n // **all** usages, duplicating it each time. For large strings, this\n // unnecessarily bloats bundle size. To work around this restriction, we\n // wrap the string in a function, and call that function for each usage.\n // This tricks Closure into using inline logic for functions instead of\n // string literals. Function calls are only inlined if the body is small\n // enough to be worth it. By doing this, very large strings will be\n // shared across multiple usages, rather than duplicating the string at\n // each usage site.\n //\n // const myStr = function() { return \"very very very long string\"; };\n // const usage1 = myStr();\n // const usage2 = myStr();\n definition = variable(name).set(new FunctionExpr([],\n // Params.\n [\n // Statements.\n new ReturnStatement(literal)]));\n usage = variable(name).callFn([]);\n } else {\n // Just declare and use the variable directly, without a function call\n // indirection. This saves a few bytes and avoids an unnecessary call.\n definition = variable(name).set(literal);\n usage = variable(name);\n }\n this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n fixup.fixup(usage);\n }\n return fixup;\n }\n getSharedConstant(def, expr) {\n const key = def.keyOf(expr);\n if (!this.sharedConstants.has(key)) {\n const id = this.freshName();\n this.sharedConstants.set(key, variable(id));\n this.statements.push(def.toSharedConstantDeclaration(id, expr));\n }\n return this.sharedConstants.get(key);\n }\n getLiteralFactory(literal) {\n // Create a pure function that builds an array of a mix of constant and variable expressions\n if (literal instanceof LiteralArrayExpr) {\n const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY);\n const key = GenericKeyFn.INSTANCE.keyOf(literalArr(argumentsForKey));\n return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries));\n } else {\n const expressionForKey = literalMap(literal.entries.map(e => ({\n key: e.key,\n value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,\n quoted: e.quoted\n })));\n const key = GenericKeyFn.INSTANCE.keyOf(expressionForKey);\n return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({\n key: literal.entries[index].key,\n value,\n quoted: literal.entries[index].quoted\n }))));\n }\n }\n _getLiteralFactory(key, values, resultMap) {\n let literalFactory = this.literalFactories.get(key);\n const literalFactoryArguments = values.filter(e => !e.isConstant());\n if (!literalFactory) {\n const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`));\n const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE));\n const pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n const name = this.freshName();\n this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n literalFactory = variable(name);\n this.literalFactories.set(key, literalFactory);\n }\n return {\n literalFactory,\n literalFactoryArguments\n };\n }\n /**\n * Produce a unique name.\n *\n * The name might be unique among different prefixes if any of the prefixes end in\n * a digit so the prefix should be a constant string (not based on user input) and\n * must not end in a digit.\n */\n uniqueName(prefix) {\n return `${prefix}${this.nextNameIndex++}`;\n }\n freshName() {\n return this.uniqueName(CONSTANT_PREFIX);\n }\n}\nclass GenericKeyFn {\n static {\n this.INSTANCE = new GenericKeyFn();\n }\n keyOf(expr) {\n if (expr instanceof LiteralExpr && typeof expr.value === 'string') {\n return `\"${expr.value}\"`;\n } else if (expr instanceof LiteralExpr) {\n return String(expr.value);\n } else if (expr instanceof LiteralArrayExpr) {\n const entries = [];\n for (const entry of expr.entries) {\n entries.push(this.keyOf(entry));\n }\n return `[${entries.join(',')}]`;\n } else if (expr instanceof LiteralMapExpr) {\n const entries = [];\n for (const entry of expr.entries) {\n let key = entry.key;\n if (entry.quoted) {\n key = `\"${key}\"`;\n }\n entries.push(key + ':' + this.keyOf(entry.value));\n }\n return `{${entries.join(',')}}`;\n } else if (expr instanceof ExternalExpr) {\n return `import(\"${expr.value.moduleName}\", ${expr.value.name})`;\n } else if (expr instanceof ReadVarExpr) {\n return `read(${expr.name})`;\n } else if (expr instanceof TypeofExpr) {\n return `typeof(${this.keyOf(expr.expr)})`;\n } else {\n throw new Error(`${this.constructor.name} does not handle expressions of type ${expr.constructor.name}`);\n }\n }\n}\nfunction isVariable(e) {\n return e instanceof ReadVarExpr;\n}\nfunction isLongStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string' && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;\n}\nconst CORE = '@angular/core';\nclass Identifiers {\n /* Methods */\n static {\n this.NEW_METHOD = 'factory';\n }\n static {\n this.TRANSFORM_METHOD = 'transform';\n }\n static {\n this.PATCH_DEPS = 'patchedDeps';\n }\n static {\n this.core = {\n name: null,\n moduleName: CORE\n };\n }\n /* Instructions */\n static {\n this.namespaceHTML = {\n name: 'ɵɵnamespaceHTML',\n moduleName: CORE\n };\n }\n static {\n this.namespaceMathML = {\n name: 'ɵɵnamespaceMathML',\n moduleName: CORE\n };\n }\n static {\n this.namespaceSVG = {\n name: 'ɵɵnamespaceSVG',\n moduleName: CORE\n };\n }\n static {\n this.element = {\n name: 'ɵɵelement',\n moduleName: CORE\n };\n }\n static {\n this.elementStart = {\n name: 'ɵɵelementStart',\n moduleName: CORE\n };\n }\n static {\n this.elementEnd = {\n name: 'ɵɵelementEnd',\n moduleName: CORE\n };\n }\n static {\n this.advance = {\n name: 'ɵɵadvance',\n moduleName: CORE\n };\n }\n static {\n this.syntheticHostProperty = {\n name: 'ɵɵsyntheticHostProperty',\n moduleName: CORE\n };\n }\n static {\n this.syntheticHostListener = {\n name: 'ɵɵsyntheticHostListener',\n moduleName: CORE\n };\n }\n static {\n this.attribute = {\n name: 'ɵɵattribute',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate1 = {\n name: 'ɵɵattributeInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate2 = {\n name: 'ɵɵattributeInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate3 = {\n name: 'ɵɵattributeInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate4 = {\n name: 'ɵɵattributeInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate5 = {\n name: 'ɵɵattributeInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate6 = {\n name: 'ɵɵattributeInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate7 = {\n name: 'ɵɵattributeInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolate8 = {\n name: 'ɵɵattributeInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.attributeInterpolateV = {\n name: 'ɵɵattributeInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.classProp = {\n name: 'ɵɵclassProp',\n moduleName: CORE\n };\n }\n static {\n this.elementContainerStart = {\n name: 'ɵɵelementContainerStart',\n moduleName: CORE\n };\n }\n static {\n this.elementContainerEnd = {\n name: 'ɵɵelementContainerEnd',\n moduleName: CORE\n };\n }\n static {\n this.elementContainer = {\n name: 'ɵɵelementContainer',\n moduleName: CORE\n };\n }\n static {\n this.styleMap = {\n name: 'ɵɵstyleMap',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate1 = {\n name: 'ɵɵstyleMapInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate2 = {\n name: 'ɵɵstyleMapInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate3 = {\n name: 'ɵɵstyleMapInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate4 = {\n name: 'ɵɵstyleMapInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate5 = {\n name: 'ɵɵstyleMapInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate6 = {\n name: 'ɵɵstyleMapInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate7 = {\n name: 'ɵɵstyleMapInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolate8 = {\n name: 'ɵɵstyleMapInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.styleMapInterpolateV = {\n name: 'ɵɵstyleMapInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.classMap = {\n name: 'ɵɵclassMap',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate1 = {\n name: 'ɵɵclassMapInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate2 = {\n name: 'ɵɵclassMapInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate3 = {\n name: 'ɵɵclassMapInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate4 = {\n name: 'ɵɵclassMapInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate5 = {\n name: 'ɵɵclassMapInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate6 = {\n name: 'ɵɵclassMapInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate7 = {\n name: 'ɵɵclassMapInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolate8 = {\n name: 'ɵɵclassMapInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.classMapInterpolateV = {\n name: 'ɵɵclassMapInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.styleProp = {\n name: 'ɵɵstyleProp',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate1 = {\n name: 'ɵɵstylePropInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate2 = {\n name: 'ɵɵstylePropInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate3 = {\n name: 'ɵɵstylePropInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate4 = {\n name: 'ɵɵstylePropInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate5 = {\n name: 'ɵɵstylePropInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate6 = {\n name: 'ɵɵstylePropInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate7 = {\n name: 'ɵɵstylePropInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolate8 = {\n name: 'ɵɵstylePropInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.stylePropInterpolateV = {\n name: 'ɵɵstylePropInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.nextContext = {\n name: 'ɵɵnextContext',\n moduleName: CORE\n };\n }\n static {\n this.resetView = {\n name: 'ɵɵresetView',\n moduleName: CORE\n };\n }\n static {\n this.templateCreate = {\n name: 'ɵɵtemplate',\n moduleName: CORE\n };\n }\n static {\n this.defer = {\n name: 'ɵɵdefer',\n moduleName: CORE\n };\n }\n static {\n this.text = {\n name: 'ɵɵtext',\n moduleName: CORE\n };\n }\n static {\n this.enableBindings = {\n name: 'ɵɵenableBindings',\n moduleName: CORE\n };\n }\n static {\n this.disableBindings = {\n name: 'ɵɵdisableBindings',\n moduleName: CORE\n };\n }\n static {\n this.getCurrentView = {\n name: 'ɵɵgetCurrentView',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate = {\n name: 'ɵɵtextInterpolate',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate1 = {\n name: 'ɵɵtextInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate2 = {\n name: 'ɵɵtextInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate3 = {\n name: 'ɵɵtextInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate4 = {\n name: 'ɵɵtextInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate5 = {\n name: 'ɵɵtextInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate6 = {\n name: 'ɵɵtextInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate7 = {\n name: 'ɵɵtextInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolate8 = {\n name: 'ɵɵtextInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.textInterpolateV = {\n name: 'ɵɵtextInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.restoreView = {\n name: 'ɵɵrestoreView',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction0 = {\n name: 'ɵɵpureFunction0',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction1 = {\n name: 'ɵɵpureFunction1',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction2 = {\n name: 'ɵɵpureFunction2',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction3 = {\n name: 'ɵɵpureFunction3',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction4 = {\n name: 'ɵɵpureFunction4',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction5 = {\n name: 'ɵɵpureFunction5',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction6 = {\n name: 'ɵɵpureFunction6',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction7 = {\n name: 'ɵɵpureFunction7',\n moduleName: CORE\n };\n }\n static {\n this.pureFunction8 = {\n name: 'ɵɵpureFunction8',\n moduleName: CORE\n };\n }\n static {\n this.pureFunctionV = {\n name: 'ɵɵpureFunctionV',\n moduleName: CORE\n };\n }\n static {\n this.pipeBind1 = {\n name: 'ɵɵpipeBind1',\n moduleName: CORE\n };\n }\n static {\n this.pipeBind2 = {\n name: 'ɵɵpipeBind2',\n moduleName: CORE\n };\n }\n static {\n this.pipeBind3 = {\n name: 'ɵɵpipeBind3',\n moduleName: CORE\n };\n }\n static {\n this.pipeBind4 = {\n name: 'ɵɵpipeBind4',\n moduleName: CORE\n };\n }\n static {\n this.pipeBindV = {\n name: 'ɵɵpipeBindV',\n moduleName: CORE\n };\n }\n static {\n this.hostProperty = {\n name: 'ɵɵhostProperty',\n moduleName: CORE\n };\n }\n static {\n this.property = {\n name: 'ɵɵproperty',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate = {\n name: 'ɵɵpropertyInterpolate',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate1 = {\n name: 'ɵɵpropertyInterpolate1',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate2 = {\n name: 'ɵɵpropertyInterpolate2',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate3 = {\n name: 'ɵɵpropertyInterpolate3',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate4 = {\n name: 'ɵɵpropertyInterpolate4',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate5 = {\n name: 'ɵɵpropertyInterpolate5',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate6 = {\n name: 'ɵɵpropertyInterpolate6',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate7 = {\n name: 'ɵɵpropertyInterpolate7',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolate8 = {\n name: 'ɵɵpropertyInterpolate8',\n moduleName: CORE\n };\n }\n static {\n this.propertyInterpolateV = {\n name: 'ɵɵpropertyInterpolateV',\n moduleName: CORE\n };\n }\n static {\n this.i18n = {\n name: 'ɵɵi18n',\n moduleName: CORE\n };\n }\n static {\n this.i18nAttributes = {\n name: 'ɵɵi18nAttributes',\n moduleName: CORE\n };\n }\n static {\n this.i18nExp = {\n name: 'ɵɵi18nExp',\n moduleName: CORE\n };\n }\n static {\n this.i18nStart = {\n name: 'ɵɵi18nStart',\n moduleName: CORE\n };\n }\n static {\n this.i18nEnd = {\n name: 'ɵɵi18nEnd',\n moduleName: CORE\n };\n }\n static {\n this.i18nApply = {\n name: 'ɵɵi18nApply',\n moduleName: CORE\n };\n }\n static {\n this.i18nPostprocess = {\n name: 'ɵɵi18nPostprocess',\n moduleName: CORE\n };\n }\n static {\n this.pipe = {\n name: 'ɵɵpipe',\n moduleName: CORE\n };\n }\n static {\n this.projection = {\n name: 'ɵɵprojection',\n moduleName: CORE\n };\n }\n static {\n this.projectionDef = {\n name: 'ɵɵprojectionDef',\n moduleName: CORE\n };\n }\n static {\n this.reference = {\n name: 'ɵɵreference',\n moduleName: CORE\n };\n }\n static {\n this.inject = {\n name: 'ɵɵinject',\n moduleName: CORE\n };\n }\n static {\n this.injectAttribute = {\n name: 'ɵɵinjectAttribute',\n moduleName: CORE\n };\n }\n static {\n this.directiveInject = {\n name: 'ɵɵdirectiveInject',\n moduleName: CORE\n };\n }\n static {\n this.invalidFactory = {\n name: 'ɵɵinvalidFactory',\n moduleName: CORE\n };\n }\n static {\n this.invalidFactoryDep = {\n name: 'ɵɵinvalidFactoryDep',\n moduleName: CORE\n };\n }\n static {\n this.templateRefExtractor = {\n name: 'ɵɵtemplateRefExtractor',\n moduleName: CORE\n };\n }\n static {\n this.forwardRef = {\n name: 'forwardRef',\n moduleName: CORE\n };\n }\n static {\n this.resolveForwardRef = {\n name: 'resolveForwardRef',\n moduleName: CORE\n };\n }\n static {\n this.ɵɵdefineInjectable = {\n name: 'ɵɵdefineInjectable',\n moduleName: CORE\n };\n }\n static {\n this.declareInjectable = {\n name: 'ɵɵngDeclareInjectable',\n moduleName: CORE\n };\n }\n static {\n this.InjectableDeclaration = {\n name: 'ɵɵInjectableDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.resolveWindow = {\n name: 'ɵɵresolveWindow',\n moduleName: CORE\n };\n }\n static {\n this.resolveDocument = {\n name: 'ɵɵresolveDocument',\n moduleName: CORE\n };\n }\n static {\n this.resolveBody = {\n name: 'ɵɵresolveBody',\n moduleName: CORE\n };\n }\n static {\n this.defineComponent = {\n name: 'ɵɵdefineComponent',\n moduleName: CORE\n };\n }\n static {\n this.declareComponent = {\n name: 'ɵɵngDeclareComponent',\n moduleName: CORE\n };\n }\n static {\n this.setComponentScope = {\n name: 'ɵɵsetComponentScope',\n moduleName: CORE\n };\n }\n static {\n this.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE\n };\n }\n static {\n this.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE\n };\n }\n static {\n this.ComponentDeclaration = {\n name: 'ɵɵComponentDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.FactoryDeclaration = {\n name: 'ɵɵFactoryDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.declareFactory = {\n name: 'ɵɵngDeclareFactory',\n moduleName: CORE\n };\n }\n static {\n this.FactoryTarget = {\n name: 'ɵɵFactoryTarget',\n moduleName: CORE\n };\n }\n static {\n this.defineDirective = {\n name: 'ɵɵdefineDirective',\n moduleName: CORE\n };\n }\n static {\n this.declareDirective = {\n name: 'ɵɵngDeclareDirective',\n moduleName: CORE\n };\n }\n static {\n this.DirectiveDeclaration = {\n name: 'ɵɵDirectiveDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.InjectorDef = {\n name: 'ɵɵInjectorDef',\n moduleName: CORE\n };\n }\n static {\n this.InjectorDeclaration = {\n name: 'ɵɵInjectorDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.defineInjector = {\n name: 'ɵɵdefineInjector',\n moduleName: CORE\n };\n }\n static {\n this.declareInjector = {\n name: 'ɵɵngDeclareInjector',\n moduleName: CORE\n };\n }\n static {\n this.NgModuleDeclaration = {\n name: 'ɵɵNgModuleDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.ModuleWithProviders = {\n name: 'ModuleWithProviders',\n moduleName: CORE\n };\n }\n static {\n this.defineNgModule = {\n name: 'ɵɵdefineNgModule',\n moduleName: CORE\n };\n }\n static {\n this.declareNgModule = {\n name: 'ɵɵngDeclareNgModule',\n moduleName: CORE\n };\n }\n static {\n this.setNgModuleScope = {\n name: 'ɵɵsetNgModuleScope',\n moduleName: CORE\n };\n }\n static {\n this.registerNgModuleType = {\n name: 'ɵɵregisterNgModuleType',\n moduleName: CORE\n };\n }\n static {\n this.PipeDeclaration = {\n name: 'ɵɵPipeDeclaration',\n moduleName: CORE\n };\n }\n static {\n this.definePipe = {\n name: 'ɵɵdefinePipe',\n moduleName: CORE\n };\n }\n static {\n this.declarePipe = {\n name: 'ɵɵngDeclarePipe',\n moduleName: CORE\n };\n }\n static {\n this.declareClassMetadata = {\n name: 'ɵɵngDeclareClassMetadata',\n moduleName: CORE\n };\n }\n static {\n this.setClassMetadata = {\n name: 'ɵsetClassMetadata',\n moduleName: CORE\n };\n }\n static {\n this.queryRefresh = {\n name: 'ɵɵqueryRefresh',\n moduleName: CORE\n };\n }\n static {\n this.viewQuery = {\n name: 'ɵɵviewQuery',\n moduleName: CORE\n };\n }\n static {\n this.loadQuery = {\n name: 'ɵɵloadQuery',\n moduleName: CORE\n };\n }\n static {\n this.contentQuery = {\n name: 'ɵɵcontentQuery',\n moduleName: CORE\n };\n }\n static {\n this.NgOnChangesFeature = {\n name: 'ɵɵNgOnChangesFeature',\n moduleName: CORE\n };\n }\n static {\n this.InheritDefinitionFeature = {\n name: 'ɵɵInheritDefinitionFeature',\n moduleName: CORE\n };\n }\n static {\n this.CopyDefinitionFeature = {\n name: 'ɵɵCopyDefinitionFeature',\n moduleName: CORE\n };\n }\n static {\n this.StandaloneFeature = {\n name: 'ɵɵStandaloneFeature',\n moduleName: CORE\n };\n }\n static {\n this.ProvidersFeature = {\n name: 'ɵɵProvidersFeature',\n moduleName: CORE\n };\n }\n static {\n this.HostDirectivesFeature = {\n name: 'ɵɵHostDirectivesFeature',\n moduleName: CORE\n };\n }\n static {\n this.InputTransformsFeatureFeature = {\n name: 'ɵɵInputTransformsFeature',\n moduleName: CORE\n };\n }\n static {\n this.listener = {\n name: 'ɵɵlistener',\n moduleName: CORE\n };\n }\n static {\n this.getInheritedFactory = {\n name: 'ɵɵgetInheritedFactory',\n moduleName: CORE\n };\n }\n // sanitization-related functions\n static {\n this.sanitizeHtml = {\n name: 'ɵɵsanitizeHtml',\n moduleName: CORE\n };\n }\n static {\n this.sanitizeStyle = {\n name: 'ɵɵsanitizeStyle',\n moduleName: CORE\n };\n }\n static {\n this.sanitizeResourceUrl = {\n name: 'ɵɵsanitizeResourceUrl',\n moduleName: CORE\n };\n }\n static {\n this.sanitizeScript = {\n name: 'ɵɵsanitizeScript',\n moduleName: CORE\n };\n }\n static {\n this.sanitizeUrl = {\n name: 'ɵɵsanitizeUrl',\n moduleName: CORE\n };\n }\n static {\n this.sanitizeUrlOrResourceUrl = {\n name: 'ɵɵsanitizeUrlOrResourceUrl',\n moduleName: CORE\n };\n }\n static {\n this.trustConstantHtml = {\n name: 'ɵɵtrustConstantHtml',\n moduleName: CORE\n };\n }\n static {\n this.trustConstantResourceUrl = {\n name: 'ɵɵtrustConstantResourceUrl',\n moduleName: CORE\n };\n }\n static {\n this.validateIframeAttribute = {\n name: 'ɵɵvalidateIframeAttribute',\n moduleName: CORE\n };\n }\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\nfunction splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\nfunction _splitAt(input, character, defaultValues) {\n const characterIndex = input.indexOf(character);\n if (characterIndex == -1) return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\nfunction noUndefined(val) {\n return val === undefined ? null : val;\n}\nfunction error(msg) {\n throw new Error(`Internal Error: ${msg}`);\n}\n// Escape characters that have a special meaning in Regular Expressions\nfunction escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nfunction utf8Encode(str) {\n let encoded = [];\n for (let index = 0; index < str.length; index++) {\n let 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 const 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.push(codePoint);\n } else if (codePoint <= 0x7ff) {\n encoded.push(codePoint >> 6 & 0x1F | 0xc0, codePoint & 0x3f | 0x80);\n } else if (codePoint <= 0xffff) {\n encoded.push(codePoint >> 12 | 0xe0, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);\n } else if (codePoint <= 0x1fffff) {\n encoded.push(codePoint >> 18 & 0x07 | 0xf0, codePoint >> 12 & 0x3f | 0x80, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);\n }\n }\n return encoded;\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\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 if (!token.toString) {\n return 'object';\n }\n // WARNING: do not try to `JSON.stringify(token)` here\n // see https://github.com/angular/angular/issues/23440\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\nclass Version {\n constructor(full) {\n this.full = full;\n const splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n}\nconst _global = globalThis;\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Partitions a given array into 2 arrays, based on a boolean value returned by the condition\n * function.\n *\n * @param arr Input array that should be partitioned\n * @param conditionFn Condition function that is called for each item in a given array and returns a\n * boolean value.\n */\nfunction partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}\n\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nconst VERSION$1 = 3;\nconst JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nclass SourceMapGenerator {\n constructor(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 addSource(url, content = null) {\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n }\n addLine() {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n }\n addMapping(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({\n col0,\n sourceUrl,\n sourceLine0,\n sourceCol0\n });\n return this;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get currentLine() {\n return this.lines.slice(-1)[0];\n }\n toJSON() {\n if (!this.hasMappings) {\n return null;\n }\n const sourcesIndex = new Map();\n const sources = [];\n const sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach((url, i) => {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(this.sourcesContent.get(url) || null);\n });\n let mappings = '';\n let lastCol0 = 0;\n let lastSourceIndex = 0;\n let lastSourceLine0 = 0;\n let lastSourceCol0 = 0;\n this.lines.forEach(segments => {\n lastCol0 = 0;\n mappings += segments.map(segment => {\n // zero-based starting column of the line in the generated code\n let segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n lastCol0 = segment.col0;\n if (segment.sourceUrl != null) {\n // zero-based index into the “sources” list\n segAsStr += toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n lastSourceIndex = sourcesIndex.get(segment.sourceUrl);\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n lastSourceLine0 = segment.sourceLine0;\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n lastSourceCol0 = segment.sourceCol0;\n }\n return segAsStr;\n }).join(',');\n mappings += ';';\n });\n mappings = mappings.slice(0, -1);\n return {\n 'file': this.file || '',\n 'version': VERSION$1,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings\n };\n }\n toJsComment() {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) : '';\n }\n}\nfunction toBase64String(value) {\n let b64 = '';\n const encoded = utf8Encode(value);\n for (let i = 0; i < encoded.length;) {\n const i1 = encoded[i++];\n const i2 = i < encoded.length ? encoded[i++] : null;\n const i3 = i < encoded.length ? encoded[i++] : null;\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit((i1 & 3) << 4 | (i2 === null ? 0 : i2 >> 4));\n b64 += i2 === null ? '=' : toBase64Digit((i2 & 15) << 2 | (i3 === null ? 0 : i3 >> 6));\n b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\nfunction toBase64VLQ(value) {\n value = value < 0 ? (-value << 1) + 1 : value << 1;\n let out = '';\n do {\n let 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}\nconst B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\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}\nconst _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nconst _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nconst _INDENT_WITH = ' ';\nclass _EmittedLine {\n constructor(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n}\nclass EmitterVisitorContext {\n static createRoot() {\n return new EmitterVisitorContext(0);\n }\n constructor(_indent) {\n this._indent = _indent;\n this._lines = [new _EmittedLine(_indent)];\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get _currentLine() {\n return this._lines[this._lines.length - 1];\n }\n println(from, lastPart = '') {\n this.print(from || null, lastPart, true);\n }\n lineIsEmpty() {\n return this._currentLine.parts.length === 0;\n }\n lineLength() {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n }\n print(from, part, 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 removeEmptyLastLine() {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n }\n incIndent() {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n decIndent() {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n toSource() {\n return this.sourceLines.map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '').join('\\n');\n }\n toSourceMapGenerator(genFilePath, startsAtLine = 0) {\n const map = new SourceMapGenerator(genFilePath);\n let firstOffsetMapped = false;\n const mapFirstOffsetIfNeeded = () => {\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 (let i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach((line, lineIdx) => {\n map.addLine();\n const spans = line.srcSpans;\n const parts = line.parts;\n let col0 = line.indent * _INDENT_WITH.length;\n let 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 } else {\n mapFirstOffsetIfNeeded();\n }\n while (spanIdx < spans.length) {\n const span = spans[spanIdx];\n const source = span.start.file;\n const sourceLine = span.start.line;\n const sourceCol = span.start.col;\n map.addSource(source.url, source.content).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 spanOf(line, column) {\n const emittedLine = this._lines[line];\n if (emittedLine) {\n let columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n const 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 /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get sourceLines() {\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}\nclass AbstractEmitterVisitor {\n constructor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n printLeadingComments(stmt, ctx) {\n if (stmt.leadingComments === undefined) {\n return;\n }\n for (const comment of stmt.leadingComments) {\n if (comment instanceof JSDocComment) {\n ctx.print(stmt, `/*${comment.toString()}*/`, comment.trailingNewline);\n } else {\n if (comment.multiline) {\n ctx.print(stmt, `/* ${comment.text} */`, comment.trailingNewline);\n } else {\n comment.text.split('\\n').forEach(line => {\n ctx.println(stmt, `// ${line}`);\n });\n }\n }\n }\n }\n visitExpressionStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitReturnStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `return `);\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitIfStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `if (`);\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, `) {`);\n const 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 } 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 visitWriteVarExpr(expr, ctx) {\n const 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 visitWriteKeyExpr(expr, ctx) {\n const 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 visitWritePropExpr(expr, ctx) {\n const 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 visitInvokeFunctionExpr(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 visitTaggedTemplateExpr(expr, ctx) {\n expr.tag.visitExpression(this, ctx);\n ctx.print(expr, '`' + expr.template.elements[0].rawText);\n for (let i = 1; i < expr.template.elements.length; i++) {\n ctx.print(expr, '${');\n expr.template.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(expr, `}${expr.template.elements[i].rawText}`);\n }\n ctx.print(expr, '`');\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n }\n visitTypeofExpr(expr, ctx) {\n ctx.print(expr, 'typeof ');\n expr.expr.visitExpression(this, ctx);\n }\n visitReadVarExpr(ast, ctx) {\n ctx.print(ast, ast.name);\n return null;\n }\n visitInstantiateExpr(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 visitLiteralExpr(ast, ctx) {\n const value = ast.value;\n if (typeof value === 'string') {\n ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n } else {\n ctx.print(ast, `${value}`);\n }\n return null;\n }\n visitLocalizedString(ast, ctx) {\n const head = ast.serializeI18nHead();\n ctx.print(ast, '$localize `' + head.raw);\n for (let i = 1; i < ast.messageParts.length; i++) {\n ctx.print(ast, '${');\n ast.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(ast, `}${ast.serializeI18nTemplatePart(i).raw}`);\n }\n ctx.print(ast, '`');\n return null;\n }\n visitConditionalExpr(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, ': ');\n ast.falseCase.visitExpression(this, ctx);\n ctx.print(ast, `)`);\n return null;\n }\n visitDynamicImportExpr(ast, ctx) {\n ctx.print(ast, `import(${ast.url})`);\n }\n visitNotExpr(ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n }\n visitUnaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case UnaryOperator.Plus:\n opStr = '+';\n break;\n case UnaryOperator.Minus:\n opStr = '-';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens) ctx.print(ast, `(`);\n ctx.print(ast, opStr);\n ast.expr.visitExpression(this, ctx);\n if (ast.parens) ctx.print(ast, `)`);\n return null;\n }\n visitBinaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case BinaryOperator.Equals:\n opStr = '==';\n break;\n case BinaryOperator.Identical:\n opStr = '===';\n break;\n case BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case BinaryOperator.And:\n opStr = '&&';\n break;\n case BinaryOperator.BitwiseAnd:\n opStr = '&';\n break;\n case BinaryOperator.Or:\n opStr = '||';\n break;\n case BinaryOperator.Plus:\n opStr = '+';\n break;\n case BinaryOperator.Minus:\n opStr = '-';\n break;\n case BinaryOperator.Divide:\n opStr = '/';\n break;\n case BinaryOperator.Multiply:\n opStr = '*';\n break;\n case BinaryOperator.Modulo:\n opStr = '%';\n break;\n case BinaryOperator.Lower:\n opStr = '<';\n break;\n case BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case BinaryOperator.Bigger:\n opStr = '>';\n break;\n case BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n case BinaryOperator.NullishCoalesce:\n opStr = '??';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens) ctx.print(ast, `(`);\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, ` ${opStr} `);\n ast.rhs.visitExpression(this, ctx);\n if (ast.parens) ctx.print(ast, `)`);\n return null;\n }\n visitReadPropExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `.`);\n ctx.print(ast, ast.name);\n return null;\n }\n visitReadKeyExpr(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 visitLiteralArrayExpr(ast, ctx) {\n ctx.print(ast, `[`);\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralMapExpr(ast, ctx) {\n ctx.print(ast, `{`);\n this.visitAllObjects(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 visitCommaExpr(ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n }\n visitAllExpressions(expressions, ctx, separator) {\n this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);\n }\n visitAllObjects(handler, expressions, ctx, separator) {\n let incrementedIndent = false;\n for (let 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 } 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 visitAllStatements(statements, ctx) {\n statements.forEach(stmt => stmt.visitStatement(this, ctx));\n }\n}\nfunction escapeIdentifier(input, escapeDollar, alwaysQuote = true) {\n if (input == null) {\n return null;\n }\n const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match) => {\n if (match[0] == '$') {\n return escapeDollar ? '\\\\$' : '$';\n } else if (match[0] == '\\n') {\n return '\\\\n';\n } else if (match[0] == '\\r') {\n return '\\\\r';\n } else {\n return `\\\\${match[0]}`;\n }\n });\n const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? `'${body}'` : body;\n}\nfunction _createIndent(count) {\n let res = '';\n for (let i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\nfunction typeWithParameters(type, numParams) {\n if (numParams === 0) {\n return expressionType(type);\n }\n const params = [];\n for (let i = 0; i < numParams; i++) {\n params.push(DYNAMIC_TYPE);\n }\n return expressionType(type, undefined, params);\n}\nconst ANIMATE_SYMBOL_PREFIX = '@';\nfunction prepareSyntheticPropertyName(name) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}`;\n}\nfunction prepareSyntheticListenerName(name, phase) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;\n}\nfunction getSafePropertyAccessString(accessor, name) {\n const escapedName = escapeIdentifier(name, false, false);\n return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`;\n}\nfunction prepareSyntheticListenerFunctionName(name, phase) {\n return `animation_${name}_${phase}`;\n}\nfunction jitOnlyGuardedExpression(expr) {\n return guardedExpression('ngJitMode', expr);\n}\nfunction devOnlyGuardedExpression(expr) {\n return guardedExpression('ngDevMode', expr);\n}\nfunction guardedExpression(guard, expr) {\n const guardExpr = new ExternalExpr({\n name: guard,\n moduleName: null\n });\n const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined'));\n const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr, /* type */undefined, /* sourceSpan */undefined, true);\n return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);\n}\nfunction wrapReference(value) {\n const wrapped = new WrappedNodeExpr(value);\n return {\n value: wrapped,\n type: wrapped\n };\n}\nfunction refsToArray(refs, shouldForwardDeclare) {\n const values = literalArr(refs.map(ref => ref.value));\n return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;\n}\nfunction createMayBeForwardRefExpression(expression, forwardRef) {\n return {\n expression,\n forwardRef\n };\n}\n/**\n * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a\n * `forwardRef()` call.\n *\n * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression\n * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated\n * in the code.\n *\n * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and\n * `packages/compiler/src/jit_compiler_facade.ts` for more information.\n */\nfunction convertFromMaybeForwardRefExpression({\n expression,\n forwardRef\n}) {\n switch (forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 1 /* ForwardRefHandling.Wrapped */:\n return expression;\n case 2 /* ForwardRefHandling.Unwrapped */:\n return generateForwardRef(expression);\n }\n}\n/**\n * Generate an expression that has the given `expr` wrapped in the following form:\n *\n * ```\n * forwardRef(() => expr)\n * ```\n */\nfunction generateForwardRef(expr) {\n return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);\n}\nvar R3FactoryDelegateType;\n(function (R3FactoryDelegateType) {\n R3FactoryDelegateType[R3FactoryDelegateType[\"Class\"] = 0] = \"Class\";\n R3FactoryDelegateType[R3FactoryDelegateType[\"Function\"] = 1] = \"Function\";\n})(R3FactoryDelegateType || (R3FactoryDelegateType = {}));\nvar FactoryTarget$1;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget$1 || (FactoryTarget$1 = {}));\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nfunction compileFactoryFunction(meta) {\n const t = variable('t');\n let baseFactoryVar = null;\n // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n // this type is always created by constructor invocation, then this is the type-to-create\n // parameter provided by the user (t) if specified, or the current type if not. If there is a\n // delegated factory (which is used to create the current type) then this is only the type-to-\n // create parameter (t).\n const typeForCtor = !isDelegatedFactoryMetadata(meta) ? new BinaryOperatorExpr(BinaryOperator.Or, t, meta.type.value) : t;\n let ctorExpr = null;\n if (meta.deps !== null) {\n // There is a constructor (either explicitly or implicitly defined).\n if (meta.deps !== 'invalid') {\n ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target));\n }\n } else {\n // There is no constructor, use the base class' factory to construct typeForCtor.\n baseFactoryVar = variable(`ɵ${meta.name}_BaseFactory`);\n ctorExpr = baseFactoryVar.callFn([typeForCtor]);\n }\n const body = [];\n let retExpr = null;\n function makeConditionalFactory(nonCtorExpr) {\n const r = variable('r');\n body.push(r.set(NULL_EXPR).toDeclStmt());\n const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt();\n body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n return r;\n }\n if (isDelegatedFactoryMetadata(meta)) {\n // This type is created with a delegated factory. If a type parameter is not specified, call\n // the factory instead.\n const delegateArgs = injectDependencies(meta.delegateDeps, meta.target);\n // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.\n const factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ? InstantiateExpr : InvokeFunctionExpr)(meta.delegate, delegateArgs);\n retExpr = makeConditionalFactory(factoryExpr);\n } else if (isExpressionFactoryMetadata(meta)) {\n // TODO(alxhub): decide whether to lower the value here or in the caller\n retExpr = makeConditionalFactory(meta.expression);\n } else {\n retExpr = ctorExpr;\n }\n if (retExpr === null) {\n // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.\n body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());\n } else if (baseFactoryVar !== null) {\n // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.\n const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.type.value]);\n // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`\n const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));\n body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));\n } else {\n // This is straightforward factory, just return it.\n body.push(new ReturnStatement(retExpr));\n }\n let factoryFn = fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, `${meta.name}_Factory`);\n if (baseFactoryVar !== null) {\n // There is a base factory variable so wrap its declaration along with the factory function into\n // an IIFE.\n factoryFn = fn([], [new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)]).callFn([], /* sourceSpan */undefined, /* pure */true);\n }\n return {\n expression: factoryFn,\n statements: [],\n type: createFactoryType(meta)\n };\n}\nfunction createFactoryType(meta) {\n const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;\n return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));\n}\nfunction injectDependencies(deps, target) {\n return deps.map((dep, index) => compileInjectDependency(dep, target, index));\n}\nfunction compileInjectDependency(dep, target, index) {\n // Interpret the dependency according to its resolved type.\n if (dep.token === null) {\n return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);\n } else if (dep.attributeNameType === null) {\n // Build up the injection flags according to the metadata.\n const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) | (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) | (dep.optional ? 8 /* InjectFlags.Optional */ : 0) | (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);\n // If this dependency is optional or otherwise has non-default flags, then additional\n // parameters describing how to inject the dependency must be passed to the inject function\n // that's being used.\n let flagsParam = flags !== 0 /* InjectFlags.Default */ || dep.optional ? literal(flags) : null;\n // Build up the arguments to the injectFn call.\n const injectArgs = [dep.token];\n if (flagsParam) {\n injectArgs.push(flagsParam);\n }\n const injectFn = getInjectFn(target);\n return importExpr(injectFn).callFn(injectArgs);\n } else {\n // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`\n // type dependency. For the generated JS we still want to use the `dep.token` value in case the\n // name given for the attribute is not a string literal. For example given `@Attribute(foo())`,\n // we want to generate `ɵɵinjectAttribute(foo())`.\n //\n // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate\n // typings.\n return importExpr(Identifiers.injectAttribute).callFn([dep.token]);\n }\n}\nfunction createCtorDepsType(deps) {\n let hasTypes = false;\n const attributeTypes = deps.map(dep => {\n const type = createCtorDepType(dep);\n if (type !== null) {\n hasTypes = true;\n return type;\n } else {\n return literal(null);\n }\n });\n if (hasTypes) {\n return expressionType(literalArr(attributeTypes));\n } else {\n return NONE_TYPE;\n }\n}\nfunction createCtorDepType(dep) {\n const entries = [];\n if (dep.attributeNameType !== null) {\n entries.push({\n key: 'attribute',\n value: dep.attributeNameType,\n quoted: false\n });\n }\n if (dep.optional) {\n entries.push({\n key: 'optional',\n value: literal(true),\n quoted: false\n });\n }\n if (dep.host) {\n entries.push({\n key: 'host',\n value: literal(true),\n quoted: false\n });\n }\n if (dep.self) {\n entries.push({\n key: 'self',\n value: literal(true),\n quoted: false\n });\n }\n if (dep.skipSelf) {\n entries.push({\n key: 'skipSelf',\n value: literal(true),\n quoted: false\n });\n }\n return entries.length > 0 ? literalMap(entries) : null;\n}\nfunction isDelegatedFactoryMetadata(meta) {\n return meta.delegateType !== undefined;\n}\nfunction isExpressionFactoryMetadata(meta) {\n return meta.expression !== undefined;\n}\nfunction getInjectFn(target) {\n switch (target) {\n case FactoryTarget$1.Component:\n case FactoryTarget$1.Directive:\n case FactoryTarget$1.Pipe:\n return Identifiers.directiveInject;\n case FactoryTarget$1.NgModule:\n case FactoryTarget$1.Injectable:\n default:\n return Identifiers.inject;\n }\n}\n\n/**\n * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently\n * require the implementation of a visitor for Comments as they are only collected at\n * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`\n * is true.\n */\nclass Comment$1 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(_visitor) {\n throw new Error('visit() not implemented for Comment');\n }\n}\nclass Text$3 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass BoundText {\n constructor(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitBoundText(this);\n }\n}\n/**\n * Represents a text attribute in the template.\n *\n * `valueSpan` may not be present in cases where there is no value `<div a></div>`.\n * `keySpan` may also not be present for synthetic attributes from ICU expansions.\n */\nclass TextAttribute {\n constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTextAttribute(this);\n }\n}\nclass BoundAttribute {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {\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.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n static fromBoundElementProperty(prop, i18n) {\n if (prop.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`);\n }\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);\n }\n visit(visitor) {\n return visitor.visitBoundAttribute(this);\n }\n}\nclass BoundEvent {\n constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.type = type;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n static fromParsedEvent(event) {\n const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;\n const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;\n if (event.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);\n }\n return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan);\n }\n visit(visitor) {\n return visitor.visitBoundEvent(this);\n }\n}\nclass Element$1 {\n constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitElement(this);\n }\n}\nclass DeferredTrigger {\n constructor(sourceSpan) {\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredTrigger(this);\n }\n}\nclass BoundDeferredTrigger extends DeferredTrigger {\n constructor(value, sourceSpan) {\n super(sourceSpan);\n this.value = value;\n }\n}\nclass IdleDeferredTrigger extends DeferredTrigger {}\nclass ImmediateDeferredTrigger extends DeferredTrigger {}\nclass HoverDeferredTrigger extends DeferredTrigger {}\nclass TimerDeferredTrigger extends DeferredTrigger {\n constructor(delay, sourceSpan) {\n super(sourceSpan);\n this.delay = delay;\n }\n}\nclass InteractionDeferredTrigger extends DeferredTrigger {\n constructor(reference, sourceSpan) {\n super(sourceSpan);\n this.reference = reference;\n }\n}\nclass ViewportDeferredTrigger extends DeferredTrigger {\n constructor(reference, sourceSpan) {\n super(sourceSpan);\n this.reference = reference;\n }\n}\nclass DeferredBlockPlaceholder {\n constructor(children, minimumTime, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.minimumTime = minimumTime;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockPlaceholder(this);\n }\n}\nclass DeferredBlockLoading {\n constructor(children, afterTime, minimumTime, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.afterTime = afterTime;\n this.minimumTime = minimumTime;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockLoading(this);\n }\n}\nclass DeferredBlockError {\n constructor(children, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockError(this);\n }\n}\nclass DeferredBlock {\n constructor(children, triggers, prefetchTriggers, placeholder, loading, error, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.triggers = triggers;\n this.prefetchTriggers = prefetchTriggers;\n this.placeholder = placeholder;\n this.loading = loading;\n this.error = error;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlock(this);\n }\n}\nclass Template {\n constructor(\n // tagName is the name of the container element, if applicable.\n // `null` is a special case for when there is a structural directive on an `ng-template` so\n // the renderer can differentiate between the synthetic template and the one written in the\n // file.\n tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.tagName = tagName;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.templateAttrs = templateAttrs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTemplate(this);\n }\n}\nclass Content {\n constructor(selector, attributes, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n this.name = 'ng-content';\n }\n visit(visitor) {\n return visitor.visitContent(this);\n }\n}\nclass Variable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitVariable(this);\n }\n}\nclass Reference {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitReference(this);\n }\n}\nclass Icu$1 {\n constructor(vars, placeholders, sourceSpan, i18n) {\n this.vars = vars;\n this.placeholders = placeholders;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIcu(this);\n }\n}\nclass RecursiveVisitor$1 {\n visitElement(element) {\n visitAll$1(this, element.attributes);\n visitAll$1(this, element.inputs);\n visitAll$1(this, element.outputs);\n visitAll$1(this, element.children);\n visitAll$1(this, element.references);\n }\n visitTemplate(template) {\n visitAll$1(this, template.attributes);\n visitAll$1(this, template.inputs);\n visitAll$1(this, template.outputs);\n visitAll$1(this, template.children);\n visitAll$1(this, template.references);\n visitAll$1(this, template.variables);\n }\n visitDeferredBlock(deferred) {\n visitAll$1(this, deferred.triggers);\n visitAll$1(this, deferred.prefetchTriggers);\n visitAll$1(this, deferred.children);\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n visitAll$1(this, block.children);\n }\n visitDeferredBlockError(block) {\n visitAll$1(this, block.children);\n }\n visitDeferredBlockLoading(block) {\n visitAll$1(this, block.children);\n }\n visitContent(content) {}\n visitVariable(variable) {}\n visitReference(reference) {}\n visitTextAttribute(attribute) {}\n visitBoundAttribute(attribute) {}\n visitBoundEvent(attribute) {}\n visitText(text) {}\n visitBoundText(text) {}\n visitIcu(icu) {}\n visitDeferredTrigger(trigger) {}\n}\nfunction visitAll$1(visitor, nodes) {\n const result = [];\n if (visitor.visit) {\n for (const node of nodes) {\n visitor.visit(node) || node.visit(visitor);\n }\n } else {\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n return result;\n}\nclass Message {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content and their source spans\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param customId\n */\n constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.customId = customId;\n /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */\n this.legacyIds = [];\n this.id = this.customId;\n this.messageString = serializeMessage(this.nodes);\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 } else {\n this.sources = [];\n }\n }\n}\nclass Text$2 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\n// TODO(vicb): do we really need this node (vs an array) ?\nclass Container {\n constructor(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitContainer(this, context);\n }\n}\nclass Icu {\n constructor(expression, type, cases, sourceSpan, expressionPlaceholder) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n this.expressionPlaceholder = expressionPlaceholder;\n }\n visit(visitor, context) {\n return visitor.visitIcu(this, context);\n }\n}\nclass TagPlaceholder {\n constructor(tag, attrs, startName, closeName, children, isVoid,\n // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)\n sourceSpan, startSourceSpan, endSourceSpan) {\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 this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitTagPlaceholder(this, context);\n }\n}\nclass Placeholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitPlaceholder(this, context);\n }\n}\nclass IcuPlaceholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcuPlaceholder(this, context);\n }\n}\n// Clone the AST\nclass CloneVisitor {\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitContainer(container, context) {\n const children = container.children.map(n => n.visit(this, context));\n return new Container(children, container.sourceSpan);\n }\n visitIcu(icu, context) {\n const cases = {};\n Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context));\n const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan, icu.expressionPlaceholder);\n return msg;\n }\n visitTagPlaceholder(ph, context) {\n const children = ph.children.map(n => n.visit(this, context));\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n }\n}\n// Visit all the nodes recursively\nclass RecurseVisitor {\n visitText(text, context) {}\n visitContainer(container, context) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu, context) {\n Object.keys(icu.cases).forEach(k => {\n icu.cases[k].visit(this);\n });\n }\n visitTagPlaceholder(ph, context) {\n ph.children.forEach(child => child.visit(this));\n }\n visitPlaceholder(ph, context) {}\n visitIcuPlaceholder(ph, context) {}\n}\n/**\n * Serialize the message to the Localize backtick string format that would appear in compiled code.\n */\nfunction serializeMessage(messageNodes) {\n const visitor = new LocalizeMessageStringVisitor();\n const str = messageNodes.map(n => n.visit(visitor)).join('');\n return str;\n}\nclass LocalizeMessageStringVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n }\n visitTagPlaceholder(ph) {\n const children = ph.children.map(child => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\n }\n visitPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n visitIcuPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n}\nclass Serializer {\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n createNameMapper(message) {\n return null;\n }\n}\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nclass SimplePlaceholderMapper extends RecurseVisitor {\n // create a mapping from the message\n constructor(message, mapName) {\n super();\n this.mapName = mapName;\n this.internalToPublic = {};\n this.publicToNextId = {};\n this.publicToInternal = {};\n message.nodes.forEach(node => node.visit(this));\n }\n toPublicName(internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ? this.internalToPublic[internalName] : null;\n }\n toInternalName(publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] : null;\n }\n visitText(text, context) {\n return null;\n }\n visitTagPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitTagPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\n }\n visitPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n // XMB placeholders could only contains A-Z, 0-9 and _\n visitPlaceholderName(internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n let publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n const nextId = this.publicToNextId[publicName];\n this.publicToNextId[publicName] = nextId + 1;\n publicName = `${publicName}_${nextId}`;\n } else {\n this.publicToNextId[publicName] = 1;\n }\n this.internalToPublic[internalName] = publicName;\n this.publicToInternal[publicName] = internalName;\n }\n}\nclass _Visitor$2 {\n visitTag(tag) {\n const strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return `<${tag.name}${strAttrs}/>`;\n }\n const strChildren = tag.children.map(node => node.visit(this));\n return `<${tag.name}${strAttrs}>${strChildren.join('')}</${tag.name}>`;\n }\n visitText(text) {\n return text.value;\n }\n visitDeclaration(decl) {\n return `<?xml${this._serializeAttributes(decl.attrs)} ?>`;\n }\n _serializeAttributes(attrs) {\n const strAttrs = Object.keys(attrs).map(name => `${name}=\"${attrs[name]}\"`).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n }\n visitDoctype(doctype) {\n return `<!DOCTYPE ${doctype.rootTag} [\\n${doctype.dtd}\\n]>`;\n }\n}\nconst _visitor = new _Visitor$2();\nfunction serialize(nodes) {\n return nodes.map(node => node.visit(_visitor)).join('');\n}\nclass Declaration {\n constructor(unescapedAttrs) {\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(k => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitDeclaration(this);\n }\n}\nclass Doctype {\n constructor(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n visit(visitor) {\n return visitor.visitDoctype(this);\n }\n}\nclass Tag {\n constructor(name, unescapedAttrs = {}, children = []) {\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(k => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitTag(this);\n }\n}\nclass Text$1 {\n constructor(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass CR extends Text$1 {\n constructor(ws = 0) {\n super(`\\n${new Array(ws + 1).join(' ')}`);\n }\n}\nconst _ESCAPED_CHARS = [[/&/g, '&amp;'], [/\"/g, '&quot;'], [/'/g, '&apos;'], [/</g, '&lt;'], [/>/g, '&gt;']];\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nfunction escapeXml(text) {\n return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text);\n}\nconst _MESSAGES_TAG = 'messagebundle';\nconst _MESSAGE_TAG = 'msg';\nconst _PLACEHOLDER_TAG$3 = 'ph';\nconst _EXAMPLE_TAG = 'ex';\nconst _SOURCE_TAG$2 = 'source';\nconst _DOCTYPE = `<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>`;\nclass Xmb extends Serializer {\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n let rootNode = new Tag(_MESSAGES_TAG);\n messages.forEach(message => {\n const attrs = {\n id: message.id\n };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n let sourceTags = [];\n message.sources.forEach(source => {\n sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)]));\n });\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));\n });\n rootNode.children.push(new CR());\n return serialize([new Declaration({\n version: '1.0',\n encoding: 'UTF-8'\n }), new CR(), new Doctype(_MESSAGES_TAG, _DOCTYPE), new CR(), exampleVisitor.addDefaultExamples(rootNode), new CR()]);\n }\n load(content, url) {\n throw new Error('Unsupported');\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nclass _Visitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach(node => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach(c => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const startTagAsText = new Text$1(`<${ph.tag}>`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const startTagPh = new Tag(_PLACEHOLDER_TAG$3, {\n name: ph.startName\n }, [startEx, startTagAsText]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n const closeTagAsText = new Text$1(`</${ph.tag}>`);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, {\n name: ph.closeName\n }, [closeEx, closeTagAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n const interpolationAsText = new Text$1(`{{${ph.value}}}`);\n // Example tag needs to be not-empty for TC.\n const exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, {\n name: ph.name\n }, [exTag, interpolationAsText])];\n }\n visitIcuPlaceholder(ph, context) {\n const icuExpression = ph.value.expression;\n const icuType = ph.value.type;\n const icuCases = Object.keys(ph.value.cases).map(value => value + ' {...}').join(' ');\n const icuAsText = new Text$1(`{${icuExpression}, ${icuType}, ${icuCases}}`);\n const exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, {\n name: ph.name\n }, [exTag, icuAsText])];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\nfunction digest(message) {\n return decimalDigest(message);\n}\n// TC requires at least one non-empty example on placeholders\nclass ExampleVisitor {\n addDefaultExamples(node) {\n node.visit(this);\n return node;\n }\n visitTag(tag) {\n if (tag.name === _PLACEHOLDER_TAG$3) {\n if (!tag.children || tag.children.length == 0) {\n const exText = new Text$1(tag.attrs['name'] || '...');\n tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];\n }\n } else if (tag.children) {\n tag.children.forEach(node => node.visit(this));\n }\n }\n visitText(text) {}\n visitDeclaration(decl) {}\n visitDoctype(doctype) {}\n}\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nfunction toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\n/**\n * Prefix for non-`goog.getMsg` i18n-related vars.\n * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that\n * considers variables like `I18N_0` as constants and throws an error when their value changes.\n */\nconst TRANSLATION_VAR_PREFIX = 'i18n_';\n/** Name of the i18n attributes **/\nconst I18N_ATTR = 'i18n';\nconst I18N_ATTR_PREFIX = 'i18n-';\n/** Prefix of var expressions used in ICUs */\nconst I18N_ICU_VAR_PREFIX = 'VAR_';\n/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/** Placeholder wrapper for i18n expressions **/\nconst I18N_PLACEHOLDER_SYMBOL = '<27>';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction isI18nRootNode(meta) {\n return meta instanceof Message;\n}\nfunction isSingleI18nIcu(meta) {\n return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu;\n}\nfunction hasI18nMeta(node) {\n return !!node.i18n;\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some(attr => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\n}\nfunction wrapI18nPlaceholder(content, contextId = 0) {\n const blockId = contextId > 0 ? `:${contextId}` : '';\n return `${I18N_PLACEHOLDER_SYMBOL}${content}${blockId}${I18N_PLACEHOLDER_SYMBOL}`;\n}\nfunction assembleI18nBoundString(strings, bindingStartIndex = 0, contextId = 0) {\n if (!strings.length) return '';\n let acc = '';\n const lastIdx = strings.length - 1;\n for (let i = 0; i < lastIdx; i++) {\n acc += `${strings[i]}${wrapI18nPlaceholder(bindingStartIndex + i, contextId)}`;\n }\n acc += strings[lastIdx];\n return acc;\n}\nfunction getSeqNumberGenerator(startsAt = 0) {\n let current = startsAt;\n return () => current++;\n}\nfunction placeholdersToParams(placeholders) {\n const params = {};\n placeholders.forEach((values, key) => {\n params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);\n });\n return params;\n}\nfunction updatePlaceholderMap(map, name, ...values) {\n const current = map.get(name) || [];\n current.push(...values);\n map.set(name, current);\n}\nfunction assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId = 0) {\n const startIdx = bindingStartIndex;\n const placeholders = new Map();\n const node = meta instanceof Message ? meta.nodes.find(node => node instanceof Container) : meta;\n if (node) {\n node.children.filter(child => child instanceof Placeholder).forEach((child, idx) => {\n const content = wrapI18nPlaceholder(startIdx + idx, contextId);\n updatePlaceholderMap(placeholders, child.name, content);\n });\n }\n return placeholders;\n}\n/**\n * Format the placeholder names in a map of placeholders to expressions.\n *\n * The placeholder names are converted from \"internal\" format (e.g. `START_TAG_DIV_1`) to \"external\"\n * format (e.g. `startTagDiv_1`).\n *\n * @param params A map of placeholder names to expressions.\n * @param useCamelCase whether to camelCase the placeholder name when formatting.\n * @returns A new map of formatted placeholder names to expressions.\n */\nfunction formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {\n const _params = {};\n if (params && Object.keys(params).length) {\n Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);\n }\n return _params;\n}\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\nfunction formatI18nPlaceholderName(name, useCamelCase = true) {\n const publicName = toPublicName(name);\n if (!useCamelCase) {\n return publicName;\n }\n const chunks = publicName.split('_');\n if (chunks.length === 1) {\n // if no \"_\" found - just lowercase the value\n return name.toLowerCase();\n }\n let postfix;\n // eject last element if it's a number\n if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n postfix = chunks.pop();\n }\n let raw = chunks.shift().toLowerCase();\n if (chunks.length) {\n raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join('');\n }\n return postfix ? `${raw}_${postfix}` : raw;\n}\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\nfunction getTranslationConstPrefix(extra) {\n return `${CLOSURE_TRANSLATION_VAR_PREFIX}${extra}`.toUpperCase();\n}\n/**\n * Generate AST to declare a variable. E.g. `var I18N_1;`.\n * @param variable the name of the variable to declare.\n */\nfunction declareI18nVariable(variable) {\n return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);\n}\n\n/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\nconst UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n/** Name of the temporary to use during data binding */\nconst TEMPORARY_NAME = '_t';\n/** Name of the context parameter passed into a template function */\nconst CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\nconst RENDER_FLAGS = 'rf';\n/** The prefix reference variables */\nconst REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\nconst IMPLICIT_REFERENCE = '$implicit';\n/** Non bindable attribute name **/\nconst NON_BINDABLE_ATTR = 'ngNonBindable';\n/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */\nconst RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';\n/**\n * Maximum length of a single instruction chain. Because our output AST uses recursion, we're\n * limited in how many expressions we can nest before we reach the call stack limit. This\n * length is set very conservatively in order to reduce the chance of problems.\n */\nconst MAX_CHAIN_LENGTH = 500;\n/** Instructions that support chaining. */\nconst CHAINABLE_INSTRUCTIONS = new Set([Identifiers.element, Identifiers.elementStart, Identifiers.elementEnd, Identifiers.elementContainer, Identifiers.elementContainerStart, Identifiers.elementContainerEnd, Identifiers.i18nExp, Identifiers.listener, Identifiers.classProp, Identifiers.syntheticHostListener, Identifiers.hostProperty, Identifiers.syntheticHostProperty, Identifiers.property, Identifiers.propertyInterpolate1, Identifiers.propertyInterpolate2, Identifiers.propertyInterpolate3, Identifiers.propertyInterpolate4, Identifiers.propertyInterpolate5, Identifiers.propertyInterpolate6, Identifiers.propertyInterpolate7, Identifiers.propertyInterpolate8, Identifiers.propertyInterpolateV, Identifiers.attribute, Identifiers.attributeInterpolate1, Identifiers.attributeInterpolate2, Identifiers.attributeInterpolate3, Identifiers.attributeInterpolate4, Identifiers.attributeInterpolate5, Identifiers.attributeInterpolate6, Identifiers.attributeInterpolate7, Identifiers.attributeInterpolate8, Identifiers.attributeInterpolateV, Identifiers.styleProp, Identifiers.stylePropInterpolate1, Identifiers.stylePropInterpolate2, Identifiers.stylePropInterpolate3, Identifiers.stylePropInterpolate4, Identifiers.stylePropInterpolate5, Identifiers.stylePropInterpolate6, Identifiers.stylePropInterpolate7, Identifiers.stylePropInterpolate8, Identifiers.stylePropInterpolateV, Identifiers.textInterpolate, Identifiers.textInterpolate1, Identifiers.textInterpolate2, Identifiers.textInterpolate3, Identifiers.textInterpolate4, Identifiers.textInterpolate5, Identifiers.textInterpolate6, Identifiers.textInterpolate7, Identifiers.textInterpolate8, Identifiers.textInterpolateV]);\n/** Generates a call to a single instruction. */\nfunction invokeInstruction(span, reference, params) {\n return importExpr(reference, null, span).callFn(params, span);\n}\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nfunction temporaryAllocator(statements, name) {\n let temp = null;\n return () => {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n return temp;\n };\n}\nfunction invalid(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {\n const keys = Object.getOwnPropertyNames(map);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map(key => {\n const value = map[key];\n let declaredName;\n let publicName;\n let minifiedName;\n let expressionValue;\n if (typeof value === 'string') {\n // canonical syntax: `dirProp: publicProp`\n declaredName = key;\n minifiedName = key;\n publicName = value;\n expressionValue = asLiteral(publicName);\n } else {\n minifiedName = key;\n declaredName = value.classPropertyName;\n publicName = value.bindingPropertyName;\n if (keepDeclared && (publicName !== declaredName || value.transformFunction != null)) {\n const expressionKeys = [asLiteral(publicName), asLiteral(declaredName)];\n if (value.transformFunction != null) {\n expressionKeys.push(value.transformFunction);\n }\n expressionValue = literalArr(expressionKeys);\n } else {\n expressionValue = asLiteral(publicName);\n }\n }\n return {\n key: minifiedName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n value: expressionValue\n };\n }));\n}\n/**\n * Remove trailing null nodes as they are implied.\n */\nfunction trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n return parameters;\n}\nfunction getQueryPredicate(query, constantPool) {\n if (Array.isArray(query.predicate)) {\n let predicate = [];\n query.predicate.forEach(selector => {\n // Each item in predicates array may contain strings with comma-separated refs\n // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n // as separate array entities\n const selectors = selector.split(',').map(token => literal(token.trim()));\n predicate.push(...selectors);\n });\n return constantPool.getConstLiteral(literalArr(predicate), true);\n } else {\n // The original predicate may have been wrapped in a `forwardRef()` call.\n switch (query.predicate.forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 2 /* ForwardRefHandling.Unwrapped */:\n return query.predicate.expression;\n case 1 /* ForwardRefHandling.Wrapped */:\n return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);\n }\n }\n}\n/**\n * A representation for an object literal used during codegen of definition objects. The generic\n * type `T` allows to reference a documented type of the generated structure, such that the\n * property names that are set can be resolved to their documented declaration.\n */\nclass DefinitionMap {\n constructor() {\n this.values = [];\n }\n set(key, value) {\n if (value) {\n this.values.push({\n key: key,\n value,\n quoted: false\n });\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\nfunction getAttrsForDirectiveMatching(elOrTpl) {\n const attributesMap = {};\n if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {\n elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = '');\n } else {\n elOrTpl.attributes.forEach(a => {\n if (!isI18nAttribute(a.name)) {\n attributesMap[a.name] = a.value;\n }\n });\n elOrTpl.inputs.forEach(i => {\n if (i.type === 0 /* BindingType.Property */) {\n attributesMap[i.name] = '';\n }\n });\n elOrTpl.outputs.forEach(o => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\n}\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\nfunction getInterpolationArgsLength(interpolation) {\n const {\n expressions,\n strings\n } = interpolation;\n if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n // `textInterpolate`.\n return 1;\n } else {\n return expressions.length + strings.length;\n }\n}\n/**\n * Generates the final instruction call statements based on the passed in configuration.\n * Will try to chain instructions as much as possible, if chaining is supported.\n */\nfunction getInstructionStatements(instructions) {\n const statements = [];\n let pendingExpression = null;\n let pendingExpressionType = null;\n let chainLength = 0;\n for (const current of instructions) {\n const resolvedParams = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn) ?? [];\n const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];\n // If the current instruction is the same as the previous one\n // and it can be chained, add another call to the chain.\n if (chainLength < MAX_CHAIN_LENGTH && pendingExpressionType === current.reference && CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {\n // We'll always have a pending expression when there's a pending expression type.\n pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);\n chainLength++;\n } else {\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n pendingExpression = invokeInstruction(current.span, current.reference, params);\n pendingExpressionType = current.reference;\n chainLength = 0;\n }\n }\n // Since the current instruction adds the previous one to the statements,\n // we may be left with the final one at the end that is still pending.\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n return statements;\n}\nfunction compileInjectable(meta, resolveForwardRefs) {\n let result = null;\n const factoryMeta = {\n name: meta.name,\n type: meta.type,\n typeArgumentCount: meta.typeArgumentCount,\n deps: [],\n target: FactoryTarget$1.Injectable\n };\n if (meta.useClass !== undefined) {\n // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n // used to instantiate the class with dependencies injected, or deps are not specified and\n // the factory of the class is used to instantiate it.\n //\n // A special case exists for useClass: Type where Type is the injectable type itself and no\n // deps are specified, in which case 'useClass' is effectively ignored.\n const useClassOnSelf = meta.useClass.expression.isEquivalent(meta.type.value);\n let deps = undefined;\n if (meta.deps !== undefined) {\n deps = meta.deps;\n }\n if (deps !== undefined) {\n // factory: () => new meta.useClass(...deps)\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useClass.expression,\n delegateDeps: deps,\n delegateType: R3FactoryDelegateType.Class\n });\n } else if (useClassOnSelf) {\n result = compileFactoryFunction(factoryMeta);\n } else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs)\n };\n }\n } else if (meta.useFactory !== undefined) {\n if (meta.deps !== undefined) {\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useFactory,\n delegateDeps: meta.deps || [],\n delegateType: R3FactoryDelegateType.Function\n });\n } else {\n result = {\n statements: [],\n expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])\n };\n }\n } else if (meta.useValue !== undefined) {\n // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n // client code because meta.useValue is an Expression which will be defined even if the actual\n // value is undefined.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: meta.useValue.expression\n });\n } else if (meta.useExisting !== undefined) {\n // useExisting is an `inject` call on the existing token.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression])\n });\n } else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.type.value, resolveForwardRefs)\n };\n }\n const token = meta.type.value;\n const injectableProps = new DefinitionMap();\n injectableProps.set('token', token);\n injectableProps.set('factory', result.expression);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn.expression.value !== null) {\n injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));\n }\n const expression = importExpr(Identifiers.ɵɵdefineInjectable).callFn([injectableProps.toLiteralMap()], undefined, true);\n return {\n expression,\n type: createInjectableType(meta),\n statements: result.statements\n };\n}\nfunction createInjectableType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));\n}\nfunction delegateToFactory(type, useType, unwrapForwardRefs) {\n if (type.node === useType.node) {\n // The types are the same, so we can simply delegate directly to the type's factory.\n // ```\n // factory: type.ɵfac\n // ```\n return useType.prop('ɵfac');\n }\n if (!unwrapForwardRefs) {\n // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that\n // accepts a sub-type as an argument.\n // ```\n // factory: function(t) { return useType.ɵfac(t); }\n // ```\n return createFactoryFunction(useType);\n }\n // The useType is actually wrapped in a `forwardRef()` so we need to resolve that before\n // calling its factory.\n // ```\n // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }\n // ```\n const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([useType]);\n return createFactoryFunction(unwrappedType);\n}\nfunction createFactoryFunction(type) {\n return fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(type.prop('ɵfac').callFn([variable('t')]))]);\n}\nconst UNUSABLE_INTERPOLATION_REGEXPS = [/^\\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\\/\\// // comment\n];\nfunction 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 } else if (value != null) {\n const start = value[0];\n const end = value[1];\n // Check for unusable interpolation symbols\n UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {\n if (regexp.test(start) || regexp.test(end)) {\n throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);\n }\n });\n }\n}\nclass InterpolationConfig {\n static fromArray(markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n }\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nconst DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\nconst $EOF = 0;\nconst $BSPACE = 8;\nconst $TAB = 9;\nconst $LF = 10;\nconst $VTAB = 11;\nconst $FF = 12;\nconst $CR = 13;\nconst $SPACE = 32;\nconst $BANG = 33;\nconst $DQ = 34;\nconst $HASH = 35;\nconst $$ = 36;\nconst $PERCENT = 37;\nconst $AMPERSAND = 38;\nconst $SQ = 39;\nconst $LPAREN = 40;\nconst $RPAREN = 41;\nconst $STAR = 42;\nconst $PLUS = 43;\nconst $COMMA = 44;\nconst $MINUS = 45;\nconst $PERIOD = 46;\nconst $SLASH = 47;\nconst $COLON = 58;\nconst $SEMICOLON = 59;\nconst $LT = 60;\nconst $EQ = 61;\nconst $GT = 62;\nconst $QUESTION = 63;\nconst $0 = 48;\nconst $7 = 55;\nconst $9 = 57;\nconst $A = 65;\nconst $E = 69;\nconst $F = 70;\nconst $X = 88;\nconst $Z = 90;\nconst $LBRACKET = 91;\nconst $BACKSLASH = 92;\nconst $RBRACKET = 93;\nconst $CARET = 94;\nconst $_ = 95;\nconst $a = 97;\nconst $b = 98;\nconst $e = 101;\nconst $f = 102;\nconst $n = 110;\nconst $r = 114;\nconst $t = 116;\nconst $u = 117;\nconst $v = 118;\nconst $x = 120;\nconst $z = 122;\nconst $LBRACE = 123;\nconst $BAR = 124;\nconst $RBRACE = 125;\nconst $NBSP = 160;\nconst $PIPE = 124;\nconst $TILDA = 126;\nconst $AT = 64;\nconst $BT = 96;\nfunction isWhitespace(code) {\n return code >= $TAB && code <= $SPACE || code == $NBSP;\n}\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\nfunction isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\nfunction isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\nfunction isNewLine(code) {\n return code === $LF || code === $CR;\n}\nfunction isOctalDigit(code) {\n return $0 <= code && code <= $7;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\nclass ParseLocation {\n constructor(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n toString() {\n return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;\n }\n moveBy(delta) {\n const source = this.file.content;\n const len = source.length;\n let offset = this.offset;\n let line = this.line;\n let col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n const ch = source.charCodeAt(offset);\n if (ch == $LF) {\n line--;\n const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n } else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n const ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == $LF) {\n line++;\n col = 0;\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 getContext(maxChars, maxLines) {\n const content = this.file.content;\n let startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n let endOffset = startOffset;\n let ctxChars = 0;\n let 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}\nclass ParseSourceFile {\n constructor(content, url) {\n this.content = content;\n this.url = url;\n }\n}\nclass ParseSourceSpan {\n /**\n * Create an object that holds information about spans of tokens/nodes captured during\n * lexing/parsing of text.\n *\n * @param start\n * The location of the start of the span (having skipped leading trivia).\n * Skipping leading trivia makes source-spans more \"user friendly\", since things like HTML\n * elements will appear to begin at the start of the opening tag, rather than at the start of any\n * leading trivia, which could include newlines.\n *\n * @param end\n * The location of the end of the span.\n *\n * @param fullStart\n * The start of the token without skipping the leading trivia.\n * This is used by tooling that splits tokens further, such as extracting Angular interpolations\n * from text tokens. Such tooling creates new source-spans relative to the original token's\n * source-span. If leading trivia characters have been skipped then the new source-spans may be\n * incorrectly offset.\n *\n * @param details\n * Additional information (such as identifier names) that should be associated with the span.\n */\n constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }\n toString() {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n }\n}\nvar ParseErrorLevel;\n(function (ParseErrorLevel) {\n ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n})(ParseErrorLevel || (ParseErrorLevel = {}));\nclass ParseError {\n constructor(span, msg, level = ParseErrorLevel.ERROR) {\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n contextualMessage() {\n const ctx = this.span.start.getContext(100, 3);\n return ctx ? `${this.msg} (\"${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}\")` : this.msg;\n }\n toString() {\n const details = this.span.details ? `, ${this.span.details}` : '';\n return `${this.contextualMessage()}: ${this.span.start}${details}`;\n }\n}\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\nfunction r3JitTypeSourceSpan(kind, typeName, sourceUrl) {\n const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`;\n const sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\nlet _anonymousTypeIndex = 0;\nfunction identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n const ref = compileIdentifier.reference;\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n if (ref['__forward_ref__']) {\n // We do not want to try to stringify a `forwardRef()` function because that would cause the\n // inner function to be evaluated too early, defeating the whole point of the `forwardRef`.\n return '__forward_ref__';\n }\n let identifier = stringify(ref);\n if (identifier.indexOf('(') >= 0) {\n // case: anonymous functions!\n identifier = `anonymous_${_anonymousTypeIndex++}`;\n ref['__anonymousType'] = identifier;\n } else {\n identifier = sanitizeIdentifier(identifier);\n }\n return identifier;\n}\nfunction sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\n\n/**\n * In TypeScript, tagged template functions expect a \"template object\", which is an array of\n * \"cooked\" strings plus a `raw` property that contains an array of \"raw\" strings. This is\n * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not\n * be available in all environments.\n *\n * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise\n * creates an inline helper with the same functionality.\n *\n * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw`\n * array.\n */\nconst makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e})';\nclass AbstractJsEmitterVisitor extends AbstractEmitterVisitor {\n constructor() {\n super(false);\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n }\n visitDeclareVarStmt(stmt, ctx) {\n ctx.print(stmt, `var ${stmt.name}`);\n if (stmt.value) {\n ctx.print(stmt, ' = ');\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, `;`);\n return null;\n }\n visitTaggedTemplateExpr(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // tag`...`\n // ```\n // which is effectively like:\n // ```\n // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n const elements = ast.template.elements;\n ast.tag.visitExpression(this, ctx);\n ctx.print(ast, `(${makeTemplateObjectPolyfill}(`);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.text, false)).join(', ')}], `);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.rawText, false)).join(', ')}])`);\n ast.template.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n visitFunctionExpr(ast, ctx) {\n ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);\n this._visitParams(ast.params, ctx);\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 visitDeclareFunctionStmt(stmt, ctx) {\n ctx.print(stmt, `function ${stmt.name}(`);\n this._visitParams(stmt.params, ctx);\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 visitLocalizedString(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // $localize `...`\n // ```\n // which is effectively like:\n // ```\n // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n ctx.print(ast, `$localize(${makeTemplateObjectPolyfill}(`);\n const parts = [ast.serializeI18nHead()];\n for (let i = 1; i < ast.messageParts.length; i++) {\n parts.push(ast.serializeI18nTemplatePart(i));\n }\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.cooked, false)).join(', ')}], `);\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.raw, false)).join(', ')}])`);\n ast.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n _visitParams(params, ctx) {\n this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ',');\n }\n}\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy within the JIT\n * compiler. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy = _global.trustedTypes.createPolicy('angular#unsafe-jit', {\n createScript: s => s\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from the JIT compiler, as use in other code can lead to XSS\n * vulnerabilities.\n */\nfunction newTrustedFunctionForJIT(...args) {\n if (!_global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = _global['eval'](trustedScriptFromString(body));\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(_global);\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * A helper class to manage the evaluation of JIT generated code.\n */\nclass JitEvaluator {\n /**\n *\n * @param sourceUrl The URL of the generated code.\n * @param statements An array of Angular statement AST nodes to be evaluated.\n * @param refResolver Resolves `o.ExternalReference`s into values.\n * @param createSourceMaps If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns A map of all the variables in the generated code.\n */\n evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {\n const converter = new JitEmitterVisitor(refResolver);\n const ctx = EmitterVisitorContext.createRoot();\n // Ensure generated code is in strict mode\n if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n statements = [literal('use strict').toStmt(), ...statements];\n }\n converter.visitAllStatements(statements, ctx);\n converter.createReturnStmt(ctx);\n return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n }\n /**\n * Evaluate a piece of JIT generated code.\n * @param sourceUrl The URL of this generated code.\n * @param ctx A context object that contains an AST of the code to be evaluated.\n * @param vars A map containing the names and values of variables that the evaluated code might\n * reference.\n * @param createSourceMap If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns The result of evaluating the code.\n */\n evaluateCode(sourceUrl, ctx, vars, createSourceMap) {\n let fnBody = `\"use strict\";${ctx.toSource()}\\n//# sourceURL=${sourceUrl}`;\n const fnArgNames = [];\n const fnArgValues = [];\n for (const argName in vars) {\n fnArgValues.push(vars[argName]);\n fnArgNames.push(argName);\n }\n if (createSourceMap) {\n // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n // E.g. ```\n // function anonymous(a,b,c\n // /**/) { ... }```\n // We don't want to hard code this fact, so we auto detect it via an empty function first.\n const emptyFn = newTrustedFunctionForJIT(...fnArgNames.concat('return null;')).toString();\n const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n fnBody += `\\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`;\n }\n const fn = newTrustedFunctionForJIT(...fnArgNames.concat(fnBody));\n return this.executeFunction(fn, fnArgValues);\n }\n /**\n * Execute a JIT generated function by calling it.\n *\n * This method can be overridden in tests to capture the functions that are generated\n * by this `JitEvaluator` class.\n *\n * @param fn A function to execute.\n * @param args The arguments to pass to the function being executed.\n * @returns The return value of the executed function.\n */\n executeFunction(fn, args) {\n return fn(...args);\n }\n}\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\nclass JitEmitterVisitor extends AbstractJsEmitterVisitor {\n constructor(refResolver) {\n super();\n this.refResolver = refResolver;\n this._evalArgNames = [];\n this._evalArgValues = [];\n this._evalExportedVars = [];\n }\n createReturnStmt(ctx) {\n const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false))));\n stmt.visitStatement(this, ctx);\n }\n getArgs() {\n const result = {};\n for (let i = 0; i < this._evalArgNames.length; i++) {\n result[this._evalArgNames[i]] = this._evalArgValues[i];\n }\n return result;\n }\n visitExternalExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, this.refResolver.resolveExternalReference(ast.value), ctx);\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, ast.node, ctx);\n return null;\n }\n visitDeclareVarStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareVarStmt(stmt, ctx);\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareFunctionStmt(stmt, ctx);\n }\n _emitReferenceToExternal(ast, value, ctx) {\n let id = this._evalArgValues.indexOf(value);\n if (id === -1) {\n id = this._evalArgValues.length;\n this._evalArgValues.push(value);\n const name = identifierName({\n reference: value\n }) || 'val';\n this._evalArgNames.push(`jit_${name}_${id}`);\n }\n ctx.print(ast, this._evalArgNames[id]);\n }\n}\nfunction isUseStrictStatement(statement) {\n return statement.isEquivalent(literal('use strict').toStmt());\n}\nfunction compileInjector(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.providers !== null) {\n definitionMap.set('providers', meta.providers);\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createInjectorType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\nfunction createInjectorType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));\n}\n\n/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nclass R3JitReflector {\n constructor(context) {\n this.context = context;\n }\n resolveExternalReference(ref) {\n // This reflector only handles @angular/core imports.\n if (ref.moduleName !== '@angular/core') {\n throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);\n }\n if (!this.context.hasOwnProperty(ref.name)) {\n throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`);\n }\n return this.context[ref.name];\n }\n}\n\n/**\n * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted\n * as a part of the NgModule definition.\n */\nvar R3SelectorScopeMode;\n(function (R3SelectorScopeMode) {\n /**\n * Emit the declarations inline into the module definition.\n *\n * This option is useful in certain contexts where it's known that JIT support is required. The\n * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if\n * they are unused, but the NgModule is used.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Inline\"] = 0] = \"Inline\";\n /**\n * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is\n * guarded with the `ngJitMode` flag.\n *\n * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to\n * false, which allows unused directives and pipes to be tree-shaken.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"SideEffect\"] = 1] = \"SideEffect\";\n /**\n * Don't generate selector scopes at all.\n *\n * This is useful for contexts where JIT support is known to be unnecessary.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Omit\"] = 2] = \"Omit\";\n})(R3SelectorScopeMode || (R3SelectorScopeMode = {}));\n/**\n * The type of the NgModule meta data.\n * - Global: Used for full and partial compilation modes which mainly includes R3References.\n * - Local: Used for the local compilation mode which mainly includes the raw expressions as appears\n * in the NgModule decorator.\n */\nvar R3NgModuleMetadataKind;\n(function (R3NgModuleMetadataKind) {\n R3NgModuleMetadataKind[R3NgModuleMetadataKind[\"Global\"] = 0] = \"Global\";\n R3NgModuleMetadataKind[R3NgModuleMetadataKind[\"Local\"] = 1] = \"Local\";\n})(R3NgModuleMetadataKind || (R3NgModuleMetadataKind = {}));\n/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nfunction compileNgModule(meta) {\n const statements = [];\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', meta.type.value);\n // Assign bootstrap definition\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n }\n } else {\n if (meta.bootstrapExpression) {\n definitionMap.set('bootstrap', meta.bootstrapExpression);\n }\n }\n if (meta.selectorScopeMode === R3SelectorScopeMode.Inline) {\n // If requested to emit scope information inline, pass the `declarations`, `imports` and\n // `exports` to the `ɵɵdefineNgModule()` call directly.\n if (meta.declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n if (meta.exports.length > 0) {\n definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n } else if (meta.selectorScopeMode === R3SelectorScopeMode.SideEffect) {\n // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it\n // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's\n // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the\n // `ngJitMode` flag.\n const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n if (setNgModuleScopeCall !== null) {\n statements.push(setNgModuleScopeCall);\n }\n } else {\n // Selector scope emit was not requested, so skip it.\n }\n if (meta.schemas !== null && meta.schemas.length > 0) {\n definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));\n }\n if (meta.id !== null) {\n definitionMap.set('id', meta.id);\n // Generate a side-effectful call to register this NgModule by its id, as per the semantics of\n // NgModule ids.\n statements.push(importExpr(Identifiers.registerNgModuleType).callFn([meta.type.value, meta.id]).toStmt());\n }\n const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createNgModuleType(meta);\n return {\n expression,\n type,\n statements\n };\n}\n/**\n * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to\n * `ɵɵngDeclareNgModule()`.\n */\nfunction compileNgModuleDeclarationExpression(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', new WrappedNodeExpr(meta.type));\n if (meta.bootstrap !== undefined) {\n definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap));\n }\n if (meta.declarations !== undefined) {\n definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations));\n }\n if (meta.imports !== undefined) {\n definitionMap.set('imports', new WrappedNodeExpr(meta.imports));\n }\n if (meta.exports !== undefined) {\n definitionMap.set('exports', new WrappedNodeExpr(meta.exports));\n }\n if (meta.schemas !== undefined) {\n definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas));\n }\n if (meta.id !== undefined) {\n definitionMap.set('id', new WrappedNodeExpr(meta.id));\n }\n return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);\n}\nfunction createNgModuleType(meta) {\n if (meta.kind === R3NgModuleMetadataKind.Local) {\n return new ExpressionType(meta.type.value);\n }\n const {\n type: moduleType,\n declarations,\n exports,\n imports,\n includeImportTypes,\n publicDeclarationTypes\n } = meta;\n return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [new ExpressionType(moduleType.type), publicDeclarationTypes === null ? tupleTypeOf(declarations) : tupleOfTypes(publicDeclarationTypes), includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE, tupleTypeOf(exports)]));\n}\n/**\n * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\nfunction generateSetNgModuleScopeCall(meta) {\n const scopeMap = new DefinitionMap();\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.declarations.length > 0) {\n scopeMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n } else {\n if (meta.declarationsExpression) {\n scopeMap.set('declarations', meta.declarationsExpression);\n }\n }\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.imports.length > 0) {\n scopeMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n } else {\n if (meta.importsExpression) {\n scopeMap.set('imports', meta.importsExpression);\n }\n }\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.exports.length > 0) {\n scopeMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n } else {\n if (meta.exportsExpression) {\n scopeMap.set('exports', meta.exportsExpression);\n }\n }\n if (Object.keys(scopeMap.values).length === 0) {\n return null;\n }\n // setNgModuleScope(...)\n const fnCall = new InvokeFunctionExpr(/* fn */importExpr(Identifiers.setNgModuleScope), /* args */[meta.type.value, scopeMap.toLiteralMap()]);\n // (ngJitMode guard) && setNgModuleScope(...)\n const guardedCall = jitOnlyGuardedExpression(fnCall);\n // function() { (ngJitMode guard) && setNgModuleScope(...); }\n const iife = new FunctionExpr(/* params */[], /* statements */[guardedCall.toStmt()]);\n // (function() { (ngJitMode guard) && setNgModuleScope(...); })()\n const iifeCall = new InvokeFunctionExpr(/* fn */iife, /* args */[]);\n return iifeCall.toStmt();\n}\nfunction tupleTypeOf(exp) {\n const types = exp.map(ref => typeofExpr(ref.type));\n return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;\n}\nfunction tupleOfTypes(types) {\n const typeofTypes = types.map(type => typeofExpr(type));\n return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;\n}\nfunction compilePipeFromMetadata(metadata) {\n const definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({\n key: 'name',\n value: literal(metadata.pipeName),\n quoted: false\n });\n // e.g. `type: MyPipe`\n definitionMapValues.push({\n key: 'type',\n value: metadata.type.value,\n quoted: false\n });\n // e.g. `pure: true`\n definitionMapValues.push({\n key: 'pure',\n value: literal(metadata.pure),\n quoted: false\n });\n if (metadata.isStandalone) {\n definitionMapValues.push({\n key: 'standalone',\n value: literal(true),\n quoted: false\n });\n }\n const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);\n const type = createPipeType(metadata);\n return {\n expression,\n type,\n statements: []\n };\n}\nfunction createPipeType(metadata) {\n return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [typeWithParameters(metadata.type.type, metadata.typeArgumentCount), new ExpressionType(new LiteralExpr(metadata.pipeName)), new ExpressionType(new LiteralExpr(metadata.isStandalone))]));\n}\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\nclass ParserError {\n constructor(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}\nclass ParseSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n toAbsolute(absoluteOffset) {\n return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);\n }\n}\nclass AST {\n constructor(span,\n /**\n * Absolute location of the expression AST in a source code file.\n */\n sourceSpan) {\n this.span = span;\n this.sourceSpan = sourceSpan;\n }\n toString() {\n return 'AST';\n }\n}\nclass ASTWithName extends AST {\n constructor(span, sourceSpan, nameSpan) {\n super(span, sourceSpan);\n this.nameSpan = nameSpan;\n }\n}\nclass EmptyExpr$1 extends AST {\n visit(visitor, context = null) {\n // do nothing\n }\n}\nclass ImplicitReceiver extends AST {\n visit(visitor, context = null) {\n return visitor.visitImplicitReceiver(this, context);\n }\n}\n/**\n * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class\n * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the\n * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]=\"this.title\"`\n * is the same as `[attr.title]=\"title\"`.). Inheriting allows for the `this` accesses to be treated\n * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.\n * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.\n */\nclass ThisReceiver extends ImplicitReceiver {\n visit(visitor, context = null) {\n return visitor.visitThisReceiver?.(this, context);\n }\n}\n/**\n * Multiple expressions separated by a semicolon.\n */\nclass Chain extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitChain(this, context);\n }\n}\nclass Conditional extends AST {\n constructor(span, sourceSpan, condition, trueExp, falseExp) {\n super(span, sourceSpan);\n this.condition = condition;\n this.trueExp = trueExp;\n this.falseExp = falseExp;\n }\n visit(visitor, context = null) {\n return visitor.visitConditional(this, context);\n }\n}\nclass PropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyRead(this, context);\n }\n}\nclass PropertyWrite extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name, value) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyWrite(this, context);\n }\n}\nclass SafePropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitSafePropertyRead(this, context);\n }\n}\nclass KeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedRead(this, context);\n }\n}\nclass SafeKeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeKeyedRead(this, context);\n }\n}\nclass KeyedWrite extends AST {\n constructor(span, sourceSpan, receiver, key, value) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedWrite(this, context);\n }\n}\nclass BindingPipe extends ASTWithName {\n constructor(span, sourceSpan, exp, name, args, nameSpan) {\n super(span, sourceSpan, nameSpan);\n this.exp = exp;\n this.name = name;\n this.args = args;\n }\n visit(visitor, context = null) {\n return visitor.visitPipe(this, context);\n }\n}\nclass LiteralPrimitive extends AST {\n constructor(span, sourceSpan, value) {\n super(span, sourceSpan);\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralPrimitive(this, context);\n }\n}\nclass LiteralArray extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralArray(this, context);\n }\n}\nclass LiteralMap extends AST {\n constructor(span, sourceSpan, keys, values) {\n super(span, sourceSpan);\n this.keys = keys;\n this.values = values;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralMap(this, context);\n }\n}\nclass Interpolation$1 extends AST {\n constructor(span, sourceSpan, strings, expressions) {\n super(span, sourceSpan);\n this.strings = strings;\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitInterpolation(this, context);\n }\n}\nclass Binary extends AST {\n constructor(span, sourceSpan, operation, left, right) {\n super(span, sourceSpan);\n this.operation = operation;\n this.left = left;\n this.right = right;\n }\n visit(visitor, context = null) {\n return visitor.visitBinary(this, context);\n }\n}\n/**\n * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST\n * node that was originally used. This inheritance relation can be deleted in some future major,\n * after consumers have been given a chance to fully support Unary.\n */\nclass Unary extends Binary {\n /**\n * Creates a unary minus expression \"-x\", represented as `Binary` using \"0 - x\".\n */\n static createMinus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);\n }\n /**\n * Creates a unary plus expression \"+x\", represented as `Binary` using \"x - 0\".\n */\n static createPlus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));\n }\n /**\n * During the deprecation period this constructor is private, to avoid consumers from creating\n * a `Unary` with the fallback properties for `Binary`.\n */\n constructor(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {\n super(span, sourceSpan, binaryOp, binaryLeft, binaryRight);\n this.operator = operator;\n this.expr = expr;\n // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not\n // depend on these fields when operating on `Unary`.\n this.left = null;\n this.right = null;\n this.operation = null;\n }\n visit(visitor, context = null) {\n if (visitor.visitUnary !== undefined) {\n return visitor.visitUnary(this, context);\n }\n return visitor.visitBinary(this, context);\n }\n}\nclass PrefixNot extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitPrefixNot(this, context);\n }\n}\nclass NonNullAssert extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitNonNullAssert(this, context);\n }\n}\nclass Call extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitCall(this, context);\n }\n}\nclass SafeCall extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeCall(this, context);\n }\n}\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\nclass AbsoluteSourceSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nclass ASTWithSource extends AST {\n constructor(ast, source, location, absoluteOffset, errors) {\n super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));\n this.ast = ast;\n this.source = source;\n this.location = location;\n this.errors = errors;\n }\n visit(visitor, context = null) {\n if (visitor.visitASTWithSource) {\n return visitor.visitASTWithSource(this, context);\n }\n return this.ast.visit(visitor, context);\n }\n toString() {\n return `${this.source} in ${this.location}`;\n }\n}\nclass VariableBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key name of the LHS along with its span.\n * @param value optional value for the RHS along with its span.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass ExpressionBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its\n * span. Note that the length of the span may not be the same as\n * `key.source.length`. For example,\n * 1. key.source = ngFor, key.span is for \"ngFor\"\n * 2. key.source = ngForOf, key.span is for \"of\"\n * 3. key.source = ngForTrackBy, key.span is for \"trackBy\"\n * @param value optional expression for the RHS.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass RecursiveAstVisitor {\n visit(ast, context) {\n // The default implementation just visits every node.\n // Classes that extend RecursiveAstVisitor should override this function\n // to selectively visit the specified node.\n ast.visit(this, context);\n }\n visitUnary(ast, context) {\n this.visit(ast.expr, context);\n }\n visitBinary(ast, context) {\n this.visit(ast.left, context);\n this.visit(ast.right, context);\n }\n visitChain(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitConditional(ast, context) {\n this.visit(ast.condition, context);\n this.visit(ast.trueExp, context);\n this.visit(ast.falseExp, context);\n }\n visitPipe(ast, context) {\n this.visit(ast.exp, context);\n this.visitAll(ast.args, context);\n }\n visitImplicitReceiver(ast, context) {}\n visitThisReceiver(ast, context) {}\n visitInterpolation(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitKeyedWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n this.visit(ast.value, context);\n }\n visitLiteralArray(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitLiteralMap(ast, context) {\n this.visitAll(ast.values, context);\n }\n visitLiteralPrimitive(ast, context) {}\n visitPrefixNot(ast, context) {\n this.visit(ast.expression, context);\n }\n visitNonNullAssert(ast, context) {\n this.visit(ast.expression, context);\n }\n visitPropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitPropertyWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.value, context);\n }\n visitSafePropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitSafeKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n visitSafeCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n // This is not part of the AstVisitor interface, just a helper method\n visitAll(asts, context) {\n for (const ast of asts) {\n this.visit(ast, context);\n }\n }\n}\nclass AstTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));\n }\n visitLiteralPrimitive(ast, context) {\n return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);\n }\n visitPropertyRead(ast, context) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitPropertyWrite(ast, context) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n }\n visitSafePropertyRead(ast, context) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitLiteralArray(ast, context) {\n return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitLiteralMap(ast, context) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));\n }\n visitUnary(ast, context) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n visitBinary(ast, context) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));\n }\n visitPrefixNot(ast, context) {\n return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitNonNullAssert(ast, context) {\n return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitConditional(ast, context) {\n return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n }\n visitPipe(ast, context) {\n return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);\n }\n visitKeyedRead(ast, context) {\n return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n visitKeyedWrite(ast, context) {\n return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this));\n }\n visitCall(ast, context) {\n return new Call(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitSafeCall(ast, context) {\n return new SafeCall(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitAll(asts) {\n const res = [];\n for (let i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n }\n visitChain(ast, context) {\n return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitSafeKeyedRead(ast, context) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n}\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nclass AstMemoryEfficientTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, expressions);\n return ast;\n }\n visitLiteralPrimitive(ast, context) {\n return ast;\n }\n visitPropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitPropertyWrite(ast, context) {\n const receiver = ast.receiver.visit(this);\n const value = ast.value.visit(this);\n if (receiver !== ast.receiver || value !== ast.value) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);\n }\n return ast;\n }\n visitSafePropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitLiteralArray(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new LiteralArray(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitLiteralMap(ast, context) {\n const values = this.visitAll(ast.values);\n if (values !== ast.values) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);\n }\n return ast;\n }\n visitUnary(ast, context) {\n const expr = ast.expr.visit(this);\n if (expr !== ast.expr) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, expr);\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, expr);\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n return ast;\n }\n visitBinary(ast, context) {\n const left = ast.left.visit(this);\n const right = ast.right.visit(this);\n if (left !== ast.left || right !== ast.right) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);\n }\n return ast;\n }\n visitPrefixNot(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new PrefixNot(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitNonNullAssert(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new NonNullAssert(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitConditional(ast, context) {\n const condition = ast.condition.visit(this);\n const trueExp = ast.trueExp.visit(this);\n const falseExp = ast.falseExp.visit(this);\n if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);\n }\n return ast;\n }\n visitPipe(ast, context) {\n const exp = ast.exp.visit(this);\n const args = this.visitAll(ast.args);\n if (exp !== ast.exp || args !== ast.args) {\n return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);\n }\n return ast;\n }\n visitKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new KeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n visitKeyedWrite(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n const value = ast.value.visit(this);\n if (obj !== ast.receiver || key !== ast.key || value !== ast.value) {\n return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);\n }\n return ast;\n }\n visitAll(asts) {\n const res = [];\n let modified = false;\n for (let i = 0; i < asts.length; ++i) {\n const original = asts[i];\n const value = original.visit(this);\n res[i] = value;\n modified = modified || value !== original;\n }\n return modified ? res : asts;\n }\n visitChain(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new Chain(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new Call(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new SafeCall(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n}\n// Bindings\nclass ParsedProperty {\n constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n }\n}\nvar ParsedPropertyType;\n(function (ParsedPropertyType) {\n ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nclass ParsedEvent {\n // Regular events have a target\n // Animation events have a phase\n constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.targetOrPhase = targetOrPhase;\n this.type = type;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n}\n/**\n * ParsedVariable represents a variable declaration in a microsyntax expression.\n */\nclass ParsedVariable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\nclass BoundElementProperty {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {\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.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\nclass EventHandlerVars {\n static {\n this.event = variable('$event');\n }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver(globals);\n }\n const actionWithoutBuiltins = convertPropertyBindingBuiltins({\n createLiteralArrayConverter: argCount => {\n // Note: no caching for literal arrays in actions.\n return args => literalArr(args);\n },\n createLiteralMapConverter: keys => {\n // Note: no caching for literal maps in actions.\n return values => {\n const entries = keys.map((k, i) => ({\n key: k.key,\n value: values[i],\n quoted: k.quoted\n }));\n return literalMap(entries);\n };\n },\n createPipeConverter: name => {\n throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);\n }\n }, action);\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */false, baseSourceSpan, implicitReceiverAccesses);\n const actionStmts = [];\n flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const lastIndex = actionStmts.length - 1;\n if (lastIndex >= 0) {\n const lastStatement = actionStmts[lastIndex];\n // Ensure that the value of the last expression statement is returned\n if (lastStatement instanceof ExpressionStatement) {\n actionStmts[lastIndex] = new ReturnStatement(lastStatement.expr);\n }\n }\n return actionStmts;\n}\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n return convertBuiltins(converterFactory, ast);\n}\nclass ConvertPropertyBindingResult {\n constructor(stmts, currValExpr) {\n this.stmts = stmts;\n this.currValExpr = currValExpr;\n }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nfunction convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */false);\n const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n return new ConvertPropertyBindingResult(stmts, outputExpr);\n}\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\nfunction convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {\n const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */true);\n const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n const args = outputExpr.args;\n return {\n stmts,\n args\n };\n}\nfunction getStatementsFromVisitor(visitor, bindingId) {\n const stmts = [];\n for (let i = 0; i < visitor.temporaryCount; i++) {\n stmts.push(temporaryDeclaration(bindingId, i));\n }\n return stmts;\n}\nfunction convertBuiltins(converterFactory, ast) {\n const visitor = new _BuiltinAstConverter(converterFactory);\n return ast.visit(visitor);\n}\nfunction temporaryName(bindingId, temporaryNumber) {\n return `tmp_${bindingId}_${temporaryNumber}`;\n}\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber));\n}\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n for (let i = temporaryCount - 1; i >= 0; i--) {\n statements.unshift(temporaryDeclaration(bindingId, i));\n }\n}\nvar _Mode;\n(function (_Mode) {\n _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n})(_Mode || (_Mode = {}));\nfunction ensureStatementMode(mode, ast) {\n if (mode !== _Mode.Statement) {\n throw new Error(`Expected a statement, but saw ${ast}`);\n }\n}\nfunction ensureExpressionMode(mode, ast) {\n if (mode !== _Mode.Expression) {\n throw new Error(`Expected an expression, but saw ${ast}`);\n }\n}\nfunction convertToStatementIfNeeded(mode, expr) {\n if (mode === _Mode.Statement) {\n return expr.toStmt();\n } else {\n return expr;\n }\n}\nclass _BuiltinAstConverter extends AstTransformer {\n constructor(_converterFactory) {\n super();\n this._converterFactory = _converterFactory;\n }\n visitPipe(ast, context) {\n const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n }\n visitLiteralArray(ast, context) {\n const args = ast.expressions.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n }\n visitLiteralMap(ast, context) {\n const args = ast.values.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n }\n}\nclass _AstToIrVisitor {\n constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {\n this._localResolver = _localResolver;\n this._implicitReceiver = _implicitReceiver;\n this.bindingId = bindingId;\n this.supportsInterpolation = supportsInterpolation;\n this.baseSourceSpan = baseSourceSpan;\n this.implicitReceiverAccesses = implicitReceiverAccesses;\n this._nodeMap = new Map();\n this._resultMap = new Map();\n this._currentTemporary = 0;\n this.temporaryCount = 0;\n this.usesImplicitReceiver = false;\n }\n visitUnary(ast, mode) {\n let op;\n switch (ast.operator) {\n case '+':\n op = UnaryOperator.Plus;\n break;\n case '-':\n op = UnaryOperator.Minus;\n break;\n default:\n throw new Error(`Unsupported operator ${ast.operator}`);\n }\n return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitBinary(ast, mode) {\n let op;\n switch (ast.operation) {\n case '+':\n op = BinaryOperator.Plus;\n break;\n case '-':\n op = BinaryOperator.Minus;\n break;\n case '*':\n op = BinaryOperator.Multiply;\n break;\n case '/':\n op = BinaryOperator.Divide;\n break;\n case '%':\n op = BinaryOperator.Modulo;\n break;\n case '&&':\n op = BinaryOperator.And;\n break;\n case '||':\n op = BinaryOperator.Or;\n break;\n case '==':\n op = BinaryOperator.Equals;\n break;\n case '!=':\n op = BinaryOperator.NotEquals;\n break;\n case '===':\n op = BinaryOperator.Identical;\n break;\n case '!==':\n op = BinaryOperator.NotIdentical;\n break;\n case '<':\n op = BinaryOperator.Lower;\n break;\n case '>':\n op = BinaryOperator.Bigger;\n break;\n case '<=':\n op = BinaryOperator.LowerEquals;\n break;\n case '>=':\n op = BinaryOperator.BiggerEquals;\n break;\n case '??':\n return this.convertNullishCoalesce(ast, mode);\n default:\n throw new Error(`Unsupported operation ${ast.operation}`);\n }\n return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitChain(ast, mode) {\n ensureStatementMode(mode, ast);\n return this.visitAll(ast.expressions, mode);\n }\n visitConditional(ast, mode) {\n const value = this._visit(ast.condition, _Mode.Expression);\n return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n }\n visitPipe(ast, mode) {\n throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${ast.name}`);\n }\n visitImplicitReceiver(ast, mode) {\n ensureExpressionMode(mode, ast);\n this.usesImplicitReceiver = true;\n return this._implicitReceiver;\n }\n visitThisReceiver(ast, mode) {\n return this.visitImplicitReceiver(ast, mode);\n }\n visitInterpolation(ast, mode) {\n if (!this.supportsInterpolation) {\n throw new Error('Unexpected interpolation');\n }\n ensureExpressionMode(mode, ast);\n let args = [];\n for (let i = 0; i < ast.strings.length - 1; i++) {\n args.push(literal(ast.strings[i]));\n args.push(this._visit(ast.expressions[i], _Mode.Expression));\n }\n args.push(literal(ast.strings[ast.strings.length - 1]));\n // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n // args returned to just the value, because we're going to pass it to a special instruction.\n const strings = ast.strings;\n if (strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // Single argument interpolate instructions.\n args = [args[1]];\n } else if (ast.expressions.length >= 9) {\n // 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n // an array of arguments\n args = [literalArr(args)];\n }\n return new InterpolationExpression(args);\n }\n visitKeyedRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n } else {\n return convertToStatementIfNeeded(mode, this._visit(ast.receiver, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n }\n }\n visitKeyedWrite(ast, mode) {\n const obj = this._visit(ast.receiver, _Mode.Expression);\n const key = this._visit(ast.key, _Mode.Expression);\n const value = this._visit(ast.value, _Mode.Expression);\n if (obj === this._implicitReceiver) {\n this._localResolver.maybeRestoreView();\n }\n return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n }\n visitLiteralArray(ast, mode) {\n throw new Error(`Illegal State: literal arrays should have been converted into functions`);\n }\n visitLiteralMap(ast, mode) {\n throw new Error(`Illegal State: literal maps should have been converted into functions`);\n }\n visitLiteralPrimitive(ast, mode) {\n // For literal values of null, undefined, true, or false allow type interference\n // to infer the type.\n const type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ? INFERRED_TYPE : undefined;\n return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));\n }\n _getLocal(name, receiver) {\n if (this._localResolver.globals?.has(name) && receiver instanceof ThisReceiver) {\n return null;\n }\n return this._localResolver.getLocal(name);\n }\n visitPrefixNot(ast, mode) {\n return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n }\n visitNonNullAssert(ast, mode) {\n return convertToStatementIfNeeded(mode, this._visit(ast.expression, _Mode.Expression));\n }\n visitPropertyRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n } else {\n let result = null;\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n result = this._getLocal(ast.name, ast.receiver);\n if (result) {\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n }\n if (result == null) {\n result = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, result);\n }\n }\n visitPropertyWrite(ast, mode) {\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n let varExpr = null;\n if (receiver === this._implicitReceiver) {\n const localExpr = this._getLocal(ast.name, ast.receiver);\n if (localExpr) {\n if (localExpr instanceof ReadPropExpr) {\n // If the local variable is a property read expression, it's a reference\n // to a 'context.property' value and will be used as the target of the\n // write expression.\n varExpr = localExpr;\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n } else {\n // Otherwise it's an error.\n const receiver = ast.name;\n const value = ast.value instanceof PropertyRead ? ast.value.name : undefined;\n throw new Error(`Cannot assign value \"${value}\" to template variable \"${receiver}\". Template variables are read-only.`);\n }\n }\n }\n // If no local expression could be produced, use the original receiver's\n // property as the target.\n if (varExpr === null) {\n varExpr = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n }\n visitSafePropertyRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitSafeKeyedRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitAll(asts, mode) {\n return asts.map(ast => this._visit(ast, mode));\n }\n visitCall(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n const convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n if (ast instanceof BuiltinFunctionCall) {\n return convertToStatementIfNeeded(mode, ast.converter(convertedArgs));\n }\n const receiver = ast.receiver;\n if (receiver instanceof PropertyRead && receiver.receiver instanceof ImplicitReceiver && !(receiver.receiver instanceof ThisReceiver) && receiver.name === '$any') {\n if (convertedArgs.length !== 1) {\n throw new Error(`Invalid call to $any, expected 1 argument but received ${convertedArgs.length || 'none'}`);\n }\n return convertToStatementIfNeeded(mode, convertedArgs[0]);\n }\n const call = this._visit(receiver, _Mode.Expression).callFn(convertedArgs, this.convertSourceSpan(ast.span));\n return convertToStatementIfNeeded(mode, call);\n }\n visitSafeCall(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n _visit(ast, mode) {\n const result = this._resultMap.get(ast);\n if (result) return result;\n return (this._nodeMap.get(ast) || ast).visit(this, mode);\n }\n convertSafeAccess(ast, leftMostSafe, mode) {\n // If the expression contains a safe access node on the left it needs to be converted to\n // an expression that guards the access to the member by checking the receiver for blank. As\n // execution proceeds from left to right, the left most part of the expression must be guarded\n // first but, because member access is left associative, the right side of the expression is at\n // the top of the AST. The desired result requires lifting a copy of the left part of the\n // expression up to test it for blank before generating the unguarded version.\n // Consider, for example the following expression: a?.b.c?.d.e\n // This results in the ast:\n // .\n // / \\\n // ?. e\n // / \\\n // . d\n // / \\\n // ?. c\n // / \\\n // a b\n // The following tree should be generated:\n //\n // /---- ? ----\\\n // / | \\\n // a /--- ? ---\\ null\n // / | \\\n // . . null\n // / \\ / \\\n // . c . e\n // / \\ / \\\n // a b . d\n // / \\\n // . c\n // / \\\n // a b\n //\n // Notice that the first guard condition is the left hand of the left most safe access node\n // which comes in as leftMostSafe to this routine.\n let guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n let temporary = undefined;\n if (this.needsTemporaryInSafeAccess(leftMostSafe.receiver)) {\n // If the expression has method calls or pipes then we need to save the result into a\n // temporary variable to avoid calling stateful or impure code more than once.\n temporary = this.allocateTemporary();\n // Preserve the result in the temporary variable\n guardedExpression = temporary.set(guardedExpression);\n // Ensure all further references to the guarded expression refer to the temporary instead.\n this._resultMap.set(leftMostSafe.receiver, temporary);\n }\n const condition = guardedExpression.isBlank();\n // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n // leftMostNode with its unguarded version in the call to `this.visit()`.\n if (leftMostSafe instanceof SafeCall) {\n this._nodeMap.set(leftMostSafe, new Call(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.args, leftMostSafe.argumentSpan));\n } else if (leftMostSafe instanceof SafeKeyedRead) {\n this._nodeMap.set(leftMostSafe, new KeyedRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.key));\n } else {\n this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));\n }\n // Recursively convert the node now without the guarded member access.\n const access = this._visit(ast, _Mode.Expression);\n // Remove the mapping. This is not strictly required as the converter only traverses each node\n // once but is safer if the conversion is changed to traverse the nodes more than once.\n this._nodeMap.delete(leftMostSafe);\n // If we allocated a temporary, release it.\n if (temporary) {\n this.releaseTemporary(temporary);\n }\n // Produce the conditional\n return convertToStatementIfNeeded(mode, condition.conditional(NULL_EXPR, access));\n }\n convertNullishCoalesce(ast, mode) {\n const left = this._visit(ast.left, _Mode.Expression);\n const right = this._visit(ast.right, _Mode.Expression);\n const temporary = this.allocateTemporary();\n this.releaseTemporary(temporary);\n // Generate the following expression. It is identical to how TS\n // transpiles binary expressions with a nullish coalescing operator.\n // let temp;\n // (temp = a) !== null && temp !== undefined ? temp : b;\n return convertToStatementIfNeeded(mode, temporary.set(left).notIdentical(NULL_EXPR).and(temporary.notIdentical(literal(undefined))).conditional(temporary, right));\n }\n // Given an expression of the form a?.b.c?.d.e then the left most safe node is\n // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n // safe method call as this needs to be transformed initially to:\n // a == null ? null : a.c.b.c?.d.e\n // then to:\n // a == null ? null : a.b.c == null ? null : a.b.c.d.e\n leftMostSafeNode(ast) {\n const visit = (visitor, ast) => {\n return (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n return ast.visit({\n visitUnary(ast) {\n return null;\n },\n visitBinary(ast) {\n return null;\n },\n visitChain(ast) {\n return null;\n },\n visitConditional(ast) {\n return null;\n },\n visitCall(ast) {\n return visit(this, ast.receiver);\n },\n visitSafeCall(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitImplicitReceiver(ast) {\n return null;\n },\n visitThisReceiver(ast) {\n return null;\n },\n visitInterpolation(ast) {\n return null;\n },\n visitKeyedRead(ast) {\n return visit(this, ast.receiver);\n },\n visitKeyedWrite(ast) {\n return null;\n },\n visitLiteralArray(ast) {\n return null;\n },\n visitLiteralMap(ast) {\n return null;\n },\n visitLiteralPrimitive(ast) {\n return null;\n },\n visitPipe(ast) {\n return null;\n },\n visitPrefixNot(ast) {\n return null;\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return visit(this, ast.receiver);\n },\n visitPropertyWrite(ast) {\n return null;\n },\n visitSafePropertyRead(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitSafeKeyedRead(ast) {\n return visit(this, ast.receiver) || ast;\n }\n });\n }\n // Returns true of the AST includes a method or a pipe indicating that, if the\n // expression is used as the target of a safe property or method access then\n // the expression should be stored into a temporary variable.\n needsTemporaryInSafeAccess(ast) {\n const visit = (visitor, ast) => {\n return ast && (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n const visitSome = (visitor, ast) => {\n return ast.some(ast => visit(visitor, ast));\n };\n return ast.visit({\n visitUnary(ast) {\n return visit(this, ast.expr);\n },\n visitBinary(ast) {\n return visit(this, ast.left) || visit(this, ast.right);\n },\n visitChain(ast) {\n return false;\n },\n visitConditional(ast) {\n return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);\n },\n visitCall(ast) {\n return true;\n },\n visitSafeCall(ast) {\n return true;\n },\n visitImplicitReceiver(ast) {\n return false;\n },\n visitThisReceiver(ast) {\n return false;\n },\n visitInterpolation(ast) {\n return visitSome(this, ast.expressions);\n },\n visitKeyedRead(ast) {\n return false;\n },\n visitKeyedWrite(ast) {\n return false;\n },\n visitLiteralArray(ast) {\n return true;\n },\n visitLiteralMap(ast) {\n return true;\n },\n visitLiteralPrimitive(ast) {\n return false;\n },\n visitPipe(ast) {\n return true;\n },\n visitPrefixNot(ast) {\n return visit(this, ast.expression);\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return false;\n },\n visitPropertyWrite(ast) {\n return false;\n },\n visitSafePropertyRead(ast) {\n return false;\n },\n visitSafeKeyedRead(ast) {\n return false;\n }\n });\n }\n allocateTemporary() {\n const tempNumber = this._currentTemporary++;\n this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n }\n releaseTemporary(temporary) {\n this._currentTemporary--;\n if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n throw new Error(`Temporary ${temporary.name} released out of order`);\n }\n }\n /**\n * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n *\n * `ParseSpan` objects are relative to the start of the expression.\n * This method converts these to full `ParseSourceSpan` objects that\n * show where the span is within the overall source file.\n *\n * @param span the relative span to convert.\n * @returns a `ParseSourceSpan` for the given span or null if no\n * `baseSourceSpan` was provided to this class.\n */\n convertSourceSpan(span) {\n if (this.baseSourceSpan) {\n const start = this.baseSourceSpan.start.moveBy(span.start);\n const end = this.baseSourceSpan.start.moveBy(span.end);\n const fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n } else {\n return null;\n }\n }\n /** Adds the name of an AST to the list of implicit receiver accesses. */\n addImplicitReceiverAccess(name) {\n if (this.implicitReceiverAccesses) {\n this.implicitReceiverAccesses.add(name);\n }\n }\n}\nfunction flattenStatements(arg, output) {\n if (Array.isArray(arg)) {\n arg.forEach(entry => flattenStatements(entry, output));\n } else {\n output.push(arg);\n }\n}\nfunction unsupported() {\n throw new Error('Unsupported operation');\n}\nclass InterpolationExpression extends Expression {\n constructor(args) {\n super(null, null);\n this.args = args;\n this.isConstant = unsupported;\n this.isEquivalent = unsupported;\n this.visitExpression = unsupported;\n this.clone = unsupported;\n }\n}\nclass DefaultLocalResolver {\n constructor(globals) {\n this.globals = globals;\n }\n notifyImplicitReceiverUse() {}\n maybeRestoreView() {}\n getLocal(name) {\n if (name === EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n return null;\n }\n}\nclass BuiltinFunctionCall extends Call {\n constructor(span, sourceSpan, args, converter) {\n super(span, sourceSpan, new EmptyExpr$1(span, sourceSpan), args, null);\n this.converter = converter;\n }\n}\n\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */\nlet _SECURITY_SCHEMA;\nfunction SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href', 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action', 'img|src', 'input|src', 'ins|cite', 'q|cite', 'source|src', 'track|src', 'video|poster', 'video|src']);\n registerContext(SecurityContext.RESOURCE_URL, ['applet|code', 'applet|codebase', 'base|href', 'embed|src', 'frame|src', 'head|profile', 'html|manifest', 'iframe|src', 'link|href', 'media|src', 'object|codebase', 'object|data', 'script|src']);\n }\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n for (const spec of specs) _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n}\n/**\n * The set of security-sensitive attributes of an `<iframe>` that *must* be\n * applied as a static attribute only. This ensures that all security-sensitive\n * attributes are taken into account while creating an instance of an `<iframe>`\n * at runtime.\n *\n * Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function\n * in the code instead.\n */\nconst IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);\n/**\n * Checks whether a given attribute name might represent a security-sensitive\n * attribute of an <iframe>.\n */\nfunction isIframeSecuritySensitiveAttr(attrName) {\n // The `setAttribute` DOM API is case-insensitive, so we lowercase the value\n // before checking it against a known security-sensitive attributes.\n return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());\n}\n\n/**\n * The following set contains all keywords that can be used in the animation css shorthand\n * property and is used during the scoping of keyframes to make sure such keywords\n * are not modified.\n */\nconst animationKeywords = new Set([\n// global values\n'inherit', 'initial', 'revert', 'unset',\n// animation-direction\n'alternate', 'alternate-reverse', 'normal', 'reverse',\n// animation-fill-mode\n'backwards', 'both', 'forwards', 'none',\n// animation-play-state\n'paused', 'running',\n// animation-timing-function\n'ease', 'ease-in', 'ease-in-out', 'ease-out', 'linear', 'step-start', 'step-end',\n// `steps()` function\n'end', 'jump-both', 'jump-end', 'jump-none', 'jump-start', 'start']);\n/**\n * The following class has its origin from a port of shadowCSS from webcomponents.js to TypeScript.\n * It has since diverge in many ways to tailor Angular's needs.\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.\n The 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 <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n\n could become:\n\n <style>\n / *@polyfill .content-container div * /\n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\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*/\nclass ShadowCss {\n constructor() {\n /**\n * Regular expression used to extrapolate the possible keyframes from an\n * animation declaration (with possibly multiple animation definitions)\n *\n * The regular expression can be divided in three parts\n * - (^|\\s+)\n * simply captures how many (if any) leading whitespaces are present\n * - (?:(?:(['\"])((?:\\\\\\\\|\\\\\\2|(?!\\2).)+)\\2)|(-?[A-Za-z][\\w\\-]*))\n * captures two different possible keyframes, ones which are quoted or ones which are valid css\n * idents (custom properties excluded)\n * - (?=[,\\s;]|$)\n * simply matches the end of the possible keyframe, valid endings are: a comma, a space, a\n * semicolon or the end of the string\n */\n this._animationDeclarationKeyframesRe = /(^|\\s+)(?:(?:(['\"])((?:\\\\\\\\|\\\\\\2|(?!\\2).)+)\\2)|(-?[A-Za-z][\\w\\-]*))(?=[,\\s]|$)/g;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can be included in the document\n *\n * The selector is the attribute added to all elements inside the host,\n * The hostSelector is the attribute added to the host itself.\n */\n shimCssText(cssText, selector, hostSelector = '') {\n // **NOTE**: Do not strip comments as this will cause component sourcemaps to break\n // due to shift in lines.\n // Collect comments and replace them with a placeholder, this is done to avoid complicating\n // the rule parsing RegExp and keep it safer.\n const comments = [];\n cssText = cssText.replace(_commentRe, m => {\n if (m.match(_commentWithHashRe)) {\n comments.push(m);\n } else {\n // Replace non hash comments with empty lines.\n // This is done so that we do not leak any senstive data in comments.\n const newLinesMatches = m.match(_newLinesRe);\n comments.push((newLinesMatches?.join('') ?? '') + '\\n');\n }\n return COMMENT_PLACEHOLDER;\n });\n cssText = this._insertDirectives(cssText);\n const scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n // Add back comments at the original position.\n let commentIdx = 0;\n return scopedCssText.replace(_commentWithHashPlaceHolderRe, () => comments[commentIdx++]);\n }\n _insertDirectives(cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n }\n /**\n * Process styles to add scope to keyframes.\n *\n * Modify both the names of the keyframes defined in the component styles and also the css\n * animation rules using them.\n *\n * Animation rules using keyframes defined elsewhere are not modified to allow for globally\n * defined keyframes.\n *\n * For example, we convert this css:\n *\n * ```\n * .box {\n * animation: box-animation 1s forwards;\n * }\n *\n * @keyframes box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * to this:\n *\n * ```\n * .box {\n * animation: scopeName_box-animation 1s forwards;\n * }\n *\n * @keyframes scopeName_box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * @param cssText the component's css text that needs to be scoped.\n * @param scopeSelector the component's scope selector.\n *\n * @returns the scoped css text.\n */\n _scopeKeyframesRelatedCss(cssText, scopeSelector) {\n const unscopedKeyframesSet = new Set();\n const scopedKeyframesCssText = processRules(cssText, rule => this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet));\n return processRules(scopedKeyframesCssText, rule => this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet));\n }\n /**\n * Scopes local keyframes names, returning the updated css rule and it also\n * adds the original keyframe name to a provided set to collect all keyframes names\n * so that it can later be used to scope the animation rules.\n *\n * For example, it takes a rule such as:\n *\n * ```\n * @keyframes box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * and returns:\n *\n * ```\n * @keyframes scopeName_box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n * and as a side effect it adds \"box-animation\" to the `unscopedKeyframesSet` set\n *\n * @param cssRule the css rule to process.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names (which can be\n * modified as a side effect)\n *\n * @returns the css rule modified with the scoped keyframes name.\n */\n _scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet) {\n return {\n ...rule,\n selector: rule.selector.replace(/(^@(?:-webkit-)?keyframes(?:\\s+))(['\"]?)(.+)\\2(\\s*)$/, (_, start, quote, keyframeName, endSpaces) => {\n unscopedKeyframesSet.add(unescapeQuotes(keyframeName, quote));\n return `${start}${quote}${scopeSelector}_${keyframeName}${quote}${endSpaces}`;\n })\n };\n }\n /**\n * Function used to scope a keyframes name (obtained from an animation declaration)\n * using an existing set of unscopedKeyframes names to discern if the scoping needs to be\n * performed (keyframes names of keyframes not defined in the component's css need not to be\n * scoped).\n *\n * @param keyframe the keyframes name to check.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names.\n *\n * @returns the scoped name of the keyframe, or the original name is the name need not to be\n * scoped.\n */\n _scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet) {\n return keyframe.replace(/^(\\s*)(['\"]?)(.+?)\\2(\\s*)$/, (_, spaces1, quote, name, spaces2) => {\n name = `${unscopedKeyframesSet.has(unescapeQuotes(name, quote)) ? scopeSelector + '_' : ''}${name}`;\n return `${spaces1}${quote}${name}${quote}${spaces2}`;\n });\n }\n /**\n * Scope an animation rule so that the keyframes mentioned in such rule\n * are scoped if defined in the component's css and left untouched otherwise.\n *\n * It can scope values of both the 'animation' and 'animation-name' properties.\n *\n * @param rule css rule to scope.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names.\n *\n * @returns the updated css rule.\n **/\n _scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {\n let content = rule.content.replace(/((?:^|\\s+|;)(?:-webkit-)?animation(?:\\s*):(?:\\s*))([^;]+)/g, (_, start, animationDeclarations) => start + animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = '', quotedName, nonQuotedName) => {\n if (quotedName) {\n return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;\n } else {\n return animationKeywords.has(nonQuotedName) ? original : `${leadingSpaces}${this._scopeAnimationKeyframe(nonQuotedName, scopeSelector, unscopedKeyframesSet)}`;\n }\n }));\n content = content.replace(/((?:^|\\s+|;)(?:-webkit-)?animation-name(?:\\s*):(?:\\s*))([^;]+)/g, (_match, start, commaSeparatedKeyframes) => `${start}${commaSeparatedKeyframes.split(',').map(keyframe => this._scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet)).join(',')}`);\n return {\n ...rule,\n content\n };\n }\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n *\n * For example, we convert this rule:\n *\n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n *\n * to this:\n *\n * scopeName menu-item {\n *\n **/\n _insertPolyfillDirectivesInCssText(cssText) {\n return cssText.replace(_cssContentNextSelectorRe, function (...m) {\n return m[2] + '{';\n });\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n *\n * For example, we convert this rule:\n *\n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n *\n * to this:\n *\n * scopeName menu-item {...}\n *\n **/\n _insertPolyfillRulesInCssText(cssText) {\n return cssText.replace(_cssContentRuleRe, (...m) => {\n const rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n }\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n *\n * .foo {... }\n *\n * and converts this to\n *\n * scopeName .foo { ... }\n */\n _scopeCssText(cssText, scopeSelector, hostSelector) {\n const 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._scopeKeyframesRelatedCss(cssText, scopeSelector);\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n *\n * @polyfill-unscoped-rule {\n * content: 'menu-item';\n * ... }\n *\n * to this:\n *\n * menu-item {...}\n *\n **/\n _extractUnscopedRulesFromCssText(cssText) {\n let r = '';\n let m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n const rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n }\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar\n */\n _convertColonHost(cssText) {\n return cssText.replace(_cssColonHostRe, (_, hostSelectors, otherSelectors) => {\n if (hostSelectors) {\n const convertedSelectors = [];\n const hostSelectorArray = hostSelectors.split(',').map(p => p.trim());\n for (const hostSelector of hostSelectorArray) {\n if (!hostSelector) break;\n const convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, '') + otherSelectors;\n convertedSelectors.push(convertedSelector);\n }\n return convertedSelectors.join(',');\n } else {\n return _polyfillHostNoCombinator + otherSelectors;\n }\n });\n }\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar, .foo <scopeName> > .bar { }\n *\n * and\n *\n * :host-context(.foo:host) .bar { ... }\n *\n * to\n *\n * .foo<scopeName> .bar { ... }\n */\n _convertColonHostContext(cssText) {\n return cssText.replace(_cssColonHostContextReGlobal, selectorText => {\n // We have captured a selector that contains a `:host-context` rule.\n // For backward compatibility `:host-context` may contain a comma separated list of selectors.\n // Each context selector group will contain a list of host-context selectors that must match\n // an ancestor of the host.\n // (Normally `contextSelectorGroups` will only contain a single array of context selectors.)\n const contextSelectorGroups = [[]];\n // There may be more than `:host-context` in this selector so `selectorText` could look like:\n // `:host-context(.one):host-context(.two)`.\n // Execute `_cssColonHostContextRe` over and over until we have extracted all the\n // `:host-context` selectors from this selector.\n let match;\n while (match = _cssColonHostContextRe.exec(selectorText)) {\n // `match` = [':host-context(<selectors>)<rest>', <selectors>, <rest>]\n // The `<selectors>` could actually be a comma separated list: `:host-context(.one, .two)`.\n const newContextSelectors = (match[1] ?? '').trim().split(',').map(m => m.trim()).filter(m => m !== '');\n // We must duplicate the current selector group for each of these new selectors.\n // For example if the current groups are:\n // ```\n // [\n // ['a', 'b', 'c'],\n // ['x', 'y', 'z'],\n // ]\n // ```\n // And we have a new set of comma separated selectors: `:host-context(m,n)` then the new\n // groups are:\n // ```\n // [\n // ['a', 'b', 'c', 'm'],\n // ['x', 'y', 'z', 'm'],\n // ['a', 'b', 'c', 'n'],\n // ['x', 'y', 'z', 'n'],\n // ]\n // ```\n const contextSelectorGroupsLength = contextSelectorGroups.length;\n repeatGroups(contextSelectorGroups, newContextSelectors.length);\n for (let i = 0; i < newContextSelectors.length; i++) {\n for (let j = 0; j < contextSelectorGroupsLength; j++) {\n contextSelectorGroups[j + i * contextSelectorGroupsLength].push(newContextSelectors[i]);\n }\n }\n // Update the `selectorText` and see repeat to see if there are more `:host-context`s.\n selectorText = match[2];\n }\n // The context selectors now must be combined with each other to capture all the possible\n // selectors that `:host-context` can match. See `combineHostContextSelectors()` for more\n // info about how this is done.\n return contextSelectorGroups.map(contextSelectors => combineHostContextSelectors(contextSelectors, selectorText)).join(', ');\n });\n }\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n _convertShadowDOMSelectors(cssText) {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n }\n // change a selector like 'div' to 'name div'\n _scopeSelectors(cssText, scopeSelector, hostSelector) {\n return processRules(cssText, rule => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);\n } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@document') || rule.selector.startsWith('@layer') || rule.selector.startsWith('@container') || rule.selector.startsWith('@scope')) {\n content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n } else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) {\n content = this._stripScopingSelectors(rule.content);\n }\n return new CssRule(selector, content);\n });\n }\n /**\n * Handle a css text that is within a rule that should not contain scope selectors by simply\n * removing them! An example of such a rule is `@font-face`.\n *\n * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector.\n * Normally this would be a syntax error by the author of the styles. But in some rare cases, such\n * as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we\n * can end up with broken css if the imported styles happen to contain @font-face rules.\n *\n * For example:\n *\n * ```\n * :host ::ng-deep {\n * import 'some/lib/containing/font-face';\n * }\n *\n * Similar logic applies to `@page` rules which can contain a particular set of properties,\n * as well as some specific at-rules. Since they can't be encapsulated, we have to strip\n * any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3\n * ```\n */\n _stripScopingSelectors(cssText) {\n return processRules(cssText, rule => {\n const selector = rule.selector.replace(_shadowDeepSelectors, ' ').replace(_polyfillHostNoCombinatorRe, ' ');\n return new CssRule(selector, rule.content);\n });\n }\n _scopeSelector(selector, scopeSelector, hostSelector) {\n return selector.split(',').map(part => part.trim().split(_shadowDeepSelectors)).map(deepParts => {\n const [shallowPart, ...otherParts] = deepParts;\n const applyScope = shallowPart => {\n if (this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n } else {\n return shallowPart;\n }\n };\n return [applyScope(shallowPart), ...otherParts].join(' ');\n }).join(', ');\n }\n _selectorNeedsScoping(selector, scopeSelector) {\n const re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n }\n _makeScopeMatcher(scopeSelector) {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n }\n // scope via name and [is=name]\n _applySimpleSelectorScope(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 const replaceBy = `[${hostSelector}]`;\n return selector.replace(_polyfillHostNoCombinatorRe, (hnc, selector) => {\n return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {\n return before + replaceBy + colon + after;\n });\n }).replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n }\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */\n _applySelectorScope(selector, scopeSelector, hostSelector) {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const attrName = '[' + scopeSelector + ']';\n const _scopeSelectorPart = p => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n } else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n const matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const 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 const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n // A space following an escaped hex value and followed by another hex character\n // (ie: \".\\fc ber\" for \".über\") is not a separator between 2 selectors\n // also keep in mind that backslashes are replaced by a placeholder by SafeSelector\n // These escaped selectors happen for example when esbuild runs with optimization.minify.\n if (part.match(_placeholderRe) && selector[res.index + 1]?.match(/[a-fA-F\\d]/)) {\n continue;\n }\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const 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 _insertPolyfillHostInCssText(selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);\n }\n}\nclass SafeSelector {\n constructor(selector) {\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 = this._escapeRegexMatches(selector, /(\\[[^\\]]*\\])/g);\n // CSS allows for certain special characters to be used in selectors if they're escaped.\n // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a\n // pseudo-class, but writing `.foo\\:blue` will match, because the colon was escaped.\n // Replace all escape sequences (`\\` followed by a character) with a placeholder so\n // that our handling of pseudo-selectors doesn't mess with them.\n selector = this._escapeRegexMatches(selector, /(\\\\.)/g);\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, (_, pseudo, exp) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(exp);\n this.index++;\n return pseudo + replaceBy;\n });\n }\n restore(content) {\n return content.replace(_placeholderRe, (_ph, index) => this.placeholders[+index]);\n }\n content() {\n return this._content;\n }\n /**\n * Replaces all of the substrings that match a regex within a\n * special string (e.g. `__ph-0__`, `__ph-1__`, etc).\n */\n _escapeRegexMatches(content, pattern) {\n return content.replace(pattern, (_, keep) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(keep);\n this.index++;\n return replaceBy;\n });\n }\n}\nconst _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nconst _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = '(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [/::shadow/g, /::content/g,\n// Deprecated selectors\n/\\/shadow-deep\\//g, /\\/shadow\\//g];\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\nconst _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _newLinesRe = /\\r?\\n/g;\nconst _commentRe = /\\/\\*[\\s\\S]*?\\*\\//g;\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=/g;\nconst COMMENT_PLACEHOLDER = '%COMMENT%';\nconst _commentWithHashPlaceHolderRe = new RegExp(COMMENT_PLACEHOLDER, 'g');\nconst _placeholderRe = /__ph-(\\d+)__/g;\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst _ruleRe = new RegExp(`(\\\\s*(?:${COMMENT_PLACEHOLDER}\\\\s*)*)([^;\\\\{\\\\}]+?)(\\\\s*)((?:{%BLOCK%}?\\\\s*;?)|(?:\\\\s*;))`, 'g');\nconst CONTENT_PAIRS = new Map([['{', '}']]);\nconst COMMA_IN_PLACEHOLDER = '%COMMA_IN_PLACEHOLDER%';\nconst SEMI_IN_PLACEHOLDER = '%SEMI_IN_PLACEHOLDER%';\nconst COLON_IN_PLACEHOLDER = '%COLON_IN_PLACEHOLDER%';\nconst _cssCommaInPlaceholderReGlobal = new RegExp(COMMA_IN_PLACEHOLDER, 'g');\nconst _cssSemiInPlaceholderReGlobal = new RegExp(SEMI_IN_PLACEHOLDER, 'g');\nconst _cssColonInPlaceholderReGlobal = new RegExp(COLON_IN_PLACEHOLDER, 'g');\nclass CssRule {\n constructor(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n}\nfunction processRules(input, ruleCallback) {\n const escaped = escapeInStrings(input);\n const inputWithEscapedBlocks = escapeBlocks(escaped, CONTENT_PAIRS, BLOCK_PLACEHOLDER);\n let nextBlockIndex = 0;\n const escapedResult = inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let 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 const rule = ruleCallback(new CssRule(selector, content));\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n return unescapeInStrings(escapedResult);\n}\nclass StringWithEscapedBlocks {\n constructor(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n}\nfunction escapeBlocks(input, charPairs, placeholder) {\n const resultParts = [];\n const escapedBlocks = [];\n let openCharCount = 0;\n let nonBlockStartIndex = 0;\n let blockStartIndex = -1;\n let openChar;\n let closeChar;\n for (let i = 0; i < input.length; i++) {\n const char = input[i];\n if (char === '\\\\') {\n i++;\n } else if (char === closeChar) {\n openCharCount--;\n if (openCharCount === 0) {\n escapedBlocks.push(input.substring(blockStartIndex, i));\n resultParts.push(placeholder);\n nonBlockStartIndex = i;\n blockStartIndex = -1;\n openChar = closeChar = undefined;\n }\n } else if (char === openChar) {\n openCharCount++;\n } else if (openCharCount === 0 && charPairs.has(char)) {\n openChar = char;\n closeChar = charPairs.get(char);\n openCharCount = 1;\n blockStartIndex = i + 1;\n resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));\n }\n }\n if (blockStartIndex !== -1) {\n escapedBlocks.push(input.substring(blockStartIndex));\n resultParts.push(placeholder);\n } else {\n resultParts.push(input.substring(nonBlockStartIndex));\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n/**\n * Object containing as keys characters that should be substituted by placeholders\n * when found in strings during the css text parsing, and as values the respective\n * placeholders\n */\nconst ESCAPE_IN_STRING_MAP = {\n ';': SEMI_IN_PLACEHOLDER,\n ',': COMMA_IN_PLACEHOLDER,\n ':': COLON_IN_PLACEHOLDER\n};\n/**\n * Parse the provided css text and inside strings (meaning, inside pairs of unescaped single or\n * double quotes) replace specific characters with their respective placeholders as indicated\n * by the `ESCAPE_IN_STRING_MAP` map.\n *\n * For example convert the text\n * `animation: \"my-anim:at\\\"ion\" 1s;`\n * to\n * `animation: \"my-anim%COLON_IN_PLACEHOLDER%at\\\"ion\" 1s;`\n *\n * This is necessary in order to remove the meaning of some characters when found inside strings\n * (for example `;` indicates the end of a css declaration, `,` the sequence of values and `:` the\n * division between property and value during a declaration, none of these meanings apply when such\n * characters are within strings and so in order to prevent parsing issues they need to be replaced\n * with placeholder text for the duration of the css manipulation process).\n *\n * @param input the original css text.\n *\n * @returns the css text with specific characters in strings replaced by placeholders.\n **/\nfunction escapeInStrings(input) {\n let result = input;\n let currentQuoteChar = null;\n for (let i = 0; i < result.length; i++) {\n const char = result[i];\n if (char === '\\\\') {\n i++;\n } else {\n if (currentQuoteChar !== null) {\n // index i is inside a quoted sub-string\n if (char === currentQuoteChar) {\n currentQuoteChar = null;\n } else {\n const placeholder = ESCAPE_IN_STRING_MAP[char];\n if (placeholder) {\n result = `${result.substr(0, i)}${placeholder}${result.substr(i + 1)}`;\n i += placeholder.length - 1;\n }\n }\n } else if (char === '\\'' || char === '\"') {\n currentQuoteChar = char;\n }\n }\n }\n return result;\n}\n/**\n * Replace in a string all occurrences of keys in the `ESCAPE_IN_STRING_MAP` map with their\n * original representation, this is simply used to revert the changes applied by the\n * escapeInStrings function.\n *\n * For example it reverts the text:\n * `animation: \"my-anim%COLON_IN_PLACEHOLDER%at\\\"ion\" 1s;`\n * to it's original form of:\n * `animation: \"my-anim:at\\\"ion\" 1s;`\n *\n * Note: For the sake of simplicity this function does not check that the placeholders are\n * actually inside strings as it would anyway be extremely unlikely to find them outside of strings.\n *\n * @param input the css text containing the placeholders.\n *\n * @returns the css text without the placeholders.\n */\nfunction unescapeInStrings(input) {\n let result = input.replace(_cssCommaInPlaceholderReGlobal, ',');\n result = result.replace(_cssSemiInPlaceholderReGlobal, ';');\n result = result.replace(_cssColonInPlaceholderReGlobal, ':');\n return result;\n}\n/**\n * Unescape all quotes present in a string, but only if the string was actually already\n * quoted.\n *\n * This generates a \"canonical\" representation of strings which can be used to match strings\n * which would otherwise only differ because of differently escaped quotes.\n *\n * For example it converts the string (assumed to be quoted):\n * `this \\\\\"is\\\\\" a \\\\'\\\\\\\\'test`\n * to:\n * `this \"is\" a '\\\\\\\\'test`\n * (note that the latter backslashes are not removed as they are not actually escaping the single\n * quote)\n *\n *\n * @param input the string possibly containing escaped quotes.\n * @param isQuoted boolean indicating whether the string was quoted inside a bigger string (if not\n * then it means that it doesn't represent an inner string and thus no unescaping is required)\n *\n * @returns the string in the \"canonical\" representation without escaped quotes.\n */\nfunction unescapeQuotes(str, isQuoted) {\n return !isQuoted ? str : str.replace(/((?:^|[^\\\\])(?:\\\\\\\\)*)\\\\(?=['\"])/g, '$1');\n}\n/**\n * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`\n * to create a selector that matches the same as `:host-context()`.\n *\n * Given a single context selector `A` we need to output selectors that match on the host and as an\n * ancestor of the host:\n *\n * ```\n * A <hostMarker>, A<hostMarker> {}\n * ```\n *\n * When there is more than one context selector we also have to create combinations of those\n * selectors with each other. For example if there are `A` and `B` selectors the output is:\n *\n * ```\n * AB<hostMarker>, AB <hostMarker>, A B<hostMarker>,\n * B A<hostMarker>, A B <hostMarker>, B A <hostMarker> {}\n * ```\n *\n * And so on...\n *\n * @param contextSelectors an array of context selectors that will be combined.\n * @param otherSelectors the rest of the selectors that are not context selectors.\n */\nfunction combineHostContextSelectors(contextSelectors, otherSelectors) {\n const hostMarker = _polyfillHostNoCombinator;\n _polyfillHostRe.lastIndex = 0; // reset the regex to ensure we get an accurate test\n const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);\n // If there are no context selectors then just output a host marker\n if (contextSelectors.length === 0) {\n return hostMarker + otherSelectors;\n }\n const combined = [contextSelectors.pop() || ''];\n while (contextSelectors.length > 0) {\n const length = combined.length;\n const contextSelector = contextSelectors.pop();\n for (let i = 0; i < length; i++) {\n const previousSelectors = combined[i];\n // Add the new selector as a descendant of the previous selectors\n combined[length * 2 + i] = previousSelectors + ' ' + contextSelector;\n // Add the new selector as an ancestor of the previous selectors\n combined[length + i] = contextSelector + ' ' + previousSelectors;\n // Add the new selector to act on the same element as the previous selectors\n combined[i] = contextSelector + previousSelectors;\n }\n }\n // Finally connect the selector to the `hostMarker`s: either acting directly on the host\n // (A<hostMarker>) or as an ancestor (A <hostMarker>).\n return combined.map(s => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(',');\n}\n/**\n * Mutate the given `groups` array so that there are `multiples` clones of the original array\n * stored.\n *\n * For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the\n * newly added groups will be clones of the original.\n *\n * @param groups An array of groups of strings that will be repeated. This array is mutated\n * in-place.\n * @param multiples The number of times the current groups should appear.\n */\nfunction repeatGroups(groups, multiples) {\n const length = groups.length;\n for (let i = 1; i < multiples; i++) {\n for (let j = 0; j < length; j++) {\n groups[j + i * length] = groups[j].slice(0);\n }\n }\n}\nvar TagContentType;\n(function (TagContentType) {\n TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n})(TagContentType || (TagContentType = {}));\nfunction splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const 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// `<ng-container>` tags work the same regardless the namespace\nfunction isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n// `<ng-content>` tags work the same regardless the namespace\nfunction isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n// `<ng-template>` tags work the same regardless the namespace\nfunction isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\nfunction getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\nfunction mergeNsAndName(prefix, localName) {\n return prefix ? `:${prefix}:${localName}` : localName;\n}\n\n/**\n * Enumeration of the types of attributes which can be applied to an element.\n */\nvar BindingKind;\n(function (BindingKind) {\n /**\n * Static attributes.\n */\n BindingKind[BindingKind[\"Attribute\"] = 0] = \"Attribute\";\n /**\n * Class bindings.\n */\n BindingKind[BindingKind[\"ClassName\"] = 1] = \"ClassName\";\n /**\n * Style bindings.\n */\n BindingKind[BindingKind[\"StyleProperty\"] = 2] = \"StyleProperty\";\n /**\n * Dynamic property bindings.\n */\n BindingKind[BindingKind[\"Property\"] = 3] = \"Property\";\n /**\n * Property or attribute bindings on a template.\n */\n BindingKind[BindingKind[\"Template\"] = 4] = \"Template\";\n /**\n * Internationalized attributes.\n */\n BindingKind[BindingKind[\"I18n\"] = 5] = \"I18n\";\n /**\n * TODO: Consider how Animations are handled, and if they should be a distinct BindingKind.\n */\n BindingKind[BindingKind[\"Animation\"] = 6] = \"Animation\";\n})(BindingKind || (BindingKind = {}));\nconst FLYWEIGHT_ARRAY = Object.freeze([]);\n/**\n * Container for all of the various kinds of attributes which are applied on an element.\n */\nclass ElementAttributes {\n constructor() {\n this.known = new Set();\n this.byKind = new Map();\n this.projectAs = null;\n }\n get attributes() {\n return this.byKind.get(BindingKind.Attribute) ?? FLYWEIGHT_ARRAY;\n }\n get classes() {\n return this.byKind.get(BindingKind.ClassName) ?? FLYWEIGHT_ARRAY;\n }\n get styles() {\n return this.byKind.get(BindingKind.StyleProperty) ?? FLYWEIGHT_ARRAY;\n }\n get bindings() {\n return this.byKind.get(BindingKind.Property) ?? FLYWEIGHT_ARRAY;\n }\n get template() {\n return this.byKind.get(BindingKind.Template) ?? FLYWEIGHT_ARRAY;\n }\n get i18n() {\n return this.byKind.get(BindingKind.I18n) ?? FLYWEIGHT_ARRAY;\n }\n add(kind, name, value) {\n if (this.known.has(name)) {\n return;\n }\n this.known.add(name);\n const array = this.arrayFor(kind);\n array.push(...getAttributeNameLiterals$1(name));\n if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {\n if (value === null) {\n throw Error('Attribute & style element attributes must have a value');\n }\n array.push(value);\n }\n }\n arrayFor(kind) {\n if (!this.byKind.has(kind)) {\n this.byKind.set(kind, []);\n }\n return this.byKind.get(kind);\n }\n}\nfunction getAttributeNameLiterals$1(name) {\n const [attributeNamespace, attributeName] = splitNsName(name);\n const nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral];\n }\n return [nameLiteral];\n}\nfunction assertIsElementAttributes(attrs) {\n if (!(attrs instanceof ElementAttributes)) {\n throw new Error(`AssertionError: ElementAttributes has already been coalesced into the view constants`);\n }\n}\n\n/**\n * Distinguishes different kinds of IR operations.\n *\n * Includes both creation and update operations.\n */\nvar OpKind;\n(function (OpKind) {\n /**\n * A special operation type which is used to represent the beginning and end nodes of a linked\n * list of operations.\n */\n OpKind[OpKind[\"ListEnd\"] = 0] = \"ListEnd\";\n /**\n * An operation which wraps an output AST statement.\n */\n OpKind[OpKind[\"Statement\"] = 1] = \"Statement\";\n /**\n * An operation which declares and initializes a `SemanticVariable`.\n */\n OpKind[OpKind[\"Variable\"] = 2] = \"Variable\";\n /**\n * An operation to begin rendering of an element.\n */\n OpKind[OpKind[\"ElementStart\"] = 3] = \"ElementStart\";\n /**\n * An operation to render an element with no children.\n */\n OpKind[OpKind[\"Element\"] = 4] = \"Element\";\n /**\n * An operation which declares an embedded view.\n */\n OpKind[OpKind[\"Template\"] = 5] = \"Template\";\n /**\n * An operation to end rendering of an element previously started with `ElementStart`.\n */\n OpKind[OpKind[\"ElementEnd\"] = 6] = \"ElementEnd\";\n /**\n * An operation to begin an `ng-container`.\n */\n OpKind[OpKind[\"ContainerStart\"] = 7] = \"ContainerStart\";\n /**\n * An operation for an `ng-container` with no children.\n */\n OpKind[OpKind[\"Container\"] = 8] = \"Container\";\n /**\n * An operation to end an `ng-container`.\n */\n OpKind[OpKind[\"ContainerEnd\"] = 9] = \"ContainerEnd\";\n /**\n * An operation disable binding for subsequent elements, which are descendants of a non-bindable\n * node.\n */\n OpKind[OpKind[\"DisableBindings\"] = 10] = \"DisableBindings\";\n /**\n * An operation to re-enable binding, after it was previously disabled.\n */\n OpKind[OpKind[\"EnableBindings\"] = 11] = \"EnableBindings\";\n /**\n * An operation to render a text node.\n */\n OpKind[OpKind[\"Text\"] = 12] = \"Text\";\n /**\n * An operation declaring an event listener for an element.\n */\n OpKind[OpKind[\"Listener\"] = 13] = \"Listener\";\n /**\n * An operation to interpolate text into a text node.\n */\n OpKind[OpKind[\"InterpolateText\"] = 14] = \"InterpolateText\";\n /**\n * An intermediate binding op, that has not yet been processed into an individual property,\n * attribute, style, etc.\n */\n OpKind[OpKind[\"Binding\"] = 15] = \"Binding\";\n /**\n * An operation to bind an expression to a property of an element.\n */\n OpKind[OpKind[\"Property\"] = 16] = \"Property\";\n /**\n * An operation to bind an expression to a style property of an element.\n */\n OpKind[OpKind[\"StyleProp\"] = 17] = \"StyleProp\";\n /**\n * An operation to bind an expression to a class property of an element.\n */\n OpKind[OpKind[\"ClassProp\"] = 18] = \"ClassProp\";\n /**\n * An operation to bind an expression to the styles of an element.\n */\n OpKind[OpKind[\"StyleMap\"] = 19] = \"StyleMap\";\n /**\n * An operation to bind an expression to the classes of an element.\n */\n OpKind[OpKind[\"ClassMap\"] = 20] = \"ClassMap\";\n /**\n * An operation to advance the runtime's implicit slot context during the update phase of a view.\n */\n OpKind[OpKind[\"Advance\"] = 21] = \"Advance\";\n /**\n * An operation to instantiate a pipe.\n */\n OpKind[OpKind[\"Pipe\"] = 22] = \"Pipe\";\n /**\n * An operation to associate an attribute with an element.\n */\n OpKind[OpKind[\"Attribute\"] = 23] = \"Attribute\";\n /**\n * A host binding property.\n */\n OpKind[OpKind[\"HostProperty\"] = 24] = \"HostProperty\";\n /**\n * A namespace change, which causes the subsequent elements to be processed as either HTML or SVG.\n */\n OpKind[OpKind[\"Namespace\"] = 25] = \"Namespace\";\n // TODO: Add Host Listeners, and possibly other host ops also.\n})(OpKind || (OpKind = {}));\n/**\n * Distinguishes different kinds of IR expressions.\n */\nvar ExpressionKind;\n(function (ExpressionKind) {\n /**\n * Read of a variable in a lexical scope.\n */\n ExpressionKind[ExpressionKind[\"LexicalRead\"] = 0] = \"LexicalRead\";\n /**\n * A reference to the current view context.\n */\n ExpressionKind[ExpressionKind[\"Context\"] = 1] = \"Context\";\n /**\n * Read of a variable declared in a `VariableOp`.\n */\n ExpressionKind[ExpressionKind[\"ReadVariable\"] = 2] = \"ReadVariable\";\n /**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\n ExpressionKind[ExpressionKind[\"NextContext\"] = 3] = \"NextContext\";\n /**\n * Runtime operation to retrieve the value of a local reference.\n */\n ExpressionKind[ExpressionKind[\"Reference\"] = 4] = \"Reference\";\n /**\n * Runtime operation to snapshot the current view context.\n */\n ExpressionKind[ExpressionKind[\"GetCurrentView\"] = 5] = \"GetCurrentView\";\n /**\n * Runtime operation to restore a snapshotted view.\n */\n ExpressionKind[ExpressionKind[\"RestoreView\"] = 6] = \"RestoreView\";\n /**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\n ExpressionKind[ExpressionKind[\"ResetView\"] = 7] = \"ResetView\";\n /**\n * Defines and calls a function with change-detected arguments.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionExpr\"] = 8] = \"PureFunctionExpr\";\n /**\n * Indicates a positional parameter to a pure function definition.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionParameterExpr\"] = 9] = \"PureFunctionParameterExpr\";\n /**\n * Binding to a pipe transformation.\n */\n ExpressionKind[ExpressionKind[\"PipeBinding\"] = 10] = \"PipeBinding\";\n /**\n * Binding to a pipe transformation with a variable number of arguments.\n */\n ExpressionKind[ExpressionKind[\"PipeBindingVariadic\"] = 11] = \"PipeBindingVariadic\";\n /*\n * A safe property read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafePropertyRead\"] = 12] = \"SafePropertyRead\";\n /**\n * A safe keyed read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeKeyedRead\"] = 13] = \"SafeKeyedRead\";\n /**\n * A safe function call requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeInvokeFunction\"] = 14] = \"SafeInvokeFunction\";\n /**\n * An intermediate expression that will be expanded from a safe read into an explicit ternary.\n */\n ExpressionKind[ExpressionKind[\"SafeTernaryExpr\"] = 15] = \"SafeTernaryExpr\";\n /**\n * An empty expression that will be stipped before generating the final output.\n */\n ExpressionKind[ExpressionKind[\"EmptyExpr\"] = 16] = \"EmptyExpr\";\n /*\n * An assignment to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"AssignTemporaryExpr\"] = 17] = \"AssignTemporaryExpr\";\n /**\n * A reference to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"ReadTemporaryExpr\"] = 18] = \"ReadTemporaryExpr\";\n /**\n * An expression representing a sanitizer function.\n */\n ExpressionKind[ExpressionKind[\"SanitizerExpr\"] = 19] = \"SanitizerExpr\";\n})(ExpressionKind || (ExpressionKind = {}));\n/**\n * Distinguishes between different kinds of `SemanticVariable`s.\n */\nvar SemanticVariableKind;\n(function (SemanticVariableKind) {\n /**\n * Represents the context of a particular view.\n */\n SemanticVariableKind[SemanticVariableKind[\"Context\"] = 0] = \"Context\";\n /**\n * Represents an identifier declared in the lexical scope of a view.\n */\n SemanticVariableKind[SemanticVariableKind[\"Identifier\"] = 1] = \"Identifier\";\n /**\n * Represents a saved state that can be used to restore a view in a listener handler function.\n */\n SemanticVariableKind[SemanticVariableKind[\"SavedView\"] = 2] = \"SavedView\";\n})(SemanticVariableKind || (SemanticVariableKind = {}));\n/**\n * Whether to compile in compatibilty mode. In compatibility mode, the template pipeline will\n * attempt to match the output of `TemplateDefinitionBuilder` as exactly as possible, at the cost of\n * producing quirky or larger code in some cases.\n */\nvar CompatibilityMode;\n(function (CompatibilityMode) {\n CompatibilityMode[CompatibilityMode[\"Normal\"] = 0] = \"Normal\";\n CompatibilityMode[CompatibilityMode[\"TemplateDefinitionBuilder\"] = 1] = \"TemplateDefinitionBuilder\";\n})(CompatibilityMode || (CompatibilityMode = {}));\n/**\n * Represents functions used to sanitize different pieces of a template.\n */\nvar SanitizerFn;\n(function (SanitizerFn) {\n SanitizerFn[SanitizerFn[\"Html\"] = 0] = \"Html\";\n SanitizerFn[SanitizerFn[\"Script\"] = 1] = \"Script\";\n SanitizerFn[SanitizerFn[\"Style\"] = 2] = \"Style\";\n SanitizerFn[SanitizerFn[\"Url\"] = 3] = \"Url\";\n SanitizerFn[SanitizerFn[\"ResourceUrl\"] = 4] = \"ResourceUrl\";\n SanitizerFn[SanitizerFn[\"IframeAttribute\"] = 5] = \"IframeAttribute\";\n})(SanitizerFn || (SanitizerFn = {}));\n\n/**\n * Marker symbol for `ConsumesSlotOpTrait`.\n */\nconst ConsumesSlot = Symbol('ConsumesSlot');\n/**\n * Marker symbol for `DependsOnSlotContextOpTrait`.\n */\nconst DependsOnSlotContext = Symbol('DependsOnSlotContext');\n/**\n * Marker symbol for `UsesSlotIndex` trait.\n */\nconst UsesSlotIndex = Symbol('UsesSlotIndex');\n/**\n * Marker symbol for `ConsumesVars` trait.\n */\nconst ConsumesVarsTrait = Symbol('ConsumesVars');\n/**\n * Marker symbol for `UsesVarOffset` trait.\n */\nconst UsesVarOffset = Symbol('UsesVarOffset');\n/**\n * Default values for most `ConsumesSlotOpTrait` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_CONSUMES_SLOT = {\n [ConsumesSlot]: true,\n slot: null,\n numSlotsUsed: 1\n};\n/**\n * Default values for most `UsesSlotIndexTrait` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_USES_SLOT_INDEX = {\n [UsesSlotIndex]: true,\n slot: null\n};\n/**\n * Default values for most `DependsOnSlotContextOpTrait` fields (used with the spread operator to\n * initialize implementors of the trait).\n */\nconst TRAIT_DEPENDS_ON_SLOT_CONTEXT = {\n [DependsOnSlotContext]: true\n};\n/**\n * Default values for `UsesVars` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_CONSUMES_VARS = {\n [ConsumesVarsTrait]: true\n};\n/**\n * Default values for `UsesVarOffset` fields (used with the spread operator to initialize\n * implementors of this trait).\n */\nconst TRAIT_USES_VAR_OFFSET = {\n [UsesVarOffset]: true,\n varOffset: null\n};\n/**\n * Test whether an operation implements `ConsumesSlotOpTrait`.\n */\nfunction hasConsumesSlotTrait(op) {\n return op[ConsumesSlot] === true;\n}\n/**\n * Test whether an operation implements `DependsOnSlotContextOpTrait`.\n */\nfunction hasDependsOnSlotContextTrait(op) {\n return op[DependsOnSlotContext] === true;\n}\nfunction hasConsumesVarsTrait(value) {\n return value[ConsumesVarsTrait] === true;\n}\n/**\n * Test whether an expression implements `UsesVarOffsetTrait`.\n */\nfunction hasUsesVarOffsetTrait(expr) {\n return expr[UsesVarOffset] === true;\n}\nfunction hasUsesSlotIndexTrait(value) {\n return value[UsesSlotIndex] === true;\n}\n\n/**\n * Create a `StatementOp`.\n */\nfunction createStatementOp(statement) {\n return {\n kind: OpKind.Statement,\n statement,\n ...NEW_OP\n };\n}\n/**\n * Create a `VariableOp`.\n */\nfunction createVariableOp(xref, variable, initializer) {\n return {\n kind: OpKind.Variable,\n xref,\n variable,\n initializer,\n ...NEW_OP\n };\n}\n/**\n * Static structure shared by all operations.\n *\n * Used as a convenience via the spread operator (`...NEW_OP`) when creating new operations, and\n * ensures the fields are always in the same order.\n */\nconst NEW_OP = {\n debugListId: null,\n prev: null,\n next: null\n};\n\n/**\n * Create an `InterpolationTextOp`.\n */\nfunction createInterpolateTextOp(xref, interpolation, sourceSpan) {\n return {\n kind: OpKind.InterpolateText,\n target: xref,\n interpolation,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\nclass Interpolation {\n constructor(strings, expressions) {\n this.strings = strings;\n this.expressions = expressions;\n }\n}\n/**\n * Create a `BindingOp`, not yet transformed into a particular type of binding.\n */\nfunction createBindingOp(target, kind, name, expression, unit, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Binding,\n bindingKind: kind,\n target,\n name,\n expression,\n unit,\n securityContext,\n isTemplate,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Create a `PropertyOp`.\n */\nfunction createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Property,\n target,\n name,\n expression,\n isAnimationTrigger,\n securityContext,\n sanitizer: null,\n isTemplate,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/** Create a `StylePropOp`. */\nfunction createStylePropOp(xref, name, expression, unit, sourceSpan) {\n return {\n kind: OpKind.StyleProp,\n target: xref,\n name,\n expression,\n unit,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/**\n * Create a `ClassPropOp`.\n */\nfunction createClassPropOp(xref, name, expression, sourceSpan) {\n return {\n kind: OpKind.ClassProp,\n target: xref,\n name,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/** Create a `StyleMapOp`. */\nfunction createStyleMapOp(xref, expression, sourceSpan) {\n return {\n kind: OpKind.StyleMap,\n target: xref,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/**\n * Create a `ClassMapOp`.\n */\nfunction createClassMapOp(xref, expression, sourceSpan) {\n return {\n kind: OpKind.ClassMap,\n target: xref,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/**\n * Create an `AttributeOp`.\n */\nfunction createAttributeOp(target, name, expression, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Attribute,\n target,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isTemplate,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/**\n * Create an `AdvanceOp`.\n */\nfunction createAdvanceOp(delta, sourceSpan) {\n return {\n kind: OpKind.Advance,\n delta,\n sourceSpan,\n ...NEW_OP\n };\n}\nvar _a, _b, _c, _d, _e, _f, _g, _h, _j;\n/**\n * Check whether a given `o.Expression` is a logical IR expression type.\n */\nfunction isIrExpression(expr) {\n return expr instanceof ExpressionBase;\n}\n/**\n * Base type used for all logical IR expressions.\n */\nclass ExpressionBase extends Expression {\n constructor(sourceSpan = null) {\n super(null, sourceSpan);\n }\n}\n/**\n * Logical expression representing a lexical read of a variable name.\n */\nclass LexicalReadExpr extends ExpressionBase {\n constructor(name) {\n super();\n this.name = name;\n this.kind = ExpressionKind.LexicalRead;\n }\n visitExpression(visitor, context) {}\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n return new LexicalReadExpr(this.name);\n }\n}\n/**\n * Runtime operation to retrieve the value of a local reference.\n */\nclass ReferenceExpr extends ExpressionBase {\n static {\n _a = UsesSlotIndex;\n }\n constructor(target, offset) {\n super();\n this.target = target;\n this.offset = offset;\n this.kind = ExpressionKind.Reference;\n this[_a] = true;\n this.slot = null;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof ReferenceExpr && e.target === this.target;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n const expr = new ReferenceExpr(this.target, this.offset);\n expr.slot = this.slot;\n return expr;\n }\n}\n/**\n * A reference to the current view context (usually the `ctx` variable in a template function).\n */\nclass ContextExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.Context;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof ContextExpr && e.view === this.view;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n return new ContextExpr(this.view);\n }\n}\n/**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\nclass NextContextExpr extends ExpressionBase {\n constructor() {\n super();\n this.kind = ExpressionKind.NextContext;\n this.steps = 1;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof NextContextExpr && e.steps === this.steps;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n const expr = new NextContextExpr();\n expr.steps = this.steps;\n return expr;\n }\n}\n/**\n * Runtime operation to snapshot the current view context.\n *\n * The result of this operation can be stored in a variable and later used with the `RestoreView`\n * operation.\n */\nclass GetCurrentViewExpr extends ExpressionBase {\n constructor() {\n super();\n this.kind = ExpressionKind.GetCurrentView;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof GetCurrentViewExpr;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n return new GetCurrentViewExpr();\n }\n}\n/**\n * Runtime operation to restore a snapshotted view.\n */\nclass RestoreViewExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.RestoreView;\n }\n visitExpression(visitor, context) {\n if (typeof this.view !== 'number') {\n this.view.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n if (!(e instanceof RestoreViewExpr) || typeof e.view !== typeof this.view) {\n return false;\n }\n if (typeof this.view === 'number') {\n return this.view === e.view;\n } else {\n return this.view.isEquivalent(e.view);\n }\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n if (typeof this.view !== 'number') {\n this.view = transformExpressionsInExpression(this.view, transform, flags);\n }\n }\n clone() {\n return new RestoreViewExpr(this.view instanceof Expression ? this.view.clone() : this.view);\n }\n}\n/**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\nclass ResetViewExpr extends ExpressionBase {\n constructor(expr) {\n super();\n this.expr = expr;\n this.kind = ExpressionKind.ResetView;\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent(e) {\n return e instanceof ResetViewExpr && this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n return new ResetViewExpr(this.expr.clone());\n }\n}\n/**\n * Read of a variable declared as an `ir.VariableOp` and referenced through its `ir.XrefId`.\n */\nclass ReadVariableExpr extends ExpressionBase {\n constructor(xref) {\n super();\n this.xref = xref;\n this.kind = ExpressionKind.ReadVariable;\n this.name = null;\n }\n visitExpression() {}\n isEquivalent(other) {\n return other instanceof ReadVariableExpr && other.xref === this.xref;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n const expr = new ReadVariableExpr(this.xref);\n expr.name = this.name;\n return expr;\n }\n}\nclass PureFunctionExpr extends ExpressionBase {\n static {\n _b = ConsumesVarsTrait, _c = UsesVarOffset;\n }\n constructor(expression, args) {\n super();\n this.kind = ExpressionKind.PureFunctionExpr;\n this[_b] = true;\n this[_c] = true;\n this.varOffset = null;\n /**\n * Once extracted to the `ConstantPool`, a reference to the function which defines the computation\n * of `body`.\n */\n this.fn = null;\n this.body = expression;\n this.args = args;\n }\n visitExpression(visitor, context) {\n this.body?.visitExpression(visitor, context);\n for (const arg of this.args) {\n arg.visitExpression(visitor, context);\n }\n }\n isEquivalent(other) {\n if (!(other instanceof PureFunctionExpr) || other.args.length !== this.args.length) {\n return false;\n }\n return other.body !== null && this.body !== null && other.body.isEquivalent(this.body) && other.args.every((arg, idx) => arg.isEquivalent(this.args[idx]));\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n if (this.body !== null) {\n // TODO: figure out if this is the right flag to pass here.\n this.body = transformExpressionsInExpression(this.body, transform, flags | VisitorContextFlag.InChildOperation);\n } else if (this.fn !== null) {\n this.fn = transformExpressionsInExpression(this.fn, transform, flags);\n }\n for (let i = 0; i < this.args.length; i++) {\n this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags);\n }\n }\n clone() {\n const expr = new PureFunctionExpr(this.body?.clone() ?? null, this.args.map(arg => arg.clone()));\n expr.fn = this.fn?.clone() ?? null;\n expr.varOffset = this.varOffset;\n return expr;\n }\n}\nclass PureFunctionParameterExpr extends ExpressionBase {\n constructor(index) {\n super();\n this.index = index;\n this.kind = ExpressionKind.PureFunctionParameterExpr;\n }\n visitExpression() {}\n isEquivalent(other) {\n return other instanceof PureFunctionParameterExpr && other.index === this.index;\n }\n isConstant() {\n return true;\n }\n transformInternalExpressions() {}\n clone() {\n return new PureFunctionParameterExpr(this.index);\n }\n}\nclass PipeBindingExpr extends ExpressionBase {\n static {\n _d = UsesSlotIndex, _e = ConsumesVarsTrait, _f = UsesVarOffset;\n }\n constructor(target, name, args) {\n super();\n this.target = target;\n this.name = name;\n this.args = args;\n this.kind = ExpressionKind.PipeBinding;\n this[_d] = true;\n this[_e] = true;\n this[_f] = true;\n this.slot = null;\n this.varOffset = null;\n }\n visitExpression(visitor, context) {\n for (const arg of this.args) {\n arg.visitExpression(visitor, context);\n }\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n for (let idx = 0; idx < this.args.length; idx++) {\n this.args[idx] = transformExpressionsInExpression(this.args[idx], transform, flags);\n }\n }\n clone() {\n const r = new PipeBindingExpr(this.target, this.name, this.args.map(a => a.clone()));\n r.slot = this.slot;\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass PipeBindingVariadicExpr extends ExpressionBase {\n static {\n _g = UsesSlotIndex, _h = ConsumesVarsTrait, _j = UsesVarOffset;\n }\n constructor(target, name, args, numArgs) {\n super();\n this.target = target;\n this.name = name;\n this.args = args;\n this.numArgs = numArgs;\n this.kind = ExpressionKind.PipeBindingVariadic;\n this[_g] = true;\n this[_h] = true;\n this[_j] = true;\n this.slot = null;\n this.varOffset = null;\n }\n visitExpression(visitor, context) {\n this.args.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.args = transformExpressionsInExpression(this.args, transform, flags);\n }\n clone() {\n const r = new PipeBindingVariadicExpr(this.target, this.name, this.args.clone(), this.numArgs);\n r.slot = this.slot;\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass SafePropertyReadExpr extends ExpressionBase {\n constructor(receiver, name) {\n super();\n this.receiver = receiver;\n this.name = name;\n this.kind = ExpressionKind.SafePropertyRead;\n }\n // An alias for name, which allows other logic to handle property reads and keyed reads together.\n get index() {\n return this.name;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n }\n clone() {\n return new SafePropertyReadExpr(this.receiver.clone(), this.name);\n }\n}\nclass SafeKeyedReadExpr extends ExpressionBase {\n constructor(receiver, index) {\n super();\n this.receiver = receiver;\n this.index = index;\n this.kind = ExpressionKind.SafeKeyedRead;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n this.index.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n this.index = transformExpressionsInExpression(this.index, transform, flags);\n }\n clone() {\n return new SafeKeyedReadExpr(this.receiver.clone(), this.index.clone());\n }\n}\nclass SafeInvokeFunctionExpr extends ExpressionBase {\n constructor(receiver, args) {\n super();\n this.receiver = receiver;\n this.args = args;\n this.kind = ExpressionKind.SafeInvokeFunction;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n for (const a of this.args) {\n a.visitExpression(visitor, context);\n }\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n for (let i = 0; i < this.args.length; i++) {\n this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags);\n }\n }\n clone() {\n return new SafeInvokeFunctionExpr(this.receiver.clone(), this.args.map(a => a.clone()));\n }\n}\nclass SafeTernaryExpr extends ExpressionBase {\n constructor(guard, expr) {\n super();\n this.guard = guard;\n this.expr = expr;\n this.kind = ExpressionKind.SafeTernaryExpr;\n }\n visitExpression(visitor, context) {\n this.guard.visitExpression(visitor, context);\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.guard = transformExpressionsInExpression(this.guard, transform, flags);\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n return new SafeTernaryExpr(this.guard.clone(), this.expr.clone());\n }\n}\nclass EmptyExpr extends ExpressionBase {\n constructor() {\n super(...arguments);\n this.kind = ExpressionKind.EmptyExpr;\n }\n visitExpression(visitor, context) {}\n isEquivalent(e) {\n return e instanceof EmptyExpr;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new EmptyExpr();\n }\n transformInternalExpressions() {}\n}\nclass AssignTemporaryExpr extends ExpressionBase {\n constructor(expr, xref) {\n super();\n this.expr = expr;\n this.xref = xref;\n this.kind = ExpressionKind.AssignTemporaryExpr;\n this.name = null;\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n const a = new AssignTemporaryExpr(this.expr.clone(), this.xref);\n a.name = this.name;\n return a;\n }\n}\nclass ReadTemporaryExpr extends ExpressionBase {\n constructor(xref) {\n super();\n this.xref = xref;\n this.kind = ExpressionKind.ReadTemporaryExpr;\n this.name = null;\n }\n visitExpression(visitor, context) {}\n isEquivalent() {\n return this.xref === this.xref;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {}\n clone() {\n const r = new ReadTemporaryExpr(this.xref);\n r.name = this.name;\n return r;\n }\n}\nclass SanitizerExpr extends ExpressionBase {\n constructor(fn) {\n super();\n this.fn = fn;\n this.kind = ExpressionKind.SanitizerExpr;\n }\n visitExpression(visitor, context) {}\n isEquivalent(e) {\n return e instanceof SanitizerExpr && e.fn === this.fn;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new SanitizerExpr(this.fn);\n }\n transformInternalExpressions() {}\n}\n/**\n * Visits all `Expression`s in the AST of `op` with the `visitor` function.\n */\nfunction visitExpressionsInOp(op, visitor) {\n transformExpressionsInOp(op, (expr, flags) => {\n visitor(expr, flags);\n return expr;\n }, VisitorContextFlag.None);\n}\nvar VisitorContextFlag;\n(function (VisitorContextFlag) {\n VisitorContextFlag[VisitorContextFlag[\"None\"] = 0] = \"None\";\n VisitorContextFlag[VisitorContextFlag[\"InChildOperation\"] = 1] = \"InChildOperation\";\n})(VisitorContextFlag || (VisitorContextFlag = {}));\nfunction transformExpressionsInInterpolation(interpolation, transform, flags) {\n for (let i = 0; i < interpolation.expressions.length; i++) {\n interpolation.expressions[i] = transformExpressionsInExpression(interpolation.expressions[i], transform, flags);\n }\n}\n/**\n * Transform all `Expression`s in the AST of `op` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInOp(op, transform, flags) {\n switch (op.kind) {\n case OpKind.StyleProp:\n case OpKind.StyleMap:\n case OpKind.ClassProp:\n case OpKind.ClassMap:\n case OpKind.Binding:\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n transformExpressionsInInterpolation(op.expression, transform, flags);\n } else {\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n }\n break;\n case OpKind.Property:\n case OpKind.Attribute:\n if (op.expression instanceof Interpolation) {\n transformExpressionsInInterpolation(op.expression, transform, flags);\n } else {\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n }\n op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags);\n break;\n case OpKind.InterpolateText:\n transformExpressionsInInterpolation(op.interpolation, transform, flags);\n break;\n case OpKind.Statement:\n transformExpressionsInStatement(op.statement, transform, flags);\n break;\n case OpKind.Variable:\n op.initializer = transformExpressionsInExpression(op.initializer, transform, flags);\n break;\n case OpKind.Listener:\n for (const innerOp of op.handlerOps) {\n transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);\n }\n break;\n case OpKind.Element:\n case OpKind.ElementStart:\n case OpKind.ElementEnd:\n case OpKind.Container:\n case OpKind.ContainerStart:\n case OpKind.ContainerEnd:\n case OpKind.Template:\n case OpKind.DisableBindings:\n case OpKind.EnableBindings:\n case OpKind.Text:\n case OpKind.Pipe:\n case OpKind.Advance:\n case OpKind.Namespace:\n // These operations contain no expressions.\n break;\n default:\n throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);\n }\n}\n/**\n * Transform all `Expression`s in the AST of `expr` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInExpression(expr, transform, flags) {\n if (expr instanceof ExpressionBase) {\n expr.transformInternalExpressions(transform, flags);\n } else if (expr instanceof BinaryOperatorExpr) {\n expr.lhs = transformExpressionsInExpression(expr.lhs, transform, flags);\n expr.rhs = transformExpressionsInExpression(expr.rhs, transform, flags);\n } else if (expr instanceof ReadPropExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n } else if (expr instanceof ReadKeyExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.index = transformExpressionsInExpression(expr.index, transform, flags);\n } else if (expr instanceof WritePropExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n } else if (expr instanceof WriteKeyExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.index = transformExpressionsInExpression(expr.index, transform, flags);\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n } else if (expr instanceof InvokeFunctionExpr) {\n expr.fn = transformExpressionsInExpression(expr.fn, transform, flags);\n for (let i = 0; i < expr.args.length; i++) {\n expr.args[i] = transformExpressionsInExpression(expr.args[i], transform, flags);\n }\n } else if (expr instanceof LiteralArrayExpr) {\n for (let i = 0; i < expr.entries.length; i++) {\n expr.entries[i] = transformExpressionsInExpression(expr.entries[i], transform, flags);\n }\n } else if (expr instanceof LiteralMapExpr) {\n for (let i = 0; i < expr.entries.length; i++) {\n expr.entries[i].value = transformExpressionsInExpression(expr.entries[i].value, transform, flags);\n }\n } else if (expr instanceof ConditionalExpr) {\n expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);\n expr.trueCase = transformExpressionsInExpression(expr.trueCase, transform, flags);\n if (expr.falseCase !== null) {\n expr.falseCase = transformExpressionsInExpression(expr.falseCase, transform, flags);\n }\n } else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {\n // No action for these types.\n } else {\n throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);\n }\n return transform(expr, flags);\n}\n/**\n * Transform all `Expression`s in the AST of `stmt` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInStatement(stmt, transform, flags) {\n if (stmt instanceof ExpressionStatement) {\n stmt.expr = transformExpressionsInExpression(stmt.expr, transform, flags);\n } else if (stmt instanceof ReturnStatement) {\n stmt.value = transformExpressionsInExpression(stmt.value, transform, flags);\n } else if (stmt instanceof DeclareVarStmt) {\n if (stmt.value !== undefined) {\n stmt.value = transformExpressionsInExpression(stmt.value, transform, flags);\n }\n } else {\n throw new Error(`Unhandled statement kind: ${stmt.constructor.name}`);\n }\n}\n\n/**\n * A linked list of `Op` nodes of a given subtype.\n *\n * @param OpT specific subtype of `Op` nodes which this list contains.\n */\nclass OpList {\n static {\n this.nextListId = 0;\n }\n constructor() {\n /**\n * Debug ID of this `OpList` instance.\n */\n this.debugListId = OpList.nextListId++;\n // OpList uses static head/tail nodes of a special `ListEnd` type.\n // This avoids the need for special casing of the first and last list\n // elements in all list operations.\n this.head = {\n kind: OpKind.ListEnd,\n next: null,\n prev: null,\n debugListId: this.debugListId\n };\n this.tail = {\n kind: OpKind.ListEnd,\n next: null,\n prev: null,\n debugListId: this.debugListId\n };\n // Link `head` and `tail` together at the start (list is empty).\n this.head.next = this.tail;\n this.tail.prev = this.head;\n }\n /**\n * Push a new operation to the tail of the list.\n */\n push(op) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = this.debugListId;\n // The old \"previous\" node (which might be the head, if the list is empty).\n const oldLast = this.tail.prev;\n // Insert `op` following the old last node.\n op.prev = oldLast;\n oldLast.next = op;\n // Connect `op` with the list tail.\n op.next = this.tail;\n this.tail.prev = op;\n }\n /**\n * Prepend one or more nodes to the start of the list.\n */\n prepend(ops) {\n if (ops.length === 0) {\n return;\n }\n for (const op of ops) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = this.debugListId;\n }\n const first = this.head.next;\n let prev = this.head;\n for (const op of ops) {\n prev.next = op;\n op.prev = prev;\n prev = op;\n }\n prev.next = first;\n first.prev = prev;\n }\n /**\n * `OpList` is iterable via the iteration protocol.\n *\n * It's safe to mutate the part of the list that has already been returned by the iterator, up to\n * and including the last operation returned. Mutations beyond that point _may_ be safe, but may\n * also corrupt the iteration position and should be avoided.\n */\n *[Symbol.iterator]() {\n let current = this.head.next;\n while (current !== this.tail) {\n // Guards against corruption of the iterator state by mutations to the tail of the list during\n // iteration.\n OpList.assertIsOwned(current, this.debugListId);\n const next = current.next;\n yield current;\n current = next;\n }\n }\n *reversed() {\n let current = this.tail.prev;\n while (current !== this.head) {\n OpList.assertIsOwned(current, this.debugListId);\n const prev = current.prev;\n yield current;\n current = prev;\n }\n }\n /**\n * Replace `oldOp` with `newOp` in the list.\n */\n static replace(oldOp, newOp) {\n OpList.assertIsNotEnd(oldOp);\n OpList.assertIsNotEnd(newOp);\n OpList.assertIsOwned(oldOp);\n OpList.assertIsUnowned(newOp);\n newOp.debugListId = oldOp.debugListId;\n if (oldOp.prev !== null) {\n oldOp.prev.next = newOp;\n newOp.prev = oldOp.prev;\n }\n if (oldOp.next !== null) {\n oldOp.next.prev = newOp;\n newOp.next = oldOp.next;\n }\n oldOp.debugListId = null;\n oldOp.prev = null;\n oldOp.next = null;\n }\n /**\n * Replace `oldOp` with some number of new operations in the list (which may include `oldOp`).\n */\n static replaceWithMany(oldOp, newOps) {\n if (newOps.length === 0) {\n // Replacing with an empty list -> pure removal.\n OpList.remove(oldOp);\n return;\n }\n OpList.assertIsNotEnd(oldOp);\n OpList.assertIsOwned(oldOp);\n const listId = oldOp.debugListId;\n oldOp.debugListId = null;\n for (const newOp of newOps) {\n OpList.assertIsNotEnd(newOp);\n // `newOp` might be `oldOp`, but at this point it's been marked as unowned.\n OpList.assertIsUnowned(newOp);\n }\n // It should be safe to reuse `oldOp` in the `newOps` list - maybe you want to sandwich an\n // operation between two new ops.\n const {\n prev: oldPrev,\n next: oldNext\n } = oldOp;\n oldOp.prev = null;\n oldOp.next = null;\n let prev = oldPrev;\n for (const newOp of newOps) {\n this.assertIsUnowned(newOp);\n newOp.debugListId = listId;\n prev.next = newOp;\n newOp.prev = prev;\n // This _should_ be the case, but set it just in case.\n newOp.next = null;\n prev = newOp;\n }\n // At the end of iteration, `prev` holds the last node in the list.\n const first = newOps[0];\n const last = prev;\n // Replace `oldOp` with the chain `first` -> `last`.\n if (oldPrev !== null) {\n oldPrev.next = first;\n first.prev = oldOp.prev;\n }\n if (oldNext !== null) {\n oldNext.prev = last;\n last.next = oldNext;\n }\n }\n /**\n * Remove the given node from the list which contains it.\n */\n static remove(op) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsOwned(op);\n op.prev.next = op.next;\n op.next.prev = op.prev;\n // Break any link between the node and this list to safeguard against its usage in future\n // operations.\n op.debugListId = null;\n op.prev = null;\n op.next = null;\n }\n /**\n * Insert `op` before `target`.\n */\n static insertBefore(op, target) {\n OpList.assertIsOwned(target);\n if (target.prev === null) {\n throw new Error(`AssertionError: illegal operation on list start`);\n }\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = target.debugListId;\n // Just in case.\n op.prev = null;\n target.prev.next = op;\n op.prev = target.prev;\n op.next = target;\n target.prev = op;\n }\n /**\n * Insert `op` after `target`.\n */\n static insertAfter(op, target) {\n OpList.assertIsOwned(target);\n if (target.next === null) {\n throw new Error(`AssertionError: illegal operation on list end`);\n }\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = target.debugListId;\n target.next.prev = op;\n op.next = target.next;\n op.prev = target;\n target.next = op;\n }\n /**\n * Asserts that `op` does not currently belong to a list.\n */\n static assertIsUnowned(op) {\n if (op.debugListId !== null) {\n throw new Error(`AssertionError: illegal operation on owned node: ${OpKind[op.kind]}`);\n }\n }\n /**\n * Asserts that `op` currently belongs to a list. If `byList` is passed, `op` is asserted to\n * specifically belong to that list.\n */\n static assertIsOwned(op, byList) {\n if (op.debugListId === null) {\n throw new Error(`AssertionError: illegal operation on unowned node: ${OpKind[op.kind]}`);\n } else if (byList !== undefined && op.debugListId !== byList) {\n throw new Error(`AssertionError: node belongs to the wrong list (expected ${byList}, actual ${op.debugListId})`);\n }\n }\n /**\n * Asserts that `op` is not a special `ListEnd` node.\n */\n static assertIsNotEnd(op) {\n if (op.kind === OpKind.ListEnd) {\n throw new Error(`AssertionError: illegal operation on list head or tail`);\n }\n }\n}\n\n/**\n * The set of OpKinds that represent the creation of an element or container\n */\nconst elementContainerOpKinds = new Set([OpKind.Element, OpKind.ElementStart, OpKind.Container, OpKind.ContainerStart, OpKind.Template]);\n/**\n * Checks whether the given operation represents the creation of an element or container.\n */\nfunction isElementOrContainerOp(op) {\n return elementContainerOpKinds.has(op.kind);\n}\n/**\n * Create an `ElementStartOp`.\n */\nfunction createElementStartOp(tag, xref, namespace, sourceSpan) {\n return {\n kind: OpKind.ElementStart,\n xref,\n tag,\n attributes: new ElementAttributes(),\n localRefs: [],\n nonBindable: false,\n namespace,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create a `TemplateOp`.\n */\nfunction createTemplateOp(xref, tag, namespace, sourceSpan) {\n return {\n kind: OpKind.Template,\n xref,\n attributes: new ElementAttributes(),\n tag,\n decls: null,\n vars: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create an `ElementEndOp`.\n */\nfunction createElementEndOp(xref, sourceSpan) {\n return {\n kind: OpKind.ElementEnd,\n xref,\n sourceSpan,\n ...NEW_OP\n };\n}\nfunction createDisableBindingsOp(xref) {\n return {\n kind: OpKind.DisableBindings,\n xref,\n ...NEW_OP\n };\n}\nfunction createEnableBindingsOp(xref) {\n return {\n kind: OpKind.EnableBindings,\n xref,\n ...NEW_OP\n };\n}\n/**\n * Create a `TextOp`.\n */\nfunction createTextOp(xref, initialValue, sourceSpan) {\n return {\n kind: OpKind.Text,\n xref,\n initialValue,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create a `ListenerOp`.\n */\nfunction createListenerOp(target, name, tag) {\n return {\n kind: OpKind.Listener,\n target,\n tag,\n name,\n handlerOps: new OpList(),\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: false,\n animationPhase: null,\n ...NEW_OP,\n ...TRAIT_USES_SLOT_INDEX\n };\n}\n/**\n * Create a `ListenerOp` for an animation.\n */\nfunction createListenerOpForAnimation(target, name, animationPhase, tag) {\n return {\n kind: OpKind.Listener,\n target,\n tag,\n name,\n handlerOps: new OpList(),\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: true,\n animationPhase,\n ...NEW_OP,\n ...TRAIT_USES_SLOT_INDEX\n };\n}\nfunction createPipeOp(xref, name) {\n return {\n kind: OpKind.Pipe,\n xref,\n name,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT\n };\n}\n/**\n * Whether the active namespace is HTML, MathML, or SVG mode.\n */\nvar Namespace;\n(function (Namespace) {\n Namespace[Namespace[\"HTML\"] = 0] = \"HTML\";\n Namespace[Namespace[\"SVG\"] = 1] = \"SVG\";\n Namespace[Namespace[\"Math\"] = 2] = \"Math\";\n})(Namespace || (Namespace = {}));\nfunction createNamespaceOp(namespace) {\n return {\n kind: OpKind.Namespace,\n active: namespace,\n ...NEW_OP\n };\n}\nfunction createHostPropertyOp(name, expression, sourceSpan) {\n return {\n kind: OpKind.HostProperty,\n name,\n expression,\n sourceSpan,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n\n/**\n * A compilation unit is compiled into a template function.\n * Some example units are views and host bindings.\n */\nclass CompilationUnit {\n constructor(xref) {\n this.xref = xref;\n /**\n * List of creation operations for this view.\n *\n * Creation operations may internally contain other operations, including update operations.\n */\n this.create = new OpList();\n /**\n * List of update operations for this view.\n */\n this.update = new OpList();\n /**\n * Name of the function which will be generated for this unit.\n *\n * May be `null` if not yet determined.\n */\n this.fnName = null;\n /**\n * Number of variable slots used within this view, or `null` if variables have not yet been\n * counted.\n */\n this.vars = null;\n }\n /**\n * Iterate over all `ir.Op`s within this view.\n *\n * Some operations may have child operations, which this iterator will visit.\n */\n *ops() {\n for (const op of this.create) {\n yield op;\n if (op.kind === OpKind.Listener) {\n for (const listenerOp of op.handlerOps) {\n yield listenerOp;\n }\n }\n }\n for (const op of this.update) {\n yield op;\n }\n }\n}\nclass HostBindingCompilationJob extends CompilationUnit {\n // TODO: Perhaps we should accept a reference to the enclosing component, and get the name from\n // there?\n constructor(componentName, pool, compatibility) {\n super(0);\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.fnSuffix = 'HostBindings';\n this.units = [this];\n this.nextXrefId = 1;\n }\n get job() {\n return this;\n }\n get root() {\n return this;\n }\n allocateXrefId() {\n return this.nextXrefId++;\n }\n}\n/**\n * Compilation-in-progress of a whole component's template, including the main template and any\n * embedded views or host bindings.\n */\nclass ComponentCompilationJob {\n get units() {\n return this.views.values();\n }\n constructor(componentName, pool, compatibility) {\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.fnSuffix = 'Template';\n /**\n * Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.\n */\n this.nextXrefId = 0;\n /**\n * Map of view IDs to `ViewCompilation`s.\n */\n this.views = new Map();\n /**\n * Constant expressions used by operations within this component's compilation.\n *\n * This will eventually become the `consts` array in the component definition.\n */\n this.consts = [];\n // Allocate the root view.\n const root = new ViewCompilationUnit(this, this.allocateXrefId(), null);\n this.views.set(root.xref, root);\n this.root = root;\n }\n /**\n * Add a `ViewCompilation` for a new embedded view to this compilation.\n */\n allocateView(parent) {\n const view = new ViewCompilationUnit(this, this.allocateXrefId(), parent);\n this.views.set(view.xref, view);\n return view;\n }\n /**\n * Generate a new unique `ir.XrefId` in this job.\n */\n allocateXrefId() {\n return this.nextXrefId++;\n }\n /**\n * Add a constant `o.Expression` to the compilation and return its index in the `consts` array.\n */\n addConst(newConst) {\n for (let idx = 0; idx < this.consts.length; idx++) {\n if (this.consts[idx].isEquivalent(newConst)) {\n return idx;\n }\n }\n const idx = this.consts.length;\n this.consts.push(newConst);\n return idx;\n }\n}\n/**\n * Compilation-in-progress of an individual view within a template.\n */\nclass ViewCompilationUnit extends CompilationUnit {\n constructor(job, xref, parent) {\n super(xref);\n this.job = job;\n this.parent = parent;\n /**\n * Map of declared variables available within this view to the property on the context object\n * which they alias.\n */\n this.contextVariables = new Map();\n /**\n * Number of declaration slots used within this view, or `null` if slots have not yet been\n * allocated.\n */\n this.decls = null;\n }\n get compatibility() {\n return this.job.compatibility;\n }\n}\n\n/**\n * Counts the number of variable slots used within each view, and stores that on the view itself, as\n * well as propagates it to the `ir.TemplateOp` for embedded views.\n */\nfunction phaseVarCounting(job) {\n // First, count the vars used in each view, and update the view-level counter.\n for (const unit of job.units) {\n let varCount = 0;\n for (const op of unit.ops()) {\n if (hasConsumesVarsTrait(op)) {\n varCount += varsUsedByOp(op);\n }\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n // Some expressions require knowledge of the number of variable slots consumed.\n if (hasUsesVarOffsetTrait(expr)) {\n expr.varOffset = varCount;\n }\n if (hasConsumesVarsTrait(expr)) {\n varCount += varsUsedByIrExpression(expr);\n }\n });\n }\n unit.vars = varCount;\n }\n if (job instanceof ComponentCompilationJob) {\n // Add var counts for each view to the `ir.TemplateOp` which declares that view (if the view is\n // an embedded view).\n for (const view of job.views.values()) {\n for (const op of view.create) {\n if (op.kind !== OpKind.Template) {\n continue;\n }\n const childView = job.views.get(op.xref);\n op.vars = childView.vars;\n }\n }\n }\n}\n/**\n * Different operations that implement `ir.UsesVarsTrait` use different numbers of variables, so\n * count the variables used by any particular `op`.\n */\nfunction varsUsedByOp(op) {\n let slots;\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.HostProperty:\n case OpKind.Attribute:\n // All of these bindings use 1 variable slot, plus 1 slot for every interpolated expression,\n // if any.\n slots = 1;\n if (op.expression instanceof Interpolation) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n case OpKind.StyleMap:\n case OpKind.ClassMap:\n // Style & class bindings use 2 variable slots, plus 1 slot for every interpolated expression,\n // if any.\n slots = 2;\n if (op.expression instanceof Interpolation) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.InterpolateText:\n // `ir.InterpolateTextOp`s use a variable slot for each dynamic expression.\n return op.interpolation.expressions.length;\n default:\n throw new Error(`Unhandled op: ${OpKind[op.kind]}`);\n }\n}\nfunction varsUsedByIrExpression(expr) {\n switch (expr.kind) {\n case ExpressionKind.PureFunctionExpr:\n return 1 + expr.args.length;\n case ExpressionKind.PipeBinding:\n return 1 + expr.args.length;\n case ExpressionKind.PipeBindingVariadic:\n return 1 + expr.numArgs;\n default:\n throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${expr.constructor.name}`);\n }\n}\nfunction phaseAlignPipeVariadicVarOffset(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.update) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof PipeBindingVariadicExpr)) {\n return expr;\n }\n if (!(expr.args instanceof PureFunctionExpr)) {\n return expr;\n }\n if (expr.varOffset === null || expr.args.varOffset === null) {\n throw new Error(`Must run after variable counting`);\n }\n // The structure of this variadic pipe expression is:\n // PipeBindingVariadic(#, Y, PureFunction(X, ...ARGS))\n // Where X and Y are the slot offsets for the variables used by these operations, and Y > X.\n // In `TemplateDefinitionBuilder` the PipeBindingVariadic variable slots are allocated\n // before the PureFunction slots, which is unusually out-of-order.\n //\n // To maintain identical output for the tests in question, we adjust the variable offsets of\n // these two calls to emulate TDB's behavior. This is not perfect, because the ARGS of the\n // PureFunction call may also allocate slots which by TDB's ordering would come after X, and\n // we don't account for that. Still, this should be enough to pass the existing pipe tests.\n // Put the PipeBindingVariadic vars where the PureFunction vars were previously allocated.\n expr.varOffset = expr.args.varOffset;\n // Put the PureFunction vars following the PipeBindingVariadic vars.\n expr.args.varOffset = expr.varOffset + varsUsedByIrExpression(expr);\n });\n }\n }\n}\n\n/**\n * Find any function calls to `$any`, excluding `this.$any`, and delete them.\n */\nfunction phaseFindAnyCasts(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.ops()) {\n transformExpressionsInOp(op, removeAnys, VisitorContextFlag.None);\n }\n }\n}\nfunction removeAnys(e) {\n if (e instanceof InvokeFunctionExpr && e.fn instanceof LexicalReadExpr && e.fn.name === '$any') {\n if (e.args.length !== 1) {\n throw new Error('The $any builtin function expects exactly one argument.');\n }\n return e.args[0];\n }\n return e;\n}\n\n/**\n * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n * Example: `color: red; height: auto`.\n * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',\n * 'auto']`\n */\nfunction parse(value) {\n // we use a string array here instead of a string map\n // because a string-map is not guaranteed to retain the\n // order of the entries whereas a string array can be\n // constructed in a [key, value, key, value] format.\n const styles = [];\n let i = 0;\n let parenDepth = 0;\n let quote = 0 /* Char.QuoteNone */;\n let valueStart = 0;\n let propStart = 0;\n let currentProp = null;\n while (i < value.length) {\n const token = value.charCodeAt(i++);\n switch (token) {\n case 40 /* Char.OpenParen */:\n parenDepth++;\n break;\n case 41 /* Char.CloseParen */:\n parenDepth--;\n break;\n case 39 /* Char.QuoteSingle */:\n // valueStart needs to be there since prop values don't\n // have quotes in CSS\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 39 /* Char.QuoteSingle */;\n } else if (quote === 39 /* Char.QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 34 /* Char.QuoteDouble */:\n // same logic as above\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 34 /* Char.QuoteDouble */;\n } else if (quote === 34 /* Char.QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 58 /* Char.Colon */:\n if (!currentProp && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n currentProp = hyphenate$1(value.substring(propStart, i - 1).trim());\n valueStart = i;\n }\n break;\n case 59 /* Char.Semicolon */:\n if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n const styleVal = value.substring(valueStart, i - 1).trim();\n styles.push(currentProp, styleVal);\n propStart = i;\n valueStart = 0;\n currentProp = null;\n }\n break;\n }\n }\n if (currentProp && valueStart) {\n const styleVal = value.slice(valueStart).trim();\n styles.push(currentProp, styleVal);\n }\n return styles;\n}\nfunction hyphenate$1(value) {\n return value.replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n }).toLowerCase();\n}\n\n/**\n * Gets a map of all elements in the given view by their xref id.\n */\nfunction getElementsByXrefId(view) {\n const elements = new Map();\n for (const op of view.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n return elements;\n}\n\n/**\n * Find all attribute and binding ops, and collect them into the ElementAttribute structures.\n * In cases where no instruction needs to be generated for the attribute or binding, it is removed.\n */\nfunction phaseAttributeExtraction(cpl) {\n for (const [_, view] of cpl.views) {\n populateElementAttributes(view);\n }\n}\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement$2(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\n/**\n * Populates the ElementAttributes map for the given view, and removes ops for any bindings that do\n * not need further processing.\n */\nfunction populateElementAttributes(view) {\n const elements = getElementsByXrefId(view);\n for (const op of view.ops()) {\n let ownerOp;\n switch (op.kind) {\n case OpKind.Attribute:\n extractAttributeOp(view, op, elements);\n break;\n case OpKind.Property:\n if (op.isAnimationTrigger) {\n continue; // Don't extract animation properties.\n }\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n ownerOp.attributes.add(op.isTemplate ? BindingKind.Template : BindingKind.Property, op.name, null);\n break;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n // Empty StyleProperty and ClassName expressions are treated differently depending on\n // compatibility mode.\n if (view.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr) {\n // The old compiler treated empty style bindings as regular bindings for the purpose of\n // directive matching. That behavior is incorrect, but we emulate it in compatibility\n // mode.\n ownerOp.attributes.add(BindingKind.Property, op.name, null);\n }\n break;\n case OpKind.Listener:\n if (op.isAnimationListener) {\n continue; // Don't extract animation listeners.\n }\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n ownerOp.attributes.add(BindingKind.Property, op.name, null);\n break;\n }\n }\n}\nfunction isStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string';\n}\nfunction extractAttributeOp(view, op, elements) {\n if (op.expression instanceof Interpolation) {\n return;\n }\n const ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n if (op.name === 'style' && isStringLiteral(op.expression)) {\n // TemplateDefinitionBuilder did not extract style attributes that had a security context.\n if (view.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.securityContext !== SecurityContext.NONE) {\n return;\n }\n // Extract style attributes.\n const parsedStyles = parse(op.expression.value);\n for (let i = 0; i < parsedStyles.length - 1; i += 2) {\n ownerOp.attributes.add(BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]));\n }\n OpList.remove(op);\n } else {\n // The old compiler only extracted string constants, so we emulate that behavior in\n // compaitiblity mode, otherwise we optimize more aggressively.\n let extractable = view.compatibility === CompatibilityMode.TemplateDefinitionBuilder ? op.expression instanceof LiteralExpr && typeof op.expression.value === 'string' : op.expression.isConstant();\n // We don't need to generate instructions for attributes that can be extracted as consts.\n if (extractable) {\n ownerOp.attributes.add(op.isTemplate ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression);\n OpList.remove(op);\n }\n }\n}\n\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement$1(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\nfunction phaseBindingSpecialization(job) {\n const elements = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n }\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n switch (op.bindingKind) {\n case BindingKind.Attribute:\n if (op.name === 'ngNonBindable') {\n OpList.remove(op);\n const target = lookupElement$1(elements, op.target);\n target.nonBindable = true;\n } else {\n OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTemplate, op.sourceSpan));\n }\n break;\n case BindingKind.Property:\n case BindingKind.Animation:\n if (job instanceof HostBindingCompilationJob) {\n // TODO: host property animations\n OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.sourceSpan));\n } else {\n OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isTemplate, op.sourceSpan));\n }\n break;\n case BindingKind.I18n:\n case BindingKind.ClassName:\n case BindingKind.StyleProperty:\n throw new Error(`Unhandled binding of kind ${BindingKind[op.bindingKind]}`);\n }\n }\n }\n}\nconst CHAINABLE = new Set([Identifiers.elementStart, Identifiers.elementEnd, Identifiers.element, Identifiers.property, Identifiers.hostProperty, Identifiers.styleProp, Identifiers.attribute, Identifiers.stylePropInterpolate1, Identifiers.stylePropInterpolate2, Identifiers.stylePropInterpolate3, Identifiers.stylePropInterpolate4, Identifiers.stylePropInterpolate5, Identifiers.stylePropInterpolate6, Identifiers.stylePropInterpolate7, Identifiers.stylePropInterpolate8, Identifiers.stylePropInterpolateV, Identifiers.classProp, Identifiers.listener, Identifiers.elementContainerStart, Identifiers.elementContainerEnd, Identifiers.elementContainer, Identifiers.listener]);\n/**\n * Post-process a reified view compilation and convert sequential calls to chainable instructions\n * into chain calls.\n *\n * For example, two `elementStart` operations in sequence:\n *\n * ```typescript\n * elementStart(0, 'div');\n * elementStart(1, 'span');\n * ```\n *\n * Can be called as a chain instead:\n *\n * ```typescript\n * elementStart(0, 'div')(1, 'span');\n * ```\n */\nfunction phaseChaining(job) {\n for (const unit of job.units) {\n chainOperationsInList(unit.create);\n chainOperationsInList(unit.update);\n }\n}\nfunction chainOperationsInList(opList) {\n let chain = null;\n for (const op of opList) {\n if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement)) {\n // This type of statement isn't chainable.\n chain = null;\n continue;\n }\n if (!(op.statement.expr instanceof InvokeFunctionExpr) || !(op.statement.expr.fn instanceof ExternalExpr)) {\n // This is a statement, but not an instruction-type call, so not chainable.\n chain = null;\n continue;\n }\n const instruction = op.statement.expr.fn.value;\n if (!CHAINABLE.has(instruction)) {\n // This instruction isn't chainable.\n chain = null;\n continue;\n }\n // This instruction can be chained. It can either be added on to the previous chain (if\n // compatible) or it can be the start of a new chain.\n if (chain !== null && chain.instruction === instruction) {\n // This instruction can be added onto the previous chain.\n const expression = chain.expression.callFn(op.statement.expr.args, op.statement.expr.sourceSpan, op.statement.expr.pure);\n chain.expression = expression;\n chain.op.statement = expression.toStmt();\n OpList.remove(op);\n } else {\n // Leave this instruction alone for now, but consider it the start of a new chain.\n chain = {\n op,\n instruction,\n expression: op.statement.expr\n };\n }\n }\n}\n\n/**\n * Converts the semantic attributes of element-like operations (elements, templates) into constant\n * array expressions, and lifts them into the overall component `consts`.\n */\nfunction phaseConstCollection(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.create) {\n if (op.kind !== OpKind.ElementStart && op.kind !== OpKind.Element && op.kind !== OpKind.Template) {\n continue;\n } else if (!(op.attributes instanceof ElementAttributes)) {\n continue;\n }\n const attrArray = serializeAttributes(op.attributes);\n if (attrArray.entries.length > 0) {\n op.attributes = cpl.addConst(attrArray);\n } else {\n op.attributes = null;\n }\n }\n }\n}\nfunction serializeAttributes({\n attributes,\n bindings,\n classes,\n i18n,\n projectAs,\n styles,\n template\n}) {\n const attrArray = [...attributes];\n if (projectAs !== null) {\n attrArray.push(literal(5 /* core.AttributeMarker.ProjectAs */), literal(projectAs));\n }\n if (classes.length > 0) {\n attrArray.push(literal(1 /* core.AttributeMarker.Classes */), ...classes);\n }\n if (styles.length > 0) {\n attrArray.push(literal(2 /* core.AttributeMarker.Styles */), ...styles);\n }\n if (bindings.length > 0) {\n attrArray.push(literal(3 /* core.AttributeMarker.Bindings */), ...bindings);\n }\n if (template.length > 0) {\n attrArray.push(literal(4 /* core.AttributeMarker.Template */), ...template);\n }\n if (i18n.length > 0) {\n attrArray.push(literal(6 /* core.AttributeMarker.I18n */), ...i18n);\n }\n return literalArr(attrArray);\n}\nconst REPLACEMENTS = new Map([[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]], [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]]]);\n/**\n * Replace sequences of mergable elements (e.g. `ElementStart` and `ElementEnd`) with a consolidated\n * element (e.g. `Element`).\n */\nfunction phaseEmptyElements(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.create) {\n const opReplacements = REPLACEMENTS.get(op.kind);\n if (opReplacements === undefined) {\n continue;\n }\n const [startKind, mergedKind] = opReplacements;\n if (op.prev !== null && op.prev.kind === startKind) {\n // Transmute the start instruction to the merged version. This is safe as they're designed\n // to be identical apart from the `kind`.\n op.prev.kind = mergedKind;\n // Remove the end instruction.\n OpList.remove(op);\n }\n }\n }\n}\n\n/**\n * Finds all unresolved safe read expressions, and converts them into the appropriate output AST\n * reads, guarded by null checks.\n */\nfunction phaseExpandSafeReads(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, e => safeTransform(e, {\n job\n }), VisitorContextFlag.None);\n transformExpressionsInOp(op, ternaryTransform, VisitorContextFlag.None);\n }\n }\n}\n// A lookup set of all the expression kinds that require a temporary variable to be generated.\nconst requiresTemporary = [InvokeFunctionExpr, LiteralArrayExpr, LiteralMapExpr, SafeInvokeFunctionExpr, PipeBindingExpr].map(e => e.constructor.name);\nfunction needsTemporaryInSafeAccess(e) {\n // TODO: We probably want to use an expression visitor to recursively visit all descendents.\n // However, that would potentially do a lot of extra work (because it cannot short circuit), so we\n // implement the logic ourselves for now.\n if (e instanceof UnaryOperatorExpr) {\n return needsTemporaryInSafeAccess(e.expr);\n } else if (e instanceof BinaryOperatorExpr) {\n return needsTemporaryInSafeAccess(e.lhs) || needsTemporaryInSafeAccess(e.rhs);\n } else if (e instanceof ConditionalExpr) {\n if (e.falseCase && needsTemporaryInSafeAccess(e.falseCase)) return true;\n return needsTemporaryInSafeAccess(e.condition) || needsTemporaryInSafeAccess(e.trueCase);\n } else if (e instanceof NotExpr) {\n return needsTemporaryInSafeAccess(e.condition);\n } else if (e instanceof AssignTemporaryExpr) {\n return needsTemporaryInSafeAccess(e.expr);\n } else if (e instanceof ReadPropExpr) {\n return needsTemporaryInSafeAccess(e.receiver);\n } else if (e instanceof ReadKeyExpr) {\n return needsTemporaryInSafeAccess(e.receiver) || needsTemporaryInSafeAccess(e.index);\n }\n // TODO: Switch to a method which is exhaustive of newly added expression subtypes.\n return e instanceof InvokeFunctionExpr || e instanceof LiteralArrayExpr || e instanceof LiteralMapExpr || e instanceof SafeInvokeFunctionExpr || e instanceof PipeBindingExpr;\n}\nfunction temporariesIn(e) {\n const temporaries = new Set();\n // TODO: Although it's not currently supported by the transform helper, we should be able to\n // short-circuit exploring the tree to do less work. In particular, we don't have to penetrate\n // into the subexpressions of temporary assignments.\n transformExpressionsInExpression(e, e => {\n if (e instanceof AssignTemporaryExpr) {\n temporaries.add(e.xref);\n }\n return e;\n }, VisitorContextFlag.None);\n return temporaries;\n}\nfunction eliminateTemporaryAssignments(e, tmps, ctx) {\n // TODO: We can be more efficient than the transform helper here. We don't need to visit any\n // descendents of temporary assignments.\n transformExpressionsInExpression(e, e => {\n if (e instanceof AssignTemporaryExpr && tmps.has(e.xref)) {\n const read = new ReadTemporaryExpr(e.xref);\n // `TemplateDefinitionBuilder` has the (accidental?) behavior of generating assignments of\n // temporary variables to themselves. This happens because some subexpression that the\n // temporary refers to, possibly through nested temporaries, has a function call. We copy that\n // behavior here.\n return ctx.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder ? new AssignTemporaryExpr(read, read.xref) : read;\n }\n return e;\n }, VisitorContextFlag.None);\n return e;\n}\n/**\n * Creates a safe ternary guarded by the input expression, and with a body generated by the provided\n * callback on the input expression. Generates a temporary variable assignment if needed, and\n * deduplicates nested temporary assignments if needed.\n */\nfunction safeTernaryWithTemporary(guard, body, ctx) {\n let result;\n if (needsTemporaryInSafeAccess(guard)) {\n const xref = ctx.job.allocateXrefId();\n result = [new AssignTemporaryExpr(guard, xref), new ReadTemporaryExpr(xref)];\n } else {\n result = [guard, guard.clone()];\n // Consider an expression like `a?.[b?.c()]?.d`. The `b?.c()` will be transformed first,\n // introducing a temporary assignment into the key. Then, as part of expanding the `?.d`. That\n // assignment will be duplicated into both the guard and expression sides. We de-duplicate it,\n // by transforming it from an assignment into a read on the expression side.\n eliminateTemporaryAssignments(result[1], temporariesIn(result[0]), ctx);\n }\n return new SafeTernaryExpr(result[0], body(result[1]));\n}\nfunction isSafeAccessExpression(e) {\n return e instanceof SafePropertyReadExpr || e instanceof SafeKeyedReadExpr || e instanceof SafeInvokeFunctionExpr;\n}\nfunction isUnsafeAccessExpression(e) {\n return e instanceof ReadPropExpr || e instanceof ReadKeyExpr || e instanceof InvokeFunctionExpr;\n}\nfunction isAccessExpression(e) {\n return isSafeAccessExpression(e) || isUnsafeAccessExpression(e);\n}\nfunction deepestSafeTernary(e) {\n if (isAccessExpression(e) && e.receiver instanceof SafeTernaryExpr) {\n let st = e.receiver;\n while (st.expr instanceof SafeTernaryExpr) {\n st = st.expr;\n }\n return st;\n }\n return null;\n}\n// TODO: When strict compatibility with TemplateDefinitionBuilder is not required, we can use `&&`\n// instead to save some code size.\nfunction safeTransform(e, ctx) {\n if (!isAccessExpression(e)) {\n return e;\n }\n const dst = deepestSafeTernary(e);\n if (dst) {\n if (e instanceof InvokeFunctionExpr) {\n dst.expr = dst.expr.callFn(e.args);\n return e.receiver;\n }\n if (e instanceof ReadPropExpr) {\n dst.expr = dst.expr.prop(e.name);\n return e.receiver;\n }\n if (e instanceof ReadKeyExpr) {\n dst.expr = dst.expr.key(e.index);\n return e.receiver;\n }\n if (e instanceof SafeInvokeFunctionExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, r => r.callFn(e.args), ctx);\n return e.receiver;\n }\n if (e instanceof SafePropertyReadExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, r => r.prop(e.name), ctx);\n return e.receiver;\n }\n if (e instanceof SafeKeyedReadExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, r => r.key(e.index), ctx);\n return e.receiver;\n }\n } else {\n if (e instanceof SafeInvokeFunctionExpr) {\n return safeTernaryWithTemporary(e.receiver, r => r.callFn(e.args), ctx);\n }\n if (e instanceof SafePropertyReadExpr) {\n return safeTernaryWithTemporary(e.receiver, r => r.prop(e.name), ctx);\n }\n if (e instanceof SafeKeyedReadExpr) {\n return safeTernaryWithTemporary(e.receiver, r => r.key(e.index), ctx);\n }\n }\n return e;\n}\nfunction ternaryTransform(e) {\n if (!(e instanceof SafeTernaryExpr)) {\n return e;\n }\n return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);\n}\n\n/**\n * Generate `ir.AdvanceOp`s in between `ir.UpdateOp`s that ensure the runtime's implicit slot\n * context will be advanced correctly.\n */\nfunction phaseGenerateAdvance(cpl) {\n for (const [_, view] of cpl.views) {\n // First build a map of all of the declarations in the view that have assigned slots.\n const slotMap = new Map();\n for (const op of view.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n } else if (op.slot === null) {\n throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);\n }\n slotMap.set(op.xref, op.slot);\n }\n // Next, step through the update operations and generate `ir.AdvanceOp`s as required to ensure\n // the runtime's implicit slot counter will be set to the correct slot before executing each\n // update operation which depends on it.\n //\n // To do that, we track what the runtime's slot counter will be through the update operations.\n let slotContext = 0;\n for (const op of view.update) {\n if (!hasDependsOnSlotContextTrait(op)) {\n // `op` doesn't depend on the slot counter, so it can be skipped.\n continue;\n } else if (!slotMap.has(op.target)) {\n // We expect ops that _do_ depend on the slot counter to point at declarations that exist in\n // the `slotMap`.\n throw new Error(`AssertionError: reference to unknown slot for var ${op.target}`);\n }\n const slot = slotMap.get(op.target);\n // Does the slot counter need to be adjusted?\n if (slotContext !== slot) {\n // If so, generate an `ir.AdvanceOp` to advance the counter.\n const delta = slot - slotContext;\n if (delta < 0) {\n throw new Error(`AssertionError: slot counter should never need to move backwards`);\n }\n OpList.insertBefore(createAdvanceOp(delta, op.sourceSpan), op);\n slotContext = slot;\n }\n }\n }\n}\n\n/**\n * Generate a preamble sequence for each view creation block and listener function which declares\n * any variables that be referenced in other operations in the block.\n *\n * Variables generated include:\n * * a saved view context to be used to restore the current view in event listeners.\n * * the context of the restored view within event listener handlers.\n * * context variables from the current view as well as all parent views (including the root\n * context if needed).\n * * local references from elements within the current view and any lexical parents.\n *\n * Variables are generated here unconditionally, and may optimized away in future operations if it\n * turns out their values (and any side effects) are unused.\n */\nfunction phaseGenerateVariables(cpl) {\n recursivelyProcessView(cpl.root, /* there is no parent scope for the root view */null);\n}\n/**\n * Process the given `ViewCompilation` and generate preambles for it and any listeners that it\n * declares.\n *\n * @param `parentScope` a scope extracted from the parent view which captures any variables which\n * should be inherited by this view. `null` if the current view is the root view.\n */\nfunction recursivelyProcessView(view, parentScope) {\n // Extract a `Scope` from this view.\n const scope = getScopeForView(view, parentScope);\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.Template:\n // Descend into child embedded views.\n recursivelyProcessView(view.job.views.get(op.xref), scope);\n break;\n case OpKind.Listener:\n // Prepend variables to listener handler functions.\n op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));\n break;\n }\n }\n // Prepend the declarations for all available variables in scope to the `update` block.\n const preambleOps = generateVariablesInScopeForView(view, scope);\n view.update.prepend(preambleOps);\n}\n/**\n * Process a view and generate a `Scope` representing the variables available for reference within\n * that view.\n */\nfunction getScopeForView(view, parent) {\n const scope = {\n view: view.xref,\n viewContextVariable: {\n kind: SemanticVariableKind.Context,\n name: null,\n view: view.xref\n },\n contextVariables: new Map(),\n references: [],\n parent\n };\n for (const identifier of view.contextVariables.keys()) {\n scope.contextVariables.set(identifier, {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier\n });\n }\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.Element:\n case OpKind.ElementStart:\n case OpKind.Template:\n if (!Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: expected localRefs to be an array`);\n }\n // Record available local references from this element.\n for (let offset = 0; offset < op.localRefs.length; offset++) {\n scope.references.push({\n name: op.localRefs[offset].name,\n targetId: op.xref,\n offset,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.localRefs[offset].name\n }\n });\n }\n break;\n }\n }\n return scope;\n}\n/**\n * Generate declarations for all variables that are in scope for a given view.\n *\n * This is a recursive process, as views inherit variables available from their parent view, which\n * itself may have inherited variables, etc.\n */\nfunction generateVariablesInScopeForView(view, scope) {\n const newOps = [];\n if (scope.view !== view.xref) {\n // Before generating variables for a parent view, we need to switch to the context of the parent\n // view with a `nextContext` expression. This context switching operation itself declares a\n // variable, because the context of the view may be referenced directly.\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr()));\n }\n // Add variables for all context variables available in this scope's view.\n for (const [name, value] of view.job.views.get(scope.view).contextVariables) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), new ReadPropExpr(new ContextExpr(scope.view), value)));\n }\n // Add variables for all local references declared for elements in this scope.\n for (const ref of scope.references) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.offset)));\n }\n if (scope.parent !== null) {\n // Recursively add variables from the parent scope.\n newOps.push(...generateVariablesInScopeForView(view, scope.parent));\n }\n return newOps;\n}\nconst STYLE_DOT = 'style.';\nconst CLASS_DOT = 'class.';\nfunction phaseHostStylePropertyParsing(job) {\n for (const op of job.update) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n if (op.name.startsWith(STYLE_DOT)) {\n op.bindingKind = BindingKind.StyleProperty;\n op.name = op.name.substring(STYLE_DOT.length);\n if (isCssCustomProperty$1(op.name)) {\n op.name = hyphenate(op.name);\n }\n const {\n property,\n suffix\n } = parseProperty$1(op.name);\n op.name = property;\n op.unit = suffix;\n } else if (op.name.startsWith('style!')) {\n // TODO: do we only transform !important?\n op.name = 'style';\n } else if (op.name.startsWith(CLASS_DOT)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty$1(op.name.substring(CLASS_DOT.length)).property;\n }\n }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\nfunction isCssCustomProperty$1(name) {\n return name.startsWith('--');\n}\nfunction hyphenate(value) {\n return value.replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n }).toLowerCase();\n}\nfunction parseProperty$1(name) {\n const overrideIndex = name.indexOf('!important');\n if (overrideIndex !== -1) {\n name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n }\n let suffix = null;\n let property = name;\n const unitIndex = name.lastIndexOf('.');\n if (unitIndex > 0) {\n suffix = name.slice(unitIndex + 1);\n property = name.substring(0, unitIndex);\n }\n return {\n property,\n suffix\n };\n}\n\n/**\n * Lifts local reference declarations on element-like structures within each view into an entry in\n * the `consts` array for the whole component.\n */\nfunction phaseLocalRefs(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.ElementStart:\n case OpKind.Element:\n case OpKind.Template:\n if (!Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: expected localRefs to be an array still`);\n }\n op.numSlotsUsed += op.localRefs.length;\n if (op.localRefs.length > 0) {\n const localRefs = serializeLocalRefs(op.localRefs);\n op.localRefs = cpl.addConst(localRefs);\n } else {\n op.localRefs = null;\n }\n break;\n }\n }\n }\n}\nfunction serializeLocalRefs(refs) {\n const constRefs = [];\n for (const ref of refs) {\n constRefs.push(literal(ref.name), literal(ref.target));\n }\n return literalArr(constRefs);\n}\n\n/**\n * Change namespaces between HTML, SVG and MathML, depending on the next element.\n */\nfunction phaseNamespace(job) {\n for (const [_, view] of job.views) {\n let activeNamespace = Namespace.HTML;\n for (const op of view.create) {\n if (op.kind !== OpKind.Element && op.kind !== OpKind.ElementStart) {\n continue;\n }\n if (op.namespace !== activeNamespace) {\n OpList.insertBefore(createNamespaceOp(op.namespace), op);\n activeNamespace = op.namespace;\n }\n }\n }\n}\nconst BINARY_OPERATORS = new Map([['&&', BinaryOperator.And], ['>', BinaryOperator.Bigger], ['>=', BinaryOperator.BiggerEquals], ['&', BinaryOperator.BitwiseAnd], ['/', BinaryOperator.Divide], ['==', BinaryOperator.Equals], ['===', BinaryOperator.Identical], ['<', BinaryOperator.Lower], ['<=', BinaryOperator.LowerEquals], ['-', BinaryOperator.Minus], ['%', BinaryOperator.Modulo], ['*', BinaryOperator.Multiply], ['!=', BinaryOperator.NotEquals], ['!==', BinaryOperator.NotIdentical], ['??', BinaryOperator.NullishCoalesce], ['||', BinaryOperator.Or], ['+', BinaryOperator.Plus]]);\nconst NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]);\nfunction namespaceForKey(namespacePrefixKey) {\n if (namespacePrefixKey === null) {\n return Namespace.HTML;\n }\n return NAMESPACES.get(namespacePrefixKey) ?? Namespace.HTML;\n}\nfunction keyForNamespace(namespace) {\n for (const [k, n] of NAMESPACES.entries()) {\n if (n === namespace) {\n return k;\n }\n }\n return null; // No namespace prefix for HTML\n}\nfunction prefixWithNamespace(strippedTag, namespace) {\n if (namespace === Namespace.HTML) {\n return strippedTag;\n }\n return `:${keyForNamespace(namespace)}:${strippedTag}`;\n}\n\n/**\n * Generate names for functions and variables across all views.\n *\n * This includes propagating those names into any `ir.ReadVariableExpr`s of those variables, so that\n * the reads can be emitted correctly.\n */\nfunction phaseNaming(cpl) {\n addNamesToView(cpl.root, cpl.componentName, {\n index: 0\n }, cpl.compatibility === CompatibilityMode.TemplateDefinitionBuilder);\n}\nfunction addNamesToView(unit, baseName, state, compatibility) {\n if (unit.fnName === null) {\n unit.fnName = sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`);\n }\n // Keep track of the names we assign to variables in the view. We'll need to propagate these\n // into reads of those variables afterwards.\n const varNames = new Map();\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Property:\n if (op.isAnimationTrigger) {\n op.name = '@' + op.name;\n }\n break;\n case OpKind.Listener:\n if (op.handlerFnName === null) {\n if (op.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n const safeTagName = op.tag.replace('-', '_');\n if (op.isAnimationListener) {\n op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${safeTagName}_animation_${op.name}_${op.animationPhase}_${op.slot}_listener`);\n op.name = `@${op.name}.${op.animationPhase}`;\n } else {\n op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${safeTagName}_${op.name}_${op.slot}_listener`);\n }\n }\n break;\n case OpKind.Variable:\n varNames.set(op.xref, getVariableName(op.variable, state));\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const childView = unit.job.views.get(op.xref);\n if (op.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n addNamesToView(childView, `${baseName}_${prefixWithNamespace(op.tag, op.namespace)}_${op.slot}`, state, compatibility);\n break;\n case OpKind.StyleProp:\n op.name = normalizeStylePropName(op.name);\n if (compatibility) {\n op.name = stripImportant(op.name);\n }\n break;\n case OpKind.ClassProp:\n if (compatibility) {\n op.name = stripImportant(op.name);\n }\n break;\n }\n }\n // Having named all variables declared in the view, now we can push those names into the\n // `ir.ReadVariableExpr` expressions which represent reads of those variables.\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof ReadVariableExpr) || expr.name !== null) {\n return;\n }\n if (!varNames.has(expr.xref)) {\n throw new Error(`Variable ${expr.xref} not yet named`);\n }\n expr.name = varNames.get(expr.xref);\n });\n }\n}\nfunction getVariableName(variable, state) {\n if (variable.name === null) {\n switch (variable.kind) {\n case SemanticVariableKind.Context:\n variable.name = `ctx_r${state.index++}`;\n break;\n case SemanticVariableKind.Identifier:\n variable.name = `${variable.identifier}_${state.index++}`;\n break;\n default:\n variable.name = `_r${state.index++}`;\n break;\n }\n }\n return variable.name;\n}\n/**\n * Normalizes a style prop name by hyphenating it (unless its a CSS variable).\n */\nfunction normalizeStylePropName(name) {\n return name.startsWith('--') ? name : hyphenate$1(name);\n}\n/**\n * Strips `!important` out of the given style or class name.\n */\nfunction stripImportant(name) {\n const importantIndex = name.indexOf('!important');\n if (importantIndex > -1) {\n return name.substring(0, importantIndex);\n }\n return name;\n}\n\n/**\n * Merges logically sequential `NextContextExpr` operations.\n *\n * `NextContextExpr` can be referenced repeatedly, \"popping\" the runtime's context stack each time.\n * When two such expressions appear back-to-back, it's possible to merge them together into a single\n * `NextContextExpr` that steps multiple contexts. This merging is possible if all conditions are\n * met:\n *\n * * The result of the `NextContextExpr` that's folded into the subsequent one is not stored (that\n * is, the call is purely side-effectful).\n * * No operations in between them uses the implicit context.\n */\nfunction phaseMergeNextContext(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.create) {\n if (op.kind === OpKind.Listener) {\n mergeNextContextsInOps(op.handlerOps);\n }\n }\n mergeNextContextsInOps(view.update);\n }\n}\nfunction mergeNextContextsInOps(ops) {\n for (const op of ops) {\n // Look for a candidate operation to maybe merge.\n if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement) || !(op.statement.expr instanceof NextContextExpr)) {\n continue;\n }\n const mergeSteps = op.statement.expr.steps;\n // Try to merge this `ir.NextContextExpr`.\n let tryToMerge = true;\n for (let candidate = op.next; candidate.kind !== OpKind.ListEnd && tryToMerge; candidate = candidate.next) {\n visitExpressionsInOp(candidate, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return expr;\n }\n if (!tryToMerge) {\n // Either we've already merged, or failed to merge.\n return;\n }\n if (flags & VisitorContextFlag.InChildOperation) {\n // We cannot merge into child operations.\n return;\n }\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n // Merge the previous `ir.NextContextExpr` into this one.\n expr.steps += mergeSteps;\n OpList.remove(op);\n tryToMerge = false;\n break;\n case ExpressionKind.GetCurrentView:\n case ExpressionKind.Reference:\n // Can't merge past a dependency on the context.\n tryToMerge = false;\n break;\n }\n });\n }\n }\n}\nconst CONTAINER_TAG = 'ng-container';\n/**\n * Replace an `Element` or `ElementStart` whose tag is `ng-container` with a specific op.\n */\nfunction phaseNgContainer(cpl) {\n for (const [_, view] of cpl.views) {\n const updatedElementXrefs = new Set();\n for (const op of view.create) {\n if (op.kind === OpKind.ElementStart && op.tag === CONTAINER_TAG) {\n // Transmute the `ElementStart` instruction to `ContainerStart`.\n op.kind = OpKind.ContainerStart;\n updatedElementXrefs.add(op.xref);\n }\n if (op.kind === OpKind.ElementEnd && updatedElementXrefs.has(op.xref)) {\n // This `ElementEnd` is associated with an `ElementStart` we already transmuted.\n op.kind = OpKind.ContainerEnd;\n }\n }\n }\n}\n\n/**\n * Transforms special-case bindings with 'style' or 'class' in their names. Must run before the\n * main binding specialization pass.\n */\nfunction phaseNoListenersOnTemplates(job) {\n for (const unit of job.units) {\n let inTemplate = false;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.Template:\n inTemplate = true;\n break;\n case OpKind.ElementStart:\n case OpKind.Element:\n case OpKind.ContainerStart:\n case OpKind.Container:\n inTemplate = false;\n break;\n case OpKind.Listener:\n if (inTemplate) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\n\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\n/**\n * When a container is marked with `ngNonBindable`, the non-bindable characteristic also applies to\n * all descendants of that container. Therefore, we must emit `disableBindings` and `enableBindings`\n * instructions for every such container.\n */\nfunction phaseNonbindable(job) {\n const elements = new Map();\n for (const view of job.units) {\n for (const op of view.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n }\n for (const [_, view] of job.views) {\n for (const op of view.create) {\n if ((op.kind === OpKind.ElementStart || op.kind === OpKind.ContainerStart) && op.nonBindable) {\n OpList.insertAfter(createDisableBindingsOp(op.xref), op);\n }\n if ((op.kind === OpKind.ElementEnd || op.kind === OpKind.ContainerEnd) && lookupElement(elements, op.xref).nonBindable) {\n OpList.insertBefore(createEnableBindingsOp(op.xref), op);\n }\n }\n }\n}\nfunction phaseNullishCoalescing(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof BinaryOperatorExpr) || expr.operator !== BinaryOperator.NullishCoalesce) {\n return expr;\n }\n const assignment = new AssignTemporaryExpr(expr.lhs.clone(), job.allocateXrefId());\n const read = new ReadTemporaryExpr(assignment.xref);\n // TODO: When not in compatibility mode for TemplateDefinitionBuilder, we can just emit\n // `t != null` instead of including an undefined check as well.\n return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.And, new BinaryOperatorExpr(BinaryOperator.NotIdentical, assignment, NULL_EXPR), new BinaryOperatorExpr(BinaryOperator.NotIdentical, read, new LiteralExpr(undefined))), read.clone(), expr.rhs);\n }, VisitorContextFlag.None);\n }\n }\n}\nfunction phasePipeCreation(cpl) {\n for (const view of cpl.views.values()) {\n processPipeBindingsInView(view);\n }\n}\nfunction processPipeBindingsInView(view) {\n for (const updateOp of view.update) {\n visitExpressionsInOp(updateOp, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.PipeBinding) {\n return;\n }\n if (flags & VisitorContextFlag.InChildOperation) {\n throw new Error(`AssertionError: pipe bindings should not appear in child expressions`);\n }\n if (!hasDependsOnSlotContextTrait(updateOp)) {\n throw new Error(`AssertionError: pipe binding associated with non-slot operation ${OpKind[updateOp.kind]}`);\n }\n addPipeToCreationBlock(view, updateOp.target, expr);\n });\n }\n}\nfunction addPipeToCreationBlock(view, afterTargetXref, binding) {\n // Find the appropriate point to insert the Pipe creation operation.\n // We're looking for `afterTargetXref` (and also want to insert after any other pipe operations\n // which might be beyond it).\n for (let op = view.create.head.next; op.kind !== OpKind.ListEnd; op = op.next) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n if (op.xref !== afterTargetXref) {\n continue;\n }\n // We've found a tentative insertion point; however, we also want to skip past any _other_ pipe\n // operations present.\n while (op.next.kind === OpKind.Pipe) {\n op = op.next;\n }\n const pipe = createPipeOp(binding.target, binding.name);\n OpList.insertBefore(pipe, op.next);\n // This completes adding the pipe to the creation block.\n return;\n }\n // At this point, we've failed to add the pipe to the creation block.\n throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);\n}\nfunction phasePipeVariadic(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.update) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof PipeBindingExpr)) {\n return expr;\n }\n // Pipes are variadic if they have more than 4 arguments.\n if (expr.args.length <= 4) {\n return expr;\n }\n return new PipeBindingVariadicExpr(expr.target, expr.name, literalArr(expr.args), expr.args.length);\n }, VisitorContextFlag.None);\n }\n }\n}\nfunction kindTest(kind) {\n return op => op.kind === kind;\n}\n/**\n * Defines the groups based on `OpKind` that ops will be divided into. Ops will be collected into\n * groups, then optionally transformed, before recombining the groups in the order defined here.\n */\nconst ORDERING = [{\n test: kindTest(OpKind.StyleMap),\n transform: keepLast\n}, {\n test: kindTest(OpKind.ClassMap),\n transform: keepLast\n}, {\n test: kindTest(OpKind.StyleProp)\n}, {\n test: kindTest(OpKind.ClassProp)\n}, {\n test: op => (op.kind === OpKind.Property || op.kind === OpKind.HostProperty) && op.expression instanceof Interpolation\n}, {\n test: op => (op.kind === OpKind.Property || op.kind === OpKind.HostProperty) && !(op.expression instanceof Interpolation)\n}, {\n test: kindTest(OpKind.Attribute)\n}];\n/**\n * The set of all op kinds we handle in the reordering phase.\n */\nconst handledOpKinds = new Set([OpKind.StyleMap, OpKind.ClassMap, OpKind.StyleProp, OpKind.ClassProp, OpKind.Property, OpKind.HostProperty, OpKind.Attribute]);\n/**\n * Reorders property and attribute ops according to the following ordering:\n * 1. styleMap & styleMapInterpolate (drops all but the last op in the group)\n * 2. classMap & classMapInterpolate (drops all but the last op in the group)\n * 3. styleProp & stylePropInterpolate (ordering preserved within group)\n * 4. classProp (ordering preserved within group)\n * 5. propertyInterpolate (ordering preserved within group)\n * 6. property (ordering preserved within group)\n * 7. attribute & attributeInterpolate (ordering preserve within group)\n */\nfunction phasePropertyOrdering(cpl) {\n for (const unit of cpl.units) {\n let opsToOrder = [];\n for (const op of unit.update) {\n if (handledOpKinds.has(op.kind)) {\n // Pull out ops that need o be ordered.\n opsToOrder.push(op);\n OpList.remove(op);\n } else {\n // When we encounter an op that shouldn't be reordered, put the ones we've pulled so far\n // back in the correct order.\n for (const orderedOp of reorder(opsToOrder)) {\n OpList.insertBefore(orderedOp, op);\n }\n opsToOrder = [];\n }\n }\n // If we still have ops pulled at the end, put them back in the correct order.\n for (const orderedOp of reorder(opsToOrder)) {\n unit.update.push(orderedOp);\n }\n }\n}\n/**\n * Reorders the given list of ops according to the ordering defined by `ORDERING`.\n */\nfunction reorder(ops) {\n // Break the ops list into groups based on OpKind.\n const groups = Array.from(ORDERING, () => new Array());\n for (const op of ops) {\n const groupIndex = ORDERING.findIndex(o => o.test(op));\n groups[groupIndex].push(op);\n }\n // Reassemble the groups into a single list, in the correct order.\n return groups.flatMap((group, i) => {\n const transform = ORDERING[i].transform;\n return transform ? transform(group) : group;\n });\n}\n/**\n * Keeps only the last op in a list of ops.\n */\nfunction keepLast(ops) {\n return ops.slice(ops.length - 1);\n}\nfunction phasePureFunctionExtraction(job) {\n for (const view of job.units) {\n for (const op of view.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof PureFunctionExpr) || expr.body === null) {\n return;\n }\n const constantDef = new PureFunctionConstant(expr.args.length);\n expr.fn = job.pool.getSharedConstant(constantDef, expr.body);\n expr.body = null;\n });\n }\n }\n}\nclass PureFunctionConstant extends GenericKeyFn {\n constructor(numArgs) {\n super();\n this.numArgs = numArgs;\n }\n keyOf(expr) {\n if (expr instanceof PureFunctionParameterExpr) {\n return `param(${expr.index})`;\n } else {\n return super.keyOf(expr);\n }\n }\n toSharedConstantDeclaration(declName, keyExpr) {\n const fnParams = [];\n for (let idx = 0; idx < this.numArgs; idx++) {\n fnParams.push(new FnParam('_p' + idx));\n }\n // We will never visit `ir.PureFunctionParameterExpr`s that don't belong to us, because this\n // transform runs inside another visitor which will visit nested pure functions before this one.\n const returnExpr = transformExpressionsInExpression(keyExpr, expr => {\n if (!(expr instanceof PureFunctionParameterExpr)) {\n return expr;\n }\n return variable('_p' + expr.index);\n }, VisitorContextFlag.None);\n return new DeclareFunctionStmt(declName, fnParams, [new ReturnStatement(returnExpr)]);\n }\n}\nfunction phasePureLiteralStructures(job) {\n for (const view of job.units) {\n for (const op of view.update) {\n transformExpressionsInOp(op, (expr, flags) => {\n if (flags & VisitorContextFlag.InChildOperation) {\n return expr;\n }\n if (expr instanceof LiteralArrayExpr) {\n return transformLiteralArray(expr);\n } else if (expr instanceof LiteralMapExpr) {\n return transformLiteralMap(expr);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n }\n}\nfunction transformLiteralArray(expr) {\n const derivedEntries = [];\n const nonConstantArgs = [];\n for (const entry of expr.entries) {\n if (entry.isConstant()) {\n derivedEntries.push(entry);\n } else {\n const idx = nonConstantArgs.length;\n nonConstantArgs.push(entry);\n derivedEntries.push(new PureFunctionParameterExpr(idx));\n }\n }\n return new PureFunctionExpr(literalArr(derivedEntries), nonConstantArgs);\n}\nfunction transformLiteralMap(expr) {\n let derivedEntries = [];\n const nonConstantArgs = [];\n for (const entry of expr.entries) {\n if (entry.value.isConstant()) {\n derivedEntries.push(entry);\n } else {\n const idx = nonConstantArgs.length;\n nonConstantArgs.push(entry.value);\n derivedEntries.push(new LiteralMapEntry(entry.key, new PureFunctionParameterExpr(idx), entry.quoted));\n }\n }\n return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);\n}\n\n// This file contains helpers for generating calls to Ivy instructions. In particular, each\n// instruction type is represented as a function, which may select a specific instruction variant\n// depending on the exact arguments.\nfunction element(slot, tag, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementStart, slot, tag, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementOrContainerBase(instruction, slot, tag, constIndex, localRefIndex, sourceSpan) {\n const args = [literal(slot)];\n if (tag !== null) {\n args.push(literal(tag));\n }\n if (localRefIndex !== null) {\n args.push(literal(constIndex),\n // might be null, but that's okay.\n literal(localRefIndex));\n } else if (constIndex !== null) {\n args.push(literal(constIndex));\n }\n return call(instruction, args, sourceSpan);\n}\nfunction elementEnd(sourceSpan) {\n return call(Identifiers.elementEnd, [], sourceSpan);\n}\nfunction elementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementContainerStart, slot, /* tag */null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainer(slot, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementContainer, slot, /* tag */null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainerEnd() {\n return call(Identifiers.elementContainerEnd, [], null);\n}\nfunction template(slot, templateFnRef, decls, vars, tag, constIndex, sourceSpan) {\n return call(Identifiers.templateCreate, [literal(slot), templateFnRef, literal(decls), literal(vars), literal(tag), literal(constIndex)], sourceSpan);\n}\nfunction disableBindings() {\n return call(Identifiers.disableBindings, [], null);\n}\nfunction enableBindings() {\n return call(Identifiers.enableBindings, [], null);\n}\nfunction listener(name, handlerFn) {\n return call(Identifiers.listener, [literal(name), handlerFn], null);\n}\nfunction pipe(slot, name) {\n return call(Identifiers.pipe, [literal(slot), literal(name)], null);\n}\nfunction namespaceHTML() {\n return call(Identifiers.namespaceHTML, [], null);\n}\nfunction namespaceSVG() {\n return call(Identifiers.namespaceSVG, [], null);\n}\nfunction namespaceMath() {\n return call(Identifiers.namespaceMathML, [], null);\n}\nfunction advance(delta, sourceSpan) {\n return call(Identifiers.advance, [literal(delta)], sourceSpan);\n}\nfunction reference(slot) {\n return importExpr(Identifiers.reference).callFn([literal(slot)]);\n}\nfunction nextContext(steps) {\n return importExpr(Identifiers.nextContext).callFn(steps === 1 ? [] : [literal(steps)]);\n}\nfunction getCurrentView() {\n return importExpr(Identifiers.getCurrentView).callFn([]);\n}\nfunction restoreView(savedView) {\n return importExpr(Identifiers.restoreView).callFn([savedView]);\n}\nfunction resetView(returnValue) {\n return importExpr(Identifiers.resetView).callFn([returnValue]);\n}\nfunction text(slot, initialValue, sourceSpan) {\n const args = [literal(slot, null)];\n if (initialValue !== '') {\n args.push(literal(initialValue));\n }\n return call(Identifiers.text, args, sourceSpan);\n}\nfunction property(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.property, args, sourceSpan);\n}\nfunction attribute(name, expression, sanitizer) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.attribute, args, null);\n}\nfunction styleProp(name, expression, unit) {\n const args = [literal(name), expression];\n if (unit !== null) {\n args.push(literal(unit));\n }\n return call(Identifiers.styleProp, args, null);\n}\nfunction classProp(name, expression) {\n return call(Identifiers.classProp, [literal(name), expression], null);\n}\nfunction styleMap(expression) {\n return call(Identifiers.styleMap, [expression], null);\n}\nfunction classMap(expression) {\n return call(Identifiers.classMap, [expression], null);\n}\nconst PIPE_BINDINGS = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];\nfunction pipeBind(slot, varOffset, args) {\n if (args.length < 1 || args.length > PIPE_BINDINGS.length) {\n throw new Error(`pipeBind() argument count out of bounds`);\n }\n const instruction = PIPE_BINDINGS[args.length - 1];\n return importExpr(instruction).callFn([literal(slot), literal(varOffset), ...args]);\n}\nfunction pipeBindV(slot, varOffset, args) {\n return importExpr(Identifiers.pipeBindV).callFn([literal(slot), literal(varOffset), args]);\n}\nfunction textInterpolate(strings, expressions, sourceSpan) {\n if (strings.length < 1 || expressions.length !== strings.length - 1) {\n throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);\n }\n const interpolationArgs = [];\n if (expressions.length === 1 && strings[0] === '' && strings[1] === '') {\n interpolationArgs.push(expressions[0]);\n } else {\n let idx;\n for (idx = 0; idx < expressions.length; idx++) {\n interpolationArgs.push(literal(strings[idx]), expressions[idx]);\n }\n // idx points at the last string.\n interpolationArgs.push(literal(strings[idx]));\n }\n return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction propertyInterpolate(name, strings, expressions, sanitizer, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (sanitizer !== null) {\n extraArgs.push(sanitizer);\n }\n return callVariadicInstruction(PROPERTY_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, sourceSpan);\n}\nfunction attributeInterpolate(name, strings, expressions, sanitizer) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (sanitizer !== null) {\n extraArgs.push(sanitizer);\n }\n return callVariadicInstruction(ATTRIBUTE_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, null);\n}\nfunction stylePropInterpolate(name, strings, expressions, unit) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (unit !== null) {\n extraArgs.push(literal(unit));\n }\n return callVariadicInstruction(STYLE_PROP_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, null);\n}\nfunction styleMapInterpolate(strings, expressions) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(STYLE_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], null);\n}\nfunction classMapInterpolate(strings, expressions) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], null);\n}\nfunction hostProperty(name, expression) {\n return call(Identifiers.hostProperty, [literal(name), expression], null);\n}\nfunction pureFunction(varOffset, fn, args) {\n return callVariadicInstructionExpr(PURE_FUNCTION_CONFIG, [literal(varOffset), fn], args, [], null);\n}\n/**\n * Collates the string an expression arguments for an interpolation instruction.\n */\nfunction collateInterpolationArgs(strings, expressions) {\n if (strings.length < 1 || expressions.length !== strings.length - 1) {\n throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);\n }\n const interpolationArgs = [];\n if (expressions.length === 1 && strings[0] === '' && strings[1] === '') {\n interpolationArgs.push(expressions[0]);\n } else {\n let idx;\n for (idx = 0; idx < expressions.length; idx++) {\n interpolationArgs.push(literal(strings[idx]), expressions[idx]);\n }\n // idx points at the last string.\n interpolationArgs.push(literal(strings[idx]));\n }\n return interpolationArgs;\n}\nfunction call(instruction, args, sourceSpan) {\n const expr = importExpr(instruction).callFn(args, sourceSpan);\n return createStatementOp(new ExpressionStatement(expr, sourceSpan));\n}\n/**\n * `InterpolationConfig` for the `textInterpolate` instruction.\n */\nconst TEXT_INTERPOLATE_CONFIG = {\n constant: [Identifiers.textInterpolate, Identifiers.textInterpolate1, Identifiers.textInterpolate2, Identifiers.textInterpolate3, Identifiers.textInterpolate4, Identifiers.textInterpolate5, Identifiers.textInterpolate6, Identifiers.textInterpolate7, Identifiers.textInterpolate8],\n variable: Identifiers.textInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\n/**\n * `InterpolationConfig` for the `propertyInterpolate` instruction.\n */\nconst PROPERTY_INTERPOLATE_CONFIG = {\n constant: [Identifiers.propertyInterpolate, Identifiers.propertyInterpolate1, Identifiers.propertyInterpolate2, Identifiers.propertyInterpolate3, Identifiers.propertyInterpolate4, Identifiers.propertyInterpolate5, Identifiers.propertyInterpolate6, Identifiers.propertyInterpolate7, Identifiers.propertyInterpolate8],\n variable: Identifiers.propertyInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\n/**\n * `InterpolationConfig` for the `stylePropInterpolate` instruction.\n */\nconst STYLE_PROP_INTERPOLATE_CONFIG = {\n constant: [Identifiers.styleProp, Identifiers.stylePropInterpolate1, Identifiers.stylePropInterpolate2, Identifiers.stylePropInterpolate3, Identifiers.stylePropInterpolate4, Identifiers.stylePropInterpolate5, Identifiers.stylePropInterpolate6, Identifiers.stylePropInterpolate7, Identifiers.stylePropInterpolate8],\n variable: Identifiers.stylePropInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\n/**\n * `InterpolationConfig` for the `attributeInterpolate` instruction.\n */\nconst ATTRIBUTE_INTERPOLATE_CONFIG = {\n constant: [Identifiers.attribute, Identifiers.attributeInterpolate1, Identifiers.attributeInterpolate2, Identifiers.attributeInterpolate3, Identifiers.attributeInterpolate4, Identifiers.attributeInterpolate5, Identifiers.attributeInterpolate6, Identifiers.attributeInterpolate7, Identifiers.attributeInterpolate8],\n variable: Identifiers.attributeInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\n/**\n * `InterpolationConfig` for the `styleMapInterpolate` instruction.\n */\nconst STYLE_MAP_INTERPOLATE_CONFIG = {\n constant: [Identifiers.styleMap, Identifiers.styleMapInterpolate1, Identifiers.styleMapInterpolate2, Identifiers.styleMapInterpolate3, Identifiers.styleMapInterpolate4, Identifiers.styleMapInterpolate5, Identifiers.styleMapInterpolate6, Identifiers.styleMapInterpolate7, Identifiers.styleMapInterpolate8],\n variable: Identifiers.styleMapInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\n/**\n * `InterpolationConfig` for the `classMapInterpolate` instruction.\n */\nconst CLASS_MAP_INTERPOLATE_CONFIG = {\n constant: [Identifiers.classMap, Identifiers.classMapInterpolate1, Identifiers.classMapInterpolate2, Identifiers.classMapInterpolate3, Identifiers.classMapInterpolate4, Identifiers.classMapInterpolate5, Identifiers.classMapInterpolate6, Identifiers.classMapInterpolate7, Identifiers.classMapInterpolate8],\n variable: Identifiers.classMapInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n }\n};\nconst PURE_FUNCTION_CONFIG = {\n constant: [Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4, Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8],\n variable: Identifiers.pureFunctionV,\n mapping: n => n\n};\nfunction callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {\n const n = config.mapping(interpolationArgs.length);\n if (n < config.constant.length) {\n // Constant calling pattern.\n return importExpr(config.constant[n]).callFn([...baseArgs, ...interpolationArgs, ...extraArgs], sourceSpan);\n } else if (config.variable !== null) {\n // Variable calling pattern.\n return importExpr(config.variable).callFn([...baseArgs, literalArr(interpolationArgs), ...extraArgs], sourceSpan);\n } else {\n throw new Error(`AssertionError: unable to call variadic function`);\n }\n}\nfunction callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {\n return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());\n}\n\n/**\n * Map of sanitizers to their identifier.\n */\nconst sanitizerIdentifierMap = new Map([[SanitizerFn.Html, Identifiers.sanitizeHtml], [SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute], [SanitizerFn.ResourceUrl, Identifiers.sanitizeResourceUrl], [SanitizerFn.Script, Identifiers.sanitizeScript], [SanitizerFn.Style, Identifiers.sanitizeStyle], [SanitizerFn.Url, Identifiers.sanitizeUrl]]);\n/**\n * Compiles semantic operations across all views and generates output `o.Statement`s with actual\n * runtime calls in their place.\n *\n * Reification replaces semantic operations with selected Ivy instructions and other generated code\n * structures. After reification, the create/update operation lists of all views should only contain\n * `ir.StatementOp`s (which wrap generated `o.Statement`s).\n */\nfunction phaseReify(cpl) {\n for (const unit of cpl.units) {\n reifyCreateOperations(unit, unit.create);\n reifyUpdateOperations(unit, unit.update);\n }\n}\nfunction reifyCreateOperations(unit, ops) {\n for (const op of ops) {\n transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);\n switch (op.kind) {\n case OpKind.Text:\n OpList.replace(op, text(op.slot, op.initialValue, op.sourceSpan));\n break;\n case OpKind.ElementStart:\n OpList.replace(op, elementStart(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.Element:\n OpList.replace(op, element(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.ElementEnd:\n OpList.replace(op, elementEnd(op.sourceSpan));\n break;\n case OpKind.ContainerStart:\n OpList.replace(op, elementContainerStart(op.slot, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.Container:\n OpList.replace(op, elementContainer(op.slot, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.ContainerEnd:\n OpList.replace(op, elementContainerEnd());\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const childView = unit.job.views.get(op.xref);\n OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.sourceSpan));\n break;\n case OpKind.DisableBindings:\n OpList.replace(op, disableBindings());\n break;\n case OpKind.EnableBindings:\n OpList.replace(op, enableBindings());\n break;\n case OpKind.Pipe:\n OpList.replace(op, pipe(op.slot, op.name));\n break;\n case OpKind.Listener:\n const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);\n OpList.replace(op, listener(op.name, listenerFn));\n break;\n case OpKind.Variable:\n if (op.variable.name === null) {\n throw new Error(`AssertionError: unnamed variable ${op.xref}`);\n }\n OpList.replace(op, createStatementOp(new DeclareVarStmt(op.variable.name, op.initializer, undefined, StmtModifier.Final)));\n break;\n case OpKind.Namespace:\n switch (op.active) {\n case Namespace.HTML:\n OpList.replace(op, namespaceHTML());\n break;\n case Namespace.SVG:\n OpList.replace(op, namespaceSVG());\n break;\n case Namespace.Math:\n OpList.replace(op, namespaceMath());\n break;\n }\n break;\n case OpKind.Statement:\n // Pass statement operations directly through.\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of create op ${OpKind[op.kind]}`);\n }\n }\n}\nfunction reifyUpdateOperations(_unit, ops) {\n for (const op of ops) {\n transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);\n switch (op.kind) {\n case OpKind.Advance:\n OpList.replace(op, advance(op.delta, op.sourceSpan));\n break;\n case OpKind.Property:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, propertyInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));\n } else {\n OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));\n }\n break;\n case OpKind.StyleProp:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, stylePropInterpolate(op.name, op.expression.strings, op.expression.expressions, op.unit));\n } else {\n OpList.replace(op, styleProp(op.name, op.expression, op.unit));\n }\n break;\n case OpKind.ClassProp:\n OpList.replace(op, classProp(op.name, op.expression));\n break;\n case OpKind.StyleMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, styleMapInterpolate(op.expression.strings, op.expression.expressions));\n } else {\n OpList.replace(op, styleMap(op.expression));\n }\n break;\n case OpKind.ClassMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, classMapInterpolate(op.expression.strings, op.expression.expressions));\n } else {\n OpList.replace(op, classMap(op.expression));\n }\n break;\n case OpKind.InterpolateText:\n OpList.replace(op, textInterpolate(op.interpolation.strings, op.interpolation.expressions, op.sourceSpan));\n break;\n case OpKind.Attribute:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer));\n } else {\n OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));\n }\n break;\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n throw new Error('not yet handled');\n } else {\n OpList.replace(op, hostProperty(op.name, op.expression));\n }\n break;\n case OpKind.Variable:\n if (op.variable.name === null) {\n throw new Error(`AssertionError: unnamed variable ${op.xref}`);\n }\n OpList.replace(op, createStatementOp(new DeclareVarStmt(op.variable.name, op.initializer, undefined, StmtModifier.Final)));\n break;\n case OpKind.Statement:\n // Pass statement operations directly through.\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of update op ${OpKind[op.kind]}`);\n }\n }\n}\nfunction reifyIrExpression(expr) {\n if (!isIrExpression(expr)) {\n return expr;\n }\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n return nextContext(expr.steps);\n case ExpressionKind.Reference:\n return reference(expr.slot + 1 + expr.offset);\n case ExpressionKind.LexicalRead:\n throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);\n case ExpressionKind.RestoreView:\n if (typeof expr.view === 'number') {\n throw new Error(`AssertionError: unresolved RestoreView`);\n }\n return restoreView(expr.view);\n case ExpressionKind.ResetView:\n return resetView(expr.expr);\n case ExpressionKind.GetCurrentView:\n return getCurrentView();\n case ExpressionKind.ReadVariable:\n if (expr.name === null) {\n throw new Error(`Read of unnamed variable ${expr.xref}`);\n }\n return variable(expr.name);\n case ExpressionKind.ReadTemporaryExpr:\n if (expr.name === null) {\n throw new Error(`Read of unnamed temporary ${expr.xref}`);\n }\n return variable(expr.name);\n case ExpressionKind.AssignTemporaryExpr:\n if (expr.name === null) {\n throw new Error(`Assign of unnamed temporary ${expr.xref}`);\n }\n return variable(expr.name).set(expr.expr);\n case ExpressionKind.PureFunctionExpr:\n if (expr.fn === null) {\n throw new Error(`AssertionError: expected PureFunctions to have been extracted`);\n }\n return pureFunction(expr.varOffset, expr.fn, expr.args);\n case ExpressionKind.PureFunctionParameterExpr:\n throw new Error(`AssertionError: expected PureFunctionParameterExpr to have been extracted`);\n case ExpressionKind.PipeBinding:\n return pipeBind(expr.slot, expr.varOffset, expr.args);\n case ExpressionKind.PipeBindingVariadic:\n return pipeBindV(expr.slot, expr.varOffset, expr.args);\n case ExpressionKind.SanitizerExpr:\n return importExpr(sanitizerIdentifierMap.get(expr.fn));\n default:\n throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);\n }\n}\n/**\n * Listeners get turned into a function expression, which may or may not have the `$event`\n * parameter defined.\n */\nfunction reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {\n // First, reify all instruction calls within `handlerOps`.\n reifyUpdateOperations(unit, handlerOps);\n // Next, extract all the `o.Statement`s from the reified operations. We can expect that at this\n // point, all operations have been converted to statements.\n const handlerStmts = [];\n for (const op of handlerOps) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected reified statements, but found op ${OpKind[op.kind]}`);\n }\n handlerStmts.push(op.statement);\n }\n // If `$event` is referenced, we need to generate it as a parameter.\n const params = [];\n if (consumesDollarEvent) {\n // We need the `$event` parameter.\n params.push(new FnParam('$event'));\n }\n return fn(params, handlerStmts, undefined, undefined, name);\n}\nfunction phaseRemoveEmptyBindings(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Attribute:\n case OpKind.Binding:\n case OpKind.ClassProp:\n case OpKind.ClassMap:\n case OpKind.Property:\n case OpKind.StyleProp:\n case OpKind.StyleMap:\n if (op.expression instanceof EmptyExpr) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\n\n/**\n * Resolves `ir.ContextExpr` expressions (which represent embedded view or component contexts) to\n * either the `ctx` parameter to component functions (for the current view context) or to variables\n * that store those contexts (for contexts accessed via the `nextContext()` instruction).\n */\nfunction phaseResolveContexts(cpl) {\n for (const unit of cpl.units) {\n processLexicalScope$1(unit, unit.create);\n processLexicalScope$1(unit, unit.update);\n }\n}\nfunction processLexicalScope$1(view, ops) {\n // Track the expressions used to access all available contexts within the current view, by the\n // view `ir.XrefId`.\n const scope = new Map();\n // The current view's context is accessible via the `ctx` parameter.\n scope.set(view.xref, variable('ctx'));\n for (const op of ops) {\n switch (op.kind) {\n case OpKind.Variable:\n switch (op.variable.kind) {\n case SemanticVariableKind.Context:\n scope.set(op.variable.view, new ReadVariableExpr(op.xref));\n break;\n }\n break;\n case OpKind.Listener:\n processLexicalScope$1(view, op.handlerOps);\n break;\n }\n }\n for (const op of ops) {\n transformExpressionsInOp(op, expr => {\n if (expr instanceof ContextExpr) {\n if (!scope.has(expr.view)) {\n throw new Error(`No context found for reference to view ${expr.view} from view ${view.xref}`);\n }\n return scope.get(expr.view);\n } else {\n return expr;\n }\n }, VisitorContextFlag.None);\n }\n}\n\n/**\n * Any variable inside a listener with the name `$event` will be transformed into a output lexical\n * read immediately, and does not participate in any of the normal logic for handling variables.\n */\nfunction phaseResolveDollarEvent(cpl) {\n for (const [_, view] of cpl.views) {\n resolveDollarEvent(view, view.create);\n resolveDollarEvent(view, view.update);\n }\n}\nfunction resolveDollarEvent(view, ops) {\n for (const op of ops) {\n if (op.kind === OpKind.Listener) {\n transformExpressionsInOp(op, expr => {\n if (expr instanceof LexicalReadExpr && expr.name === '$event') {\n op.consumesDollarEvent = true;\n return new ReadVarExpr(expr.name);\n }\n return expr;\n }, VisitorContextFlag.InChildOperation);\n }\n }\n}\n\n/**\n * Resolves lexical references in views (`ir.LexicalReadExpr`) to either a target variable or to\n * property reads on the top-level component context.\n *\n * Also matches `ir.RestoreViewExpr` expressions with the variables of their corresponding saved\n * views.\n */\nfunction phaseResolveNames(cpl) {\n for (const unit of cpl.units) {\n processLexicalScope(unit, unit.create, null);\n processLexicalScope(unit, unit.update, null);\n }\n}\nfunction processLexicalScope(unit, ops, savedView) {\n // Maps names defined in the lexical scope of this template to the `ir.XrefId`s of the variable\n // declarations which represent those values.\n //\n // Since variables are generated in each view for the entire lexical scope (including any\n // identifiers from parent templates) only local variables need be considered here.\n const scope = new Map();\n // First, step through the operations list and:\n // 1) build up the `scope` mapping\n // 2) recurse into any listener functions\n for (const op of ops) {\n switch (op.kind) {\n case OpKind.Variable:\n switch (op.variable.kind) {\n case SemanticVariableKind.Identifier:\n // This variable represents some kind of identifier which can be used in the template.\n if (scope.has(op.variable.identifier)) {\n continue;\n }\n scope.set(op.variable.identifier, op.xref);\n break;\n case SemanticVariableKind.SavedView:\n // This variable represents a snapshot of the current view context, and can be used to\n // restore that context within listener functions.\n savedView = {\n view: op.variable.view,\n variable: op.xref\n };\n break;\n }\n break;\n case OpKind.Listener:\n // Listener functions have separate variable declarations, so process them as a separate\n // lexical scope.\n processLexicalScope(unit, op.handlerOps, savedView);\n break;\n }\n }\n // Next, use the `scope` mapping to match `ir.LexicalReadExpr` with defined names in the lexical\n // scope. Also, look for `ir.RestoreViewExpr`s and match them with the snapshotted view context\n // variable.\n for (const op of ops) {\n if (op.kind == OpKind.Listener) {\n // Listeners were already processed above with their own scopes.\n continue;\n }\n transformExpressionsInOp(op, (expr, flags) => {\n if (expr instanceof LexicalReadExpr) {\n // `expr` is a read of a name within the lexical scope of this view.\n // Either that name is defined within the current view, or it represents a property from the\n // main component context.\n if (scope.has(expr.name)) {\n // This was a defined variable in the current scope.\n return new ReadVariableExpr(scope.get(expr.name));\n } else {\n // Reading from the component context.\n return new ReadPropExpr(new ContextExpr(unit.job.root.xref), expr.name);\n }\n } else if (expr instanceof RestoreViewExpr && typeof expr.view === 'number') {\n // `ir.RestoreViewExpr` happens in listener functions and restores a saved view from the\n // parent creation list. We expect to find that we captured the `savedView` previously, and\n // that it matches the expected view to be restored.\n if (savedView === null || savedView.view !== expr.view) {\n throw new Error(`AssertionError: no saved view ${expr.view} from view ${unit.xref}`);\n }\n expr.view = new ReadVariableExpr(savedView.variable);\n return expr;\n } else {\n return expr;\n }\n }, VisitorContextFlag.None);\n }\n for (const op of ops) {\n visitExpressionsInOp(op, expr => {\n if (expr instanceof LexicalReadExpr) {\n throw new Error(`AssertionError: no lexical reads should remain, but found read of ${expr.name}`);\n }\n });\n }\n}\n\n/**\n * Mapping of security contexts to sanitizer function for that context.\n */\nconst sanitizers = new Map([[SecurityContext.HTML, SanitizerFn.Html], [SecurityContext.SCRIPT, SanitizerFn.Script], [SecurityContext.STYLE, SanitizerFn.Style], [SecurityContext.URL, SanitizerFn.Url], [SecurityContext.RESOURCE_URL, SanitizerFn.ResourceUrl]]);\n/**\n * Resolves sanitization functions for ops that need them.\n */\nfunction phaseResolveSanitizers(cpl) {\n for (const [_, view] of cpl.views) {\n const elements = getElementsByXrefId(view);\n let sanitizerFn;\n for (const op of view.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n sanitizerFn = sanitizers.get(op.securityContext) || null;\n op.sanitizer = sanitizerFn ? new SanitizerExpr(sanitizerFn) : null;\n // If there was no sanitization function found based on the security context of an\n // attribute/property, check whether this attribute/property is one of the\n // security-sensitive <iframe> attributes (and that the current element is actually an\n // <iframe>).\n if (op.sanitizer === null) {\n const ownerOp = elements.get(op.target);\n if (ownerOp === undefined) {\n throw Error('Property should have an element-like owner');\n }\n if (isIframeElement$1(ownerOp) && isIframeSecuritySensitiveAttr(op.name)) {\n op.sanitizer = new SanitizerExpr(SanitizerFn.IframeAttribute);\n }\n }\n break;\n }\n }\n }\n}\n/**\n * Checks whether the given op represents an iframe element.\n */\nfunction isIframeElement$1(op) {\n return (op.kind === OpKind.Element || op.kind === OpKind.ElementStart) && op.tag.toLowerCase() === 'iframe';\n}\nfunction phaseSaveRestoreView(cpl) {\n for (const view of cpl.views.values()) {\n view.create.prepend([createVariableOp(view.job.allocateXrefId(), {\n kind: SemanticVariableKind.SavedView,\n name: null,\n view: view.xref\n }, new GetCurrentViewExpr())]);\n for (const op of view.create) {\n if (op.kind !== OpKind.Listener) {\n continue;\n }\n // Embedded views always need the save/restore view operation.\n let needsRestoreView = view !== cpl.root;\n if (!needsRestoreView) {\n for (const handlerOp of op.handlerOps) {\n visitExpressionsInOp(handlerOp, expr => {\n if (expr instanceof ReferenceExpr) {\n // Listeners that reference() a local ref need the save/restore view operation.\n needsRestoreView = true;\n }\n });\n }\n }\n if (needsRestoreView) {\n addSaveRestoreViewOperationToListener(view, op);\n }\n }\n }\n}\nfunction addSaveRestoreViewOperationToListener(view, op) {\n op.handlerOps.prepend([createVariableOp(view.job.allocateXrefId(), {\n kind: SemanticVariableKind.Context,\n name: null,\n view: view.xref\n }, new RestoreViewExpr(view.xref))]);\n // The \"restore view\" operation in listeners requires a call to `resetView` to reset the\n // context prior to returning from the listener operation. Find any `return` statements in\n // the listener body and wrap them in a call to reset the view.\n for (const handlerOp of op.handlerOps) {\n if (handlerOp.kind === OpKind.Statement && handlerOp.statement instanceof ReturnStatement) {\n handlerOp.statement.value = new ResetViewExpr(handlerOp.statement.value);\n }\n }\n}\n\n/**\n * Assign data slots for all operations which implement `ConsumesSlotOpTrait`, and propagate the\n * assigned data slots of those operations to any expressions which reference them via\n * `UsesSlotIndexTrait`.\n *\n * This phase is also responsible for counting the number of slots used for each view (its `decls`)\n * and propagating that number into the `Template` operations which declare embedded views.\n */\nfunction phaseSlotAllocation(cpl) {\n // Map of all declarations in all views within the component which require an assigned slot index.\n // This map needs to be global (across all views within the component) since it's possible to\n // reference a slot from one view from an expression within another (e.g. local references work\n // this way).\n const slotMap = new Map();\n // Process all views in the component and assign slot indexes.\n for (const [_, view] of cpl.views) {\n // Slot indices start at 0 for each view (and are not unique between views).\n let slotCount = 0;\n for (const op of view.create) {\n // Only consider declarations which consume data slots.\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n // Assign slots to this declaration starting at the current `slotCount`.\n op.slot = slotCount;\n // And track its assigned slot in the `slotMap`.\n slotMap.set(op.xref, op.slot);\n // Each declaration may use more than 1 slot, so increment `slotCount` to reserve the number\n // of slots required.\n slotCount += op.numSlotsUsed;\n }\n // Record the total number of slots used on the view itself. This will later be propagated into\n // `ir.TemplateOp`s which declare those views (except for the root view).\n view.decls = slotCount;\n }\n // After slot assignment, `slotMap` now contains slot assignments for every declaration in the\n // whole template, across all views. Next, look for expressions which implement\n // `UsesSlotIndexExprTrait` and propagate the assigned slot indexes into them.\n // Additionally, this second scan allows us to find `ir.TemplateOp`s which declare views and\n // propagate the number of slots used for each view into the operation which declares it.\n for (const [_, view] of cpl.views) {\n for (const op of view.ops()) {\n if (op.kind === OpKind.Template) {\n // Record the number of slots used by the view this `ir.TemplateOp` declares in the\n // operation itself, so it can be emitted later.\n const childView = cpl.views.get(op.xref);\n op.decls = childView.decls;\n }\n if (hasUsesSlotIndexTrait(op) && op.slot === null) {\n if (!slotMap.has(op.target)) {\n // We do expect to find a slot allocated for everything which might be referenced.\n throw new Error(`AssertionError: no slot allocated for ${OpKind[op.kind]} target ${op.target}`);\n }\n op.slot = slotMap.get(op.target);\n }\n // Process all `ir.Expression`s within this view, and look for `usesSlotIndexExprTrait`.\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (!hasUsesSlotIndexTrait(expr) || expr.slot !== null) {\n return;\n }\n // The `UsesSlotIndexExprTrait` indicates that this expression references something declared\n // in this component template by its slot index. Use the `target` `ir.XrefId` to find the\n // allocated slot for that declaration in `slotMap`.\n if (!slotMap.has(expr.target)) {\n // We do expect to find a slot allocated for everything which might be referenced.\n throw new Error(`AssertionError: no slot allocated for ${expr.constructor.name} target ${expr.target}`);\n }\n // Record the allocated slot on the expression.\n expr.slot = slotMap.get(expr.target);\n });\n }\n }\n}\n\n/**\n * Transforms special-case bindings with 'style' or 'class' in their names. Must run before the\n * main binding specialization pass.\n */\nfunction phaseStyleBindingSpecialization(cpl) {\n for (const unit of cpl.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n switch (op.bindingKind) {\n case BindingKind.ClassName:\n if (op.expression instanceof Interpolation) {\n throw new Error(`Unexpected interpolation in ClassName binding`);\n }\n OpList.replace(op, createClassPropOp(op.target, op.name, op.expression, op.sourceSpan));\n break;\n case BindingKind.StyleProperty:\n OpList.replace(op, createStylePropOp(op.target, op.name, op.expression, op.unit, op.sourceSpan));\n break;\n case BindingKind.Property:\n case BindingKind.Template:\n if (op.name === 'style') {\n OpList.replace(op, createStyleMapOp(op.target, op.expression, op.sourceSpan));\n } else if (op.name === 'class') {\n OpList.replace(op, createClassMapOp(op.target, op.expression, op.sourceSpan));\n }\n break;\n }\n }\n }\n}\n\n/**\n * Find all assignments and usages of temporary variables, which are linked to each other with cross\n * references. Generate names for each cross-reference, and add a `DeclareVarStmt` to initialize\n * them at the beginning of the update block.\n *\n * TODO: Sometimes, it will be possible to reuse names across different subexpressions. For example,\n * in the double keyed read `a?.[f()]?.[f()]`, the two function calls have non-overlapping scopes.\n * Implement an algorithm for reuse.\n */\nfunction phaseTemporaryVariables(cpl) {\n for (const unit of cpl.units) {\n let opCount = 0;\n let generatedStatements = [];\n for (const op of unit.ops()) {\n // Identify the final time each temp var is read.\n const finalReads = new Map();\n visitExpressionsInOp(op, expr => {\n if (expr instanceof ReadTemporaryExpr) {\n finalReads.set(expr.xref, expr);\n }\n });\n // Name the temp vars, accounting for the fact that a name can be reused after it has been\n // read for the final time.\n let count = 0;\n const assigned = new Set();\n const released = new Set();\n const defs = new Map();\n visitExpressionsInOp(op, expr => {\n if (expr instanceof AssignTemporaryExpr) {\n if (!assigned.has(expr.xref)) {\n assigned.add(expr.xref);\n // TODO: Exactly replicate the naming scheme used by `TemplateDefinitionBuilder`.\n // It seems to rely on an expression index instead of an op index.\n defs.set(expr.xref, `tmp_${opCount}_${count++}`);\n }\n assignName(defs, expr);\n } else if (expr instanceof ReadTemporaryExpr) {\n if (finalReads.get(expr.xref) === expr) {\n released.add(expr.xref);\n count--;\n }\n assignName(defs, expr);\n }\n });\n // Add declarations for the temp vars.\n generatedStatements.push(...Array.from(new Set(defs.values())).map(name => createStatementOp(new DeclareVarStmt(name))));\n opCount++;\n }\n unit.update.prepend(generatedStatements);\n }\n}\n/**\n * Assigns a name to the temporary variable in the given temporary variable expression.\n */\nfunction assignName(names, expr) {\n const name = names.get(expr.xref);\n if (name === undefined) {\n throw new Error(`Found xref with unassigned name: ${expr.xref}`);\n }\n expr.name = name;\n}\n\n/**\n * Optimize variables declared and used in the IR.\n *\n * Variables are eagerly generated by pipeline stages for all possible values that could be\n * referenced. This stage processes the list of declared variables and all variable usages,\n * and optimizes where possible. It performs 3 main optimizations:\n *\n * * It transforms variable declarations to side effectful expressions when the\n * variable is not used, but its initializer has global effects which other\n * operations rely upon.\n * * It removes variable declarations if those variables are not referenced and\n * either they do not have global effects, or nothing relies on them.\n * * It inlines variable declarations when those variables are only used once\n * and the inlining is semantically safe.\n *\n * To guarantee correctness, analysis of \"fences\" in the instruction lists is used to determine\n * which optimizations are safe to perform.\n */\nfunction phaseVariableOptimization(job) {\n for (const unit of job.units) {\n optimizeVariablesInOpList(unit.create, job.compatibility);\n optimizeVariablesInOpList(unit.update, job.compatibility);\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener) {\n optimizeVariablesInOpList(op.handlerOps, job.compatibility);\n }\n }\n }\n}\n/**\n * A [fence](https://en.wikipedia.org/wiki/Memory_barrier) flag for an expression which indicates\n * how that expression can be optimized in relation to other expressions or instructions.\n *\n * `Fence`s are a bitfield, so multiple flags may be set on a single expression.\n */\nvar Fence;\n(function (Fence) {\n /**\n * Empty flag (no fence exists).\n */\n Fence[Fence[\"None\"] = 0] = \"None\";\n /**\n * A context read fence, meaning that the expression in question reads from the \"current view\"\n * context of the runtime.\n */\n Fence[Fence[\"ViewContextRead\"] = 1] = \"ViewContextRead\";\n /**\n * A context write fence, meaning that the expression in question writes to the \"current view\"\n * context of the runtime.\n *\n * Note that all `ContextWrite` fences are implicitly `ContextRead` fences as operations which\n * change the view context do so based on the current one.\n */\n Fence[Fence[\"ViewContextWrite\"] = 3] = \"ViewContextWrite\";\n /**\n * Indicates that a call is required for its side-effects, even if nothing reads its result.\n *\n * This is also true of `ViewContextWrite` operations **if** they are followed by a\n * `ViewContextRead`.\n */\n Fence[Fence[\"SideEffectful\"] = 4] = \"SideEffectful\";\n})(Fence || (Fence = {}));\n/**\n * Process a list of operations and optimize variables within that list.\n */\nfunction optimizeVariablesInOpList(ops, compatibility) {\n const varDecls = new Map();\n const varUsages = new Map();\n // Track variables that are used outside of the immediate operation list. For example, within\n // `ListenerOp` handler operations of listeners in the current operation list.\n const varRemoteUsages = new Set();\n const opMap = new Map();\n // First, extract information about variables declared or used within the whole list.\n for (const op of ops) {\n if (op.kind === OpKind.Variable) {\n if (varDecls.has(op.xref) || varUsages.has(op.xref)) {\n throw new Error(`Should not see two declarations of the same variable: ${op.xref}`);\n }\n varDecls.set(op.xref, op);\n varUsages.set(op.xref, 0);\n }\n opMap.set(op, collectOpInfo(op));\n countVariableUsages(op, varUsages, varRemoteUsages);\n }\n // The next step is to remove any variable declarations for variables that aren't used. The\n // variable initializer expressions may be side-effectful, so they may need to be retained as\n // expression statements.\n // Track whether we've seen an operation which reads from the view context yet. This is used to\n // determine whether a write to the view context in a variable initializer can be observed.\n let contextIsUsed = false;\n // Note that iteration through the list happens in reverse, which guarantees that we'll process\n // all reads of a variable prior to processing its declaration.\n for (const op of ops.reversed()) {\n const opInfo = opMap.get(op);\n if (op.kind === OpKind.Variable && varUsages.get(op.xref) === 0) {\n // This variable is unused and can be removed. We might need to keep the initializer around,\n // though, if something depends on it running.\n if (contextIsUsed && opInfo.fences & Fence.ViewContextWrite || opInfo.fences & Fence.SideEffectful) {\n // This variable initializer has a side effect which must be retained. Either:\n // * it writes to the view context, and we know there is a future operation which depends\n // on that write, or\n // * it's an operation which is inherently side-effectful.\n // We can't remove the initializer, but we can remove the variable declaration itself and\n // replace it with a side-effectful statement.\n const stmtOp = createStatementOp(op.initializer.toStmt());\n opMap.set(stmtOp, opInfo);\n OpList.replace(op, stmtOp);\n } else {\n // It's safe to delete this entire variable declaration as nothing depends on it, even\n // side-effectfully. Note that doing this might make other variables unused. Since we're\n // iterating in reverse order, we should always be processing usages before declarations\n // and therefore by the time we get to a declaration, all removable usages will have been\n // removed.\n uncountVariableUsages(op, varUsages);\n OpList.remove(op);\n }\n opMap.delete(op);\n varDecls.delete(op.xref);\n varUsages.delete(op.xref);\n continue;\n }\n // Does this operation depend on the view context?\n if (opInfo.fences & Fence.ViewContextRead) {\n contextIsUsed = true;\n }\n }\n // Next, inline any remaining variables with exactly one usage.\n const toInline = [];\n for (const [id, count] of varUsages) {\n // We can inline variables that:\n // - are used once\n // - are not used remotely\n if (count !== 1) {\n // We can't inline this variable as it's used more than once.\n continue;\n }\n if (varRemoteUsages.has(id)) {\n // This variable is used once, but across an operation boundary, so it can't be inlined.\n continue;\n }\n toInline.push(id);\n }\n let candidate;\n while (candidate = toInline.pop()) {\n // We will attempt to inline this variable. If inlining fails (due to fences for example),\n // no future operation will make inlining legal.\n const decl = varDecls.get(candidate);\n const varInfo = opMap.get(decl);\n // Scan operations following the variable declaration and look for the point where that variable\n // is used. There should only be one usage given the precondition above.\n for (let targetOp = decl.next; targetOp.kind !== OpKind.ListEnd; targetOp = targetOp.next) {\n const opInfo = opMap.get(targetOp);\n // Is the variable used in this operation?\n if (opInfo.variablesUsed.has(candidate)) {\n if (compatibility === CompatibilityMode.TemplateDefinitionBuilder && !allowConservativeInlining(decl, targetOp)) {\n // We're in conservative mode, and this variable is not eligible for inlining into the\n // target operation in this mode.\n break;\n }\n // Yes, try to inline it. Inlining may not be successful if fences in this operation before\n // the variable's usage cannot be safely crossed.\n if (tryInlineVariableInitializer(candidate, decl.initializer, targetOp, varInfo.fences)) {\n // Inlining was successful! Update the tracking structures to reflect the inlined\n // variable.\n opInfo.variablesUsed.delete(candidate);\n // Add all variables used in the variable's initializer to its new usage site.\n for (const id of varInfo.variablesUsed) {\n opInfo.variablesUsed.add(id);\n }\n // Merge fences in the variable's initializer into its new usage site.\n opInfo.fences |= varInfo.fences;\n // Delete tracking info related to the declaration.\n varDecls.delete(candidate);\n varUsages.delete(candidate);\n opMap.delete(decl);\n // And finally, delete the original declaration from the operation list.\n OpList.remove(decl);\n }\n // Whether inlining succeeded or failed, we're done processing this variable.\n break;\n }\n // If the variable is not used in this operation, then we'd need to inline across it. Check if\n // that's safe to do.\n if (!safeToInlinePastFences(opInfo.fences, varInfo.fences)) {\n // We can't safely inline this variable beyond this operation, so don't proceed with\n // inlining this variable.\n break;\n }\n }\n }\n}\n/**\n * Given an `ir.Expression`, returns the `Fence` flags for that expression type.\n */\nfunction fencesForIrExpression(expr) {\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n return Fence.ViewContextWrite;\n case ExpressionKind.RestoreView:\n return Fence.ViewContextWrite | Fence.SideEffectful;\n case ExpressionKind.Reference:\n return Fence.ViewContextRead;\n default:\n return Fence.None;\n }\n}\n/**\n * Build the `OpInfo` structure for the given `op`. This performs two operations:\n *\n * * It tracks which variables are used in the operation's expressions.\n * * It rolls up fence flags for expressions within the operation.\n */\nfunction collectOpInfo(op) {\n let fences = Fence.None;\n const variablesUsed = new Set();\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n switch (expr.kind) {\n case ExpressionKind.ReadVariable:\n variablesUsed.add(expr.xref);\n break;\n default:\n fences |= fencesForIrExpression(expr);\n }\n });\n return {\n fences,\n variablesUsed\n };\n}\n/**\n * Count the number of usages of each variable, being careful to track whether those usages are\n * local or remote.\n */\nfunction countVariableUsages(op, varUsages, varRemoteUsage) {\n visitExpressionsInOp(op, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.ReadVariable) {\n return;\n }\n const count = varUsages.get(expr.xref);\n if (count === undefined) {\n // This variable is declared outside the current scope of optimization.\n return;\n }\n varUsages.set(expr.xref, count + 1);\n if (flags & VisitorContextFlag.InChildOperation) {\n varRemoteUsage.add(expr.xref);\n }\n });\n}\n/**\n * Remove usages of a variable in `op` from the `varUsages` tracking.\n */\nfunction uncountVariableUsages(op, varUsages) {\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.ReadVariable) {\n return;\n }\n const count = varUsages.get(expr.xref);\n if (count === undefined) {\n // This variable is declared outside the current scope of optimization.\n return;\n } else if (count === 0) {\n throw new Error(`Inaccurate variable count: ${expr.xref} - found another read but count is already 0`);\n }\n varUsages.set(expr.xref, count - 1);\n });\n}\n/**\n * Checks whether it's safe to inline a variable across a particular operation.\n *\n * @param fences the fences of the operation which the inlining will cross\n * @param declFences the fences of the variable being inlined.\n */\nfunction safeToInlinePastFences(fences, declFences) {\n if (fences & Fence.ViewContextWrite) {\n // It's not safe to inline context reads across context writes.\n if (declFences & Fence.ViewContextRead) {\n return false;\n }\n } else if (fences & Fence.ViewContextRead) {\n // It's not safe to inline context writes across context reads.\n if (declFences & Fence.ViewContextWrite) {\n return false;\n }\n }\n return true;\n}\n/**\n * Attempt to inline the initializer of a variable into a target operation's expressions.\n *\n * This may or may not be safe to do. For example, the variable could be read following the\n * execution of an expression with fences that don't permit the variable to be inlined across them.\n */\nfunction tryInlineVariableInitializer(id, initializer, target, declFences) {\n // We use `ir.transformExpressionsInOp` to walk the expressions and inline the variable if\n // possible. Since this operation is callback-based, once inlining succeeds or fails we can't\n // \"stop\" the expression processing, and have to keep track of whether inlining has succeeded or\n // is no longer allowed.\n let inlined = false;\n let inliningAllowed = true;\n transformExpressionsInOp(target, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return expr;\n }\n if (inlined || !inliningAllowed) {\n // Either the inlining has already succeeded, or we've passed a fence that disallows inlining\n // at this point, so don't try.\n return expr;\n } else if (flags & VisitorContextFlag.InChildOperation && declFences & Fence.ViewContextRead) {\n // We cannot inline variables that are sensitive to the current context across operation\n // boundaries.\n return expr;\n }\n switch (expr.kind) {\n case ExpressionKind.ReadVariable:\n if (expr.xref === id) {\n // This is the usage site of the variable. Since nothing has disallowed inlining, it's\n // safe to inline the initializer here.\n inlined = true;\n return initializer;\n }\n break;\n default:\n // For other types of `ir.Expression`s, whether inlining is allowed depends on their fences.\n const exprFences = fencesForIrExpression(expr);\n inliningAllowed = inliningAllowed && safeToInlinePastFences(exprFences, declFences);\n break;\n }\n return expr;\n }, VisitorContextFlag.None);\n return inlined;\n}\n/**\n * Determines whether inlining of `decl` should be allowed in \"conservative\" mode.\n *\n * In conservative mode, inlining behavior is limited to those operations which the\n * `TemplateDefinitionBuilder` supported, with the goal of producing equivalent output.\n */\nfunction allowConservativeInlining(decl, target) {\n // TODO(alxhub): understand exactly how TemplateDefinitionBuilder approaches inlining, and record\n // that behavior here.\n switch (decl.variable.kind) {\n case SemanticVariableKind.Identifier:\n return false;\n case SemanticVariableKind.Context:\n // Context can only be inlined into other variables.\n return target.kind === OpKind.Variable;\n default:\n return true;\n }\n}\n\n/**\n * Run all transformation phases in the correct order against a `ComponentCompilation`. After this\n * processing, the compilation should be in a state where it can be emitted.\n */\nfunction transformTemplate(job) {\n phaseNamespace(job);\n phaseStyleBindingSpecialization(job);\n phaseBindingSpecialization(job);\n phaseAttributeExtraction(job);\n phaseRemoveEmptyBindings(job);\n phaseNoListenersOnTemplates(job);\n phasePipeCreation(job);\n phasePipeVariadic(job);\n phasePureLiteralStructures(job);\n phaseGenerateVariables(job);\n phaseSaveRestoreView(job);\n phaseFindAnyCasts(job);\n phaseResolveDollarEvent(job);\n phaseResolveNames(job);\n phaseResolveContexts(job);\n phaseResolveSanitizers(job);\n phaseLocalRefs(job);\n phaseConstCollection(job);\n phaseNullishCoalescing(job);\n phaseExpandSafeReads(job);\n phaseTemporaryVariables(job);\n phaseSlotAllocation(job);\n phaseVarCounting(job);\n phaseGenerateAdvance(job);\n phaseVariableOptimization(job);\n phaseNaming(job);\n phaseMergeNextContext(job);\n phaseNgContainer(job);\n phaseEmptyElements(job);\n phaseNonbindable(job);\n phasePureFunctionExtraction(job);\n phaseAlignPipeVariadicVarOffset(job);\n phasePropertyOrdering(job);\n phaseReify(job);\n phaseChaining(job);\n}\n/**\n * Run all transformation phases in the correct order against a `HostBindingCompilationJob`. After\n * this processing, the compilation should be in a state where it can be emitted.\n */\nfunction transformHostBinding(job) {\n phaseHostStylePropertyParsing(job);\n phaseStyleBindingSpecialization(job);\n phaseBindingSpecialization(job);\n phasePureLiteralStructures(job);\n phaseNullishCoalescing(job);\n phaseExpandSafeReads(job);\n phaseTemporaryVariables(job);\n phaseVarCounting(job);\n phaseVariableOptimization(job);\n phaseResolveNames(job);\n phaseResolveContexts(job);\n // TODO: Figure out how to make this work for host bindings.\n // phaseResolveSanitizers(job);\n phaseNaming(job);\n phasePureFunctionExtraction(job);\n phasePropertyOrdering(job);\n phaseReify(job);\n phaseChaining(job);\n}\n/**\n * Compile all views in the given `ComponentCompilation` into the final template function, which may\n * reference constants defined in a `ConstantPool`.\n */\nfunction emitTemplateFn(tpl, pool) {\n const rootFn = emitView(tpl.root);\n emitChildViews(tpl.root, pool);\n return rootFn;\n}\nfunction emitChildViews(parent, pool) {\n for (const view of parent.job.views.values()) {\n if (view.parent !== parent.xref) {\n continue;\n }\n // Child views are emitted depth-first.\n emitChildViews(view, pool);\n const viewFn = emitView(view);\n pool.statements.push(viewFn.toDeclStmt(viewFn.name));\n }\n}\n/**\n * Emit a template function for an individual `ViewCompilation` (which may be either the root view\n * or an embedded view).\n */\nfunction emitView(view) {\n if (view.fnName === null) {\n throw new Error(`AssertionError: view ${view.xref} is unnamed`);\n }\n const createStatements = [];\n for (const op of view.create) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n createStatements.push(op.statement);\n }\n const updateStatements = [];\n for (const op of view.update) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n updateStatements.push(op.statement);\n }\n const createCond = maybeGenerateRfBlock(1, createStatements);\n const updateCond = maybeGenerateRfBlock(2, updateStatements);\n return fn([new FnParam('rf'), new FnParam('ctx')], [...createCond, ...updateCond], /* type */undefined, /* sourceSpan */undefined, view.fnName);\n}\nfunction maybeGenerateRfBlock(flag, statements) {\n if (statements.length === 0) {\n return [];\n }\n return [ifStmt(new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, variable('rf'), literal(flag)), statements)];\n}\nfunction emitHostBindingFunction(job) {\n if (job.fnName === null) {\n throw new Error(`AssertionError: host binding function is unnamed`);\n }\n const createStatements = [];\n for (const op of job.create) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n createStatements.push(op.statement);\n }\n const updateStatements = [];\n for (const op of job.update) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n updateStatements.push(op.statement);\n }\n if (createStatements.length === 0 && updateStatements.length === 0) {\n return null;\n }\n const createCond = maybeGenerateRfBlock(1, createStatements);\n const updateCond = maybeGenerateRfBlock(2, updateStatements);\n return fn([new FnParam('rf'), new FnParam('ctx')], [...createCond, ...updateCond], /* type */undefined, /* sourceSpan */undefined, job.fnName);\n}\nconst compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;\n/**\n * Process a template AST and convert it into a `ComponentCompilation` in the intermediate\n * representation.\n */\nfunction ingestComponent(componentName, template, constantPool) {\n const cpl = new ComponentCompilationJob(componentName, constantPool, compatibilityMode);\n ingestNodes(cpl.root, template);\n return cpl;\n}\n/**\n * Process a host binding AST and convert it into a `HostBindingCompilationJob` in the intermediate\n * representation.\n */\nfunction ingestHostBinding(input, bindingParser, constantPool) {\n const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);\n for (const property of input.properties ?? []) {\n ingestHostProperty(job, property);\n }\n for (const event of input.events ?? []) {\n ingestHostEvent(job, event);\n }\n return job;\n}\n// TODO: We should refactor the parser to use the same types and structures for host bindings as\n// with ordinary components. This would allow us to share a lot more ingestion code.\nfunction ingestHostProperty(job, property) {\n let expression;\n const ast = property.expression.ast;\n if (ast instanceof Interpolation$1) {\n expression = new Interpolation(ast.strings, ast.expressions.map(expr => convertAst(expr, job)));\n } else {\n expression = convertAst(ast, job);\n }\n let bindingKind = BindingKind.Property;\n // TODO: this should really be handled in the parser.\n if (property.name.startsWith('attr.')) {\n property.name = property.name.substring('attr.'.length);\n bindingKind = BindingKind.Attribute;\n }\n job.update.push(createBindingOp(job.root.xref, bindingKind, property.name, expression, null, SecurityContext.NONE /* TODO: what should we pass as security context? Passing NONE for now. */, false, property.sourceSpan));\n}\nfunction ingestHostEvent(job, event) {}\n/**\n * Ingest the nodes of a template AST into the given `ViewCompilation`.\n */\nfunction ingestNodes(view, template) {\n for (const node of template) {\n if (node instanceof Element$1) {\n ingestElement(view, node);\n } else if (node instanceof Template) {\n ingestTemplate(view, node);\n } else if (node instanceof Text$3) {\n ingestText(view, node);\n } else if (node instanceof BoundText) {\n ingestBoundText(view, node);\n } else {\n throw new Error(`Unsupported template node: ${node.constructor.name}`);\n }\n }\n}\n/**\n * Ingest an element AST from the template into the given `ViewCompilation`.\n */\nfunction ingestElement(view, element) {\n const staticAttributes = {};\n for (const attr of element.attributes) {\n staticAttributes[attr.name] = attr.value;\n }\n const id = view.job.allocateXrefId();\n const [namespaceKey, elementName] = splitNsName(element.name);\n const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element.startSourceSpan);\n view.create.push(startOp);\n ingestBindings(view, startOp, element);\n ingestReferences(startOp, element);\n ingestNodes(view, element.children);\n view.create.push(createElementEndOp(id, element.endSourceSpan));\n}\n/**\n * Ingest an `ng-template` node from the AST into the given `ViewCompilation`.\n */\nfunction ingestTemplate(view, tmpl) {\n const childView = view.job.allocateView(view.xref);\n let tagNameWithoutNamespace = tmpl.tagName;\n let namespacePrefix = '';\n if (tmpl.tagName) {\n [namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);\n }\n // TODO: validate the fallback tag name here.\n const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace ?? 'ng-template', namespaceForKey(namespacePrefix), tmpl.startSourceSpan);\n view.create.push(tplOp);\n ingestBindings(view, tplOp, tmpl);\n ingestReferences(tplOp, tmpl);\n ingestNodes(childView, tmpl.children);\n for (const {\n name,\n value\n } of tmpl.variables) {\n childView.contextVariables.set(name, value);\n }\n}\n/**\n * Ingest a literal text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestText(view, text) {\n view.create.push(createTextOp(view.job.allocateXrefId(), text.value, text.sourceSpan));\n}\n/**\n * Ingest an interpolated text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestBoundText(view, text) {\n let value = text.value;\n if (value instanceof ASTWithSource) {\n value = value.ast;\n }\n if (!(value instanceof Interpolation$1)) {\n throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${value.constructor.name}`);\n }\n const textXref = view.job.allocateXrefId();\n view.create.push(createTextOp(textXref, '', text.sourceSpan));\n view.update.push(createInterpolateTextOp(textXref, new Interpolation(value.strings, value.expressions.map(expr => convertAst(expr, view.job))), text.sourceSpan));\n}\n/**\n * Convert a template AST expression into an output AST expression.\n */\nfunction convertAst(ast, cpl) {\n if (ast instanceof ASTWithSource) {\n return convertAst(ast.ast, cpl);\n } else if (ast instanceof PropertyRead) {\n if (ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver)) {\n return new LexicalReadExpr(ast.name);\n } else {\n return new ReadPropExpr(convertAst(ast.receiver, cpl), ast.name);\n }\n } else if (ast instanceof PropertyWrite) {\n return new WritePropExpr(convertAst(ast.receiver, cpl), ast.name, convertAst(ast.value, cpl));\n } else if (ast instanceof KeyedWrite) {\n return new WriteKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl), convertAst(ast.value, cpl));\n } else if (ast instanceof Call) {\n if (ast.receiver instanceof ImplicitReceiver) {\n throw new Error(`Unexpected ImplicitReceiver`);\n } else {\n return new InvokeFunctionExpr(convertAst(ast.receiver, cpl), ast.args.map(arg => convertAst(arg, cpl)));\n }\n } else if (ast instanceof LiteralPrimitive) {\n return literal(ast.value);\n } else if (ast instanceof Binary) {\n const operator = BINARY_OPERATORS.get(ast.operation);\n if (operator === undefined) {\n throw new Error(`AssertionError: unknown binary operator ${ast.operation}`);\n }\n return new BinaryOperatorExpr(operator, convertAst(ast.left, cpl), convertAst(ast.right, cpl));\n } else if (ast instanceof ThisReceiver) {\n return new ContextExpr(cpl.root.xref);\n } else if (ast instanceof KeyedRead) {\n return new ReadKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));\n } else if (ast instanceof Chain) {\n throw new Error(`AssertionError: Chain in unknown context`);\n } else if (ast instanceof LiteralMap) {\n const entries = ast.keys.map((key, idx) => {\n const value = ast.values[idx];\n return new LiteralMapEntry(key.key, convertAst(value, cpl), key.quoted);\n });\n return new LiteralMapExpr(entries);\n } else if (ast instanceof LiteralArray) {\n return new LiteralArrayExpr(ast.expressions.map(expr => convertAst(expr, cpl)));\n } else if (ast instanceof Conditional) {\n return new ConditionalExpr(convertAst(ast.condition, cpl), convertAst(ast.trueExp, cpl), convertAst(ast.falseExp, cpl));\n } else if (ast instanceof NonNullAssert) {\n // A non-null assertion shouldn't impact generated instructions, so we can just drop it.\n return convertAst(ast.expression, cpl);\n } else if (ast instanceof BindingPipe) {\n return new PipeBindingExpr(cpl.allocateXrefId(), ast.name, [convertAst(ast.exp, cpl), ...ast.args.map(arg => convertAst(arg, cpl))]);\n } else if (ast instanceof SafeKeyedRead) {\n return new SafeKeyedReadExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));\n } else if (ast instanceof SafePropertyRead) {\n return new SafePropertyReadExpr(convertAst(ast.receiver, cpl), ast.name);\n } else if (ast instanceof SafeCall) {\n return new SafeInvokeFunctionExpr(convertAst(ast.receiver, cpl), ast.args.map(a => convertAst(a, cpl)));\n } else if (ast instanceof EmptyExpr$1) {\n return new EmptyExpr();\n } else {\n throw new Error(`Unhandled expression type: ${ast.constructor.name}`);\n }\n}\n/**\n * Process all of the bindings on an element-like structure in the template AST and convert them\n * to their IR representation.\n */\nfunction ingestBindings(view, op, element) {\n if (element instanceof Template) {\n for (const attr of element.templateAttrs) {\n if (attr instanceof TextAttribute) {\n ingestBinding(view, op.xref, attr.name, literal(attr.value), 1 /* e.BindingType.Attribute */, null, SecurityContext.NONE, attr.sourceSpan, true);\n } else {\n ingestBinding(view, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, true);\n }\n }\n }\n for (const attr of element.attributes) {\n // This is only attribute TextLiteral bindings, such as `attr.foo=\"bar\"`. This can never be\n // `[attr.foo]=\"bar\"` or `attr.foo=\"{{bar}}\"`, both of which will be handled as inputs with\n // `BindingType.Attribute`.\n ingestBinding(view, op.xref, attr.name, literal(attr.value), 1 /* e.BindingType.Attribute */, null, SecurityContext.NONE, attr.sourceSpan, false);\n }\n for (const input of element.inputs) {\n ingestBinding(view, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, false);\n }\n for (const output of element.outputs) {\n let listenerOp;\n if (output.type === 1 /* e.ParsedEventType.Animation */) {\n if (output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n listenerOp = createListenerOpForAnimation(op.xref, output.name, output.phase, op.tag);\n } else {\n listenerOp = createListenerOp(op.xref, output.name, op.tag);\n }\n // if output.handler is a chain, then push each statement from the chain separately, and\n // return the last one?\n let inputExprs;\n let handler = output.handler;\n if (handler instanceof ASTWithSource) {\n handler = handler.ast;\n }\n if (handler instanceof Chain) {\n inputExprs = handler.expressions;\n } else {\n inputExprs = [handler];\n }\n if (inputExprs.length === 0) {\n throw new Error('Expected listener to have non-empty expression list.');\n }\n const expressions = inputExprs.map(expr => convertAst(expr, view.job));\n const returnExpr = expressions.pop();\n for (const expr of expressions) {\n const stmtOp = createStatementOp(new ExpressionStatement(expr));\n listenerOp.handlerOps.push(stmtOp);\n }\n listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr)));\n view.create.push(listenerOp);\n }\n}\nconst BINDING_KINDS = new Map([[0 /* e.BindingType.Property */, BindingKind.Property], [1 /* e.BindingType.Attribute */, BindingKind.Attribute], [2 /* e.BindingType.Class */, BindingKind.ClassName], [3 /* e.BindingType.Style */, BindingKind.StyleProperty], [4 /* e.BindingType.Animation */, BindingKind.Animation]]);\nfunction ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, isTemplateBinding) {\n if (value instanceof ASTWithSource) {\n value = value.ast;\n }\n let expression;\n if (value instanceof Interpolation$1) {\n expression = new Interpolation(value.strings, value.expressions.map(expr => convertAst(expr, view.job)));\n } else if (value instanceof AST) {\n expression = convertAst(value, view.job);\n } else {\n expression = value;\n }\n const kind = BINDING_KINDS.get(type);\n view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, isTemplateBinding, sourceSpan));\n}\n/**\n * Process all of the local references on an element-like structure in the template AST and\n * convert them to their IR representation.\n */\nfunction ingestReferences(op, element) {\n assertIsArray(op.localRefs);\n for (const {\n name,\n value\n } of element.references) {\n op.localRefs.push({\n name,\n target: value\n });\n }\n}\n/**\n * Assert that the given value is an array.\n */\nfunction assertIsArray(value) {\n if (!Array.isArray(value)) {\n throw new Error(`AssertionError: expected an array`);\n }\n}\nconst USE_TEMPLATE_PIPELINE = false;\nconst IMPORTANT_FLAG = '!important';\n/**\n * Minimum amount of binding slots required in the runtime for style/class bindings.\n *\n * Styling in Angular uses up two slots in the runtime LView/TData data structures to\n * record binding data, property information and metadata.\n *\n * When a binding is registered it will place the following information in the `LView`:\n *\n * slot 1) binding value\n * slot 2) cached value (all other values collected before it in string form)\n *\n * When a binding is registered it will place the following information in the `TData`:\n *\n * slot 1) prop name\n * slot 2) binding index that points to the previous style/class binding (and some extra config\n * values)\n *\n * Let's imagine we have a binding that looks like so:\n *\n * ```\n * <div [style.width]=\"x\" [style.height]=\"y\">\n * ```\n *\n * Our `LView` and `TData` data-structures look like so:\n *\n * ```typescript\n * LView = [\n * // ...\n * x, // value of x\n * \"width: x\",\n *\n * y, // value of y\n * \"width: x; height: y\",\n * // ...\n * ];\n *\n * TData = [\n * // ...\n * \"width\", // binding slot 20\n * 0,\n *\n * \"height\",\n * 20,\n * // ...\n * ];\n * ```\n *\n * */\nconst MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * It also produces the creation instruction to register all initial styling values\n * (which are all the static class=\"...\" and style=\"...\" attribute values that exist\n * on an element within a template).\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n * styling(...)\n * }\n * if (updateMode) {\n * styleMap(...)\n * classMap(...)\n * styleProp(...)\n * classProp(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\nclass StylingBuilder {\n constructor(_directiveExpr) {\n this._directiveExpr = _directiveExpr;\n /** Whether or not there are any static styling values present */\n this._hasInitialValues = false;\n /**\n * Whether or not there are any styling bindings present\n * (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)\n */\n this.hasBindings = false;\n this.hasBindingsWithPipes = false;\n /** the input for [class] (if it exists) */\n this._classMapInput = null;\n /** the input for [style] (if it exists) */\n this._styleMapInput = null;\n /** an array of each [style.prop] input */\n this._singleStyleInputs = null;\n /** an array of each [class.name] input */\n this._singleClassInputs = null;\n this._lastStylingInput = null;\n this._firstStylingInput = null;\n // maps are used instead of hash maps because a Map will\n // retain the ordering of the keys\n /**\n * Represents the location of each style binding in the template\n * (e.g. `<div [style.width]=\"w\" [style.height]=\"h\">` implies\n * that `width=0` and `height=1`)\n */\n this._stylesIndex = new Map();\n /**\n * Represents the location of each class binding in the template\n * (e.g. `<div [class.big]=\"b\" [class.hidden]=\"h\">` implies\n * that `big=0` and `hidden=1`)\n */\n this._classesIndex = new Map();\n this._initialStyleValues = [];\n this._initialClassValues = [];\n }\n /**\n * Registers a given input to the styling builder to be later used when producing AOT code.\n *\n * The code below will only accept the input if it is somehow tied to styling (whether it be\n * style/class bindings or static style/class attributes).\n */\n registerBoundInput(input) {\n // [attr.style] or [attr.class] are skipped in the code below,\n // they should not be treated as styling-based bindings since\n // they are intended to be written directly to the attr and\n // will therefore skip all style/class resolution that is present\n // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n // [class.prop]=\"\". [class]=\"\" assignments\n let binding = null;\n let name = input.name;\n switch (input.type) {\n case 0 /* BindingType.Property */:\n binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);\n break;\n case 3 /* BindingType.Style */:\n binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);\n break;\n case 2 /* BindingType.Class */:\n binding = this.registerClassInput(name, false, input.value, input.sourceSpan);\n break;\n }\n return binding ? true : false;\n }\n registerInputBasedOnName(name, expression, sourceSpan) {\n let binding = null;\n const prefix = name.substring(0, 6);\n const isStyle = name === 'style' || prefix === 'style.' || prefix === 'style!';\n const isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');\n if (isStyle || isClass) {\n const isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no\n const property = name.slice(isMapBased ? 5 : 6); // the dot explains why there's a +1\n if (isStyle) {\n binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);\n } else {\n binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);\n }\n }\n return binding;\n }\n registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {\n if (isEmptyExpression(value)) {\n return null;\n }\n // CSS custom properties are case-sensitive so we shouldn't normalize them.\n // See: https://www.w3.org/TR/css-variables-1/#defining-variables\n if (!isCssCustomProperty(name)) {\n name = hyphenate$1(name);\n }\n const {\n property,\n hasOverrideFlag,\n suffix: bindingSuffix\n } = parseProperty(name);\n suffix = typeof suffix === 'string' && suffix.length !== 0 ? suffix : bindingSuffix;\n const entry = {\n name: property,\n suffix: suffix,\n value,\n sourceSpan,\n hasOverrideFlag\n };\n if (isMapBased) {\n this._styleMapInput = entry;\n } else {\n (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n registerIntoMap(this._stylesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n registerClassInput(name, isMapBased, value, sourceSpan) {\n if (isEmptyExpression(value)) {\n return null;\n }\n const {\n property,\n hasOverrideFlag\n } = parseProperty(name);\n const entry = {\n name: property,\n value,\n sourceSpan,\n hasOverrideFlag,\n suffix: null\n };\n if (isMapBased) {\n this._classMapInput = entry;\n } else {\n (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n registerIntoMap(this._classesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n _checkForPipes(value) {\n if (value instanceof ASTWithSource && value.ast instanceof BindingPipe) {\n this.hasBindingsWithPipes = true;\n }\n }\n /**\n * Registers the element's static style string value to the builder.\n *\n * @param value the style string (e.g. `width:100px; height:200px;`)\n */\n registerStyleAttr(value) {\n this._initialStyleValues = parse(value);\n this._hasInitialValues = true;\n }\n /**\n * Registers the element's static class string value to the builder.\n *\n * @param value the className string (e.g. `disabled gold zoom`)\n */\n registerClassAttr(value) {\n this._initialClassValues = value.trim().split(/\\s+/g);\n this._hasInitialValues = true;\n }\n /**\n * Appends all styling-related expressions to the provided attrs array.\n *\n * @param attrs an existing array where each of the styling expressions\n * will be inserted into.\n */\n populateInitialStylingAttrs(attrs) {\n // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]\n if (this._initialClassValues.length) {\n attrs.push(literal(1 /* AttributeMarker.Classes */));\n for (let i = 0; i < this._initialClassValues.length; i++) {\n attrs.push(literal(this._initialClassValues[i]));\n }\n }\n // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]\n if (this._initialStyleValues.length) {\n attrs.push(literal(2 /* AttributeMarker.Styles */));\n for (let i = 0; i < this._initialStyleValues.length; i += 2) {\n attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));\n }\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.\n *\n * The instruction generation code below is used for producing the AOT statement code which is\n * responsible for registering initial styles (within a directive hostBindings' creation block),\n * as well as any of the provided attribute values, to the directive host element.\n */\n assignHostAttrs(attrs, definitionMap) {\n if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {\n this.populateInitialStylingAttrs(attrs);\n definitionMap.set('hostAttrs', literalArr(attrs));\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `classMap`.\n *\n * The instruction data will contain all expressions for `classMap` to function\n * which includes the `[class]` expression params.\n */\n buildClassMapInstruction(valueConverter) {\n if (this._classMapInput) {\n return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);\n }\n return null;\n }\n /**\n * Builds an instruction with all the expressions and parameters for `styleMap`.\n *\n * The instruction data will contain all expressions for `styleMap` to function\n * which includes the `[style]` expression params.\n */\n buildStyleMapInstruction(valueConverter) {\n if (this._styleMapInput) {\n return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);\n }\n return null;\n }\n _buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {\n // each styling binding value is stored in the LView\n // map-based bindings allocate two slots: one for the\n // previous binding value and another for the previous\n // className or style attribute value.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n // these values must be outside of the update block so that they can\n // be evaluated (the AST visit call) during creation time so that any\n // pipes can be picked up in time before the template is built\n const mapValue = stylingInput.value.visit(valueConverter);\n let reference;\n if (mapValue instanceof Interpolation$1) {\n totalBindingSlotsRequired += mapValue.expressions.length;\n reference = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);\n } else {\n reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;\n }\n return {\n reference,\n calls: [{\n supportsInterpolation: true,\n sourceSpan: stylingInput.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n params: convertFn => {\n const convertResult = convertFn(mapValue);\n const params = Array.isArray(convertResult) ? convertResult : [convertResult];\n return params;\n }\n }]\n };\n }\n _buildSingleInputs(reference, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {\n const instructions = [];\n inputs.forEach(input => {\n const previousInstruction = instructions[instructions.length - 1];\n const value = input.value.visit(valueConverter);\n let referenceForCall = reference;\n // each styling binding value is stored in the LView\n // but there are two values stored for each binding:\n // 1) the value itself\n // 2) an intermediate value (concatenation of style up to this point).\n // We need to store the intermediate value so that we don't allocate\n // the strings on each CD.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n if (value instanceof Interpolation$1) {\n totalBindingSlotsRequired += value.expressions.length;\n if (getInterpolationExpressionFn) {\n referenceForCall = getInterpolationExpressionFn(value);\n }\n }\n const call = {\n sourceSpan: input.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n supportsInterpolation: !!getInterpolationExpressionFn,\n params: convertFn => {\n // params => stylingProp(propName, value, suffix)\n const params = [];\n params.push(literal(input.name));\n const convertResult = convertFn(value);\n if (Array.isArray(convertResult)) {\n params.push(...convertResult);\n } else {\n params.push(convertResult);\n }\n // [style.prop] bindings may use suffix values (e.g. px, em, etc...), therefore,\n // if that is detected then we need to pass that in as an optional param.\n if (!isClassBased && input.suffix !== null) {\n params.push(literal(input.suffix));\n }\n return params;\n }\n };\n // If we ended up generating a call to the same instruction as the previous styling property\n // we can chain the calls together safely to save some bytes, otherwise we have to generate\n // a separate instruction call. This is primarily a concern with interpolation instructions\n // where we may start off with one `reference`, but end up using another based on the\n // number of interpolations.\n if (previousInstruction && previousInstruction.reference === referenceForCall) {\n previousInstruction.calls.push(call);\n } else {\n instructions.push({\n reference: referenceForCall,\n calls: [call]\n });\n }\n });\n return instructions;\n }\n _buildClassInputs(valueConverter) {\n if (this._singleClassInputs) {\n return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);\n }\n return [];\n }\n _buildStyleInputs(valueConverter) {\n if (this._singleStyleInputs) {\n return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);\n }\n return [];\n }\n /**\n * Constructs all instructions which contain the expressions that will be placed\n * into the update block of a template function or a directive hostBindings function.\n */\n buildUpdateLevelInstructions(valueConverter) {\n const instructions = [];\n if (this.hasBindings) {\n const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);\n if (styleMapInstruction) {\n instructions.push(styleMapInstruction);\n }\n const classMapInstruction = this.buildClassMapInstruction(valueConverter);\n if (classMapInstruction) {\n instructions.push(classMapInstruction);\n }\n instructions.push(...this._buildStyleInputs(valueConverter));\n instructions.push(...this._buildClassInputs(valueConverter));\n }\n return instructions;\n }\n}\nfunction registerIntoMap(map, key) {\n if (!map.has(key)) {\n map.set(key, map.size);\n }\n}\nfunction parseProperty(name) {\n let hasOverrideFlag = false;\n const overrideIndex = name.indexOf(IMPORTANT_FLAG);\n if (overrideIndex !== -1) {\n name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n hasOverrideFlag = true;\n }\n let suffix = null;\n let property = name;\n const unitIndex = name.lastIndexOf('.');\n if (unitIndex > 0) {\n suffix = name.slice(unitIndex + 1);\n property = name.substring(0, unitIndex);\n }\n return {\n property,\n suffix,\n hasOverrideFlag\n };\n}\n/**\n * Gets the instruction to generate for an interpolated class map.\n * @param interpolation An Interpolation AST\n */\nfunction getClassMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.classMap;\n case 3:\n return Identifiers.classMapInterpolate1;\n case 5:\n return Identifiers.classMapInterpolate2;\n case 7:\n return Identifiers.classMapInterpolate3;\n case 9:\n return Identifiers.classMapInterpolate4;\n case 11:\n return Identifiers.classMapInterpolate5;\n case 13:\n return Identifiers.classMapInterpolate6;\n case 15:\n return Identifiers.classMapInterpolate7;\n case 17:\n return Identifiers.classMapInterpolate8;\n default:\n return Identifiers.classMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style map.\n * @param interpolation An Interpolation AST\n */\nfunction getStyleMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleMap;\n case 3:\n return Identifiers.styleMapInterpolate1;\n case 5:\n return Identifiers.styleMapInterpolate2;\n case 7:\n return Identifiers.styleMapInterpolate3;\n case 9:\n return Identifiers.styleMapInterpolate4;\n case 11:\n return Identifiers.styleMapInterpolate5;\n case 13:\n return Identifiers.styleMapInterpolate6;\n case 15:\n return Identifiers.styleMapInterpolate7;\n case 17:\n return Identifiers.styleMapInterpolate8;\n default:\n return Identifiers.styleMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style prop.\n * @param interpolation An Interpolation AST\n */\nfunction getStylePropInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleProp;\n case 3:\n return Identifiers.stylePropInterpolate1;\n case 5:\n return Identifiers.stylePropInterpolate2;\n case 7:\n return Identifiers.stylePropInterpolate3;\n case 9:\n return Identifiers.stylePropInterpolate4;\n case 11:\n return Identifiers.stylePropInterpolate5;\n case 13:\n return Identifiers.stylePropInterpolate6;\n case 15:\n return Identifiers.stylePropInterpolate7;\n case 17:\n return Identifiers.stylePropInterpolate8;\n default:\n return Identifiers.stylePropInterpolateV;\n }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\nfunction isCssCustomProperty(name) {\n return name.startsWith('--');\n}\nfunction isEmptyExpression(ast) {\n if (ast instanceof ASTWithSource) {\n ast = ast.ast;\n }\n return ast instanceof EmptyExpr$1;\n}\nvar TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n TokenType[TokenType[\"PrivateIdentifier\"] = 2] = \"PrivateIdentifier\";\n TokenType[TokenType[\"Keyword\"] = 3] = \"Keyword\";\n TokenType[TokenType[\"String\"] = 4] = \"String\";\n TokenType[TokenType[\"Operator\"] = 5] = \"Operator\";\n TokenType[TokenType[\"Number\"] = 6] = \"Number\";\n TokenType[TokenType[\"Error\"] = 7] = \"Error\";\n})(TokenType || (TokenType = {}));\nconst KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nclass Lexer {\n tokenize(text) {\n const scanner = new _Scanner(text);\n const tokens = [];\n let token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n }\n}\nclass Token {\n constructor(index, end, type, numValue, strValue) {\n this.index = index;\n this.end = end;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n isCharacter(code) {\n return this.type == TokenType.Character && this.numValue == code;\n }\n isNumber() {\n return this.type == TokenType.Number;\n }\n isString() {\n return this.type == TokenType.String;\n }\n isOperator(operator) {\n return this.type == TokenType.Operator && this.strValue == operator;\n }\n isIdentifier() {\n return this.type == TokenType.Identifier;\n }\n isPrivateIdentifier() {\n return this.type == TokenType.PrivateIdentifier;\n }\n isKeyword() {\n return this.type == TokenType.Keyword;\n }\n isKeywordLet() {\n return this.type == TokenType.Keyword && this.strValue == 'let';\n }\n isKeywordAs() {\n return this.type == TokenType.Keyword && this.strValue == 'as';\n }\n isKeywordNull() {\n return this.type == TokenType.Keyword && this.strValue == 'null';\n }\n isKeywordUndefined() {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n }\n isKeywordTrue() {\n return this.type == TokenType.Keyword && this.strValue == 'true';\n }\n isKeywordFalse() {\n return this.type == TokenType.Keyword && this.strValue == 'false';\n }\n isKeywordThis() {\n return this.type == TokenType.Keyword && this.strValue == 'this';\n }\n isError() {\n return this.type == TokenType.Error;\n }\n toNumber() {\n return this.type == TokenType.Number ? this.numValue : -1;\n }\n toString() {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.PrivateIdentifier:\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}\nfunction newCharacterToken(index, end, code) {\n return new Token(index, end, TokenType.Character, code, String.fromCharCode(code));\n}\nfunction newIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.Identifier, 0, text);\n}\nfunction newPrivateIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.PrivateIdentifier, 0, text);\n}\nfunction newKeywordToken(index, end, text) {\n return new Token(index, end, TokenType.Keyword, 0, text);\n}\nfunction newOperatorToken(index, end, text) {\n return new Token(index, end, TokenType.Operator, 0, text);\n}\nfunction newStringToken(index, end, text) {\n return new Token(index, end, TokenType.String, 0, text);\n}\nfunction newNumberToken(index, end, n) {\n return new Token(index, end, TokenType.Number, n, '');\n}\nfunction newErrorToken(index, end, message) {\n return new Token(index, end, TokenType.Error, 0, message);\n}\nconst EOF = new Token(-1, -1, TokenType.Character, 0, '');\nclass _Scanner {\n constructor(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n advance() {\n this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n }\n scanToken() {\n const input = this.input,\n length = this.length;\n let peek = this.peek,\n index = this.index;\n // Skip whitespace.\n while (peek <= $SPACE) {\n if (++index >= length) {\n peek = $EOF;\n break;\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)) return this.scanIdentifier();\n if (isDigit(peek)) return this.scanNumber(index);\n const start = index;\n switch (peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) : newCharacterToken(start, this.index, $PERIOD);\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, peek);\n case $SQ:\n case $DQ:\n return this.scanString();\n case $HASH:\n return this.scanPrivateIdentifier();\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case $QUESTION:\n return this.scanQuestion(start);\n case $LT:\n case $GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n case $BAR:\n return this.scanComplexOperator(start, '|', $BAR, '|');\n case $NBSP:\n while (isWhitespace(this.peek)) this.advance();\n return this.scanToken();\n }\n this.advance();\n return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0);\n }\n scanCharacter(start, code) {\n this.advance();\n return newCharacterToken(start, this.index, code);\n }\n scanOperator(start, str) {\n this.advance();\n return newOperatorToken(start, this.index, 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 scanComplexOperator(start, one, twoCode, two, threeCode, three) {\n this.advance();\n let 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, this.index, str);\n }\n scanIdentifier() {\n const start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek)) this.advance();\n const str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) : newIdentifierToken(start, this.index, str);\n }\n /** Scans an ECMAScript private identifier. */\n scanPrivateIdentifier() {\n const start = this.index;\n this.advance();\n if (!isIdentifierStart(this.peek)) {\n return this.error('Invalid character [#]', -1);\n }\n while (isIdentifierPart(this.peek)) this.advance();\n const identifierName = this.input.substring(start, this.index);\n return newPrivateIdentifierToken(start, this.index, identifierName);\n }\n scanNumber(start) {\n let simple = this.index === start;\n let hasSeparators = false;\n this.advance(); // Skip initial digit.\n while (true) {\n if (isDigit(this.peek)) {\n // Do nothing.\n } else if (this.peek === $_) {\n // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is\n // valid while `_101` and `101_` are not. The separator can't be next to the decimal\n // point or another separator either. Note that it's unlikely that we'll hit a case where\n // the underscore is at the start, because that's a valid identifier and it will be picked\n // up earlier in the parsing. We validate for it anyway just in case.\n if (!isDigit(this.input.charCodeAt(this.index - 1)) || !isDigit(this.input.charCodeAt(this.index + 1))) {\n return this.error('Invalid numeric separator', 0);\n }\n hasSeparators = true;\n } else if (this.peek === $PERIOD) {\n simple = false;\n } else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek)) this.advance();\n if (!isDigit(this.peek)) return this.error('Invalid exponent', -1);\n simple = false;\n } else {\n break;\n }\n this.advance();\n }\n let str = this.input.substring(start, this.index);\n if (hasSeparators) {\n str = str.replace(/_/g, '');\n }\n const value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, this.index, value);\n }\n scanString() {\n const start = this.index;\n const quote = this.peek;\n this.advance(); // Skip initial quote.\n let buffer = '';\n let marker = this.index;\n const input = this.input;\n while (this.peek != quote) {\n if (this.peek == $BACKSLASH) {\n buffer += input.substring(marker, this.index);\n let unescapedCode;\n this.advance(); // mutates this.peek\n // @ts-expect-error see microsoft/TypeScript#9998\n if (this.peek == $u) {\n // 4 character hex code for unicode character.\n const hex = input.substring(this.index + 1, this.index + 5);\n if (/^[0-9a-f]+$/i.test(hex)) {\n unescapedCode = parseInt(hex, 16);\n } else {\n return this.error(`Invalid unicode escape [\\\\u${hex}]`, 0);\n }\n for (let i = 0; i < 5; i++) {\n this.advance();\n }\n } else {\n unescapedCode = unescape(this.peek);\n this.advance();\n }\n buffer += String.fromCharCode(unescapedCode);\n marker = this.index;\n } else if (this.peek == $EOF) {\n return this.error('Unterminated quote', 0);\n } else {\n this.advance();\n }\n }\n const last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, this.index, buffer + last);\n }\n scanQuestion(start) {\n this.advance();\n let str = '?';\n // Either `a ?? b` or 'a?.b'.\n if (this.peek === $QUESTION || this.peek === $PERIOD) {\n str += this.peek === $PERIOD ? '.' : '?';\n this.advance();\n }\n return newOperatorToken(start, this.index, str);\n }\n error(message, offset) {\n const position = this.index + offset;\n return newErrorToken(position, this.index, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`);\n }\n}\nfunction isIdentifierStart(code) {\n return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;\n}\nfunction isIdentifier(input) {\n if (input.length == 0) return false;\n const scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek)) return false;\n scanner.advance();\n while (scanner.peek !== $EOF) {\n if (!isIdentifierPart(scanner.peek)) return false;\n scanner.advance();\n }\n return true;\n}\nfunction isIdentifierPart(code) {\n return isAsciiLetter(code) || isDigit(code) || code == $_ || code == $$;\n}\nfunction isExponentStart(code) {\n return code == $e || code == $E;\n}\nfunction isExponentSign(code) {\n return code == $MINUS || code == $PLUS;\n}\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\nfunction parseIntAutoRadix(text) {\n const result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\nclass SplitInterpolation {\n constructor(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n}\nclass TemplateBindingParseResult {\n constructor(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n}\nclass Parser$1 {\n constructor(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n parseAction(input, isAssignmentEvent, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n let flags = 1 /* ParseFlags.Action */;\n if (isAssignmentEvent) {\n flags |= 2 /* ParseFlags.AssignmentEvent */;\n }\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n checkSimpleExpression(ast) {\n const checker = new SimpleExpressionChecker();\n ast.visit(checker);\n return checker.errors;\n }\n // Host bindings parsed here\n parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n const errors = this.checkSimpleExpression(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, absoluteOffset, this.errors);\n }\n _reportError(message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n }\n _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0).parseChain();\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items\">\n * ^ ^ absoluteValueOffset for `templateValue`\n * absoluteKeyOffset for `templateKey`\n * ```\n * contains three bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n *\n * This is apparent from the de-sugared template:\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\">\n * ```\n *\n * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor\n * @param templateValue RHS of the microsyntax attribute\n * @param templateUrl template filename if it's external, component filename if it's inline\n * @param absoluteKeyOffset start of the `templateKey`\n * @param absoluteValueOffset start of the `templateValue`\n */\n parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {\n const tokens = this._lexer.tokenize(templateValue);\n const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */);\n return parser.parseTemplateBindings({\n source: templateKey,\n span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)\n });\n }\n parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const {\n strings,\n expressions,\n offsets\n } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);\n if (expressions.length === 0) return null;\n const expressionNodes = [];\n for (let i = 0; i < expressions.length; ++i) {\n const expressionText = expressions[i].text;\n const sourceToLex = this._stripComments(expressionText);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i]).parseChain();\n expressionNodes.push(ast);\n }\n return this.createInterpolationAst(strings.map(s => s.text), expressionNodes, input, location, absoluteOffset);\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, location, absoluteOffset) {\n const sourceToLex = this._stripComments(expression);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0).parseChain();\n const strings = ['', '']; // The prefix and suffix strings are both empty\n return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);\n }\n createInterpolationAst(strings, expressions, input, location, absoluteOffset) {\n const span = new ParseSpan(0, input.length);\n const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);\n return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);\n }\n /**\n * Splits a string of text into \"raw\" text segments and expressions present in interpolations in\n * the string.\n * Returns `null` if there are no interpolations, otherwise a\n * `SplitInterpolation` with splits that look like\n * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>\n */\n splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const strings = [];\n const expressions = [];\n const offsets = [];\n const inputToTemplateIndexMap = interpolatedTokens ? getIndexMapForOriginalTemplate(interpolatedTokens) : null;\n let i = 0;\n let atInterpolation = false;\n let extendLastString = false;\n let {\n start: interpStart,\n end: interpEnd\n } = interpolationConfig;\n while (i < input.length) {\n if (!atInterpolation) {\n // parse until starting {{\n const start = i;\n i = input.indexOf(interpStart, i);\n if (i === -1) {\n i = input.length;\n }\n const text = input.substring(start, i);\n strings.push({\n text,\n start,\n end: i\n });\n atInterpolation = true;\n } else {\n // parse from starting {{ to ending }} while ignoring content inside quotes.\n const fullStart = i;\n const exprStart = fullStart + interpStart.length;\n const exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);\n if (exprEnd === -1) {\n // Could not find the end of the interpolation; do not parse an expression.\n // Instead we should extend the content on the last raw string.\n atInterpolation = false;\n extendLastString = true;\n break;\n }\n const fullEnd = exprEnd + interpEnd.length;\n const text = input.substring(exprStart, exprEnd);\n if (text.trim().length === 0) {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);\n }\n expressions.push({\n text,\n start: fullStart,\n end: fullEnd\n });\n const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;\n const offset = startInOriginalTemplate + interpStart.length;\n offsets.push(offset);\n i = fullEnd;\n atInterpolation = false;\n }\n }\n if (!atInterpolation) {\n // If we are now at a text section, add the remaining content as a raw string.\n if (extendLastString) {\n const piece = strings[strings.length - 1];\n piece.text += input.substring(i);\n piece.end = input.length;\n } else {\n strings.push({\n text: input.substring(i),\n start: i,\n end: input.length\n });\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n }\n wrapLiteralPrimitive(input, location, absoluteOffset) {\n const span = new ParseSpan(0, input == null ? 0 : input.length);\n return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);\n }\n _stripComments(input) {\n const i = this._commentStart(input);\n return i != null ? input.substring(0, i) : input;\n }\n _commentStart(input) {\n let outerQuote = null;\n for (let i = 0; i < input.length - 1; i++) {\n const char = input.charCodeAt(i);\n const nextChar = input.charCodeAt(i + 1);\n if (char === $SLASH && nextChar == $SLASH && outerQuote == null) return i;\n if (outerQuote === char) {\n outerQuote = null;\n } else if (outerQuote == null && isQuote(char)) {\n outerQuote = char;\n }\n }\n return null;\n }\n _checkNoInterpolation(input, location, {\n start,\n end\n }) {\n let startIndex = -1;\n let endIndex = -1;\n for (const charIndex of this._forEachUnquotedChar(input, 0)) {\n if (startIndex === -1) {\n if (input.startsWith(start)) {\n startIndex = charIndex;\n }\n } else {\n endIndex = this._getInterpolationEndIndex(input, end, charIndex);\n if (endIndex > -1) {\n break;\n }\n }\n }\n if (startIndex > -1 && endIndex > -1) {\n this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);\n }\n }\n /**\n * Finds the index of the end of an interpolation expression\n * while ignoring comments and quoted content.\n */\n _getInterpolationEndIndex(input, expressionEnd, start) {\n for (const charIndex of this._forEachUnquotedChar(input, start)) {\n if (input.startsWith(expressionEnd, charIndex)) {\n return charIndex;\n }\n // Nothing else in the expression matters after we've\n // hit a comment so look directly for the end token.\n if (input.startsWith('//', charIndex)) {\n return input.indexOf(expressionEnd, charIndex);\n }\n }\n return -1;\n }\n /**\n * Generator used to iterate over the character indexes of a string that are outside of quotes.\n * @param input String to loop through.\n * @param start Index within the string at which to start.\n */\n *_forEachUnquotedChar(input, start) {\n let currentQuote = null;\n let escapeCount = 0;\n for (let i = start; i < input.length; i++) {\n const char = input[i];\n // Skip the characters inside quotes. Note that we only care about the outer-most\n // quotes matching up and we need to account for escape characters.\n if (isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) && escapeCount % 2 === 0) {\n currentQuote = currentQuote === null ? char : null;\n } else if (currentQuote === null) {\n yield i;\n }\n escapeCount = char === '\\\\' ? escapeCount + 1 : 0;\n }\n }\n}\n/** Describes a stateful context an expression parser is in. */\nvar ParseContextFlags;\n(function (ParseContextFlags) {\n ParseContextFlags[ParseContextFlags[\"None\"] = 0] = \"None\";\n /**\n * A Writable context is one in which a value may be written to an lvalue.\n * For example, after we see a property access, we may expect a write to the\n * property via the \"=\" operator.\n * prop\n * ^ possible \"=\" after\n */\n ParseContextFlags[ParseContextFlags[\"Writable\"] = 1] = \"Writable\";\n})(ParseContextFlags || (ParseContextFlags = {}));\nclass _ParseAST {\n constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {\n this.input = input;\n this.location = location;\n this.absoluteOffset = absoluteOffset;\n this.tokens = tokens;\n this.parseFlags = parseFlags;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.context = ParseContextFlags.None;\n // Cache of expression start and input indeces to the absolute source span they map to, used to\n // prevent creating superfluous source spans in `sourceSpan`.\n // A serial of the expression start and input index is used for mapping because both are stateful\n // and may change for subsequent expressions visited by the parser.\n this.sourceSpanCache = new Map();\n this.index = 0;\n }\n peek(offset) {\n const i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n }\n get next() {\n return this.peek(0);\n }\n /** Whether all the parser input has been processed. */\n get atEOF() {\n return this.index >= this.tokens.length;\n }\n /**\n * Index of the next token to be processed, or the end of the last token if all have been\n * processed.\n */\n get inputIndex() {\n return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;\n }\n /**\n * End index of the last processed token, or the start of the first token if none have been\n * processed.\n */\n get currentEndIndex() {\n if (this.index > 0) {\n const curToken = this.peek(-1);\n return curToken.end + this.offset;\n }\n // No tokens have been processed yet; return the next token's start or the length of the input\n // if there is no token.\n if (this.tokens.length === 0) {\n return this.input.length + this.offset;\n }\n return this.next.index + this.offset;\n }\n /**\n * Returns the absolute offset of the start of the current token.\n */\n get currentAbsoluteOffset() {\n return this.absoluteOffset + this.inputIndex;\n }\n /**\n * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if\n * provided).\n *\n * @param start Position from which the `ParseSpan` will start.\n * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the\n * natural ending index)\n */\n span(start, artificialEndIndex) {\n let endIndex = this.currentEndIndex;\n if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) {\n endIndex = artificialEndIndex;\n }\n // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is\n // being created), the current token may already be advanced beyond the `currentEndIndex`. This\n // appears to be a deep-seated parser bug.\n //\n // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`.\n // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround.\n if (start > endIndex) {\n const tmp = endIndex;\n endIndex = start;\n start = tmp;\n }\n return new ParseSpan(start, endIndex);\n }\n sourceSpan(start, artificialEndIndex) {\n const serial = `${start}@${this.inputIndex}:${artificialEndIndex}`;\n if (!this.sourceSpanCache.has(serial)) {\n this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset));\n }\n return this.sourceSpanCache.get(serial);\n }\n advance() {\n this.index++;\n }\n /**\n * Executes a callback in the provided context.\n */\n withContext(context, cb) {\n this.context |= context;\n const ret = cb();\n this.context ^= context;\n return ret;\n }\n consumeOptionalCharacter(code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n } else {\n return false;\n }\n }\n peekKeywordLet() {\n return this.next.isKeywordLet();\n }\n peekKeywordAs() {\n return this.next.isKeywordAs();\n }\n /**\n * Consumes an expected character, otherwise emits an error about the missing expected character\n * and skips over the token stream until reaching a recoverable point.\n *\n * See `this.error` and `this.skip` for more details.\n */\n expectCharacter(code) {\n if (this.consumeOptionalCharacter(code)) return;\n this.error(`Missing expected ${String.fromCharCode(code)}`);\n }\n consumeOptionalOperator(op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n } else {\n return false;\n }\n }\n expectOperator(operator) {\n if (this.consumeOptionalOperator(operator)) return;\n this.error(`Missing expected operator ${operator}`);\n }\n prettyPrintToken(tok) {\n return tok === EOF ? 'end of input' : `token ${tok}`;\n }\n expectIdentifierOrKeyword() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword');\n } else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);\n }\n return null;\n }\n this.advance();\n return n.toString();\n }\n expectIdentifierOrKeywordOrString() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string');\n } else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);\n }\n return '';\n }\n this.advance();\n return n.toString();\n }\n parseChain() {\n const exprs = [];\n const start = this.inputIndex;\n while (this.index < this.tokens.length) {\n const expr = this.parsePipe();\n exprs.push(expr);\n if (this.consumeOptionalCharacter($SEMICOLON)) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.consumeOptionalCharacter($SEMICOLON)) {} // read all semicolons\n } else if (this.index < this.tokens.length) {\n const errorIndex = this.index;\n this.error(`Unexpected token '${this.next}'`);\n // The `error` call above will skip ahead to the next recovery point in an attempt to\n // recover part of the expression, but that might be the token we started from which will\n // lead to an infinite loop. If that's the case, break the loop assuming that we can't\n // parse further.\n if (this.index === errorIndex) {\n break;\n }\n }\n }\n if (exprs.length === 0) {\n // We have no expressions so create an empty expression that spans the entire input length\n const artificialStart = this.offset;\n const artificialEnd = this.offset + this.input.length;\n return new EmptyExpr$1(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));\n }\n if (exprs.length == 1) return exprs[0];\n return new Chain(this.span(start), this.sourceSpan(start), exprs);\n }\n parsePipe() {\n const start = this.inputIndex;\n let result = this.parseExpression();\n if (this.consumeOptionalOperator('|')) {\n if (this.parseFlags & 1 /* ParseFlags.Action */) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n const nameStart = this.inputIndex;\n let nameId = this.expectIdentifierOrKeyword();\n let nameSpan;\n let fullSpanEnd = undefined;\n if (nameId !== null) {\n nameSpan = this.sourceSpan(nameStart);\n } else {\n // No valid identifier was found, so we'll assume an empty pipe name ('').\n nameId = '';\n // However, there may have been whitespace present between the pipe character and the next\n // token in the sequence (or the end of input). We want to track this whitespace so that\n // the `BindingPipe` we produce covers not just the pipe character, but any trailing\n // whitespace beyond it. Another way of thinking about this is that the zero-length name\n // is assumed to be at the end of any whitespace beyond the pipe character.\n //\n // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the\n // beginning of the next token, or until the end of input if the next token is EOF.\n fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset;\n // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace\n // beyond the pipe character.\n nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);\n }\n const args = [];\n while (this.consumeOptionalCharacter($COLON)) {\n args.push(this.parseExpression());\n // If there are additional expressions beyond the name, then the artificial end for the\n // name is no longer relevant.\n }\n result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);\n } while (this.consumeOptionalOperator('|'));\n }\n return result;\n }\n parseExpression() {\n return this.parseConditional();\n }\n parseConditional() {\n const start = this.inputIndex;\n const result = this.parseLogicalOr();\n if (this.consumeOptionalOperator('?')) {\n const yes = this.parsePipe();\n let no;\n if (!this.consumeOptionalCharacter($COLON)) {\n const end = this.inputIndex;\n const expression = this.input.substring(start, end);\n this.error(`Conditional expression ${expression} requires all 3 expressions`);\n no = new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n } else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);\n } else {\n return result;\n }\n }\n parseLogicalOr() {\n // '||'\n const start = this.inputIndex;\n let result = this.parseLogicalAnd();\n while (this.consumeOptionalOperator('||')) {\n const right = this.parseLogicalAnd();\n result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right);\n }\n return result;\n }\n parseLogicalAnd() {\n // '&&'\n const start = this.inputIndex;\n let result = this.parseNullishCoalescing();\n while (this.consumeOptionalOperator('&&')) {\n const right = this.parseNullishCoalescing();\n result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right);\n }\n return result;\n }\n parseNullishCoalescing() {\n // '??'\n const start = this.inputIndex;\n let result = this.parseEquality();\n while (this.consumeOptionalOperator('??')) {\n const right = this.parseEquality();\n result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right);\n }\n return result;\n }\n parseEquality() {\n // '==','!=','===','!=='\n const start = this.inputIndex;\n let result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n const right = this.parseRelational();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseRelational() {\n // '<', '>', '<=', '>='\n const start = this.inputIndex;\n let result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n const right = this.parseAdditive();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseAdditive() {\n // '+', '-'\n const start = this.inputIndex;\n let result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n let right = this.parseMultiplicative();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseMultiplicative() {\n // '*', '%', '/'\n const start = this.inputIndex;\n let result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n let right = this.parsePrefix();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parsePrefix() {\n if (this.next.type == TokenType.Operator) {\n const start = this.inputIndex;\n const operator = this.next.strValue;\n let result;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return Unary.createPlus(this.span(start), this.sourceSpan(start), result);\n case '-':\n this.advance();\n result = this.parsePrefix();\n return Unary.createMinus(this.span(start), this.sourceSpan(start), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), this.sourceSpan(start), result);\n }\n }\n return this.parseCallChain();\n }\n parseCallChain() {\n const start = this.inputIndex;\n let result = this.parsePrimary();\n while (true) {\n if (this.consumeOptionalCharacter($PERIOD)) {\n result = this.parseAccessMember(result, start, false);\n } else if (this.consumeOptionalOperator('?.')) {\n if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, true);\n } else {\n result = this.consumeOptionalCharacter($LBRACKET) ? this.parseKeyedReadOrWrite(result, start, true) : this.parseAccessMember(result, start, true);\n }\n } else if (this.consumeOptionalCharacter($LBRACKET)) {\n result = this.parseKeyedReadOrWrite(result, start, false);\n } else if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, false);\n } else if (this.consumeOptionalOperator('!')) {\n result = new NonNullAssert(this.span(start), this.sourceSpan(start), result);\n } else {\n return result;\n }\n }\n }\n parsePrimary() {\n const start = this.inputIndex;\n if (this.consumeOptionalCharacter($LPAREN)) {\n this.rparensExpected++;\n const result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n return result;\n } else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);\n } else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);\n } else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);\n } else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);\n } else if (this.next.isKeywordThis()) {\n this.advance();\n return new ThisReceiver(this.span(start), this.sourceSpan(start));\n } else if (this.consumeOptionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n const elements = this.parseExpressionList($RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n return new LiteralArray(this.span(start), this.sourceSpan(start), elements);\n } else if (this.next.isCharacter($LBRACE)) {\n return this.parseLiteralMap();\n } else if (this.next.isIdentifier()) {\n return this.parseAccessMember(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false);\n } else if (this.next.isNumber()) {\n const value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);\n } else if (this.next.isString()) {\n const literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);\n } else if (this.next.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(this.next, null);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n } else if (this.index >= this.tokens.length) {\n this.error(`Unexpected end of expression: ${this.input}`);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n } else {\n this.error(`Unexpected token ${this.next}`);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n }\n parseExpressionList(terminator) {\n const result = [];\n do {\n if (!this.next.isCharacter(terminator)) {\n result.push(this.parsePipe());\n } else {\n break;\n }\n } while (this.consumeOptionalCharacter($COMMA));\n return result;\n }\n parseLiteralMap() {\n const keys = [];\n const values = [];\n const start = this.inputIndex;\n this.expectCharacter($LBRACE);\n if (!this.consumeOptionalCharacter($RBRACE)) {\n this.rbracesExpected++;\n do {\n const keyStart = this.inputIndex;\n const quoted = this.next.isString();\n const key = this.expectIdentifierOrKeywordOrString();\n keys.push({\n key,\n quoted\n });\n // Properties with quoted keys can't use the shorthand syntax.\n if (quoted) {\n this.expectCharacter($COLON);\n values.push(this.parsePipe());\n } else if (this.consumeOptionalCharacter($COLON)) {\n values.push(this.parsePipe());\n } else {\n const span = this.span(keyStart);\n const sourceSpan = this.sourceSpan(keyStart);\n values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));\n }\n } while (this.consumeOptionalCharacter($COMMA) && !this.next.isCharacter($RBRACE));\n this.rbracesExpected--;\n this.expectCharacter($RBRACE);\n }\n return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);\n }\n parseAccessMember(readReceiver, start, isSafe) {\n const nameStart = this.inputIndex;\n const id = this.withContext(ParseContextFlags.Writable, () => {\n const id = this.expectIdentifierOrKeyword() ?? '';\n if (id.length === 0) {\n this.error(`Expected identifier for property access`, readReceiver.span.end);\n }\n return id;\n });\n const nameSpan = this.sourceSpan(nameStart);\n let receiver;\n if (isSafe) {\n if (this.consumeOptionalAssignment()) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n receiver = new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n } else {\n receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n } else {\n if (this.consumeOptionalAssignment()) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n const value = this.parseConditional();\n receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value);\n } else {\n receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n }\n return receiver;\n }\n parseCall(receiver, start, isSafe) {\n const argumentStart = this.inputIndex;\n this.rparensExpected++;\n const args = this.parseCallArguments();\n const argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset);\n this.expectCharacter($RPAREN);\n this.rparensExpected--;\n const span = this.span(start);\n const sourceSpan = this.sourceSpan(start);\n return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) : new Call(span, sourceSpan, receiver, args, argumentSpan);\n }\n consumeOptionalAssignment() {\n // When parsing assignment events (originating from two-way-binding aka banana-in-a-box syntax),\n // it is valid for the primary expression to be terminated by the non-null operator. This\n // primary expression is substituted as LHS of the assignment operator to achieve\n // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't\n // naturally allow for this syntax, so assignment events are parsed specially.\n if (this.parseFlags & 2 /* ParseFlags.AssignmentEvent */ && this.next.isOperator('!') && this.peek(1).isOperator('=')) {\n // First skip over the ! operator.\n this.advance();\n // Then skip over the = operator, to fully consume the optional assignment operator.\n this.advance();\n return true;\n }\n return this.consumeOptionalOperator('=');\n }\n parseCallArguments() {\n if (this.next.isCharacter($RPAREN)) return [];\n const positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.consumeOptionalCharacter($COMMA));\n return positionals;\n }\n /**\n * Parses an identifier, a keyword, a string with an optional `-` in between,\n * and returns the string along with its absolute source span.\n */\n expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n const start = this.currentAbsoluteOffset;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.consumeOptionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return {\n source: result,\n span: new AbsoluteSourceSpan(start, start + result.length)\n };\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items; index as i; trackBy: func\">\n * ```\n * contains five bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n * 4. i -> NgForOfContext.index\n * 5. ngForTrackBy -> func\n *\n * For a full description of the microsyntax grammar, see\n * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855\n *\n * @param templateKey name of the microsyntax directive, like ngIf, ngFor,\n * without the *, along with its absolute span.\n */\n parseTemplateBindings(templateKey) {\n const bindings = [];\n // The first binding is for the template key itself\n // In *ngFor=\"let item of items\", key = \"ngFor\", value = null\n // In *ngIf=\"cond | pipe\", key = \"ngIf\", value = \"cond | pipe\"\n bindings.push(...this.parseDirectiveKeywordBindings(templateKey));\n while (this.index < this.tokens.length) {\n // If it starts with 'let', then this must be variable declaration\n const letBinding = this.parseLetBinding();\n if (letBinding) {\n bindings.push(letBinding);\n } else {\n // Two possible cases here, either `value \"as\" key` or\n // \"directive-keyword expression\". We don't know which case, but both\n // \"value\" and \"directive-keyword\" are template binding key, so consume\n // the key first.\n const key = this.expectTemplateBindingKey();\n // Peek at the next token, if it is \"as\" then this must be variable\n // declaration.\n const binding = this.parseAsBinding(key);\n if (binding) {\n bindings.push(binding);\n } else {\n // Otherwise the key must be a directive keyword, like \"of\". Transform\n // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy\n key.source = templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);\n bindings.push(...this.parseDirectiveKeywordBindings(key));\n }\n }\n this.consumeStatementTerminator();\n }\n return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors);\n }\n parseKeyedReadOrWrite(receiver, start, isSafe) {\n return this.withContext(ParseContextFlags.Writable, () => {\n this.rbracketsExpected++;\n const key = this.parsePipe();\n if (key instanceof EmptyExpr$1) {\n this.error(`Key access cannot be empty`);\n }\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n if (this.consumeOptionalOperator('=')) {\n if (isSafe) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n } else {\n const value = this.parseConditional();\n return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);\n }\n } else {\n return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);\n }\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n });\n }\n /**\n * Parse a directive keyword, followed by a mandatory expression.\n * For example, \"of items\", \"trackBy: func\".\n * The bindings are: ngForOf -> items, ngForTrackBy -> func\n * There could be an optional \"as\" binding that follows the expression.\n * For example,\n * ```\n * *ngFor=\"let item of items | slice:0:1 as collection\".\n * ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^\n * keyword bound target optional 'as' binding\n * ```\n *\n * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its\n * absolute span.\n */\n parseDirectiveKeywordBindings(key) {\n const bindings = [];\n this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction\n const value = this.getDirectiveBoundTarget();\n let spanEnd = this.currentAbsoluteOffset;\n // The binding could optionally be followed by \"as\". For example,\n // *ngIf=\"cond | pipe as x\". In this case, the key in the \"as\" binding\n // is \"x\" and the value is the template key itself (\"ngIf\"). Note that the\n // 'key' in the current context now becomes the \"value\" in the next binding.\n const asBinding = this.parseAsBinding(key);\n if (!asBinding) {\n this.consumeStatementTerminator();\n spanEnd = this.currentAbsoluteOffset;\n }\n const sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);\n bindings.push(new ExpressionBinding(sourceSpan, key, value));\n if (asBinding) {\n bindings.push(asBinding);\n }\n return bindings;\n }\n /**\n * Return the expression AST for the bound target of a directive keyword\n * binding. For example,\n * ```\n * *ngIf=\"condition | pipe\"\n * ^^^^^^^^^^^^^^^^ bound target for \"ngIf\"\n * *ngFor=\"let item of items\"\n * ^^^^^ bound target for \"ngForOf\"\n * ```\n */\n getDirectiveBoundTarget() {\n if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {\n return null;\n }\n const ast = this.parsePipe(); // example: \"condition | async\"\n const {\n start,\n end\n } = ast.span;\n const value = this.input.substring(start, end);\n return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);\n }\n /**\n * Return the binding for a variable declared using `as`. Note that the order\n * of the key-value pair in this declaration is reversed. For example,\n * ```\n * *ngFor=\"let item of items; index as i\"\n * ^^^^^ ^\n * value key\n * ```\n *\n * @param value name of the value in the declaration, \"ngIf\" in the example\n * above, along with its absolute span.\n */\n parseAsBinding(value) {\n if (!this.peekKeywordAs()) {\n return null;\n }\n this.advance(); // consume the 'as' keyword\n const key = this.expectTemplateBindingKey();\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Return the binding for a variable declared using `let`. For example,\n * ```\n * *ngFor=\"let item of items; let i=index;\"\n * ^^^^^^^^ ^^^^^^^^^^^\n * ```\n * In the first binding, `item` is bound to `NgForOfContext.$implicit`.\n * In the second binding, `i` is bound to `NgForOfContext.index`.\n */\n parseLetBinding() {\n if (!this.peekKeywordLet()) {\n return null;\n }\n const spanStart = this.currentAbsoluteOffset;\n this.advance(); // consume the 'let' keyword\n const key = this.expectTemplateBindingKey();\n let value = null;\n if (this.consumeOptionalOperator('=')) {\n value = this.expectTemplateBindingKey();\n }\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Consume the optional statement terminator: semicolon or comma.\n */\n consumeStatementTerminator() {\n this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);\n }\n /**\n * Records an error and skips over the token stream until reaching a recoverable point. See\n * `this.skip` for more details on token skipping.\n */\n error(message, index = null) {\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n }\n locationText(index = null) {\n if (index == null) index = this.index;\n return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`;\n }\n /**\n * Records an error for an unexpected private identifier being discovered.\n * @param token Token representing a private identifier.\n * @param extraMessage Optional additional message being appended to the error.\n */\n _reportErrorForPrivateIdentifier(token, extraMessage) {\n let errorMessage = `Private identifiers are not supported. Unexpected private identifier: ${token}`;\n if (extraMessage !== null) {\n errorMessage += `, ${extraMessage}`;\n }\n this.error(errorMessage);\n }\n /**\n * Error recovery should skip tokens until it encounters a recovery point.\n *\n * The following are treated as unconditional recovery points:\n * - end of input\n * - ';' (parseChain() is always the root production, and it expects a ';')\n * - '|' (since pipes may be chained and each pipe expression may be treated independently)\n *\n * The following are conditional recovery points:\n * - ')', '}', ']' if one of calling productions is expecting one of these symbols\n * - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to\n * be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins\n * an '(' <expr> ')' production).\n * The recovery points of grouping symbols must be conditional as they must be skipped if\n * none of the calling productions are not expecting the closing token else we will never\n * make progress in the case of an extraneous group closing symbol (such as a stray ')').\n * That is, we skip a closing symbol if we are not in a grouping production.\n * - '=' in a `Writable` context\n * - In this context, we are able to recover after seeing the `=` operator, which\n * signals the presence of an independent rvalue expression following the `=` operator.\n *\n * If a production expects one of these token it increments the corresponding nesting count,\n * and then decrements it just prior to checking if the token is in the input.\n */\n skip() {\n let n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n }\n}\nclass SimpleExpressionChecker extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.errors = [];\n }\n visitPipe() {\n this.errors.push('pipes');\n }\n}\n/**\n * Computes the real offset in the original template for indexes in an interpolation.\n *\n * Because templates can have encoded HTML entities and the input passed to the parser at this stage\n * of the compiler is the _decoded_ value, we need to compute the real offset using the original\n * encoded values in the interpolated tokens. Note that this is only a special case handling for\n * `MlParserTokenType.ENCODED_ENTITY` token types. All other interpolated tokens are expected to\n * have parts which exactly match the input string for parsing the interpolation.\n *\n * @param interpolatedTokens The tokens for the interpolated value.\n *\n * @returns A map of index locations in the decoded template to indexes in the original template\n */\nfunction getIndexMapForOriginalTemplate(interpolatedTokens) {\n let offsetMap = new Map();\n let consumedInOriginalTemplate = 0;\n let consumedInInput = 0;\n let tokenIndex = 0;\n while (tokenIndex < interpolatedTokens.length) {\n const currentToken = interpolatedTokens[tokenIndex];\n if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) {\n const [decoded, encoded] = currentToken.parts;\n consumedInOriginalTemplate += encoded.length;\n consumedInInput += decoded.length;\n } else {\n const lengthOfParts = currentToken.parts.reduce((sum, current) => sum + current.length, 0);\n consumedInInput += lengthOfParts;\n consumedInOriginalTemplate += lengthOfParts;\n }\n offsetMap.set(consumedInInput, consumedInOriginalTemplate);\n tokenIndex++;\n }\n return offsetMap;\n}\nclass NodeWithI18n {\n constructor(sourceSpan, i18n) {\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n}\nclass Text extends NodeWithI18n {\n constructor(value, sourceSpan, tokens, i18n) {\n super(sourceSpan, i18n);\n this.value = value;\n this.tokens = tokens;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\nclass Expansion extends NodeWithI18n {\n constructor(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {\n super(sourceSpan, i18n);\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.switchValueSourceSpan = switchValueSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitExpansion(this, context);\n }\n}\nclass ExpansionCase {\n constructor(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 visit(visitor, context) {\n return visitor.visitExpansionCase(this, context);\n }\n}\nclass Attribute extends NodeWithI18n {\n constructor(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.value = value;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.valueTokens = valueTokens;\n }\n visit(visitor, context) {\n return visitor.visitAttribute(this, context);\n }\n}\nclass Element extends NodeWithI18n {\n constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitElement(this, context);\n }\n}\nclass Comment {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitComment(this, context);\n }\n}\nclass BlockGroup {\n constructor(blocks, sourceSpan, startSourceSpan, endSourceSpan = null) {\n this.blocks = blocks;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockGroup(this, context);\n }\n}\nclass Block {\n constructor(name, parameters, children, sourceSpan, startSourceSpan, endSourceSpan = null) {\n this.name = name;\n this.parameters = parameters;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlock(this, context);\n }\n}\nclass BlockParameter {\n constructor(expression, sourceSpan) {\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockParameter(this, context);\n }\n}\nfunction visitAll(visitor, nodes, context = null) {\n const result = [];\n const visit = visitor.visit ? ast => visitor.visit(ast, context) || ast.visit(visitor, context) : ast => ast.visit(visitor, context);\n nodes.forEach(ast => {\n const astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nclass RecursiveVisitor {\n constructor() {}\n visitElement(ast, context) {\n this.visitChildren(context, visit => {\n visit(ast.attrs);\n visit(ast.children);\n });\n }\n visitAttribute(ast, context) {}\n visitText(ast, context) {}\n visitComment(ast, context) {}\n visitExpansion(ast, context) {\n return this.visitChildren(context, visit => {\n visit(ast.cases);\n });\n }\n visitExpansionCase(ast, context) {}\n visitBlockGroup(ast, context) {\n this.visitChildren(context, visit => {\n visit(ast.blocks);\n });\n }\n visitBlock(block, context) {\n this.visitChildren(context, visit => {\n visit(block.parameters);\n visit(block.children);\n });\n }\n visitBlockParameter(ast, context) {}\n visitChildren(context, cb) {\n let results = [];\n let t = this;\n function visit(children) {\n if (children) results.push(visitAll(t, children, context));\n }\n cb(visit);\n return Array.prototype.concat.apply([], results);\n }\n}\nclass ElementSchemaRegistry {}\nconst BOOLEAN = 'boolean';\nconst NUMBER = 'number';\nconst STRING = 'string';\nconst 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 */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\nconst SCHEMA = ['[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' + /* added manually to avoid breaking changes */\n',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored', '[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy', 'abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy', 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume', ':svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex', ':svg:graphics^:svg:|', ':svg:animation^:svg:|*begin,*end,*repeat', ':svg:geometry^:svg:|', ':svg:componentTransferFunction^:svg:|', ':svg:gradient^:svg:|', ':svg:textContent^:svg:graphics|', ':svg:textPositioning^:svg:textContent|', 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username', 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username', 'audio^media|', 'br^[HTMLElement]|clear', 'base^[HTMLElement]|href,target', 'body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink', 'button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value', 'canvas^[HTMLElement]|#height,#width', 'content^[HTMLElement]|select', 'dl^[HTMLElement]|!compact', 'data^[HTMLElement]|value', 'datalist^[HTMLElement]|', 'details^[HTMLElement]|!open', 'dialog^[HTMLElement]|!open,returnValue', 'dir^[HTMLElement]|!compact', 'div^[HTMLElement]|align', 'embed^[HTMLElement]|align,height,name,src,type,width', 'fieldset^[HTMLElement]|!disabled,name', 'font^[HTMLElement]|color,face,size', 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target', 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src', 'frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows', 'hr^[HTMLElement]|align,color,!noShade,size,width', 'head^[HTMLElement]|', 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align', 'html^[HTMLElement]|version', 'iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width', 'img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width', 'input^[HTMLElement]|accept,align,alt,autocomplete,!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', 'li^[HTMLElement]|type,#value', 'label^[HTMLElement]|htmlFor', 'legend^[HTMLElement]|align', 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type', 'map^[HTMLElement]|name', 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width', 'menu^[HTMLElement]|!compact', 'meta^[HTMLElement]|content,httpEquiv,media,name,scheme', 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value', 'ins,del^[HTMLElement]|cite,dateTime', 'ol^[HTMLElement]|!compact,!reversed,#start,type', 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width', 'optgroup^[HTMLElement]|!disabled,label', 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value', 'output^[HTMLElement]|defaultValue,%htmlFor,name,value', 'p^[HTMLElement]|align', 'param^[HTMLElement]|name,type,value,valueType', 'picture^[HTMLElement]|', 'pre^[HTMLElement]|#width', 'progress^[HTMLElement]|#max,#value', 'q,blockquote,cite^[HTMLElement]|', 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type', 'select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value', 'slot^[HTMLElement]|name', 'source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width', 'span^[HTMLElement]|', 'style^[HTMLElement]|!disabled,media,type', 'caption^[HTMLElement]|align', 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width', 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width', 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width', 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign', 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign', 'template^[HTMLElement]|', 'textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap', 'time^[HTMLElement]|dateTime', 'title^[HTMLElement]|text', 'track^[HTMLElement]|!default,kind,label,src,srclang', 'ul^[HTMLElement]|!compact,type', 'unknown^[HTMLElement]|', 'video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width', ':svg:a^:svg:graphics|', ':svg:animate^:svg:animation|', ':svg:animateMotion^:svg:animation|', ':svg:animateTransform^:svg:animation|', ':svg:circle^:svg:geometry|', ':svg:clipPath^:svg:graphics|', ':svg:defs^:svg:graphics|', ':svg:desc^:svg:|', ':svg:discard^:svg:|', ':svg:ellipse^:svg:geometry|', ':svg:feBlend^:svg:|', ':svg:feColorMatrix^:svg:|', ':svg:feComponentTransfer^:svg:|', ':svg:feComposite^:svg:|', ':svg:feConvolveMatrix^:svg:|', ':svg:feDiffuseLighting^:svg:|', ':svg:feDisplacementMap^:svg:|', ':svg:feDistantLight^:svg:|', ':svg:feDropShadow^:svg:|', ':svg:feFlood^:svg:|', ':svg:feFuncA^:svg:componentTransferFunction|', ':svg:feFuncB^:svg:componentTransferFunction|', ':svg:feFuncG^:svg:componentTransferFunction|', ':svg:feFuncR^:svg:componentTransferFunction|', ':svg:feGaussianBlur^:svg:|', ':svg:feImage^:svg:|', ':svg:feMerge^:svg:|', ':svg:feMergeNode^:svg:|', ':svg:feMorphology^:svg:|', ':svg:feOffset^:svg:|', ':svg:fePointLight^:svg:|', ':svg:feSpecularLighting^:svg:|', ':svg:feSpotLight^:svg:|', ':svg:feTile^:svg:|', ':svg:feTurbulence^:svg:|', ':svg:filter^:svg:|', ':svg:foreignObject^:svg:graphics|', ':svg:g^:svg:graphics|', ':svg:image^:svg:graphics|decoding', ':svg:line^:svg:geometry|', ':svg:linearGradient^:svg:gradient|', ':svg:mpath^:svg:|', ':svg:marker^:svg:|', ':svg:mask^:svg:|', ':svg:metadata^:svg:|', ':svg:path^:svg:geometry|', ':svg:pattern^:svg:|', ':svg:polygon^:svg:geometry|', ':svg:polyline^:svg:geometry|', ':svg:radialGradient^:svg:gradient|', ':svg:rect^:svg:geometry|', ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan', ':svg:script^:svg:|type', ':svg:set^:svg:animation|', ':svg:stop^:svg:|', ':svg:style^:svg:|!disabled,media,title,type', ':svg:switch^:svg:graphics|', ':svg:symbol^:svg:|', ':svg:tspan^:svg:textPositioning|', ':svg:text^:svg:textPositioning|', ':svg:textPath^:svg:textContent|', ':svg:title^:svg:|', ':svg:use^:svg:graphics|', ':svg:view^:svg:|#zoomAndPan', 'data^[HTMLElement]|value', 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name', 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default', 'summary^[HTMLElement]|', 'time^[HTMLElement]|dateTime', ':svg:cursor^:svg:|'];\nconst _ATTR_TO_PROP = new Map(Object.entries({\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex'\n}));\n// Invert _ATTR_TO_PROP.\nconst _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {\n inverted.set(propertyName, attributeName);\n return inverted;\n}, new Map());\nclass DomElementSchemaRegistry extends ElementSchemaRegistry {\n constructor() {\n super();\n this._schema = new Map();\n // We don't allow binding to events for security reasons. Allowing event bindings would almost\n // certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.\n this._eventSchema = new Map();\n SCHEMA.forEach(encodedType => {\n const type = new Map();\n const events = new Set();\n const [strType, strProperties] = encodedType.split('|');\n const properties = strProperties.split(',');\n const [typeNames, superName] = strType.split('^');\n typeNames.split(',').forEach(tag => {\n this._schema.set(tag.toLowerCase(), type);\n this._eventSchema.set(tag.toLowerCase(), events);\n });\n const superType = superName && this._schema.get(superName.toLowerCase());\n if (superType) {\n for (const [prop, value] of superType) {\n type.set(prop, value);\n }\n for (const superEvent of this._eventSchema.get(superName.toLowerCase())) {\n events.add(superEvent);\n }\n }\n properties.forEach(property => {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n events.add(property.substring(1));\n break;\n case '!':\n type.set(property.substring(1), BOOLEAN);\n break;\n case '#':\n type.set(property.substring(1), NUMBER);\n break;\n case '%':\n type.set(property.substring(1), OBJECT);\n break;\n default:\n type.set(property, STRING);\n }\n }\n });\n });\n }\n hasProperty(tagName, propName, schemaMetas) {\n if (schemaMetas.some(schema => 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(schema => 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 const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');\n return elementProperties.has(propName);\n }\n hasElement(tagName, schemaMetas) {\n if (schemaMetas.some(schema => 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(schema => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n // Allow any custom elements\n return true;\n }\n }\n return this._schema.has(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 based on a list of allowed tags|attributes. All attributes in the schema\n * above are assumed to have the 'NONE' security context, i.e. that they are safe inert\n * string values. Only specific well known attack vectors are assigned their appropriate context.\n */\n securityContext(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 let 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 getMappedPropName(propName) {\n return _ATTR_TO_PROP.get(propName) ?? propName;\n }\n getDefaultComponentElementName() {\n return 'ng-component';\n }\n validateProperty(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + `\\nIf '${name}' is a directive input, make sure the directive is imported by the` + ` current module.`;\n return {\n error: true,\n msg: msg\n };\n } else {\n return {\n error: false\n };\n }\n }\n validateAttribute(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...`;\n return {\n error: true,\n msg: msg\n };\n } else {\n return {\n error: false\n };\n }\n }\n allKnownElementNames() {\n return Array.from(this._schema.keys());\n }\n allKnownAttributesOfElement(tagName) {\n const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');\n // Convert properties to attributes.\n return Array.from(elementProperties.keys()).map(prop => _PROP_TO_ATTR.get(prop) ?? prop);\n }\n allKnownEventsOfElement(tagName) {\n return Array.from(this._eventSchema.get(tagName.toLowerCase()) ?? []);\n }\n normalizeAnimationStyleProperty(propName) {\n return dashCaseToCamelCase(propName);\n }\n normalizeAnimationStyleValue(camelCaseProp, userProvidedProp, val) {\n let unit = '';\n const strVal = val.toString().trim();\n let errorMsg = null;\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n } else {\n const 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 {\n error: errorMsg,\n value: strVal + unit\n };\n }\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}\nclass HtmlTagDefinition {\n constructor({\n closedByChildren,\n implicitNamespacePrefix,\n contentType = TagContentType.PARSABLE_DATA,\n closedByParent = false,\n isVoid = false,\n ignoreFirstLf = false,\n preventNamespaceInheritance = false,\n canSelfClose = false\n } = {}) {\n this.closedByChildren = {};\n this.closedByParent = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(tagName => this.closedByChildren[tagName] = true);\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n this.preventNamespaceInheritance = preventNamespaceInheritance;\n this.canSelfClose = canSelfClose ?? isVoid;\n }\n isClosedByChild(name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n }\n getContentType(prefix) {\n if (typeof this.contentType === 'object') {\n const overrideType = prefix === undefined ? undefined : this.contentType[prefix];\n return overrideType ?? this.contentType.default;\n }\n return this.contentType;\n }\n}\nlet DEFAULT_TAG_DEFINITION;\n// see https://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nlet TAG_DEFINITIONS;\nfunction getHtmlTagDefinition(tagName) {\n if (!TAG_DEFINITIONS) {\n DEFAULT_TAG_DEFINITION = new HtmlTagDefinition({\n canSelfClose: true\n });\n TAG_DEFINITIONS = {\n 'base': new HtmlTagDefinition({\n isVoid: true\n }),\n 'meta': new HtmlTagDefinition({\n isVoid: true\n }),\n 'area': new HtmlTagDefinition({\n isVoid: true\n }),\n 'embed': new HtmlTagDefinition({\n isVoid: true\n }),\n 'link': new HtmlTagDefinition({\n isVoid: true\n }),\n 'img': new HtmlTagDefinition({\n isVoid: true\n }),\n 'input': new HtmlTagDefinition({\n isVoid: true\n }),\n 'param': new HtmlTagDefinition({\n isVoid: true\n }),\n 'hr': new HtmlTagDefinition({\n isVoid: true\n }),\n 'br': new HtmlTagDefinition({\n isVoid: true\n }),\n 'source': new HtmlTagDefinition({\n isVoid: true\n }),\n 'track': new HtmlTagDefinition({\n isVoid: true\n }),\n 'wbr': new HtmlTagDefinition({\n isVoid: true\n }),\n 'p': new HtmlTagDefinition({\n closedByChildren: ['address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'],\n closedByParent: true\n }),\n 'thead': new HtmlTagDefinition({\n closedByChildren: ['tbody', 'tfoot']\n }),\n 'tbody': new HtmlTagDefinition({\n closedByChildren: ['tbody', 'tfoot'],\n closedByParent: true\n }),\n 'tfoot': new HtmlTagDefinition({\n closedByChildren: ['tbody'],\n closedByParent: true\n }),\n 'tr': new HtmlTagDefinition({\n closedByChildren: ['tr'],\n closedByParent: true\n }),\n 'td': new HtmlTagDefinition({\n closedByChildren: ['td', 'th'],\n closedByParent: true\n }),\n 'th': new HtmlTagDefinition({\n closedByChildren: ['td', 'th'],\n closedByParent: true\n }),\n 'col': new HtmlTagDefinition({\n isVoid: true\n }),\n 'svg': new HtmlTagDefinition({\n implicitNamespacePrefix: 'svg'\n }),\n 'foreignObject': new HtmlTagDefinition({\n // Usually the implicit namespace here would be redundant since it will be inherited from\n // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser\n // works is that the parent node of an end tag is its own start tag which means that\n // the `preventNamespaceInheritance` on `foreignObject` would have it default to the\n // implicit namespace which is `html`, unless specified otherwise.\n implicitNamespacePrefix: 'svg',\n // We want to prevent children of foreignObject from inheriting its namespace, because\n // the point of the element is to allow nodes from other namespaces to be inserted.\n preventNamespaceInheritance: true\n }),\n 'math': new HtmlTagDefinition({\n implicitNamespacePrefix: 'math'\n }),\n 'li': new HtmlTagDefinition({\n closedByChildren: ['li'],\n closedByParent: true\n }),\n 'dt': new HtmlTagDefinition({\n closedByChildren: ['dt', 'dd']\n }),\n 'dd': new HtmlTagDefinition({\n closedByChildren: ['dt', 'dd'],\n closedByParent: true\n }),\n 'rb': new HtmlTagDefinition({\n closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n closedByParent: true\n }),\n 'rt': new HtmlTagDefinition({\n closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n closedByParent: true\n }),\n 'rtc': new HtmlTagDefinition({\n closedByChildren: ['rb', 'rtc', 'rp'],\n closedByParent: true\n }),\n 'rp': new HtmlTagDefinition({\n closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n closedByParent: true\n }),\n 'optgroup': new HtmlTagDefinition({\n closedByChildren: ['optgroup'],\n closedByParent: true\n }),\n 'option': new HtmlTagDefinition({\n closedByChildren: ['option', 'optgroup'],\n closedByParent: true\n }),\n 'pre': new HtmlTagDefinition({\n ignoreFirstLf: true\n }),\n 'listing': new HtmlTagDefinition({\n ignoreFirstLf: true\n }),\n 'style': new HtmlTagDefinition({\n contentType: TagContentType.RAW_TEXT\n }),\n 'script': new HtmlTagDefinition({\n contentType: TagContentType.RAW_TEXT\n }),\n 'title': new HtmlTagDefinition({\n // The browser supports two separate `title` tags which have to use\n // a different content type: `HTMLTitleElement` and `SVGTitleElement`\n contentType: {\n default: TagContentType.ESCAPABLE_RAW_TEXT,\n svg: TagContentType.PARSABLE_DATA\n }\n }),\n 'textarea': new HtmlTagDefinition({\n contentType: TagContentType.ESCAPABLE_RAW_TEXT,\n ignoreFirstLf: true\n })\n };\n new DomElementSchemaRegistry().allKnownElementNames().forEach(knownTagName => {\n if (!TAG_DEFINITIONS.hasOwnProperty(knownTagName) && getNsPrefix(knownTagName) === null) {\n TAG_DEFINITIONS[knownTagName] = new HtmlTagDefinition({\n canSelfClose: false\n });\n }\n });\n }\n // We have to make both a case-sensitive and a case-insensitive lookup, because\n // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.\n return TAG_DEFINITIONS[tagName] ?? TAG_DEFINITIONS[tagName.toLowerCase()] ?? DEFAULT_TAG_DEFINITION;\n}\n\n// Mapping between all HTML entity names and their unicode representation.\n// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping\n// the `&` and `;` from the keys and removing the duplicates.\n// see https://www.w3.org/TR/html51/syntax.html#named-character-references\nconst NAMED_ENTITIES = {\n 'AElig': '\\u00C6',\n 'AMP': '\\u0026',\n 'amp': '\\u0026',\n 'Aacute': '\\u00C1',\n 'Abreve': '\\u0102',\n 'Acirc': '\\u00C2',\n 'Acy': '\\u0410',\n 'Afr': '\\uD835\\uDD04',\n 'Agrave': '\\u00C0',\n 'Alpha': '\\u0391',\n 'Amacr': '\\u0100',\n 'And': '\\u2A53',\n 'Aogon': '\\u0104',\n 'Aopf': '\\uD835\\uDD38',\n 'ApplyFunction': '\\u2061',\n 'af': '\\u2061',\n 'Aring': '\\u00C5',\n 'angst': '\\u00C5',\n 'Ascr': '\\uD835\\uDC9C',\n 'Assign': '\\u2254',\n 'colone': '\\u2254',\n 'coloneq': '\\u2254',\n 'Atilde': '\\u00C3',\n 'Auml': '\\u00C4',\n 'Backslash': '\\u2216',\n 'setminus': '\\u2216',\n 'setmn': '\\u2216',\n 'smallsetminus': '\\u2216',\n 'ssetmn': '\\u2216',\n 'Barv': '\\u2AE7',\n 'Barwed': '\\u2306',\n 'doublebarwedge': '\\u2306',\n 'Bcy': '\\u0411',\n 'Because': '\\u2235',\n 'becaus': '\\u2235',\n 'because': '\\u2235',\n 'Bernoullis': '\\u212C',\n 'Bscr': '\\u212C',\n 'bernou': '\\u212C',\n 'Beta': '\\u0392',\n 'Bfr': '\\uD835\\uDD05',\n 'Bopf': '\\uD835\\uDD39',\n 'Breve': '\\u02D8',\n 'breve': '\\u02D8',\n 'Bumpeq': '\\u224E',\n 'HumpDownHump': '\\u224E',\n 'bump': '\\u224E',\n 'CHcy': '\\u0427',\n 'COPY': '\\u00A9',\n 'copy': '\\u00A9',\n 'Cacute': '\\u0106',\n 'Cap': '\\u22D2',\n 'CapitalDifferentialD': '\\u2145',\n 'DD': '\\u2145',\n 'Cayleys': '\\u212D',\n 'Cfr': '\\u212D',\n 'Ccaron': '\\u010C',\n 'Ccedil': '\\u00C7',\n 'Ccirc': '\\u0108',\n 'Cconint': '\\u2230',\n 'Cdot': '\\u010A',\n 'Cedilla': '\\u00B8',\n 'cedil': '\\u00B8',\n 'CenterDot': '\\u00B7',\n 'centerdot': '\\u00B7',\n 'middot': '\\u00B7',\n 'Chi': '\\u03A7',\n 'CircleDot': '\\u2299',\n 'odot': '\\u2299',\n 'CircleMinus': '\\u2296',\n 'ominus': '\\u2296',\n 'CirclePlus': '\\u2295',\n 'oplus': '\\u2295',\n 'CircleTimes': '\\u2297',\n 'otimes': '\\u2297',\n 'ClockwiseContourIntegral': '\\u2232',\n 'cwconint': '\\u2232',\n 'CloseCurlyDoubleQuote': '\\u201D',\n 'rdquo': '\\u201D',\n 'rdquor': '\\u201D',\n 'CloseCurlyQuote': '\\u2019',\n 'rsquo': '\\u2019',\n 'rsquor': '\\u2019',\n 'Colon': '\\u2237',\n 'Proportion': '\\u2237',\n 'Colone': '\\u2A74',\n 'Congruent': '\\u2261',\n 'equiv': '\\u2261',\n 'Conint': '\\u222F',\n 'DoubleContourIntegral': '\\u222F',\n 'ContourIntegral': '\\u222E',\n 'conint': '\\u222E',\n 'oint': '\\u222E',\n 'Copf': '\\u2102',\n 'complexes': '\\u2102',\n 'Coproduct': '\\u2210',\n 'coprod': '\\u2210',\n 'CounterClockwiseContourIntegral': '\\u2233',\n 'awconint': '\\u2233',\n 'Cross': '\\u2A2F',\n 'Cscr': '\\uD835\\uDC9E',\n 'Cup': '\\u22D3',\n 'CupCap': '\\u224D',\n 'asympeq': '\\u224D',\n 'DDotrahd': '\\u2911',\n 'DJcy': '\\u0402',\n 'DScy': '\\u0405',\n 'DZcy': '\\u040F',\n 'Dagger': '\\u2021',\n 'ddagger': '\\u2021',\n 'Darr': '\\u21A1',\n 'Dashv': '\\u2AE4',\n 'DoubleLeftTee': '\\u2AE4',\n 'Dcaron': '\\u010E',\n 'Dcy': '\\u0414',\n 'Del': '\\u2207',\n 'nabla': '\\u2207',\n 'Delta': '\\u0394',\n 'Dfr': '\\uD835\\uDD07',\n 'DiacriticalAcute': '\\u00B4',\n 'acute': '\\u00B4',\n 'DiacriticalDot': '\\u02D9',\n 'dot': '\\u02D9',\n 'DiacriticalDoubleAcute': '\\u02DD',\n 'dblac': '\\u02DD',\n 'DiacriticalGrave': '\\u0060',\n 'grave': '\\u0060',\n 'DiacriticalTilde': '\\u02DC',\n 'tilde': '\\u02DC',\n 'Diamond': '\\u22C4',\n 'diam': '\\u22C4',\n 'diamond': '\\u22C4',\n 'DifferentialD': '\\u2146',\n 'dd': '\\u2146',\n 'Dopf': '\\uD835\\uDD3B',\n 'Dot': '\\u00A8',\n 'DoubleDot': '\\u00A8',\n 'die': '\\u00A8',\n 'uml': '\\u00A8',\n 'DotDot': '\\u20DC',\n 'DotEqual': '\\u2250',\n 'doteq': '\\u2250',\n 'esdot': '\\u2250',\n 'DoubleDownArrow': '\\u21D3',\n 'Downarrow': '\\u21D3',\n 'dArr': '\\u21D3',\n 'DoubleLeftArrow': '\\u21D0',\n 'Leftarrow': '\\u21D0',\n 'lArr': '\\u21D0',\n 'DoubleLeftRightArrow': '\\u21D4',\n 'Leftrightarrow': '\\u21D4',\n 'hArr': '\\u21D4',\n 'iff': '\\u21D4',\n 'DoubleLongLeftArrow': '\\u27F8',\n 'Longleftarrow': '\\u27F8',\n 'xlArr': '\\u27F8',\n 'DoubleLongLeftRightArrow': '\\u27FA',\n 'Longleftrightarrow': '\\u27FA',\n 'xhArr': '\\u27FA',\n 'DoubleLongRightArrow': '\\u27F9',\n 'Longrightarrow': '\\u27F9',\n 'xrArr': '\\u27F9',\n 'DoubleRightArrow': '\\u21D2',\n 'Implies': '\\u21D2',\n 'Rightarrow': '\\u21D2',\n 'rArr': '\\u21D2',\n 'DoubleRightTee': '\\u22A8',\n 'vDash': '\\u22A8',\n 'DoubleUpArrow': '\\u21D1',\n 'Uparrow': '\\u21D1',\n 'uArr': '\\u21D1',\n 'DoubleUpDownArrow': '\\u21D5',\n 'Updownarrow': '\\u21D5',\n 'vArr': '\\u21D5',\n 'DoubleVerticalBar': '\\u2225',\n 'par': '\\u2225',\n 'parallel': '\\u2225',\n 'shortparallel': '\\u2225',\n 'spar': '\\u2225',\n 'DownArrow': '\\u2193',\n 'ShortDownArrow': '\\u2193',\n 'darr': '\\u2193',\n 'downarrow': '\\u2193',\n 'DownArrowBar': '\\u2913',\n 'DownArrowUpArrow': '\\u21F5',\n 'duarr': '\\u21F5',\n 'DownBreve': '\\u0311',\n 'DownLeftRightVector': '\\u2950',\n 'DownLeftTeeVector': '\\u295E',\n 'DownLeftVector': '\\u21BD',\n 'leftharpoondown': '\\u21BD',\n 'lhard': '\\u21BD',\n 'DownLeftVectorBar': '\\u2956',\n 'DownRightTeeVector': '\\u295F',\n 'DownRightVector': '\\u21C1',\n 'rhard': '\\u21C1',\n 'rightharpoondown': '\\u21C1',\n 'DownRightVectorBar': '\\u2957',\n 'DownTee': '\\u22A4',\n 'top': '\\u22A4',\n 'DownTeeArrow': '\\u21A7',\n 'mapstodown': '\\u21A7',\n 'Dscr': '\\uD835\\uDC9F',\n 'Dstrok': '\\u0110',\n 'ENG': '\\u014A',\n 'ETH': '\\u00D0',\n 'Eacute': '\\u00C9',\n 'Ecaron': '\\u011A',\n 'Ecirc': '\\u00CA',\n 'Ecy': '\\u042D',\n 'Edot': '\\u0116',\n 'Efr': '\\uD835\\uDD08',\n 'Egrave': '\\u00C8',\n 'Element': '\\u2208',\n 'in': '\\u2208',\n 'isin': '\\u2208',\n 'isinv': '\\u2208',\n 'Emacr': '\\u0112',\n 'EmptySmallSquare': '\\u25FB',\n 'EmptyVerySmallSquare': '\\u25AB',\n 'Eogon': '\\u0118',\n 'Eopf': '\\uD835\\uDD3C',\n 'Epsilon': '\\u0395',\n 'Equal': '\\u2A75',\n 'EqualTilde': '\\u2242',\n 'eqsim': '\\u2242',\n 'esim': '\\u2242',\n 'Equilibrium': '\\u21CC',\n 'rightleftharpoons': '\\u21CC',\n 'rlhar': '\\u21CC',\n 'Escr': '\\u2130',\n 'expectation': '\\u2130',\n 'Esim': '\\u2A73',\n 'Eta': '\\u0397',\n 'Euml': '\\u00CB',\n 'Exists': '\\u2203',\n 'exist': '\\u2203',\n 'ExponentialE': '\\u2147',\n 'ee': '\\u2147',\n 'exponentiale': '\\u2147',\n 'Fcy': '\\u0424',\n 'Ffr': '\\uD835\\uDD09',\n 'FilledSmallSquare': '\\u25FC',\n 'FilledVerySmallSquare': '\\u25AA',\n 'blacksquare': '\\u25AA',\n 'squarf': '\\u25AA',\n 'squf': '\\u25AA',\n 'Fopf': '\\uD835\\uDD3D',\n 'ForAll': '\\u2200',\n 'forall': '\\u2200',\n 'Fouriertrf': '\\u2131',\n 'Fscr': '\\u2131',\n 'GJcy': '\\u0403',\n 'GT': '\\u003E',\n 'gt': '\\u003E',\n 'Gamma': '\\u0393',\n 'Gammad': '\\u03DC',\n 'Gbreve': '\\u011E',\n 'Gcedil': '\\u0122',\n 'Gcirc': '\\u011C',\n 'Gcy': '\\u0413',\n 'Gdot': '\\u0120',\n 'Gfr': '\\uD835\\uDD0A',\n 'Gg': '\\u22D9',\n 'ggg': '\\u22D9',\n 'Gopf': '\\uD835\\uDD3E',\n 'GreaterEqual': '\\u2265',\n 'ge': '\\u2265',\n 'geq': '\\u2265',\n 'GreaterEqualLess': '\\u22DB',\n 'gel': '\\u22DB',\n 'gtreqless': '\\u22DB',\n 'GreaterFullEqual': '\\u2267',\n 'gE': '\\u2267',\n 'geqq': '\\u2267',\n 'GreaterGreater': '\\u2AA2',\n 'GreaterLess': '\\u2277',\n 'gl': '\\u2277',\n 'gtrless': '\\u2277',\n 'GreaterSlantEqual': '\\u2A7E',\n 'geqslant': '\\u2A7E',\n 'ges': '\\u2A7E',\n 'GreaterTilde': '\\u2273',\n 'gsim': '\\u2273',\n 'gtrsim': '\\u2273',\n 'Gscr': '\\uD835\\uDCA2',\n 'Gt': '\\u226B',\n 'NestedGreaterGreater': '\\u226B',\n 'gg': '\\u226B',\n 'HARDcy': '\\u042A',\n 'Hacek': '\\u02C7',\n 'caron': '\\u02C7',\n 'Hat': '\\u005E',\n 'Hcirc': '\\u0124',\n 'Hfr': '\\u210C',\n 'Poincareplane': '\\u210C',\n 'HilbertSpace': '\\u210B',\n 'Hscr': '\\u210B',\n 'hamilt': '\\u210B',\n 'Hopf': '\\u210D',\n 'quaternions': '\\u210D',\n 'HorizontalLine': '\\u2500',\n 'boxh': '\\u2500',\n 'Hstrok': '\\u0126',\n 'HumpEqual': '\\u224F',\n 'bumpe': '\\u224F',\n 'bumpeq': '\\u224F',\n 'IEcy': '\\u0415',\n 'IJlig': '\\u0132',\n 'IOcy': '\\u0401',\n 'Iacute': '\\u00CD',\n 'Icirc': '\\u00CE',\n 'Icy': '\\u0418',\n 'Idot': '\\u0130',\n 'Ifr': '\\u2111',\n 'Im': '\\u2111',\n 'image': '\\u2111',\n 'imagpart': '\\u2111',\n 'Igrave': '\\u00CC',\n 'Imacr': '\\u012A',\n 'ImaginaryI': '\\u2148',\n 'ii': '\\u2148',\n 'Int': '\\u222C',\n 'Integral': '\\u222B',\n 'int': '\\u222B',\n 'Intersection': '\\u22C2',\n 'bigcap': '\\u22C2',\n 'xcap': '\\u22C2',\n 'InvisibleComma': '\\u2063',\n 'ic': '\\u2063',\n 'InvisibleTimes': '\\u2062',\n 'it': '\\u2062',\n 'Iogon': '\\u012E',\n 'Iopf': '\\uD835\\uDD40',\n 'Iota': '\\u0399',\n 'Iscr': '\\u2110',\n 'imagline': '\\u2110',\n 'Itilde': '\\u0128',\n 'Iukcy': '\\u0406',\n 'Iuml': '\\u00CF',\n 'Jcirc': '\\u0134',\n 'Jcy': '\\u0419',\n 'Jfr': '\\uD835\\uDD0D',\n 'Jopf': '\\uD835\\uDD41',\n 'Jscr': '\\uD835\\uDCA5',\n 'Jsercy': '\\u0408',\n 'Jukcy': '\\u0404',\n 'KHcy': '\\u0425',\n 'KJcy': '\\u040C',\n 'Kappa': '\\u039A',\n 'Kcedil': '\\u0136',\n 'Kcy': '\\u041A',\n 'Kfr': '\\uD835\\uDD0E',\n 'Kopf': '\\uD835\\uDD42',\n 'Kscr': '\\uD835\\uDCA6',\n 'LJcy': '\\u0409',\n 'LT': '\\u003C',\n 'lt': '\\u003C',\n 'Lacute': '\\u0139',\n 'Lambda': '\\u039B',\n 'Lang': '\\u27EA',\n 'Laplacetrf': '\\u2112',\n 'Lscr': '\\u2112',\n 'lagran': '\\u2112',\n 'Larr': '\\u219E',\n 'twoheadleftarrow': '\\u219E',\n 'Lcaron': '\\u013D',\n 'Lcedil': '\\u013B',\n 'Lcy': '\\u041B',\n 'LeftAngleBracket': '\\u27E8',\n 'lang': '\\u27E8',\n 'langle': '\\u27E8',\n 'LeftArrow': '\\u2190',\n 'ShortLeftArrow': '\\u2190',\n 'larr': '\\u2190',\n 'leftarrow': '\\u2190',\n 'slarr': '\\u2190',\n 'LeftArrowBar': '\\u21E4',\n 'larrb': '\\u21E4',\n 'LeftArrowRightArrow': '\\u21C6',\n 'leftrightarrows': '\\u21C6',\n 'lrarr': '\\u21C6',\n 'LeftCeiling': '\\u2308',\n 'lceil': '\\u2308',\n 'LeftDoubleBracket': '\\u27E6',\n 'lobrk': '\\u27E6',\n 'LeftDownTeeVector': '\\u2961',\n 'LeftDownVector': '\\u21C3',\n 'dharl': '\\u21C3',\n 'downharpoonleft': '\\u21C3',\n 'LeftDownVectorBar': '\\u2959',\n 'LeftFloor': '\\u230A',\n 'lfloor': '\\u230A',\n 'LeftRightArrow': '\\u2194',\n 'harr': '\\u2194',\n 'leftrightarrow': '\\u2194',\n 'LeftRightVector': '\\u294E',\n 'LeftTee': '\\u22A3',\n 'dashv': '\\u22A3',\n 'LeftTeeArrow': '\\u21A4',\n 'mapstoleft': '\\u21A4',\n 'LeftTeeVector': '\\u295A',\n 'LeftTriangle': '\\u22B2',\n 'vartriangleleft': '\\u22B2',\n 'vltri': '\\u22B2',\n 'LeftTriangleBar': '\\u29CF',\n 'LeftTriangleEqual': '\\u22B4',\n 'ltrie': '\\u22B4',\n 'trianglelefteq': '\\u22B4',\n 'LeftUpDownVector': '\\u2951',\n 'LeftUpTeeVector': '\\u2960',\n 'LeftUpVector': '\\u21BF',\n 'uharl': '\\u21BF',\n 'upharpoonleft': '\\u21BF',\n 'LeftUpVectorBar': '\\u2958',\n 'LeftVector': '\\u21BC',\n 'leftharpoonup': '\\u21BC',\n 'lharu': '\\u21BC',\n 'LeftVectorBar': '\\u2952',\n 'LessEqualGreater': '\\u22DA',\n 'leg': '\\u22DA',\n 'lesseqgtr': '\\u22DA',\n 'LessFullEqual': '\\u2266',\n 'lE': '\\u2266',\n 'leqq': '\\u2266',\n 'LessGreater': '\\u2276',\n 'lessgtr': '\\u2276',\n 'lg': '\\u2276',\n 'LessLess': '\\u2AA1',\n 'LessSlantEqual': '\\u2A7D',\n 'leqslant': '\\u2A7D',\n 'les': '\\u2A7D',\n 'LessTilde': '\\u2272',\n 'lesssim': '\\u2272',\n 'lsim': '\\u2272',\n 'Lfr': '\\uD835\\uDD0F',\n 'Ll': '\\u22D8',\n 'Lleftarrow': '\\u21DA',\n 'lAarr': '\\u21DA',\n 'Lmidot': '\\u013F',\n 'LongLeftArrow': '\\u27F5',\n 'longleftarrow': '\\u27F5',\n 'xlarr': '\\u27F5',\n 'LongLeftRightArrow': '\\u27F7',\n 'longleftrightarrow': '\\u27F7',\n 'xharr': '\\u27F7',\n 'LongRightArrow': '\\u27F6',\n 'longrightarrow': '\\u27F6',\n 'xrarr': '\\u27F6',\n 'Lopf': '\\uD835\\uDD43',\n 'LowerLeftArrow': '\\u2199',\n 'swarr': '\\u2199',\n 'swarrow': '\\u2199',\n 'LowerRightArrow': '\\u2198',\n 'searr': '\\u2198',\n 'searrow': '\\u2198',\n 'Lsh': '\\u21B0',\n 'lsh': '\\u21B0',\n 'Lstrok': '\\u0141',\n 'Lt': '\\u226A',\n 'NestedLessLess': '\\u226A',\n 'll': '\\u226A',\n 'Map': '\\u2905',\n 'Mcy': '\\u041C',\n 'MediumSpace': '\\u205F',\n 'Mellintrf': '\\u2133',\n 'Mscr': '\\u2133',\n 'phmmat': '\\u2133',\n 'Mfr': '\\uD835\\uDD10',\n 'MinusPlus': '\\u2213',\n 'mnplus': '\\u2213',\n 'mp': '\\u2213',\n 'Mopf': '\\uD835\\uDD44',\n 'Mu': '\\u039C',\n 'NJcy': '\\u040A',\n 'Nacute': '\\u0143',\n 'Ncaron': '\\u0147',\n 'Ncedil': '\\u0145',\n 'Ncy': '\\u041D',\n 'NegativeMediumSpace': '\\u200B',\n 'NegativeThickSpace': '\\u200B',\n 'NegativeThinSpace': '\\u200B',\n 'NegativeVeryThinSpace': '\\u200B',\n 'ZeroWidthSpace': '\\u200B',\n 'NewLine': '\\u000A',\n 'Nfr': '\\uD835\\uDD11',\n 'NoBreak': '\\u2060',\n 'NonBreakingSpace': '\\u00A0',\n 'nbsp': '\\u00A0',\n 'Nopf': '\\u2115',\n 'naturals': '\\u2115',\n 'Not': '\\u2AEC',\n 'NotCongruent': '\\u2262',\n 'nequiv': '\\u2262',\n 'NotCupCap': '\\u226D',\n 'NotDoubleVerticalBar': '\\u2226',\n 'npar': '\\u2226',\n 'nparallel': '\\u2226',\n 'nshortparallel': '\\u2226',\n 'nspar': '\\u2226',\n 'NotElement': '\\u2209',\n 'notin': '\\u2209',\n 'notinva': '\\u2209',\n 'NotEqual': '\\u2260',\n 'ne': '\\u2260',\n 'NotEqualTilde': '\\u2242\\u0338',\n 'nesim': '\\u2242\\u0338',\n 'NotExists': '\\u2204',\n 'nexist': '\\u2204',\n 'nexists': '\\u2204',\n 'NotGreater': '\\u226F',\n 'ngt': '\\u226F',\n 'ngtr': '\\u226F',\n 'NotGreaterEqual': '\\u2271',\n 'nge': '\\u2271',\n 'ngeq': '\\u2271',\n 'NotGreaterFullEqual': '\\u2267\\u0338',\n 'ngE': '\\u2267\\u0338',\n 'ngeqq': '\\u2267\\u0338',\n 'NotGreaterGreater': '\\u226B\\u0338',\n 'nGtv': '\\u226B\\u0338',\n 'NotGreaterLess': '\\u2279',\n 'ntgl': '\\u2279',\n 'NotGreaterSlantEqual': '\\u2A7E\\u0338',\n 'ngeqslant': '\\u2A7E\\u0338',\n 'nges': '\\u2A7E\\u0338',\n 'NotGreaterTilde': '\\u2275',\n 'ngsim': '\\u2275',\n 'NotHumpDownHump': '\\u224E\\u0338',\n 'nbump': '\\u224E\\u0338',\n 'NotHumpEqual': '\\u224F\\u0338',\n 'nbumpe': '\\u224F\\u0338',\n 'NotLeftTriangle': '\\u22EA',\n 'nltri': '\\u22EA',\n 'ntriangleleft': '\\u22EA',\n 'NotLeftTriangleBar': '\\u29CF\\u0338',\n 'NotLeftTriangleEqual': '\\u22EC',\n 'nltrie': '\\u22EC',\n 'ntrianglelefteq': '\\u22EC',\n 'NotLess': '\\u226E',\n 'nless': '\\u226E',\n 'nlt': '\\u226E',\n 'NotLessEqual': '\\u2270',\n 'nle': '\\u2270',\n 'nleq': '\\u2270',\n 'NotLessGreater': '\\u2278',\n 'ntlg': '\\u2278',\n 'NotLessLess': '\\u226A\\u0338',\n 'nLtv': '\\u226A\\u0338',\n 'NotLessSlantEqual': '\\u2A7D\\u0338',\n 'nleqslant': '\\u2A7D\\u0338',\n 'nles': '\\u2A7D\\u0338',\n 'NotLessTilde': '\\u2274',\n 'nlsim': '\\u2274',\n 'NotNestedGreaterGreater': '\\u2AA2\\u0338',\n 'NotNestedLessLess': '\\u2AA1\\u0338',\n 'NotPrecedes': '\\u2280',\n 'npr': '\\u2280',\n 'nprec': '\\u2280',\n 'NotPrecedesEqual': '\\u2AAF\\u0338',\n 'npre': '\\u2AAF\\u0338',\n 'npreceq': '\\u2AAF\\u0338',\n 'NotPrecedesSlantEqual': '\\u22E0',\n 'nprcue': '\\u22E0',\n 'NotReverseElement': '\\u220C',\n 'notni': '\\u220C',\n 'notniva': '\\u220C',\n 'NotRightTriangle': '\\u22EB',\n 'nrtri': '\\u22EB',\n 'ntriangleright': '\\u22EB',\n 'NotRightTriangleBar': '\\u29D0\\u0338',\n 'NotRightTriangleEqual': '\\u22ED',\n 'nrtrie': '\\u22ED',\n 'ntrianglerighteq': '\\u22ED',\n 'NotSquareSubset': '\\u228F\\u0338',\n 'NotSquareSubsetEqual': '\\u22E2',\n 'nsqsube': '\\u22E2',\n 'NotSquareSuperset': '\\u2290\\u0338',\n 'NotSquareSupersetEqual': '\\u22E3',\n 'nsqsupe': '\\u22E3',\n 'NotSubset': '\\u2282\\u20D2',\n 'nsubset': '\\u2282\\u20D2',\n 'vnsub': '\\u2282\\u20D2',\n 'NotSubsetEqual': '\\u2288',\n 'nsube': '\\u2288',\n 'nsubseteq': '\\u2288',\n 'NotSucceeds': '\\u2281',\n 'nsc': '\\u2281',\n 'nsucc': '\\u2281',\n 'NotSucceedsEqual': '\\u2AB0\\u0338',\n 'nsce': '\\u2AB0\\u0338',\n 'nsucceq': '\\u2AB0\\u0338',\n 'NotSucceedsSlantEqual': '\\u22E1',\n 'nsccue': '\\u22E1',\n 'NotSucceedsTilde': '\\u227F\\u0338',\n 'NotSuperset': '\\u2283\\u20D2',\n 'nsupset': '\\u2283\\u20D2',\n 'vnsup': '\\u2283\\u20D2',\n 'NotSupersetEqual': '\\u2289',\n 'nsupe': '\\u2289',\n 'nsupseteq': '\\u2289',\n 'NotTilde': '\\u2241',\n 'nsim': '\\u2241',\n 'NotTildeEqual': '\\u2244',\n 'nsime': '\\u2244',\n 'nsimeq': '\\u2244',\n 'NotTildeFullEqual': '\\u2247',\n 'ncong': '\\u2247',\n 'NotTildeTilde': '\\u2249',\n 'nap': '\\u2249',\n 'napprox': '\\u2249',\n 'NotVerticalBar': '\\u2224',\n 'nmid': '\\u2224',\n 'nshortmid': '\\u2224',\n 'nsmid': '\\u2224',\n 'Nscr': '\\uD835\\uDCA9',\n 'Ntilde': '\\u00D1',\n 'Nu': '\\u039D',\n 'OElig': '\\u0152',\n 'Oacute': '\\u00D3',\n 'Ocirc': '\\u00D4',\n 'Ocy': '\\u041E',\n 'Odblac': '\\u0150',\n 'Ofr': '\\uD835\\uDD12',\n 'Ograve': '\\u00D2',\n 'Omacr': '\\u014C',\n 'Omega': '\\u03A9',\n 'ohm': '\\u03A9',\n 'Omicron': '\\u039F',\n 'Oopf': '\\uD835\\uDD46',\n 'OpenCurlyDoubleQuote': '\\u201C',\n 'ldquo': '\\u201C',\n 'OpenCurlyQuote': '\\u2018',\n 'lsquo': '\\u2018',\n 'Or': '\\u2A54',\n 'Oscr': '\\uD835\\uDCAA',\n 'Oslash': '\\u00D8',\n 'Otilde': '\\u00D5',\n 'Otimes': '\\u2A37',\n 'Ouml': '\\u00D6',\n 'OverBar': '\\u203E',\n 'oline': '\\u203E',\n 'OverBrace': '\\u23DE',\n 'OverBracket': '\\u23B4',\n 'tbrk': '\\u23B4',\n 'OverParenthesis': '\\u23DC',\n 'PartialD': '\\u2202',\n 'part': '\\u2202',\n 'Pcy': '\\u041F',\n 'Pfr': '\\uD835\\uDD13',\n 'Phi': '\\u03A6',\n 'Pi': '\\u03A0',\n 'PlusMinus': '\\u00B1',\n 'plusmn': '\\u00B1',\n 'pm': '\\u00B1',\n 'Popf': '\\u2119',\n 'primes': '\\u2119',\n 'Pr': '\\u2ABB',\n 'Precedes': '\\u227A',\n 'pr': '\\u227A',\n 'prec': '\\u227A',\n 'PrecedesEqual': '\\u2AAF',\n 'pre': '\\u2AAF',\n 'preceq': '\\u2AAF',\n 'PrecedesSlantEqual': '\\u227C',\n 'prcue': '\\u227C',\n 'preccurlyeq': '\\u227C',\n 'PrecedesTilde': '\\u227E',\n 'precsim': '\\u227E',\n 'prsim': '\\u227E',\n 'Prime': '\\u2033',\n 'Product': '\\u220F',\n 'prod': '\\u220F',\n 'Proportional': '\\u221D',\n 'prop': '\\u221D',\n 'propto': '\\u221D',\n 'varpropto': '\\u221D',\n 'vprop': '\\u221D',\n 'Pscr': '\\uD835\\uDCAB',\n 'Psi': '\\u03A8',\n 'QUOT': '\\u0022',\n 'quot': '\\u0022',\n 'Qfr': '\\uD835\\uDD14',\n 'Qopf': '\\u211A',\n 'rationals': '\\u211A',\n 'Qscr': '\\uD835\\uDCAC',\n 'RBarr': '\\u2910',\n 'drbkarow': '\\u2910',\n 'REG': '\\u00AE',\n 'circledR': '\\u00AE',\n 'reg': '\\u00AE',\n 'Racute': '\\u0154',\n 'Rang': '\\u27EB',\n 'Rarr': '\\u21A0',\n 'twoheadrightarrow': '\\u21A0',\n 'Rarrtl': '\\u2916',\n 'Rcaron': '\\u0158',\n 'Rcedil': '\\u0156',\n 'Rcy': '\\u0420',\n 'Re': '\\u211C',\n 'Rfr': '\\u211C',\n 'real': '\\u211C',\n 'realpart': '\\u211C',\n 'ReverseElement': '\\u220B',\n 'SuchThat': '\\u220B',\n 'ni': '\\u220B',\n 'niv': '\\u220B',\n 'ReverseEquilibrium': '\\u21CB',\n 'leftrightharpoons': '\\u21CB',\n 'lrhar': '\\u21CB',\n 'ReverseUpEquilibrium': '\\u296F',\n 'duhar': '\\u296F',\n 'Rho': '\\u03A1',\n 'RightAngleBracket': '\\u27E9',\n 'rang': '\\u27E9',\n 'rangle': '\\u27E9',\n 'RightArrow': '\\u2192',\n 'ShortRightArrow': '\\u2192',\n 'rarr': '\\u2192',\n 'rightarrow': '\\u2192',\n 'srarr': '\\u2192',\n 'RightArrowBar': '\\u21E5',\n 'rarrb': '\\u21E5',\n 'RightArrowLeftArrow': '\\u21C4',\n 'rightleftarrows': '\\u21C4',\n 'rlarr': '\\u21C4',\n 'RightCeiling': '\\u2309',\n 'rceil': '\\u2309',\n 'RightDoubleBracket': '\\u27E7',\n 'robrk': '\\u27E7',\n 'RightDownTeeVector': '\\u295D',\n 'RightDownVector': '\\u21C2',\n 'dharr': '\\u21C2',\n 'downharpoonright': '\\u21C2',\n 'RightDownVectorBar': '\\u2955',\n 'RightFloor': '\\u230B',\n 'rfloor': '\\u230B',\n 'RightTee': '\\u22A2',\n 'vdash': '\\u22A2',\n 'RightTeeArrow': '\\u21A6',\n 'map': '\\u21A6',\n 'mapsto': '\\u21A6',\n 'RightTeeVector': '\\u295B',\n 'RightTriangle': '\\u22B3',\n 'vartriangleright': '\\u22B3',\n 'vrtri': '\\u22B3',\n 'RightTriangleBar': '\\u29D0',\n 'RightTriangleEqual': '\\u22B5',\n 'rtrie': '\\u22B5',\n 'trianglerighteq': '\\u22B5',\n 'RightUpDownVector': '\\u294F',\n 'RightUpTeeVector': '\\u295C',\n 'RightUpVector': '\\u21BE',\n 'uharr': '\\u21BE',\n 'upharpoonright': '\\u21BE',\n 'RightUpVectorBar': '\\u2954',\n 'RightVector': '\\u21C0',\n 'rharu': '\\u21C0',\n 'rightharpoonup': '\\u21C0',\n 'RightVectorBar': '\\u2953',\n 'Ropf': '\\u211D',\n 'reals': '\\u211D',\n 'RoundImplies': '\\u2970',\n 'Rrightarrow': '\\u21DB',\n 'rAarr': '\\u21DB',\n 'Rscr': '\\u211B',\n 'realine': '\\u211B',\n 'Rsh': '\\u21B1',\n 'rsh': '\\u21B1',\n 'RuleDelayed': '\\u29F4',\n 'SHCHcy': '\\u0429',\n 'SHcy': '\\u0428',\n 'SOFTcy': '\\u042C',\n 'Sacute': '\\u015A',\n 'Sc': '\\u2ABC',\n 'Scaron': '\\u0160',\n 'Scedil': '\\u015E',\n 'Scirc': '\\u015C',\n 'Scy': '\\u0421',\n 'Sfr': '\\uD835\\uDD16',\n 'ShortUpArrow': '\\u2191',\n 'UpArrow': '\\u2191',\n 'uarr': '\\u2191',\n 'uparrow': '\\u2191',\n 'Sigma': '\\u03A3',\n 'SmallCircle': '\\u2218',\n 'compfn': '\\u2218',\n 'Sopf': '\\uD835\\uDD4A',\n 'Sqrt': '\\u221A',\n 'radic': '\\u221A',\n 'Square': '\\u25A1',\n 'squ': '\\u25A1',\n 'square': '\\u25A1',\n 'SquareIntersection': '\\u2293',\n 'sqcap': '\\u2293',\n 'SquareSubset': '\\u228F',\n 'sqsub': '\\u228F',\n 'sqsubset': '\\u228F',\n 'SquareSubsetEqual': '\\u2291',\n 'sqsube': '\\u2291',\n 'sqsubseteq': '\\u2291',\n 'SquareSuperset': '\\u2290',\n 'sqsup': '\\u2290',\n 'sqsupset': '\\u2290',\n 'SquareSupersetEqual': '\\u2292',\n 'sqsupe': '\\u2292',\n 'sqsupseteq': '\\u2292',\n 'SquareUnion': '\\u2294',\n 'sqcup': '\\u2294',\n 'Sscr': '\\uD835\\uDCAE',\n 'Star': '\\u22C6',\n 'sstarf': '\\u22C6',\n 'Sub': '\\u22D0',\n 'Subset': '\\u22D0',\n 'SubsetEqual': '\\u2286',\n 'sube': '\\u2286',\n 'subseteq': '\\u2286',\n 'Succeeds': '\\u227B',\n 'sc': '\\u227B',\n 'succ': '\\u227B',\n 'SucceedsEqual': '\\u2AB0',\n 'sce': '\\u2AB0',\n 'succeq': '\\u2AB0',\n 'SucceedsSlantEqual': '\\u227D',\n 'sccue': '\\u227D',\n 'succcurlyeq': '\\u227D',\n 'SucceedsTilde': '\\u227F',\n 'scsim': '\\u227F',\n 'succsim': '\\u227F',\n 'Sum': '\\u2211',\n 'sum': '\\u2211',\n 'Sup': '\\u22D1',\n 'Supset': '\\u22D1',\n 'Superset': '\\u2283',\n 'sup': '\\u2283',\n 'supset': '\\u2283',\n 'SupersetEqual': '\\u2287',\n 'supe': '\\u2287',\n 'supseteq': '\\u2287',\n 'THORN': '\\u00DE',\n 'TRADE': '\\u2122',\n 'trade': '\\u2122',\n 'TSHcy': '\\u040B',\n 'TScy': '\\u0426',\n 'Tab': '\\u0009',\n 'Tau': '\\u03A4',\n 'Tcaron': '\\u0164',\n 'Tcedil': '\\u0162',\n 'Tcy': '\\u0422',\n 'Tfr': '\\uD835\\uDD17',\n 'Therefore': '\\u2234',\n 'there4': '\\u2234',\n 'therefore': '\\u2234',\n 'Theta': '\\u0398',\n 'ThickSpace': '\\u205F\\u200A',\n 'ThinSpace': '\\u2009',\n 'thinsp': '\\u2009',\n 'Tilde': '\\u223C',\n 'sim': '\\u223C',\n 'thicksim': '\\u223C',\n 'thksim': '\\u223C',\n 'TildeEqual': '\\u2243',\n 'sime': '\\u2243',\n 'simeq': '\\u2243',\n 'TildeFullEqual': '\\u2245',\n 'cong': '\\u2245',\n 'TildeTilde': '\\u2248',\n 'ap': '\\u2248',\n 'approx': '\\u2248',\n 'asymp': '\\u2248',\n 'thickapprox': '\\u2248',\n 'thkap': '\\u2248',\n 'Topf': '\\uD835\\uDD4B',\n 'TripleDot': '\\u20DB',\n 'tdot': '\\u20DB',\n 'Tscr': '\\uD835\\uDCAF',\n 'Tstrok': '\\u0166',\n 'Uacute': '\\u00DA',\n 'Uarr': '\\u219F',\n 'Uarrocir': '\\u2949',\n 'Ubrcy': '\\u040E',\n 'Ubreve': '\\u016C',\n 'Ucirc': '\\u00DB',\n 'Ucy': '\\u0423',\n 'Udblac': '\\u0170',\n 'Ufr': '\\uD835\\uDD18',\n 'Ugrave': '\\u00D9',\n 'Umacr': '\\u016A',\n 'UnderBar': '\\u005F',\n 'lowbar': '\\u005F',\n 'UnderBrace': '\\u23DF',\n 'UnderBracket': '\\u23B5',\n 'bbrk': '\\u23B5',\n 'UnderParenthesis': '\\u23DD',\n 'Union': '\\u22C3',\n 'bigcup': '\\u22C3',\n 'xcup': '\\u22C3',\n 'UnionPlus': '\\u228E',\n 'uplus': '\\u228E',\n 'Uogon': '\\u0172',\n 'Uopf': '\\uD835\\uDD4C',\n 'UpArrowBar': '\\u2912',\n 'UpArrowDownArrow': '\\u21C5',\n 'udarr': '\\u21C5',\n 'UpDownArrow': '\\u2195',\n 'updownarrow': '\\u2195',\n 'varr': '\\u2195',\n 'UpEquilibrium': '\\u296E',\n 'udhar': '\\u296E',\n 'UpTee': '\\u22A5',\n 'bot': '\\u22A5',\n 'bottom': '\\u22A5',\n 'perp': '\\u22A5',\n 'UpTeeArrow': '\\u21A5',\n 'mapstoup': '\\u21A5',\n 'UpperLeftArrow': '\\u2196',\n 'nwarr': '\\u2196',\n 'nwarrow': '\\u2196',\n 'UpperRightArrow': '\\u2197',\n 'nearr': '\\u2197',\n 'nearrow': '\\u2197',\n 'Upsi': '\\u03D2',\n 'upsih': '\\u03D2',\n 'Upsilon': '\\u03A5',\n 'Uring': '\\u016E',\n 'Uscr': '\\uD835\\uDCB0',\n 'Utilde': '\\u0168',\n 'Uuml': '\\u00DC',\n 'VDash': '\\u22AB',\n 'Vbar': '\\u2AEB',\n 'Vcy': '\\u0412',\n 'Vdash': '\\u22A9',\n 'Vdashl': '\\u2AE6',\n 'Vee': '\\u22C1',\n 'bigvee': '\\u22C1',\n 'xvee': '\\u22C1',\n 'Verbar': '\\u2016',\n 'Vert': '\\u2016',\n 'VerticalBar': '\\u2223',\n 'mid': '\\u2223',\n 'shortmid': '\\u2223',\n 'smid': '\\u2223',\n 'VerticalLine': '\\u007C',\n 'verbar': '\\u007C',\n 'vert': '\\u007C',\n 'VerticalSeparator': '\\u2758',\n 'VerticalTilde': '\\u2240',\n 'wr': '\\u2240',\n 'wreath': '\\u2240',\n 'VeryThinSpace': '\\u200A',\n 'hairsp': '\\u200A',\n 'Vfr': '\\uD835\\uDD19',\n 'Vopf': '\\uD835\\uDD4D',\n 'Vscr': '\\uD835\\uDCB1',\n 'Vvdash': '\\u22AA',\n 'Wcirc': '\\u0174',\n 'Wedge': '\\u22C0',\n 'bigwedge': '\\u22C0',\n 'xwedge': '\\u22C0',\n 'Wfr': '\\uD835\\uDD1A',\n 'Wopf': '\\uD835\\uDD4E',\n 'Wscr': '\\uD835\\uDCB2',\n 'Xfr': '\\uD835\\uDD1B',\n 'Xi': '\\u039E',\n 'Xopf': '\\uD835\\uDD4F',\n 'Xscr': '\\uD835\\uDCB3',\n 'YAcy': '\\u042F',\n 'YIcy': '\\u0407',\n 'YUcy': '\\u042E',\n 'Yacute': '\\u00DD',\n 'Ycirc': '\\u0176',\n 'Ycy': '\\u042B',\n 'Yfr': '\\uD835\\uDD1C',\n 'Yopf': '\\uD835\\uDD50',\n 'Yscr': '\\uD835\\uDCB4',\n 'Yuml': '\\u0178',\n 'ZHcy': '\\u0416',\n 'Zacute': '\\u0179',\n 'Zcaron': '\\u017D',\n 'Zcy': '\\u0417',\n 'Zdot': '\\u017B',\n 'Zeta': '\\u0396',\n 'Zfr': '\\u2128',\n 'zeetrf': '\\u2128',\n 'Zopf': '\\u2124',\n 'integers': '\\u2124',\n 'Zscr': '\\uD835\\uDCB5',\n 'aacute': '\\u00E1',\n 'abreve': '\\u0103',\n 'ac': '\\u223E',\n 'mstpos': '\\u223E',\n 'acE': '\\u223E\\u0333',\n 'acd': '\\u223F',\n 'acirc': '\\u00E2',\n 'acy': '\\u0430',\n 'aelig': '\\u00E6',\n 'afr': '\\uD835\\uDD1E',\n 'agrave': '\\u00E0',\n 'alefsym': '\\u2135',\n 'aleph': '\\u2135',\n 'alpha': '\\u03B1',\n 'amacr': '\\u0101',\n 'amalg': '\\u2A3F',\n 'and': '\\u2227',\n 'wedge': '\\u2227',\n 'andand': '\\u2A55',\n 'andd': '\\u2A5C',\n 'andslope': '\\u2A58',\n 'andv': '\\u2A5A',\n 'ang': '\\u2220',\n 'angle': '\\u2220',\n 'ange': '\\u29A4',\n 'angmsd': '\\u2221',\n 'measuredangle': '\\u2221',\n 'angmsdaa': '\\u29A8',\n 'angmsdab': '\\u29A9',\n 'angmsdac': '\\u29AA',\n 'angmsdad': '\\u29AB',\n 'angmsdae': '\\u29AC',\n 'angmsdaf': '\\u29AD',\n 'angmsdag': '\\u29AE',\n 'angmsdah': '\\u29AF',\n 'angrt': '\\u221F',\n 'angrtvb': '\\u22BE',\n 'angrtvbd': '\\u299D',\n 'angsph': '\\u2222',\n 'angzarr': '\\u237C',\n 'aogon': '\\u0105',\n 'aopf': '\\uD835\\uDD52',\n 'apE': '\\u2A70',\n 'apacir': '\\u2A6F',\n 'ape': '\\u224A',\n 'approxeq': '\\u224A',\n 'apid': '\\u224B',\n 'apos': '\\u0027',\n 'aring': '\\u00E5',\n 'ascr': '\\uD835\\uDCB6',\n 'ast': '\\u002A',\n 'midast': '\\u002A',\n 'atilde': '\\u00E3',\n 'auml': '\\u00E4',\n 'awint': '\\u2A11',\n 'bNot': '\\u2AED',\n 'backcong': '\\u224C',\n 'bcong': '\\u224C',\n 'backepsilon': '\\u03F6',\n 'bepsi': '\\u03F6',\n 'backprime': '\\u2035',\n 'bprime': '\\u2035',\n 'backsim': '\\u223D',\n 'bsim': '\\u223D',\n 'backsimeq': '\\u22CD',\n 'bsime': '\\u22CD',\n 'barvee': '\\u22BD',\n 'barwed': '\\u2305',\n 'barwedge': '\\u2305',\n 'bbrktbrk': '\\u23B6',\n 'bcy': '\\u0431',\n 'bdquo': '\\u201E',\n 'ldquor': '\\u201E',\n 'bemptyv': '\\u29B0',\n 'beta': '\\u03B2',\n 'beth': '\\u2136',\n 'between': '\\u226C',\n 'twixt': '\\u226C',\n 'bfr': '\\uD835\\uDD1F',\n 'bigcirc': '\\u25EF',\n 'xcirc': '\\u25EF',\n 'bigodot': '\\u2A00',\n 'xodot': '\\u2A00',\n 'bigoplus': '\\u2A01',\n 'xoplus': '\\u2A01',\n 'bigotimes': '\\u2A02',\n 'xotime': '\\u2A02',\n 'bigsqcup': '\\u2A06',\n 'xsqcup': '\\u2A06',\n 'bigstar': '\\u2605',\n 'starf': '\\u2605',\n 'bigtriangledown': '\\u25BD',\n 'xdtri': '\\u25BD',\n 'bigtriangleup': '\\u25B3',\n 'xutri': '\\u25B3',\n 'biguplus': '\\u2A04',\n 'xuplus': '\\u2A04',\n 'bkarow': '\\u290D',\n 'rbarr': '\\u290D',\n 'blacklozenge': '\\u29EB',\n 'lozf': '\\u29EB',\n 'blacktriangle': '\\u25B4',\n 'utrif': '\\u25B4',\n 'blacktriangledown': '\\u25BE',\n 'dtrif': '\\u25BE',\n 'blacktriangleleft': '\\u25C2',\n 'ltrif': '\\u25C2',\n 'blacktriangleright': '\\u25B8',\n 'rtrif': '\\u25B8',\n 'blank': '\\u2423',\n 'blk12': '\\u2592',\n 'blk14': '\\u2591',\n 'blk34': '\\u2593',\n 'block': '\\u2588',\n 'bne': '\\u003D\\u20E5',\n 'bnequiv': '\\u2261\\u20E5',\n 'bnot': '\\u2310',\n 'bopf': '\\uD835\\uDD53',\n 'bowtie': '\\u22C8',\n 'boxDL': '\\u2557',\n 'boxDR': '\\u2554',\n 'boxDl': '\\u2556',\n 'boxDr': '\\u2553',\n 'boxH': '\\u2550',\n 'boxHD': '\\u2566',\n 'boxHU': '\\u2569',\n 'boxHd': '\\u2564',\n 'boxHu': '\\u2567',\n 'boxUL': '\\u255D',\n 'boxUR': '\\u255A',\n 'boxUl': '\\u255C',\n 'boxUr': '\\u2559',\n 'boxV': '\\u2551',\n 'boxVH': '\\u256C',\n 'boxVL': '\\u2563',\n 'boxVR': '\\u2560',\n 'boxVh': '\\u256B',\n 'boxVl': '\\u2562',\n 'boxVr': '\\u255F',\n 'boxbox': '\\u29C9',\n 'boxdL': '\\u2555',\n 'boxdR': '\\u2552',\n 'boxdl': '\\u2510',\n 'boxdr': '\\u250C',\n 'boxhD': '\\u2565',\n 'boxhU': '\\u2568',\n 'boxhd': '\\u252C',\n 'boxhu': '\\u2534',\n 'boxminus': '\\u229F',\n 'minusb': '\\u229F',\n 'boxplus': '\\u229E',\n 'plusb': '\\u229E',\n 'boxtimes': '\\u22A0',\n 'timesb': '\\u22A0',\n 'boxuL': '\\u255B',\n 'boxuR': '\\u2558',\n 'boxul': '\\u2518',\n 'boxur': '\\u2514',\n 'boxv': '\\u2502',\n 'boxvH': '\\u256A',\n 'boxvL': '\\u2561',\n 'boxvR': '\\u255E',\n 'boxvh': '\\u253C',\n 'boxvl': '\\u2524',\n 'boxvr': '\\u251C',\n 'brvbar': '\\u00A6',\n 'bscr': '\\uD835\\uDCB7',\n 'bsemi': '\\u204F',\n 'bsol': '\\u005C',\n 'bsolb': '\\u29C5',\n 'bsolhsub': '\\u27C8',\n 'bull': '\\u2022',\n 'bullet': '\\u2022',\n 'bumpE': '\\u2AAE',\n 'cacute': '\\u0107',\n 'cap': '\\u2229',\n 'capand': '\\u2A44',\n 'capbrcup': '\\u2A49',\n 'capcap': '\\u2A4B',\n 'capcup': '\\u2A47',\n 'capdot': '\\u2A40',\n 'caps': '\\u2229\\uFE00',\n 'caret': '\\u2041',\n 'ccaps': '\\u2A4D',\n 'ccaron': '\\u010D',\n 'ccedil': '\\u00E7',\n 'ccirc': '\\u0109',\n 'ccups': '\\u2A4C',\n 'ccupssm': '\\u2A50',\n 'cdot': '\\u010B',\n 'cemptyv': '\\u29B2',\n 'cent': '\\u00A2',\n 'cfr': '\\uD835\\uDD20',\n 'chcy': '\\u0447',\n 'check': '\\u2713',\n 'checkmark': '\\u2713',\n 'chi': '\\u03C7',\n 'cir': '\\u25CB',\n 'cirE': '\\u29C3',\n 'circ': '\\u02C6',\n 'circeq': '\\u2257',\n 'cire': '\\u2257',\n 'circlearrowleft': '\\u21BA',\n 'olarr': '\\u21BA',\n 'circlearrowright': '\\u21BB',\n 'orarr': '\\u21BB',\n 'circledS': '\\u24C8',\n 'oS': '\\u24C8',\n 'circledast': '\\u229B',\n 'oast': '\\u229B',\n 'circledcirc': '\\u229A',\n 'ocir': '\\u229A',\n 'circleddash': '\\u229D',\n 'odash': '\\u229D',\n 'cirfnint': '\\u2A10',\n 'cirmid': '\\u2AEF',\n 'cirscir': '\\u29C2',\n 'clubs': '\\u2663',\n 'clubsuit': '\\u2663',\n 'colon': '\\u003A',\n 'comma': '\\u002C',\n 'commat': '\\u0040',\n 'comp': '\\u2201',\n 'complement': '\\u2201',\n 'congdot': '\\u2A6D',\n 'copf': '\\uD835\\uDD54',\n 'copysr': '\\u2117',\n 'crarr': '\\u21B5',\n 'cross': '\\u2717',\n 'cscr': '\\uD835\\uDCB8',\n 'csub': '\\u2ACF',\n 'csube': '\\u2AD1',\n 'csup': '\\u2AD0',\n 'csupe': '\\u2AD2',\n 'ctdot': '\\u22EF',\n 'cudarrl': '\\u2938',\n 'cudarrr': '\\u2935',\n 'cuepr': '\\u22DE',\n 'curlyeqprec': '\\u22DE',\n 'cuesc': '\\u22DF',\n 'curlyeqsucc': '\\u22DF',\n 'cularr': '\\u21B6',\n 'curvearrowleft': '\\u21B6',\n 'cularrp': '\\u293D',\n 'cup': '\\u222A',\n 'cupbrcap': '\\u2A48',\n 'cupcap': '\\u2A46',\n 'cupcup': '\\u2A4A',\n 'cupdot': '\\u228D',\n 'cupor': '\\u2A45',\n 'cups': '\\u222A\\uFE00',\n 'curarr': '\\u21B7',\n 'curvearrowright': '\\u21B7',\n 'curarrm': '\\u293C',\n 'curlyvee': '\\u22CE',\n 'cuvee': '\\u22CE',\n 'curlywedge': '\\u22CF',\n 'cuwed': '\\u22CF',\n 'curren': '\\u00A4',\n 'cwint': '\\u2231',\n 'cylcty': '\\u232D',\n 'dHar': '\\u2965',\n 'dagger': '\\u2020',\n 'daleth': '\\u2138',\n 'dash': '\\u2010',\n 'hyphen': '\\u2010',\n 'dbkarow': '\\u290F',\n 'rBarr': '\\u290F',\n 'dcaron': '\\u010F',\n 'dcy': '\\u0434',\n 'ddarr': '\\u21CA',\n 'downdownarrows': '\\u21CA',\n 'ddotseq': '\\u2A77',\n 'eDDot': '\\u2A77',\n 'deg': '\\u00B0',\n 'delta': '\\u03B4',\n 'demptyv': '\\u29B1',\n 'dfisht': '\\u297F',\n 'dfr': '\\uD835\\uDD21',\n 'diamondsuit': '\\u2666',\n 'diams': '\\u2666',\n 'digamma': '\\u03DD',\n 'gammad': '\\u03DD',\n 'disin': '\\u22F2',\n 'div': '\\u00F7',\n 'divide': '\\u00F7',\n 'divideontimes': '\\u22C7',\n 'divonx': '\\u22C7',\n 'djcy': '\\u0452',\n 'dlcorn': '\\u231E',\n 'llcorner': '\\u231E',\n 'dlcrop': '\\u230D',\n 'dollar': '\\u0024',\n 'dopf': '\\uD835\\uDD55',\n 'doteqdot': '\\u2251',\n 'eDot': '\\u2251',\n 'dotminus': '\\u2238',\n 'minusd': '\\u2238',\n 'dotplus': '\\u2214',\n 'plusdo': '\\u2214',\n 'dotsquare': '\\u22A1',\n 'sdotb': '\\u22A1',\n 'drcorn': '\\u231F',\n 'lrcorner': '\\u231F',\n 'drcrop': '\\u230C',\n 'dscr': '\\uD835\\uDCB9',\n 'dscy': '\\u0455',\n 'dsol': '\\u29F6',\n 'dstrok': '\\u0111',\n 'dtdot': '\\u22F1',\n 'dtri': '\\u25BF',\n 'triangledown': '\\u25BF',\n 'dwangle': '\\u29A6',\n 'dzcy': '\\u045F',\n 'dzigrarr': '\\u27FF',\n 'eacute': '\\u00E9',\n 'easter': '\\u2A6E',\n 'ecaron': '\\u011B',\n 'ecir': '\\u2256',\n 'eqcirc': '\\u2256',\n 'ecirc': '\\u00EA',\n 'ecolon': '\\u2255',\n 'eqcolon': '\\u2255',\n 'ecy': '\\u044D',\n 'edot': '\\u0117',\n 'efDot': '\\u2252',\n 'fallingdotseq': '\\u2252',\n 'efr': '\\uD835\\uDD22',\n 'eg': '\\u2A9A',\n 'egrave': '\\u00E8',\n 'egs': '\\u2A96',\n 'eqslantgtr': '\\u2A96',\n 'egsdot': '\\u2A98',\n 'el': '\\u2A99',\n 'elinters': '\\u23E7',\n 'ell': '\\u2113',\n 'els': '\\u2A95',\n 'eqslantless': '\\u2A95',\n 'elsdot': '\\u2A97',\n 'emacr': '\\u0113',\n 'empty': '\\u2205',\n 'emptyset': '\\u2205',\n 'emptyv': '\\u2205',\n 'varnothing': '\\u2205',\n 'emsp13': '\\u2004',\n 'emsp14': '\\u2005',\n 'emsp': '\\u2003',\n 'eng': '\\u014B',\n 'ensp': '\\u2002',\n 'eogon': '\\u0119',\n 'eopf': '\\uD835\\uDD56',\n 'epar': '\\u22D5',\n 'eparsl': '\\u29E3',\n 'eplus': '\\u2A71',\n 'epsi': '\\u03B5',\n 'epsilon': '\\u03B5',\n 'epsiv': '\\u03F5',\n 'straightepsilon': '\\u03F5',\n 'varepsilon': '\\u03F5',\n 'equals': '\\u003D',\n 'equest': '\\u225F',\n 'questeq': '\\u225F',\n 'equivDD': '\\u2A78',\n 'eqvparsl': '\\u29E5',\n 'erDot': '\\u2253',\n 'risingdotseq': '\\u2253',\n 'erarr': '\\u2971',\n 'escr': '\\u212F',\n 'eta': '\\u03B7',\n 'eth': '\\u00F0',\n 'euml': '\\u00EB',\n 'euro': '\\u20AC',\n 'excl': '\\u0021',\n 'fcy': '\\u0444',\n 'female': '\\u2640',\n 'ffilig': '\\uFB03',\n 'fflig': '\\uFB00',\n 'ffllig': '\\uFB04',\n 'ffr': '\\uD835\\uDD23',\n 'filig': '\\uFB01',\n 'fjlig': '\\u0066\\u006A',\n 'flat': '\\u266D',\n 'fllig': '\\uFB02',\n 'fltns': '\\u25B1',\n 'fnof': '\\u0192',\n 'fopf': '\\uD835\\uDD57',\n 'fork': '\\u22D4',\n 'pitchfork': '\\u22D4',\n 'forkv': '\\u2AD9',\n 'fpartint': '\\u2A0D',\n 'frac12': '\\u00BD',\n 'half': '\\u00BD',\n 'frac13': '\\u2153',\n 'frac14': '\\u00BC',\n 'frac15': '\\u2155',\n 'frac16': '\\u2159',\n 'frac18': '\\u215B',\n 'frac23': '\\u2154',\n 'frac25': '\\u2156',\n 'frac34': '\\u00BE',\n 'frac35': '\\u2157',\n 'frac38': '\\u215C',\n 'frac45': '\\u2158',\n 'frac56': '\\u215A',\n 'frac58': '\\u215D',\n 'frac78': '\\u215E',\n 'frasl': '\\u2044',\n 'frown': '\\u2322',\n 'sfrown': '\\u2322',\n 'fscr': '\\uD835\\uDCBB',\n 'gEl': '\\u2A8C',\n 'gtreqqless': '\\u2A8C',\n 'gacute': '\\u01F5',\n 'gamma': '\\u03B3',\n 'gap': '\\u2A86',\n 'gtrapprox': '\\u2A86',\n 'gbreve': '\\u011F',\n 'gcirc': '\\u011D',\n 'gcy': '\\u0433',\n 'gdot': '\\u0121',\n 'gescc': '\\u2AA9',\n 'gesdot': '\\u2A80',\n 'gesdoto': '\\u2A82',\n 'gesdotol': '\\u2A84',\n 'gesl': '\\u22DB\\uFE00',\n 'gesles': '\\u2A94',\n 'gfr': '\\uD835\\uDD24',\n 'gimel': '\\u2137',\n 'gjcy': '\\u0453',\n 'glE': '\\u2A92',\n 'gla': '\\u2AA5',\n 'glj': '\\u2AA4',\n 'gnE': '\\u2269',\n 'gneqq': '\\u2269',\n 'gnap': '\\u2A8A',\n 'gnapprox': '\\u2A8A',\n 'gne': '\\u2A88',\n 'gneq': '\\u2A88',\n 'gnsim': '\\u22E7',\n 'gopf': '\\uD835\\uDD58',\n 'gscr': '\\u210A',\n 'gsime': '\\u2A8E',\n 'gsiml': '\\u2A90',\n 'gtcc': '\\u2AA7',\n 'gtcir': '\\u2A7A',\n 'gtdot': '\\u22D7',\n 'gtrdot': '\\u22D7',\n 'gtlPar': '\\u2995',\n 'gtquest': '\\u2A7C',\n 'gtrarr': '\\u2978',\n 'gvertneqq': '\\u2269\\uFE00',\n 'gvnE': '\\u2269\\uFE00',\n 'hardcy': '\\u044A',\n 'harrcir': '\\u2948',\n 'harrw': '\\u21AD',\n 'leftrightsquigarrow': '\\u21AD',\n 'hbar': '\\u210F',\n 'hslash': '\\u210F',\n 'planck': '\\u210F',\n 'plankv': '\\u210F',\n 'hcirc': '\\u0125',\n 'hearts': '\\u2665',\n 'heartsuit': '\\u2665',\n 'hellip': '\\u2026',\n 'mldr': '\\u2026',\n 'hercon': '\\u22B9',\n 'hfr': '\\uD835\\uDD25',\n 'hksearow': '\\u2925',\n 'searhk': '\\u2925',\n 'hkswarow': '\\u2926',\n 'swarhk': '\\u2926',\n 'hoarr': '\\u21FF',\n 'homtht': '\\u223B',\n 'hookleftarrow': '\\u21A9',\n 'larrhk': '\\u21A9',\n 'hookrightarrow': '\\u21AA',\n 'rarrhk': '\\u21AA',\n 'hopf': '\\uD835\\uDD59',\n 'horbar': '\\u2015',\n 'hscr': '\\uD835\\uDCBD',\n 'hstrok': '\\u0127',\n 'hybull': '\\u2043',\n 'iacute': '\\u00ED',\n 'icirc': '\\u00EE',\n 'icy': '\\u0438',\n 'iecy': '\\u0435',\n 'iexcl': '\\u00A1',\n 'ifr': '\\uD835\\uDD26',\n 'igrave': '\\u00EC',\n 'iiiint': '\\u2A0C',\n 'qint': '\\u2A0C',\n 'iiint': '\\u222D',\n 'tint': '\\u222D',\n 'iinfin': '\\u29DC',\n 'iiota': '\\u2129',\n 'ijlig': '\\u0133',\n 'imacr': '\\u012B',\n 'imath': '\\u0131',\n 'inodot': '\\u0131',\n 'imof': '\\u22B7',\n 'imped': '\\u01B5',\n 'incare': '\\u2105',\n 'infin': '\\u221E',\n 'infintie': '\\u29DD',\n 'intcal': '\\u22BA',\n 'intercal': '\\u22BA',\n 'intlarhk': '\\u2A17',\n 'intprod': '\\u2A3C',\n 'iprod': '\\u2A3C',\n 'iocy': '\\u0451',\n 'iogon': '\\u012F',\n 'iopf': '\\uD835\\uDD5A',\n 'iota': '\\u03B9',\n 'iquest': '\\u00BF',\n 'iscr': '\\uD835\\uDCBE',\n 'isinE': '\\u22F9',\n 'isindot': '\\u22F5',\n 'isins': '\\u22F4',\n 'isinsv': '\\u22F3',\n 'itilde': '\\u0129',\n 'iukcy': '\\u0456',\n 'iuml': '\\u00EF',\n 'jcirc': '\\u0135',\n 'jcy': '\\u0439',\n 'jfr': '\\uD835\\uDD27',\n 'jmath': '\\u0237',\n 'jopf': '\\uD835\\uDD5B',\n 'jscr': '\\uD835\\uDCBF',\n 'jsercy': '\\u0458',\n 'jukcy': '\\u0454',\n 'kappa': '\\u03BA',\n 'kappav': '\\u03F0',\n 'varkappa': '\\u03F0',\n 'kcedil': '\\u0137',\n 'kcy': '\\u043A',\n 'kfr': '\\uD835\\uDD28',\n 'kgreen': '\\u0138',\n 'khcy': '\\u0445',\n 'kjcy': '\\u045C',\n 'kopf': '\\uD835\\uDD5C',\n 'kscr': '\\uD835\\uDCC0',\n 'lAtail': '\\u291B',\n 'lBarr': '\\u290E',\n 'lEg': '\\u2A8B',\n 'lesseqqgtr': '\\u2A8B',\n 'lHar': '\\u2962',\n 'lacute': '\\u013A',\n 'laemptyv': '\\u29B4',\n 'lambda': '\\u03BB',\n 'langd': '\\u2991',\n 'lap': '\\u2A85',\n 'lessapprox': '\\u2A85',\n 'laquo': '\\u00AB',\n 'larrbfs': '\\u291F',\n 'larrfs': '\\u291D',\n 'larrlp': '\\u21AB',\n 'looparrowleft': '\\u21AB',\n 'larrpl': '\\u2939',\n 'larrsim': '\\u2973',\n 'larrtl': '\\u21A2',\n 'leftarrowtail': '\\u21A2',\n 'lat': '\\u2AAB',\n 'latail': '\\u2919',\n 'late': '\\u2AAD',\n 'lates': '\\u2AAD\\uFE00',\n 'lbarr': '\\u290C',\n 'lbbrk': '\\u2772',\n 'lbrace': '\\u007B',\n 'lcub': '\\u007B',\n 'lbrack': '\\u005B',\n 'lsqb': '\\u005B',\n 'lbrke': '\\u298B',\n 'lbrksld': '\\u298F',\n 'lbrkslu': '\\u298D',\n 'lcaron': '\\u013E',\n 'lcedil': '\\u013C',\n 'lcy': '\\u043B',\n 'ldca': '\\u2936',\n 'ldrdhar': '\\u2967',\n 'ldrushar': '\\u294B',\n 'ldsh': '\\u21B2',\n 'le': '\\u2264',\n 'leq': '\\u2264',\n 'leftleftarrows': '\\u21C7',\n 'llarr': '\\u21C7',\n 'leftthreetimes': '\\u22CB',\n 'lthree': '\\u22CB',\n 'lescc': '\\u2AA8',\n 'lesdot': '\\u2A7F',\n 'lesdoto': '\\u2A81',\n 'lesdotor': '\\u2A83',\n 'lesg': '\\u22DA\\uFE00',\n 'lesges': '\\u2A93',\n 'lessdot': '\\u22D6',\n 'ltdot': '\\u22D6',\n 'lfisht': '\\u297C',\n 'lfr': '\\uD835\\uDD29',\n 'lgE': '\\u2A91',\n 'lharul': '\\u296A',\n 'lhblk': '\\u2584',\n 'ljcy': '\\u0459',\n 'llhard': '\\u296B',\n 'lltri': '\\u25FA',\n 'lmidot': '\\u0140',\n 'lmoust': '\\u23B0',\n 'lmoustache': '\\u23B0',\n 'lnE': '\\u2268',\n 'lneqq': '\\u2268',\n 'lnap': '\\u2A89',\n 'lnapprox': '\\u2A89',\n 'lne': '\\u2A87',\n 'lneq': '\\u2A87',\n 'lnsim': '\\u22E6',\n 'loang': '\\u27EC',\n 'loarr': '\\u21FD',\n 'longmapsto': '\\u27FC',\n 'xmap': '\\u27FC',\n 'looparrowright': '\\u21AC',\n 'rarrlp': '\\u21AC',\n 'lopar': '\\u2985',\n 'lopf': '\\uD835\\uDD5D',\n 'loplus': '\\u2A2D',\n 'lotimes': '\\u2A34',\n 'lowast': '\\u2217',\n 'loz': '\\u25CA',\n 'lozenge': '\\u25CA',\n 'lpar': '\\u0028',\n 'lparlt': '\\u2993',\n 'lrhard': '\\u296D',\n 'lrm': '\\u200E',\n 'lrtri': '\\u22BF',\n 'lsaquo': '\\u2039',\n 'lscr': '\\uD835\\uDCC1',\n 'lsime': '\\u2A8D',\n 'lsimg': '\\u2A8F',\n 'lsquor': '\\u201A',\n 'sbquo': '\\u201A',\n 'lstrok': '\\u0142',\n 'ltcc': '\\u2AA6',\n 'ltcir': '\\u2A79',\n 'ltimes': '\\u22C9',\n 'ltlarr': '\\u2976',\n 'ltquest': '\\u2A7B',\n 'ltrPar': '\\u2996',\n 'ltri': '\\u25C3',\n 'triangleleft': '\\u25C3',\n 'lurdshar': '\\u294A',\n 'luruhar': '\\u2966',\n 'lvertneqq': '\\u2268\\uFE00',\n 'lvnE': '\\u2268\\uFE00',\n 'mDDot': '\\u223A',\n 'macr': '\\u00AF',\n 'strns': '\\u00AF',\n 'male': '\\u2642',\n 'malt': '\\u2720',\n 'maltese': '\\u2720',\n 'marker': '\\u25AE',\n 'mcomma': '\\u2A29',\n 'mcy': '\\u043C',\n 'mdash': '\\u2014',\n 'mfr': '\\uD835\\uDD2A',\n 'mho': '\\u2127',\n 'micro': '\\u00B5',\n 'midcir': '\\u2AF0',\n 'minus': '\\u2212',\n 'minusdu': '\\u2A2A',\n 'mlcp': '\\u2ADB',\n 'models': '\\u22A7',\n 'mopf': '\\uD835\\uDD5E',\n 'mscr': '\\uD835\\uDCC2',\n 'mu': '\\u03BC',\n 'multimap': '\\u22B8',\n 'mumap': '\\u22B8',\n 'nGg': '\\u22D9\\u0338',\n 'nGt': '\\u226B\\u20D2',\n 'nLeftarrow': '\\u21CD',\n 'nlArr': '\\u21CD',\n 'nLeftrightarrow': '\\u21CE',\n 'nhArr': '\\u21CE',\n 'nLl': '\\u22D8\\u0338',\n 'nLt': '\\u226A\\u20D2',\n 'nRightarrow': '\\u21CF',\n 'nrArr': '\\u21CF',\n 'nVDash': '\\u22AF',\n 'nVdash': '\\u22AE',\n 'nacute': '\\u0144',\n 'nang': '\\u2220\\u20D2',\n 'napE': '\\u2A70\\u0338',\n 'napid': '\\u224B\\u0338',\n 'napos': '\\u0149',\n 'natur': '\\u266E',\n 'natural': '\\u266E',\n 'ncap': '\\u2A43',\n 'ncaron': '\\u0148',\n 'ncedil': '\\u0146',\n 'ncongdot': '\\u2A6D\\u0338',\n 'ncup': '\\u2A42',\n 'ncy': '\\u043D',\n 'ndash': '\\u2013',\n 'neArr': '\\u21D7',\n 'nearhk': '\\u2924',\n 'nedot': '\\u2250\\u0338',\n 'nesear': '\\u2928',\n 'toea': '\\u2928',\n 'nfr': '\\uD835\\uDD2B',\n 'nharr': '\\u21AE',\n 'nleftrightarrow': '\\u21AE',\n 'nhpar': '\\u2AF2',\n 'nis': '\\u22FC',\n 'nisd': '\\u22FA',\n 'njcy': '\\u045A',\n 'nlE': '\\u2266\\u0338',\n 'nleqq': '\\u2266\\u0338',\n 'nlarr': '\\u219A',\n 'nleftarrow': '\\u219A',\n 'nldr': '\\u2025',\n 'nopf': '\\uD835\\uDD5F',\n 'not': '\\u00AC',\n 'notinE': '\\u22F9\\u0338',\n 'notindot': '\\u22F5\\u0338',\n 'notinvb': '\\u22F7',\n 'notinvc': '\\u22F6',\n 'notnivb': '\\u22FE',\n 'notnivc': '\\u22FD',\n 'nparsl': '\\u2AFD\\u20E5',\n 'npart': '\\u2202\\u0338',\n 'npolint': '\\u2A14',\n 'nrarr': '\\u219B',\n 'nrightarrow': '\\u219B',\n 'nrarrc': '\\u2933\\u0338',\n 'nrarrw': '\\u219D\\u0338',\n 'nscr': '\\uD835\\uDCC3',\n 'nsub': '\\u2284',\n 'nsubE': '\\u2AC5\\u0338',\n 'nsubseteqq': '\\u2AC5\\u0338',\n 'nsup': '\\u2285',\n 'nsupE': '\\u2AC6\\u0338',\n 'nsupseteqq': '\\u2AC6\\u0338',\n 'ntilde': '\\u00F1',\n 'nu': '\\u03BD',\n 'num': '\\u0023',\n 'numero': '\\u2116',\n 'numsp': '\\u2007',\n 'nvDash': '\\u22AD',\n 'nvHarr': '\\u2904',\n 'nvap': '\\u224D\\u20D2',\n 'nvdash': '\\u22AC',\n 'nvge': '\\u2265\\u20D2',\n 'nvgt': '\\u003E\\u20D2',\n 'nvinfin': '\\u29DE',\n 'nvlArr': '\\u2902',\n 'nvle': '\\u2264\\u20D2',\n 'nvlt': '\\u003C\\u20D2',\n 'nvltrie': '\\u22B4\\u20D2',\n 'nvrArr': '\\u2903',\n 'nvrtrie': '\\u22B5\\u20D2',\n 'nvsim': '\\u223C\\u20D2',\n 'nwArr': '\\u21D6',\n 'nwarhk': '\\u2923',\n 'nwnear': '\\u2927',\n 'oacute': '\\u00F3',\n 'ocirc': '\\u00F4',\n 'ocy': '\\u043E',\n 'odblac': '\\u0151',\n 'odiv': '\\u2A38',\n 'odsold': '\\u29BC',\n 'oelig': '\\u0153',\n 'ofcir': '\\u29BF',\n 'ofr': '\\uD835\\uDD2C',\n 'ogon': '\\u02DB',\n 'ograve': '\\u00F2',\n 'ogt': '\\u29C1',\n 'ohbar': '\\u29B5',\n 'olcir': '\\u29BE',\n 'olcross': '\\u29BB',\n 'olt': '\\u29C0',\n 'omacr': '\\u014D',\n 'omega': '\\u03C9',\n 'omicron': '\\u03BF',\n 'omid': '\\u29B6',\n 'oopf': '\\uD835\\uDD60',\n 'opar': '\\u29B7',\n 'operp': '\\u29B9',\n 'or': '\\u2228',\n 'vee': '\\u2228',\n 'ord': '\\u2A5D',\n 'order': '\\u2134',\n 'orderof': '\\u2134',\n 'oscr': '\\u2134',\n 'ordf': '\\u00AA',\n 'ordm': '\\u00BA',\n 'origof': '\\u22B6',\n 'oror': '\\u2A56',\n 'orslope': '\\u2A57',\n 'orv': '\\u2A5B',\n 'oslash': '\\u00F8',\n 'osol': '\\u2298',\n 'otilde': '\\u00F5',\n 'otimesas': '\\u2A36',\n 'ouml': '\\u00F6',\n 'ovbar': '\\u233D',\n 'para': '\\u00B6',\n 'parsim': '\\u2AF3',\n 'parsl': '\\u2AFD',\n 'pcy': '\\u043F',\n 'percnt': '\\u0025',\n 'period': '\\u002E',\n 'permil': '\\u2030',\n 'pertenk': '\\u2031',\n 'pfr': '\\uD835\\uDD2D',\n 'phi': '\\u03C6',\n 'phiv': '\\u03D5',\n 'straightphi': '\\u03D5',\n 'varphi': '\\u03D5',\n 'phone': '\\u260E',\n 'pi': '\\u03C0',\n 'piv': '\\u03D6',\n 'varpi': '\\u03D6',\n 'planckh': '\\u210E',\n 'plus': '\\u002B',\n 'plusacir': '\\u2A23',\n 'pluscir': '\\u2A22',\n 'plusdu': '\\u2A25',\n 'pluse': '\\u2A72',\n 'plussim': '\\u2A26',\n 'plustwo': '\\u2A27',\n 'pointint': '\\u2A15',\n 'popf': '\\uD835\\uDD61',\n 'pound': '\\u00A3',\n 'prE': '\\u2AB3',\n 'prap': '\\u2AB7',\n 'precapprox': '\\u2AB7',\n 'precnapprox': '\\u2AB9',\n 'prnap': '\\u2AB9',\n 'precneqq': '\\u2AB5',\n 'prnE': '\\u2AB5',\n 'precnsim': '\\u22E8',\n 'prnsim': '\\u22E8',\n 'prime': '\\u2032',\n 'profalar': '\\u232E',\n 'profline': '\\u2312',\n 'profsurf': '\\u2313',\n 'prurel': '\\u22B0',\n 'pscr': '\\uD835\\uDCC5',\n 'psi': '\\u03C8',\n 'puncsp': '\\u2008',\n 'qfr': '\\uD835\\uDD2E',\n 'qopf': '\\uD835\\uDD62',\n 'qprime': '\\u2057',\n 'qscr': '\\uD835\\uDCC6',\n 'quatint': '\\u2A16',\n 'quest': '\\u003F',\n 'rAtail': '\\u291C',\n 'rHar': '\\u2964',\n 'race': '\\u223D\\u0331',\n 'racute': '\\u0155',\n 'raemptyv': '\\u29B3',\n 'rangd': '\\u2992',\n 'range': '\\u29A5',\n 'raquo': '\\u00BB',\n 'rarrap': '\\u2975',\n 'rarrbfs': '\\u2920',\n 'rarrc': '\\u2933',\n 'rarrfs': '\\u291E',\n 'rarrpl': '\\u2945',\n 'rarrsim': '\\u2974',\n 'rarrtl': '\\u21A3',\n 'rightarrowtail': '\\u21A3',\n 'rarrw': '\\u219D',\n 'rightsquigarrow': '\\u219D',\n 'ratail': '\\u291A',\n 'ratio': '\\u2236',\n 'rbbrk': '\\u2773',\n 'rbrace': '\\u007D',\n 'rcub': '\\u007D',\n 'rbrack': '\\u005D',\n 'rsqb': '\\u005D',\n 'rbrke': '\\u298C',\n 'rbrksld': '\\u298E',\n 'rbrkslu': '\\u2990',\n 'rcaron': '\\u0159',\n 'rcedil': '\\u0157',\n 'rcy': '\\u0440',\n 'rdca': '\\u2937',\n 'rdldhar': '\\u2969',\n 'rdsh': '\\u21B3',\n 'rect': '\\u25AD',\n 'rfisht': '\\u297D',\n 'rfr': '\\uD835\\uDD2F',\n 'rharul': '\\u296C',\n 'rho': '\\u03C1',\n 'rhov': '\\u03F1',\n 'varrho': '\\u03F1',\n 'rightrightarrows': '\\u21C9',\n 'rrarr': '\\u21C9',\n 'rightthreetimes': '\\u22CC',\n 'rthree': '\\u22CC',\n 'ring': '\\u02DA',\n 'rlm': '\\u200F',\n 'rmoust': '\\u23B1',\n 'rmoustache': '\\u23B1',\n 'rnmid': '\\u2AEE',\n 'roang': '\\u27ED',\n 'roarr': '\\u21FE',\n 'ropar': '\\u2986',\n 'ropf': '\\uD835\\uDD63',\n 'roplus': '\\u2A2E',\n 'rotimes': '\\u2A35',\n 'rpar': '\\u0029',\n 'rpargt': '\\u2994',\n 'rppolint': '\\u2A12',\n 'rsaquo': '\\u203A',\n 'rscr': '\\uD835\\uDCC7',\n 'rtimes': '\\u22CA',\n 'rtri': '\\u25B9',\n 'triangleright': '\\u25B9',\n 'rtriltri': '\\u29CE',\n 'ruluhar': '\\u2968',\n 'rx': '\\u211E',\n 'sacute': '\\u015B',\n 'scE': '\\u2AB4',\n 'scap': '\\u2AB8',\n 'succapprox': '\\u2AB8',\n 'scaron': '\\u0161',\n 'scedil': '\\u015F',\n 'scirc': '\\u015D',\n 'scnE': '\\u2AB6',\n 'succneqq': '\\u2AB6',\n 'scnap': '\\u2ABA',\n 'succnapprox': '\\u2ABA',\n 'scnsim': '\\u22E9',\n 'succnsim': '\\u22E9',\n 'scpolint': '\\u2A13',\n 'scy': '\\u0441',\n 'sdot': '\\u22C5',\n 'sdote': '\\u2A66',\n 'seArr': '\\u21D8',\n 'sect': '\\u00A7',\n 'semi': '\\u003B',\n 'seswar': '\\u2929',\n 'tosa': '\\u2929',\n 'sext': '\\u2736',\n 'sfr': '\\uD835\\uDD30',\n 'sharp': '\\u266F',\n 'shchcy': '\\u0449',\n 'shcy': '\\u0448',\n 'shy': '\\u00AD',\n 'sigma': '\\u03C3',\n 'sigmaf': '\\u03C2',\n 'sigmav': '\\u03C2',\n 'varsigma': '\\u03C2',\n 'simdot': '\\u2A6A',\n 'simg': '\\u2A9E',\n 'simgE': '\\u2AA0',\n 'siml': '\\u2A9D',\n 'simlE': '\\u2A9F',\n 'simne': '\\u2246',\n 'simplus': '\\u2A24',\n 'simrarr': '\\u2972',\n 'smashp': '\\u2A33',\n 'smeparsl': '\\u29E4',\n 'smile': '\\u2323',\n 'ssmile': '\\u2323',\n 'smt': '\\u2AAA',\n 'smte': '\\u2AAC',\n 'smtes': '\\u2AAC\\uFE00',\n 'softcy': '\\u044C',\n 'sol': '\\u002F',\n 'solb': '\\u29C4',\n 'solbar': '\\u233F',\n 'sopf': '\\uD835\\uDD64',\n 'spades': '\\u2660',\n 'spadesuit': '\\u2660',\n 'sqcaps': '\\u2293\\uFE00',\n 'sqcups': '\\u2294\\uFE00',\n 'sscr': '\\uD835\\uDCC8',\n 'star': '\\u2606',\n 'sub': '\\u2282',\n 'subset': '\\u2282',\n 'subE': '\\u2AC5',\n 'subseteqq': '\\u2AC5',\n 'subdot': '\\u2ABD',\n 'subedot': '\\u2AC3',\n 'submult': '\\u2AC1',\n 'subnE': '\\u2ACB',\n 'subsetneqq': '\\u2ACB',\n 'subne': '\\u228A',\n 'subsetneq': '\\u228A',\n 'subplus': '\\u2ABF',\n 'subrarr': '\\u2979',\n 'subsim': '\\u2AC7',\n 'subsub': '\\u2AD5',\n 'subsup': '\\u2AD3',\n 'sung': '\\u266A',\n 'sup1': '\\u00B9',\n 'sup2': '\\u00B2',\n 'sup3': '\\u00B3',\n 'supE': '\\u2AC6',\n 'supseteqq': '\\u2AC6',\n 'supdot': '\\u2ABE',\n 'supdsub': '\\u2AD8',\n 'supedot': '\\u2AC4',\n 'suphsol': '\\u27C9',\n 'suphsub': '\\u2AD7',\n 'suplarr': '\\u297B',\n 'supmult': '\\u2AC2',\n 'supnE': '\\u2ACC',\n 'supsetneqq': '\\u2ACC',\n 'supne': '\\u228B',\n 'supsetneq': '\\u228B',\n 'supplus': '\\u2AC0',\n 'supsim': '\\u2AC8',\n 'supsub': '\\u2AD4',\n 'supsup': '\\u2AD6',\n 'swArr': '\\u21D9',\n 'swnwar': '\\u292A',\n 'szlig': '\\u00DF',\n 'target': '\\u2316',\n 'tau': '\\u03C4',\n 'tcaron': '\\u0165',\n 'tcedil': '\\u0163',\n 'tcy': '\\u0442',\n 'telrec': '\\u2315',\n 'tfr': '\\uD835\\uDD31',\n 'theta': '\\u03B8',\n 'thetasym': '\\u03D1',\n 'thetav': '\\u03D1',\n 'vartheta': '\\u03D1',\n 'thorn': '\\u00FE',\n 'times': '\\u00D7',\n 'timesbar': '\\u2A31',\n 'timesd': '\\u2A30',\n 'topbot': '\\u2336',\n 'topcir': '\\u2AF1',\n 'topf': '\\uD835\\uDD65',\n 'topfork': '\\u2ADA',\n 'tprime': '\\u2034',\n 'triangle': '\\u25B5',\n 'utri': '\\u25B5',\n 'triangleq': '\\u225C',\n 'trie': '\\u225C',\n 'tridot': '\\u25EC',\n 'triminus': '\\u2A3A',\n 'triplus': '\\u2A39',\n 'trisb': '\\u29CD',\n 'tritime': '\\u2A3B',\n 'trpezium': '\\u23E2',\n 'tscr': '\\uD835\\uDCC9',\n 'tscy': '\\u0446',\n 'tshcy': '\\u045B',\n 'tstrok': '\\u0167',\n 'uHar': '\\u2963',\n 'uacute': '\\u00FA',\n 'ubrcy': '\\u045E',\n 'ubreve': '\\u016D',\n 'ucirc': '\\u00FB',\n 'ucy': '\\u0443',\n 'udblac': '\\u0171',\n 'ufisht': '\\u297E',\n 'ufr': '\\uD835\\uDD32',\n 'ugrave': '\\u00F9',\n 'uhblk': '\\u2580',\n 'ulcorn': '\\u231C',\n 'ulcorner': '\\u231C',\n 'ulcrop': '\\u230F',\n 'ultri': '\\u25F8',\n 'umacr': '\\u016B',\n 'uogon': '\\u0173',\n 'uopf': '\\uD835\\uDD66',\n 'upsi': '\\u03C5',\n 'upsilon': '\\u03C5',\n 'upuparrows': '\\u21C8',\n 'uuarr': '\\u21C8',\n 'urcorn': '\\u231D',\n 'urcorner': '\\u231D',\n 'urcrop': '\\u230E',\n 'uring': '\\u016F',\n 'urtri': '\\u25F9',\n 'uscr': '\\uD835\\uDCCA',\n 'utdot': '\\u22F0',\n 'utilde': '\\u0169',\n 'uuml': '\\u00FC',\n 'uwangle': '\\u29A7',\n 'vBar': '\\u2AE8',\n 'vBarv': '\\u2AE9',\n 'vangrt': '\\u299C',\n 'varsubsetneq': '\\u228A\\uFE00',\n 'vsubne': '\\u228A\\uFE00',\n 'varsubsetneqq': '\\u2ACB\\uFE00',\n 'vsubnE': '\\u2ACB\\uFE00',\n 'varsupsetneq': '\\u228B\\uFE00',\n 'vsupne': '\\u228B\\uFE00',\n 'varsupsetneqq': '\\u2ACC\\uFE00',\n 'vsupnE': '\\u2ACC\\uFE00',\n 'vcy': '\\u0432',\n 'veebar': '\\u22BB',\n 'veeeq': '\\u225A',\n 'vellip': '\\u22EE',\n 'vfr': '\\uD835\\uDD33',\n 'vopf': '\\uD835\\uDD67',\n 'vscr': '\\uD835\\uDCCB',\n 'vzigzag': '\\u299A',\n 'wcirc': '\\u0175',\n 'wedbar': '\\u2A5F',\n 'wedgeq': '\\u2259',\n 'weierp': '\\u2118',\n 'wp': '\\u2118',\n 'wfr': '\\uD835\\uDD34',\n 'wopf': '\\uD835\\uDD68',\n 'wscr': '\\uD835\\uDCCC',\n 'xfr': '\\uD835\\uDD35',\n 'xi': '\\u03BE',\n 'xnis': '\\u22FB',\n 'xopf': '\\uD835\\uDD69',\n 'xscr': '\\uD835\\uDCCD',\n 'yacute': '\\u00FD',\n 'yacy': '\\u044F',\n 'ycirc': '\\u0177',\n 'ycy': '\\u044B',\n 'yen': '\\u00A5',\n 'yfr': '\\uD835\\uDD36',\n 'yicy': '\\u0457',\n 'yopf': '\\uD835\\uDD6A',\n 'yscr': '\\uD835\\uDCCE',\n 'yucy': '\\u044E',\n 'yuml': '\\u00FF',\n 'zacute': '\\u017A',\n 'zcaron': '\\u017E',\n 'zcy': '\\u0437',\n 'zdot': '\\u017C',\n 'zeta': '\\u03B6',\n 'zfr': '\\uD835\\uDD37',\n 'zhcy': '\\u0436',\n 'zigrarr': '\\u21DD',\n 'zopf': '\\uD835\\uDD6B',\n 'zscr': '\\uD835\\uDCCF',\n 'zwj': '\\u200D',\n 'zwnj': '\\u200C'\n};\n// The &ngsp; pseudo-entity is denoting a space.\n// 0xE500 is a PUA (Private Use Areas) unicode character\n// This is inspired by the Angular Dart implementation.\nconst NGSP_UNICODE = '\\uE500';\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\nclass TokenError extends ParseError {\n constructor(errorMsg, tokenType, span) {\n super(span, errorMsg);\n this.tokenType = tokenType;\n }\n}\nclass TokenizeResult {\n constructor(tokens, errors, nonNormalizedIcuExpressions) {\n this.tokens = tokens;\n this.errors = errors;\n this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;\n }\n}\nfunction tokenize(source, url, getTagDefinition, options = {}) {\n const tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options);\n tokenizer.tokenize();\n return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);\n}\nconst _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\nfunction _unexpectedCharacterErrorMsg(charCode) {\n const char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n return `Unexpected character \"${char}\"`;\n}\nfunction _unknownEntityErrorMsg(entitySrc) {\n return `Unknown entity \"${entitySrc}\" - use the \"&#<decimal>;\" or \"&#x<hex>;\" syntax`;\n}\nfunction _unparsableEntityErrorMsg(type, entityStr) {\n return `Unable to parse entity \"${entityStr}\" - ${type} character reference entities must end with \";\"`;\n}\nvar CharacterReferenceType;\n(function (CharacterReferenceType) {\n CharacterReferenceType[\"HEX\"] = \"hexadecimal\";\n CharacterReferenceType[\"DEC\"] = \"decimal\";\n})(CharacterReferenceType || (CharacterReferenceType = {}));\nclass _ControlFlowError {\n constructor(error) {\n this.error = error;\n }\n}\n// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents\nclass _Tokenizer {\n /**\n * @param _file The html source file being tokenized.\n * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.\n * @param options Configuration of the tokenization.\n */\n constructor(_file, _getTagDefinition, options) {\n this._getTagDefinition = _getTagDefinition;\n this._currentTokenStart = null;\n this._currentTokenType = null;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this.nonNormalizedIcuExpressions = [];\n this._tokenizeIcu = options.tokenizeExpansionForms || false;\n this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n this._leadingTriviaCodePoints = options.leadingTriviaChars && options.leadingTriviaChars.map(c => c.codePointAt(0) || 0);\n const range = options.range || {\n endPos: _file.content.length,\n startPos: 0,\n startLine: 0,\n startCol: 0\n };\n this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) : new PlainCharacterCursor(_file, range);\n this._preserveLineEndings = options.preserveLineEndings || false;\n this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;\n this._tokenizeBlocks = options.tokenizeBlocks || false;\n try {\n this._cursor.init();\n } catch (e) {\n this.handleError(e);\n }\n }\n _processCarriageReturns(content) {\n if (this._preserveLineEndings) {\n return content;\n }\n // https://www.w3.org/TR/html51/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 tokenize() {\n while (this._cursor.peek() !== $EOF) {\n const start = this._cursor.clone();\n try {\n if (this._attemptCharCode($LT)) {\n if (this._attemptCharCode($BANG)) {\n if (this._attemptCharCode($LBRACKET)) {\n this._consumeCdata(start);\n } else if (this._attemptCharCode($MINUS)) {\n this._consumeComment(start);\n } else {\n this._consumeDocType(start);\n }\n } else if (this._attemptCharCode($SLASH)) {\n this._consumeTagClose(start);\n } else {\n this._consumeTagOpen(start);\n }\n } else if (this._tokenizeBlocks && this._attemptStr('{#')) {\n this._consumeBlockGroupOpen(start);\n } else if (this._tokenizeBlocks && this._attemptStr('{/')) {\n this._consumeBlockGroupClose(start);\n } else if (this._tokenizeBlocks && this._attemptStr('{:')) {\n this._consumeBlock(start);\n } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while\n // the premature end of an interpolation is given by the start of a new HTML element.\n this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());\n }\n } catch (e) {\n this.handleError(e);\n }\n }\n this._beginToken(24 /* TokenType.EOF */);\n this._endToken([]);\n }\n _consumeBlockGroupOpen(start) {\n this._beginToken(25 /* TokenType.BLOCK_GROUP_OPEN_START */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n this._endToken([this._cursor.getChars(nameCursor)]);\n this._consumeBlockParameters();\n this._beginToken(26 /* TokenType.BLOCK_GROUP_OPEN_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n }\n _consumeBlockGroupClose(start) {\n this._beginToken(27 /* TokenType.BLOCK_GROUP_CLOSE */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n const name = this._cursor.getChars(nameCursor);\n this._requireCharCode($RBRACE);\n this._endToken([name]);\n }\n _consumeBlock(start) {\n this._beginToken(29 /* TokenType.BLOCK_OPEN_START */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n this._endToken([this._cursor.getChars(nameCursor)]);\n this._consumeBlockParameters();\n this._beginToken(30 /* TokenType.BLOCK_OPEN_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n }\n _consumeBlockParameters() {\n // Trim the whitespace until the first parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n while (this._cursor.peek() !== $RBRACE && this._cursor.peek() !== $EOF) {\n this._beginToken(28 /* TokenType.BLOCK_PARAMETER */);\n const start = this._cursor.clone();\n let inQuote = null;\n let openBraces = 0;\n // Consume the parameter until the next semicolon or brace.\n // Note that we skip over semicolons/braces inside of strings.\n while (this._cursor.peek() !== $SEMICOLON && this._cursor.peek() !== $EOF || inQuote !== null) {\n const char = this._cursor.peek();\n // Skip to the next character if it was escaped.\n if (char === $BACKSLASH) {\n this._cursor.advance();\n } else if (char === inQuote) {\n inQuote = null;\n } else if (inQuote === null && isQuote(char)) {\n inQuote = char;\n } else if (char === $LBRACE && inQuote === null) {\n openBraces++;\n } else if (char === $RBRACE && inQuote === null) {\n if (openBraces === 0) {\n break;\n } else if (openBraces > 0) {\n openBraces--;\n }\n }\n this._cursor.advance();\n }\n this._endToken([this._cursor.getChars(start)]);\n // Skip to the next parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n }\n }\n /**\n * @returns whether an ICU token has been created\n * @internal\n */\n _tokenizeExpansionForm() {\n if (this.isExpansionFormStart()) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._cursor.peek() === $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 _beginToken(type, start = this._cursor.clone()) {\n this._currentTokenStart = start;\n this._currentTokenType = type;\n }\n _endToken(parts, end) {\n if (this._currentTokenStart === null) {\n throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));\n }\n if (this._currentTokenType === null) {\n throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));\n }\n const token = {\n type: this._currentTokenType,\n parts,\n sourceSpan: (end ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints)\n };\n this.tokens.push(token);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return token;\n }\n _createError(msg, span) {\n if (this._isInExpansionForm()) {\n msg += ` (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)`;\n }\n const error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return new _ControlFlowError(error);\n }\n handleError(e) {\n if (e instanceof CursorError) {\n e = this._createError(e.msg, this._cursor.getSpan(e.cursor));\n }\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n } else {\n throw e;\n }\n }\n _attemptCharCode(charCode) {\n if (this._cursor.peek() === charCode) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _attemptCharCodeCaseInsensitive(charCode) {\n if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _requireCharCode(charCode) {\n const location = this._cursor.clone();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptStr(chars) {\n const len = chars.length;\n if (this._cursor.charsLeft() < len) {\n return false;\n }\n const initialPosition = this._cursor.clone();\n for (let 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._cursor = initialPosition;\n return false;\n }\n }\n return true;\n }\n _attemptStrCaseInsensitive(chars) {\n for (let i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n }\n _requireStr(chars) {\n const location = this._cursor.clone();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptCharCodeUntilFn(predicate) {\n while (!predicate(this._cursor.peek())) {\n this._cursor.advance();\n }\n }\n _requireCharCodeUntilFn(predicate, len) {\n const start = this._cursor.clone();\n this._attemptCharCodeUntilFn(predicate);\n if (this._cursor.diff(start) < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n }\n _attemptUntilChar(char) {\n while (this._cursor.peek() !== char) {\n this._cursor.advance();\n }\n }\n _readChar() {\n // Don't rely upon reading directly from `_input` as the actual char value\n // may have been generated from an escape sequence.\n const char = String.fromCodePoint(this._cursor.peek());\n this._cursor.advance();\n return char;\n }\n _consumeEntity(textTokenType) {\n this._beginToken(9 /* TokenType.ENCODED_ENTITY */);\n const start = this._cursor.clone();\n this._cursor.advance();\n if (this._attemptCharCode($HASH)) {\n const isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n const codeStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // Advance cursor to include the peeked character in the string provided to the error\n // message.\n this._cursor.advance();\n const entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;\n throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());\n }\n const strNum = this._cursor.getChars(codeStart);\n this._cursor.advance();\n try {\n const charCode = parseInt(strNum, isHex ? 16 : 10);\n this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]);\n } catch {\n throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());\n }\n } else {\n const nameStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // No semicolon was found so abort the encoded entity token that was in progress, and treat\n // this as a text token\n this._beginToken(textTokenType, start);\n this._cursor = nameStart;\n this._endToken(['&']);\n } else {\n const name = this._cursor.getChars(nameStart);\n this._cursor.advance();\n const char = NAMED_ENTITIES[name];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));\n }\n this._endToken([char, `&${name};`]);\n }\n }\n }\n _consumeRawText(consumeEntities, endMarkerPredicate) {\n this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */);\n const parts = [];\n while (true) {\n const tagCloseStart = this._cursor.clone();\n const foundEndMarker = endMarkerPredicate();\n this._cursor = tagCloseStart;\n if (foundEndMarker) {\n break;\n }\n if (consumeEntities && this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n } else {\n parts.push(this._readChar());\n }\n }\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n _consumeComment(start) {\n this._beginToken(10 /* TokenType.COMMENT_START */, start);\n this._requireCharCode($MINUS);\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr('-->'));\n this._beginToken(11 /* TokenType.COMMENT_END */);\n this._requireStr('-->');\n this._endToken([]);\n }\n _consumeCdata(start) {\n this._beginToken(12 /* TokenType.CDATA_START */, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr(']]>'));\n this._beginToken(13 /* TokenType.CDATA_END */);\n this._requireStr(']]>');\n this._endToken([]);\n }\n _consumeDocType(start) {\n this._beginToken(18 /* TokenType.DOC_TYPE */, start);\n const contentStart = this._cursor.clone();\n this._attemptUntilChar($GT);\n const content = this._cursor.getChars(contentStart);\n this._cursor.advance();\n this._endToken([content]);\n }\n _consumePrefixAndName() {\n const nameOrPrefixStart = this._cursor.clone();\n let prefix = '';\n while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) {\n this._cursor.advance();\n }\n let nameStart;\n if (this._cursor.peek() === $COLON) {\n prefix = this._cursor.getChars(nameOrPrefixStart);\n this._cursor.advance();\n nameStart = this._cursor.clone();\n } else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);\n const name = this._cursor.getChars(nameStart);\n return [prefix, name];\n }\n _consumeTagOpen(start) {\n let tagName;\n let prefix;\n let openTagToken;\n try {\n if (!isAsciiLetter(this._cursor.peek())) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n openTagToken = this._consumeTagOpenStart(start);\n prefix = openTagToken.parts[0];\n tagName = openTagToken.parts[1];\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT && this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n } catch (e) {\n if (e instanceof _ControlFlowError) {\n if (openTagToken) {\n // We errored before we could close the opening tag, so it is incomplete.\n openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */;\n } else {\n // When the start tag is invalid, assume we want a \"<\" as text.\n // Back to back text tokens are merged at the end.\n this._beginToken(5 /* TokenType.TEXT */, start);\n this._endToken(['<']);\n }\n return;\n }\n throw e;\n }\n const contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, false);\n } else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, true);\n }\n }\n _consumeRawTextWithTagClose(prefix, tagName, consumeEntities) {\n this._consumeRawText(consumeEntities, () => {\n if (!this._attemptCharCode($LT)) return false;\n if (!this._attemptCharCode($SLASH)) return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!this._attemptStrCaseInsensitive(tagName)) return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n return this._attemptCharCode($GT);\n });\n this._beginToken(3 /* TokenType.TAG_CLOSE */);\n this._requireCharCodeUntilFn(code => code === $GT, 3);\n this._cursor.advance(); // Consume the `>`\n this._endToken([prefix, tagName]);\n }\n _consumeTagOpenStart(start) {\n this._beginToken(0 /* TokenType.TAG_OPEN_START */, start);\n const parts = this._consumePrefixAndName();\n return this._endToken(parts);\n }\n _consumeAttributeName() {\n const attrNameStart = this._cursor.peek();\n if (attrNameStart === $SQ || attrNameStart === $DQ) {\n throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());\n }\n this._beginToken(14 /* TokenType.ATTR_NAME */);\n const prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n }\n _consumeAttributeValue() {\n if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) {\n const quoteChar = this._cursor.peek();\n this._consumeQuote(quoteChar);\n // In an attribute then end of the attribute value and the premature end to an interpolation\n // are both triggered by the `quoteChar`.\n const endPredicate = () => this._cursor.peek() === quoteChar;\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n this._consumeQuote(quoteChar);\n } else {\n const endPredicate = () => isNameEnd(this._cursor.peek());\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n }\n }\n _consumeQuote(quoteChar) {\n this._beginToken(15 /* TokenType.ATTR_QUOTE */);\n this._requireCharCode(quoteChar);\n this._endToken([String.fromCodePoint(quoteChar)]);\n }\n _consumeTagOpenEnd() {\n const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */;\n this._beginToken(tokenType);\n this._requireCharCode($GT);\n this._endToken([]);\n }\n _consumeTagClose(start) {\n this._beginToken(3 /* TokenType.TAG_CLOSE */, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n const prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode($GT);\n this._endToken(prefixAndName);\n }\n _consumeExpansionFormStart() {\n this._beginToken(19 /* TokenType.EXPANSION_FORM_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const condition = this._readUntil($COMMA);\n const normalizedCondition = this._processCarriageReturns(condition);\n if (this._i18nNormalizeLineEndingsInICUs) {\n // We explicitly want to normalize line endings for this text.\n this._endToken([normalizedCondition]);\n } else {\n // We are not normalizing line endings.\n const conditionToken = this._endToken([condition]);\n if (normalizedCondition !== condition) {\n this.nonNormalizedIcuExpressions.push(conditionToken);\n }\n }\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const type = this._readUntil($COMMA);\n this._endToken([type]);\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n _consumeExpansionCaseStart() {\n this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */);\n const value = this._readUntil($LBRACE).trim();\n this._endToken([value]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n }\n _consumeExpansionCaseEnd() {\n this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n }\n _consumeExpansionFormEnd() {\n this._beginToken(23 /* TokenType.EXPANSION_FORM_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n }\n /**\n * Consume a string that may contain interpolation expressions.\n *\n * The first token consumed will be of `tokenType` and then there will be alternating\n * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true.\n *\n * If an interpolation token ends prematurely it will have no end marker in its `parts` array.\n *\n * @param textTokenType the kind of tokens to interleave around interpolation tokens.\n * @param interpolationTokenType the kind of tokens that contain interpolation.\n * @param endPredicate a function that should return true when we should stop consuming.\n * @param endInterpolation a function that should return true if there is a premature end to an\n * interpolation expression - i.e. before we get to the normal interpolation closing marker.\n */\n _consumeWithInterpolation(textTokenType, interpolationTokenType, endPredicate, endInterpolation) {\n this._beginToken(textTokenType);\n const parts = [];\n while (!endPredicate()) {\n const current = this._cursor.clone();\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n this._endToken([this._processCarriageReturns(parts.join(''))], current);\n parts.length = 0;\n this._consumeInterpolation(interpolationTokenType, current, endInterpolation);\n this._beginToken(textTokenType);\n } else if (this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(textTokenType);\n this._beginToken(textTokenType);\n } else {\n parts.push(this._readChar());\n }\n }\n // It is possible that an interpolation was started but not ended inside this text token.\n // Make sure that we reset the state of the lexer correctly.\n this._inInterpolation = false;\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n /**\n * Consume a block of text that has been interpreted as an Angular interpolation.\n *\n * @param interpolationTokenType the type of the interpolation token to generate.\n * @param interpolationStart a cursor that points to the start of this interpolation.\n * @param prematureEndPredicate a function that should return true if the next characters indicate\n * an end to the interpolation before its normal closing marker.\n */\n _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) {\n const parts = [];\n this._beginToken(interpolationTokenType, interpolationStart);\n parts.push(this._interpolationConfig.start);\n // Find the end of the interpolation, ignoring content inside quotes.\n const expressionStart = this._cursor.clone();\n let inQuote = null;\n let inComment = false;\n while (this._cursor.peek() !== $EOF && (prematureEndPredicate === null || !prematureEndPredicate())) {\n const current = this._cursor.clone();\n if (this._isTagStart()) {\n // We are starting what looks like an HTML element in the middle of this interpolation.\n // Reset the cursor to before the `<` character and end the interpolation token.\n // (This is actually wrong but here for backward compatibility).\n this._cursor = current;\n parts.push(this._getProcessedChars(expressionStart, current));\n this._endToken(parts);\n return;\n }\n if (inQuote === null) {\n if (this._attemptStr(this._interpolationConfig.end)) {\n // We are not in a string, and we hit the end interpolation marker\n parts.push(this._getProcessedChars(expressionStart, current));\n parts.push(this._interpolationConfig.end);\n this._endToken(parts);\n return;\n } else if (this._attemptStr('//')) {\n // Once we are in a comment we ignore any quotes\n inComment = true;\n }\n }\n const char = this._cursor.peek();\n this._cursor.advance();\n if (char === $BACKSLASH) {\n // Skip the next character because it was escaped.\n this._cursor.advance();\n } else if (char === inQuote) {\n // Exiting the current quoted string\n inQuote = null;\n } else if (!inComment && inQuote === null && isQuote(char)) {\n // Entering a new quoted string\n inQuote = char;\n }\n }\n // We hit EOF without finding a closing interpolation marker\n parts.push(this._getProcessedChars(expressionStart, this._cursor));\n this._endToken(parts);\n }\n _getProcessedChars(start, end) {\n return this._processCarriageReturns(end.getChars(start));\n }\n _isTextEnd() {\n if (this._isTagStart() || this._isBlockStart() || this._cursor.peek() === $EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (this.isExpansionFormStart()) {\n // start of an expansion form\n return true;\n }\n if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n }\n /**\n * Returns true if the current cursor is pointing to the start of a tag\n * (opening/closing/comments/cdata/etc).\n */\n _isTagStart() {\n if (this._cursor.peek() === $LT) {\n // We assume that `<` followed by whitespace is not the start of an HTML element.\n const tmp = this._cursor.clone();\n tmp.advance();\n // If the next character is alphabetic, ! nor / then it is a tag start\n const code = tmp.peek();\n if ($a <= code && code <= $z || $A <= code && code <= $Z || code === $SLASH || code === $BANG) {\n return true;\n }\n }\n return false;\n }\n _isBlockStart() {\n if (this._tokenizeBlocks && this._cursor.peek() === $LBRACE) {\n const tmp = this._cursor.clone();\n // Check that the cursor is on a `{#`, `{/` or `{:`.\n tmp.advance();\n const next = tmp.peek();\n if (next !== $BANG && next !== $SLASH && next !== $COLON) {\n return false;\n }\n // If it is, also verify that the next character is a valid block identifier.\n tmp.advance();\n if (isBlockNameChar(tmp.peek())) {\n return true;\n }\n }\n return false;\n }\n _readUntil(char) {\n const start = this._cursor.clone();\n this._attemptUntilChar(char);\n return this._cursor.getChars(start);\n }\n _isInExpansionCase() {\n return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 21 /* TokenType.EXPANSION_CASE_EXP_START */;\n }\n _isInExpansionForm() {\n return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 19 /* TokenType.EXPANSION_FORM_START */;\n }\n isExpansionFormStart() {\n if (this._cursor.peek() !== $LBRACE) {\n return false;\n }\n if (this._interpolationConfig) {\n const start = this._cursor.clone();\n const isInterpolation = this._attemptStr(this._interpolationConfig.start);\n this._cursor = start;\n return !isInterpolation;\n }\n return true;\n }\n}\nfunction isNotWhitespace(code) {\n return !isWhitespace(code) || code === $EOF;\n}\nfunction isNameEnd(code) {\n return isWhitespace(code) || code === $GT || code === $LT || code === $SLASH || code === $SQ || code === $DQ || code === $EQ || code === $EOF;\n}\nfunction isPrefixEnd(code) {\n return (code < $a || $z < code) && (code < $A || $Z < code) && (code < $0 || code > $9);\n}\nfunction isDigitEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiHexDigit(code);\n}\nfunction isNamedEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code);\n}\nfunction isExpansionCaseStart(peek) {\n return peek !== $RBRACE;\n}\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2);\n}\nfunction toUpperCaseCharCode(code) {\n return code >= $a && code <= $z ? code - $a + $A : code;\n}\nfunction isBlockNameChar(code) {\n return isAsciiLetter(code) || isDigit(code) || code === $_;\n}\nfunction isBlockParameterChar(code) {\n return code !== $SEMICOLON && isNotWhitespace(code);\n}\nfunction mergeTextTokens(srcTokens) {\n const dstTokens = [];\n let lastDstToken = undefined;\n for (let i = 0; i < srcTokens.length; i++) {\n const token = srcTokens[i];\n if (lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */ || lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ && token.type === 16 /* TokenType.ATTR_VALUE_TEXT */) {\n lastDstToken.parts[0] += token.parts[0];\n lastDstToken.sourceSpan.end = token.sourceSpan.end;\n } else {\n lastDstToken = token;\n dstTokens.push(lastDstToken);\n }\n }\n return dstTokens;\n}\nclass PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof PlainCharacterCursor) {\n this.file = fileOrCursor.file;\n this.input = fileOrCursor.input;\n this.end = fileOrCursor.end;\n const state = fileOrCursor.state;\n // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.\n // In ES5 bundles the object spread operator is translated into the `__assign` helper, which\n // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is\n // called in tight loops, this difference matters.\n this.state = {\n peek: state.peek,\n offset: state.offset,\n line: state.line,\n column: state.column\n };\n } else {\n if (!range) {\n throw new Error('Programming error: the range argument must be provided with a file argument.');\n }\n this.file = fileOrCursor;\n this.input = fileOrCursor.content;\n this.end = range.endPos;\n this.state = {\n peek: -1,\n offset: range.startPos,\n line: range.startLine,\n column: range.startCol\n };\n }\n }\n clone() {\n return new PlainCharacterCursor(this);\n }\n peek() {\n return this.state.peek;\n }\n charsLeft() {\n return this.end - this.state.offset;\n }\n diff(other) {\n return this.state.offset - other.state.offset;\n }\n advance() {\n this.advanceState(this.state);\n }\n init() {\n this.updatePeek(this.state);\n }\n getSpan(start, leadingTriviaCodePoints) {\n start = start || this;\n let fullStart = start;\n if (leadingTriviaCodePoints) {\n while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {\n if (fullStart === start) {\n start = start.clone();\n }\n start.advance();\n }\n }\n const startLocation = this.locationFromCursor(start);\n const endLocation = this.locationFromCursor(this);\n const fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;\n return new ParseSourceSpan(startLocation, endLocation, fullStartLocation);\n }\n getChars(start) {\n return this.input.substring(start.state.offset, this.state.offset);\n }\n charAt(pos) {\n return this.input.charCodeAt(pos);\n }\n advanceState(state) {\n if (state.offset >= this.end) {\n this.state = state;\n throw new CursorError('Unexpected character \"EOF\"', this);\n }\n const currentChar = this.charAt(state.offset);\n if (currentChar === $LF) {\n state.line++;\n state.column = 0;\n } else if (!isNewLine(currentChar)) {\n state.column++;\n }\n state.offset++;\n this.updatePeek(state);\n }\n updatePeek(state) {\n state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset);\n }\n locationFromCursor(cursor) {\n return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);\n }\n}\nclass EscapedCharacterCursor extends PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof EscapedCharacterCursor) {\n super(fileOrCursor);\n this.internalState = {\n ...fileOrCursor.internalState\n };\n } else {\n super(fileOrCursor, range);\n this.internalState = this.state;\n }\n }\n advance() {\n this.state = this.internalState;\n super.advance();\n this.processEscapeSequence();\n }\n init() {\n super.init();\n this.processEscapeSequence();\n }\n clone() {\n return new EscapedCharacterCursor(this);\n }\n getChars(start) {\n const cursor = start.clone();\n let chars = '';\n while (cursor.internalState.offset < this.internalState.offset) {\n chars += String.fromCodePoint(cursor.peek());\n cursor.advance();\n }\n return chars;\n }\n /**\n * Process the escape sequence that starts at the current position in the text.\n *\n * This method is called to ensure that `peek` has the unescaped value of escape sequences.\n */\n processEscapeSequence() {\n const peek = () => this.internalState.peek;\n if (peek() === $BACKSLASH) {\n // We have hit an escape sequence so we need the internal state to become independent\n // of the external state.\n this.internalState = {\n ...this.state\n };\n // Move past the backslash\n this.advanceState(this.internalState);\n // First check for standard control char sequences\n if (peek() === $n) {\n this.state.peek = $LF;\n } else if (peek() === $r) {\n this.state.peek = $CR;\n } else if (peek() === $v) {\n this.state.peek = $VTAB;\n } else if (peek() === $t) {\n this.state.peek = $TAB;\n } else if (peek() === $b) {\n this.state.peek = $BSPACE;\n } else if (peek() === $f) {\n this.state.peek = $FF;\n }\n // Now consider more complex sequences\n else if (peek() === $u) {\n // Unicode code-point sequence\n this.advanceState(this.internalState); // advance past the `u` char\n if (peek() === $LBRACE) {\n // Variable length Unicode, e.g. `\\x{123}`\n this.advanceState(this.internalState); // advance past the `{` char\n // Advance past the variable number of hex digits until we hit a `}` char\n const digitStart = this.clone();\n let length = 0;\n while (peek() !== $RBRACE) {\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = this.decodeHexDigits(digitStart, length);\n } else {\n // Fixed length Unicode, e.g. `\\u1234`\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 4);\n }\n } else if (peek() === $x) {\n // Hex char code, e.g. `\\x2F`\n this.advanceState(this.internalState); // advance past the `x` char\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 2);\n } else if (isOctalDigit(peek())) {\n // Octal char code, e.g. `\\012`,\n let octal = '';\n let length = 0;\n let previous = this.clone();\n while (isOctalDigit(peek()) && length < 3) {\n previous = this.clone();\n octal += String.fromCodePoint(peek());\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = parseInt(octal, 8);\n // Backup one char\n this.internalState = previous.internalState;\n } else if (isNewLine(this.internalState.peek)) {\n // Line continuation `\\` followed by a new line\n this.advanceState(this.internalState); // advance over the newline\n this.state = this.internalState;\n } else {\n // If none of the `if` blocks were executed then we just have an escaped normal character.\n // In that case we just, effectively, skip the backslash from the character.\n this.state.peek = this.internalState.peek;\n }\n }\n }\n decodeHexDigits(start, length) {\n const hex = this.input.slice(start.internalState.offset, start.internalState.offset + length);\n const charCode = parseInt(hex, 16);\n if (!isNaN(charCode)) {\n return charCode;\n } else {\n start.state = start.internalState;\n throw new CursorError('Invalid hexadecimal escape sequence', start);\n }\n }\n}\nclass CursorError {\n constructor(msg, cursor) {\n this.msg = msg;\n this.cursor = cursor;\n }\n}\nclass TreeError extends ParseError {\n static create(elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n }\n constructor(elementName, span, msg) {\n super(span, msg);\n this.elementName = elementName;\n }\n}\nclass ParseTreeResult {\n constructor(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n}\nclass Parser {\n constructor(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n parse(source, url, options) {\n const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);\n const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);\n parser.build();\n return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));\n }\n}\nclass _TreeBuilder {\n constructor(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._containerStack = [];\n this.rootNodes = [];\n this.errors = [];\n this._advance();\n }\n build() {\n while (this._peek.type !== 24 /* TokenType.EOF */) {\n if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ || this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n this._consumeStartTag(this._advance());\n } else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) {\n this._consumeEndTag(this._advance());\n } else if (this._peek.type === 12 /* TokenType.CDATA_START */) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n } else if (this._peek.type === 10 /* TokenType.COMMENT_START */) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n } else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ || this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n } else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) {\n this._consumeExpansion(this._advance());\n } else if (this._peek.type === 25 /* TokenType.BLOCK_GROUP_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlockGroupOpen(this._advance());\n } else if (this._peek.type === 29 /* TokenType.BLOCK_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlock(this._advance(), 30 /* TokenType.BLOCK_OPEN_END */);\n } else if (this._peek.type === 27 /* TokenType.BLOCK_GROUP_CLOSE */) {\n this._closeVoidElement();\n this._consumeBlockGroupClose(this._advance());\n } else {\n // Skip all other tokens...\n this._advance();\n }\n }\n }\n _advance() {\n const 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 _advanceIf(type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n }\n _consumeCdata(_startToken) {\n this._consumeText(this._advance());\n this._advanceIf(13 /* TokenType.CDATA_END */);\n }\n _consumeComment(token) {\n const text = this._advanceIf(7 /* TokenType.RAW_TEXT */);\n const endToken = this._advanceIf(11 /* TokenType.COMMENT_END */);\n const value = text != null ? text.parts[0].trim() : null;\n const sourceSpan = endToken == null ? token.sourceSpan : new ParseSourceSpan(token.sourceSpan.start, endToken.sourceSpan.end, token.sourceSpan.fullStart);\n this._addToParent(new Comment(value, sourceSpan));\n }\n _consumeExpansion(token) {\n const switchValue = this._advance();\n const type = this._advance();\n const cases = [];\n // read =\n while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) {\n const expCase = this._parseExpansionCase();\n if (!expCase) return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) {\n this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return;\n }\n const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);\n this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n }\n _parseExpansionCase() {\n const value = this._advance();\n // read {\n if (this._peek.type !== 21 /* 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 const start = this._advance();\n const exp = this._collectExpansionExpTokens(start);\n if (!exp) return null;\n const end = this._advance();\n exp.push({\n type: 24 /* TokenType.EOF */,\n parts: [],\n sourceSpan: end.sourceSpan\n });\n // parse everything in between { and }\n const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);\n expansionCaseParser.build();\n if (expansionCaseParser.errors.length > 0) {\n this.errors = this.errors.concat(expansionCaseParser.errors);\n return null;\n }\n const sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart);\n const expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart);\n return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n }\n _collectExpansionExpTokens(start) {\n const exp = [];\n const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */];\n while (true) {\n if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ || this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) {\n if (lastOnStack(expansionFormStack, 21 /* TokenType.EXPANSION_CASE_EXP_START */)) {\n expansionFormStack.pop();\n if (expansionFormStack.length === 0) return exp;\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 === 23 /* TokenType.EXPANSION_FORM_END */) {\n if (lastOnStack(expansionFormStack, 19 /* TokenType.EXPANSION_FORM_START */)) {\n expansionFormStack.pop();\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 === 24 /* 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 _consumeText(token) {\n const tokens = [token];\n const startSpan = token.sourceSpan;\n let text = token.parts[0];\n if (text.length > 0 && text[0] === '\\n') {\n const parent = this._getContainer();\n // This is unlikely to happen, but we have an assertion just in case.\n if (parent instanceof BlockGroup) {\n this.errors.push(TreeError.create(null, startSpan, 'Text cannot be placed directly inside of a block group.'));\n return null;\n }\n if (parent != null && parent.children.length === 0 && this.getTagDefinition(parent.name).ignoreFirstLf) {\n text = text.substring(1);\n tokens[0] = {\n type: token.type,\n sourceSpan: token.sourceSpan,\n parts: [text]\n };\n }\n }\n while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n token = this._advance();\n tokens.push(token);\n if (token.type === 8 /* TokenType.INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n } else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) {\n text += token.parts[0];\n } else {\n text += token.parts.join('');\n }\n }\n if (text.length > 0) {\n const endSpan = token.sourceSpan;\n this._addToParent(new Text(text, new ParseSourceSpan(startSpan.start, endSpan.end, startSpan.fullStart, startSpan.details), tokens));\n }\n }\n _closeVoidElement() {\n const el = this._getContainer();\n if (el instanceof Element && this.getTagDefinition(el.name).isVoid) {\n this._containerStack.pop();\n }\n }\n _consumeStartTag(startTagToken) {\n const [prefix, name] = startTagToken.parts;\n const attrs = [];\n while (this._peek.type === 14 /* TokenType.ATTR_NAME */) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n const fullName = this._getElementFullName(prefix, name, this._getClosestParentElement());\n let 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 === 2 /* TokenType.TAG_OPEN_END_VOID */) {\n this._advance();\n selfClosing = true;\n const tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed \"${startTagToken.parts[1]}\"`));\n }\n } else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) {\n this._advance();\n selfClosing = false;\n }\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n const el = new Element(fullName, attrs, [], span, startSpan, undefined);\n const parentEl = this._getContainer();\n this._pushContainer(el, parentEl instanceof Element && this.getTagDefinition(parentEl.name).isClosedByChild(el.name));\n if (selfClosing) {\n // Elements that are self-closed have their `endSourceSpan` set to the full span, as the\n // element start tag also represents the end tag.\n this._popContainer(fullName, Element, span);\n } else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n // We already know the opening tag is not complete, so it is unlikely it has a corresponding\n // close tag. Let's optimistically parse it as a full element and emit an error.\n this._popContainer(fullName, Element, null);\n this.errors.push(TreeError.create(fullName, span, `Opening tag \"${fullName}\" not terminated.`));\n }\n }\n _pushContainer(node, isClosedByChild) {\n if (isClosedByChild) {\n this._containerStack.pop();\n }\n this._addToParent(node);\n this._containerStack.push(node);\n }\n _consumeEndTag(endTagToken) {\n const fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getClosestParentElement());\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 } else if (!this._popContainer(fullName, Element, endTagToken.sourceSpan)) {\n const 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 * Closes the nearest element with the tag name `fullName` in the parse tree.\n * `endSourceSpan` is the span of the closing tag, or null if the element does\n * not have a closing tag (for example, this happens when an incomplete\n * opening tag is recovered).\n */\n _popContainer(fullName, expectedType, endSourceSpan) {\n let unexpectedCloseTagDetected = false;\n for (let stackIndex = this._containerStack.length - 1; stackIndex >= 0; stackIndex--) {\n const node = this._containerStack[stackIndex];\n const name = node instanceof BlockGroup ? node.blocks[0]?.name : node.name;\n if (name === fullName && node instanceof expectedType) {\n // Record the parse span with the element that is being closed. Any elements that are\n // removed from the element stack at this point are closed implicitly, so they won't get\n // an end source span (as there is no explicit closing element).\n node.endSourceSpan = endSourceSpan;\n node.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : node.sourceSpan.end;\n this._containerStack.splice(stackIndex, this._containerStack.length - stackIndex);\n return !unexpectedCloseTagDetected;\n }\n // Blocks are self-closing while block groups and (most times) elements are not.\n if (node instanceof BlockGroup || node instanceof Element && !this.getTagDefinition(node.name).closedByParent) {\n // Note that we encountered an unexpected close tag but continue processing the element\n // stack so we can assign an `endSourceSpan` if there is a corresponding start tag for this\n // end tag in the stack.\n unexpectedCloseTagDetected = true;\n }\n }\n return false;\n }\n _consumeAttr(attrName) {\n const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n let attrEnd = attrName.sourceSpan.end;\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n this._advance();\n }\n // Consume the attribute value\n let value = '';\n const valueTokens = [];\n let valueStartSpan = undefined;\n let valueEnd = undefined;\n // NOTE: We need to use a new variable `nextTokenType` here to hide the actual type of\n // `_peek.type` from TS. Otherwise TS will narrow the type of `_peek.type` preventing it from\n // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not\n // able to see that `_advance()` will actually mutate `_peek`.\n const nextTokenType = this._peek.type;\n if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) {\n valueStartSpan = this._peek.sourceSpan;\n valueEnd = this._peek.sourceSpan.end;\n while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ || this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ || this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n const valueToken = this._advance();\n valueTokens.push(valueToken);\n if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n } else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) {\n value += valueToken.parts[0];\n } else {\n value += valueToken.parts.join('');\n }\n valueEnd = attrEnd = valueToken.sourceSpan.end;\n }\n }\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n const quoteToken = this._advance();\n attrEnd = quoteToken.sourceSpan.end;\n }\n const valueSpan = valueStartSpan && valueEnd && new ParseSourceSpan(valueStartSpan.start, valueEnd, valueStartSpan.fullStart);\n return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, attrEnd, attrName.sourceSpan.fullStart), attrName.sourceSpan, valueSpan, valueTokens.length > 0 ? valueTokens : undefined, undefined);\n }\n _consumeBlockGroupOpen(token) {\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n const blockGroup = new BlockGroup([], span, startSpan, null);\n this._pushContainer(blockGroup, false);\n const implicitBlock = this._consumeBlock(token, 26 /* TokenType.BLOCK_GROUP_OPEN_END */);\n // Block parameters are consumed as a part of the implicit block so we need to expand the\n // start source span once the block is parsed to include the full opening tag.\n startSpan.end = implicitBlock.startSourceSpan.end;\n }\n _consumeBlock(token, closeToken) {\n // The start of a block implicitly closes the previous block.\n this._conditionallyClosePreviousBlock();\n const parameters = [];\n while (this._peek.type === 28 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\n }\n if (this._peek.type === closeToken) {\n this._advance();\n }\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n const block = new Block(token.parts[0], parameters, [], span, startSpan);\n const parent = this._getContainer();\n if (!(parent instanceof BlockGroup)) {\n this.errors.push(TreeError.create(block.name, block.sourceSpan, 'Blocks can only be placed inside of block groups.'));\n } else {\n parent.blocks.push(block);\n this._containerStack.push(block);\n }\n return block;\n }\n _consumeBlockGroupClose(token) {\n const name = token.parts[0];\n const previousContainer = this._getContainer();\n // Blocks are implcitly closed by the block group.\n this._conditionallyClosePreviousBlock();\n if (!this._popContainer(name, BlockGroup, token.sourceSpan)) {\n const context = previousContainer instanceof Element ? `There is an unclosed \"${previousContainer.name}\" HTML tag named that may have to be closed first.` : `The block may have been closed earlier.`;\n this.errors.push(TreeError.create(name, token.sourceSpan, `Unexpected closing block \"${name}\". ${context}`));\n }\n }\n _conditionallyClosePreviousBlock() {\n const container = this._getContainer();\n if (container instanceof Block) {\n // Blocks don't have an explicit closing tag, they're closed either by the next block or\n // the end of the block group. Infer the end span from the last child node.\n const lastChild = container.children.length ? container.children[container.children.length - 1] : null;\n const endSpan = lastChild === null ? null : new ParseSourceSpan(lastChild.sourceSpan.end, lastChild.sourceSpan.end);\n this._popContainer(container.name, Block, endSpan);\n }\n }\n _getContainer() {\n return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;\n }\n _getClosestParentElement() {\n for (let i = this._containerStack.length - 1; i > -1; i--) {\n if (this._containerStack[i] instanceof Element) {\n return this._containerStack[i];\n }\n }\n return null;\n }\n _addToParent(node) {\n const parent = this._getContainer();\n if (parent === null) {\n this.rootNodes.push(node);\n } else if (parent instanceof BlockGroup) {\n // Due to how parsing is set up, we're unlikely to hit this code path, but we\n // have the assertion here just in case and to satisfy the type checker.\n this.errors.push(TreeError.create(null, node.sourceSpan, 'Block groups can only contain blocks.'));\n } else {\n parent.children.push(node);\n }\n }\n _getElementFullName(prefix, localName, parentElement) {\n if (prefix === '') {\n prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';\n if (prefix === '' && parentElement != null) {\n const parentTagName = splitNsName(parentElement.name)[1];\n const parentTagDefinition = this.getTagDefinition(parentTagName);\n if (!parentTagDefinition.preventNamespaceInheritance) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n }\n return mergeNsAndName(prefix, localName);\n }\n}\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\n}\n/**\n * Decode the `entity` string, which we believe is the contents of an HTML entity.\n *\n * If the string is not actually a valid/known entity then just return the original `match` string.\n */\nfunction decodeEntity(match, entity) {\n if (NAMED_ENTITIES[entity] !== undefined) {\n return NAMED_ENTITIES[entity] || match;\n }\n if (/^#x[a-f0-9]+$/i.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(2), 16));\n }\n if (/^#\\d+$/.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(1), 10));\n }\n return match;\n}\nclass HtmlParser extends Parser {\n constructor() {\n super(getHtmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\n }\n}\nconst PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nconst 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\nconst WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nconst NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);\nconst WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, 'g');\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some(attr => attr.name === PRESERVE_WS_ATTR_NAME);\n}\n/**\n * &ngsp; is a placeholder for non-removable space\n * &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space.\n */\nfunction 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 */\nclass WhitespaceVisitor {\n visitElement(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 Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n return new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n visitAttribute(attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n }\n visitText(text, context) {\n const isNotBlank = text.value.match(NO_WS_REGEXP);\n const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);\n if (isNotBlank || hasExpansionSibling) {\n // Process the whitespace in the tokens of this Text node\n const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token);\n // Process the whitespace of the value of this Text node\n const value = processWhitespace(text.value);\n return new Text(value, text.sourceSpan, tokens, text.i18n);\n }\n return null;\n }\n visitComment(comment, context) {\n return comment;\n }\n visitExpansion(expansion, context) {\n return expansion;\n }\n visitExpansionCase(expansionCase, context) {\n return expansionCase;\n }\n visitBlockGroup(group, context) {\n return new BlockGroup(visitAllWithSiblings(this, group.blocks), group.sourceSpan, group.startSourceSpan, group.endSourceSpan);\n }\n visitBlock(block, context) {\n return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.startSourceSpan);\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n}\nfunction createWhitespaceProcessedTextToken({\n type,\n parts,\n sourceSpan\n}) {\n return {\n type,\n parts: [processWhitespace(parts[0])],\n sourceSpan\n };\n}\nfunction processWhitespace(text) {\n return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\nfunction removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\nfunction visitAllWithSiblings(visitor, nodes) {\n const result = [];\n nodes.forEach((ast, i) => {\n const context = {\n prev: nodes[i - 1],\n next: nodes[i + 1]\n };\n const astResult = ast.visit(visitor, context);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nfunction mapEntry(key, value) {\n return {\n key,\n value,\n quoted: false\n };\n}\nfunction mapLiteral(obj, quoted = false) {\n return literalMap(Object.keys(obj).map(key => ({\n key,\n quoted,\n value: obj[key]\n })));\n}\n\n/**\n * Set of tagName|propertyName corresponding to Trusted Types sinks. Properties applying to all\n * tags use '*'.\n *\n * Extracted from, and should be kept in sync with\n * https://w3c.github.io/webappsec-trusted-types/dist/spec/#integrations\n */\nconst TRUSTED_TYPES_SINKS = new Set([\n// NOTE: All strings in this set *must* be lowercase!\n// TrustedHTML\n'iframe|srcdoc', '*|innerhtml', '*|outerhtml',\n// NB: no TrustedScript here, as the corresponding tags are stripped by the compiler.\n// TrustedScriptURL\n'embed|src', 'object|codebase', 'object|data']);\n/**\n * isTrustedTypesSink returns true if the given property on the given DOM tag is a Trusted Types\n * sink. In that case, use `ElementSchemaRegistry.securityContext` to determine which particular\n * Trusted Type is required for values passed to the sink:\n * - SecurityContext.HTML corresponds to TrustedHTML\n * - SecurityContext.RESOURCE_URL corresponds to TrustedScriptURL\n */\nfunction isTrustedTypesSink(tagName, propName) {\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 return TRUSTED_TYPES_SINKS.has(tagName + '|' + propName) || TRUSTED_TYPES_SINKS.has('*|' + propName);\n}\nconst PROPERTY_PARTS_SEPARATOR = '.';\nconst ATTRIBUTE_PREFIX = 'attr';\nconst CLASS_PREFIX = 'class';\nconst STYLE_PREFIX = 'style';\nconst TEMPLATE_ATTR_PREFIX$1 = '*';\nconst ANIMATE_PROP_PREFIX = 'animate-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\nclass BindingParser {\n constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n }\n get interpolationConfig() {\n return this._interpolationConfig;\n }\n createBoundHostProperties(properties, sourceSpan) {\n const boundProps = [];\n for (const propName of Object.keys(properties)) {\n const expression = properties[propName];\n if (typeof expression === 'string') {\n this.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [],\n // Use the `sourceSpan` for `keySpan`. This isn't really accurate, but neither is the\n // sourceSpan, as it represents the sourceSpan of the host itself rather than the\n // source of the host binding (which doesn't exist in the template). Regardless,\n // neither of these values are used in Ivy but are only here to satisfy the function\n // signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n boundProps, sourceSpan);\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;\n }\n createDirectiveHostEventAsts(hostListeners, sourceSpan) {\n const targetEvents = [];\n for (const propName of Object.keys(hostListeners)) {\n const expression = hostListeners[propName];\n if (typeof expression === 'string') {\n // Use the `sourceSpan` for `keySpan` and `handlerSpan`. This isn't really accurate, but\n // neither is the `sourceSpan`, as it represents the `sourceSpan` of the host itself\n // rather than the source of the host binding (which doesn't exist in the template).\n // Regardless, neither of these values are used in Ivy but are only here to satisfy the\n // function signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n this.parseEvent(propName, expression, /* isAssignmentEvent */false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);\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 targetEvents;\n }\n parseInterpolation(value, sourceSpan, interpolatedTokens) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.fullStart.offset;\n try {\n const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);\n if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n } catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, sourceSpan) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.start.offset;\n try {\n const ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);\n if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n } catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, and converts them to\n * `ParsedProperty` or `ParsedVariable`.\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteValueOffset start of the tplValue relative to the entire template\n * @param targetMatchableAttrs potential attributes to match in the template\n * @param targetProps target property bindings in the template\n * @param targetVars target variables in the template\n */\n parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteValueOffset, targetMatchableAttrs, targetProps, targetVars, isIvyAst) {\n const absoluteKeyOffset = sourceSpan.start.offset + TEMPLATE_ATTR_PREFIX$1.length;\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);\n for (const binding of bindings) {\n // sourceSpan is for the entire HTML attribute. bindingSpan is for a particular\n // binding within the microsyntax expression so it's more narrow than sourceSpan.\n const bindingSpan = moveParseSourceSpan(sourceSpan, binding.sourceSpan);\n const key = binding.key.source;\n const keySpan = moveParseSourceSpan(sourceSpan, binding.key.span);\n if (binding instanceof VariableBinding) {\n const value = binding.value ? binding.value.source : '$implicit';\n const valueSpan = binding.value ? moveParseSourceSpan(sourceSpan, binding.value.span) : undefined;\n targetVars.push(new ParsedVariable(key, value, bindingSpan, keySpan, valueSpan));\n } else if (binding.value) {\n const srcSpan = isIvyAst ? bindingSpan : sourceSpan;\n const valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);\n this._parsePropertyAst(key, binding.value, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n } else {\n targetMatchableAttrs.push([key, '' /* value */]);\n // Since this is a literal attribute with no RHS, source span should be\n // just the key span.\n this.parseLiteralAttr(key, null /* value */, keySpan, absoluteValueOffset, undefined /* valueSpan */, targetMatchableAttrs, targetProps, keySpan);\n }\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, e.g.\n * ```\n * <tag *tplKey=\"let value1 = prop; let value2 = localVar\">\n * ```\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteKeyOffset start of the `tplKey`\n * @param absoluteValueOffset start of the `tplValue`\n */\n _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {\n const sourceInfo = sourceSpan.start.toString();\n try {\n const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.warnings.forEach(warning => {\n this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);\n });\n return bindingsResult.templateBindings;\n } catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return [];\n }\n }\n parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (isAnimationLabel(name)) {\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n if (value) {\n this._reportError(`Assigning animation triggers via @prop=\"exp\" attributes with an expression is invalid.` + ` 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, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n } else {\n targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));\n }\n }\n parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (name.length === 0) {\n this._reportError(`Property name is missing in binding`, sourceSpan);\n }\n let isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));\n }\n } else if (isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n } else {\n this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n }\n parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {\n const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n }\n _parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));\n }\n _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n if (name.length === 0) {\n this._reportError('Animation trigger is missing', sourceSpan);\n }\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 const ast = this.parseBinding(expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));\n }\n parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n try {\n const ast = isHostBinding ? this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n } catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {\n if (boundProp.isAnimation) {\n return new BoundElementProperty(boundProp.name, 4 /* BindingType.Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n let unit = null;\n let bindingType = undefined;\n let boundPropertyName = null;\n const parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n let securityContexts = undefined;\n // Check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts.slice(1).join(PROPERTY_PARTS_SEPARATOR);\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n }\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n const nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n const ns = boundPropertyName.substring(0, nsSeparatorIdx);\n const name = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name);\n }\n bindingType = 1 /* BindingType.Attribute */;\n } else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 2 /* BindingType.Class */;\n securityContexts = [SecurityContext.NONE];\n } else if (parts[0] == STYLE_PREFIX) {\n unit = parts.length > 2 ? parts[2] : null;\n boundPropertyName = parts[1];\n bindingType = 3 /* BindingType.Style */;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);\n boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);\n bindingType = 0 /* BindingType.Property */;\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);\n }\n }\n return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n // TODO: keySpan should be required but was made optional to avoid changing VE parser.\n parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n if (name.length === 0) {\n this._reportError(`Event name is missing in binding`, sourceSpan);\n }\n if (isAnimationLabel(name)) {\n name = name.slice(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n this._parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan);\n } else {\n this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);\n }\n }\n calcPossibleSecurityContexts(selector, propName, isAttribute) {\n const prop = this._schemaRegistry.getMappedPropName(propName);\n return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);\n }\n _parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan) {\n const matches = splitAtPeriod(name, [name, '']);\n const eventName = matches[0];\n const phase = matches[1].toLowerCase();\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 1 /* ParsedEventType.Animation */, ast, sourceSpan, handlerSpan, keySpan));\n if (eventName.length === 0) {\n this._reportError(`Animation event name is missing in binding`, sourceSpan);\n }\n if (phase) {\n if (phase !== 'start' && phase !== 'done') {\n this._reportError(`The provided animation output phase value \"${phase}\" for \"@${eventName}\" is not supported (use start or done)`, sourceSpan);\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 _parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n // long format: 'target: eventName'\n const [target, eventName] = splitAtColon(name, [null, name]);\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetEvents.push(new ParsedEvent(eventName, target, 0 /* ParsedEventType.Regular */, ast, sourceSpan, handlerSpan, keySpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n }\n _parseAction(value, isAssignmentEvent, sourceSpan) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;\n try {\n const ast = this._exprParser.parseAction(value, isAssignmentEvent, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr$1) {\n this._reportError(`Empty expressions are not allowed`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n return ast;\n } catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n _reportExpressionParserErrors(errors, sourceSpan) {\n for (const error of errors) {\n this._reportError(error.message, sourceSpan);\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 */\n _validatePropertyOrAttributeName(propName, sourceSpan, isAttr) {\n const report = isAttr ? this._schemaRegistry.validateAttribute(propName) : this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n }\n}\nclass PipeCollector extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.pipes = new Map();\n }\n visitPipe(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}\nfunction isAnimationLabel(name) {\n return name[0] == '@';\n}\nfunction calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n const ctxs = [];\n CssSelector.parse(selector).forEach(selector => {\n const elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n const notElementNames = new Set(selector.notSelectors.filter(selector => selector.isElementSelector()).map(selector => selector.element));\n const possibleElementNames = elementNames.filter(elementName => !notElementNames.has(elementName));\n ctxs.push(...possibleElementNames.map(elementName => registry.securityContext(elementName, propName, isAttribute)));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n/**\n * Compute a new ParseSourceSpan based off an original `sourceSpan` by using\n * absolute offsets from the specified `absoluteSpan`.\n *\n * @param sourceSpan original source span\n * @param absoluteSpan absolute source span to move to\n */\nfunction moveParseSourceSpan(sourceSpan, absoluteSpan) {\n // The difference of two absolute offsets provide the relative offset\n const startDiff = absoluteSpan.start - sourceSpan.start.offset;\n const endDiff = absoluteSpan.end - sourceSpan.end.offset;\n return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);\n}\n\n// Some of the code comes from WebComponents.JS\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/HTMLImports/path.js\nfunction isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/') return false;\n const schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\nconst URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\nconst NG_CONTENT_SELECT_ATTR$1 = 'select';\nconst LINK_ELEMENT = 'link';\nconst LINK_STYLE_REL_ATTR = 'rel';\nconst LINK_STYLE_HREF_ATTR = 'href';\nconst LINK_STYLE_REL_VALUE = 'stylesheet';\nconst STYLE_ELEMENT = 'style';\nconst SCRIPT_ELEMENT = 'script';\nconst NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nconst NG_PROJECT_AS = 'ngProjectAs';\nfunction preparseElement(ast) {\n let selectAttr = null;\n let hrefAttr = null;\n let relAttr = null;\n let nonBindable = false;\n let projectAs = '';\n ast.attrs.forEach(attr => {\n const lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR$1) {\n selectAttr = attr.value;\n } else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n hrefAttr = attr.value;\n } else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n relAttr = attr.value;\n } else if (attr.name == NG_NON_BINDABLE_ATTR) {\n nonBindable = true;\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 const nodeName = ast.name.toLowerCase();\n let type = PreparsedElementType.OTHER;\n if (isNgContent(nodeName)) {\n type = PreparsedElementType.NG_CONTENT;\n } else if (nodeName == STYLE_ELEMENT) {\n type = PreparsedElementType.STYLE;\n } else if (nodeName == SCRIPT_ELEMENT) {\n type = PreparsedElementType.SCRIPT;\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}\nvar PreparsedElementType;\n(function (PreparsedElementType) {\n PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n})(PreparsedElementType || (PreparsedElementType = {}));\nclass PreparsedElement {\n constructor(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}\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\n}\n\n/** Pattern for a timing value in a trigger. */\nconst TIME_PATTERN = /^\\d+(ms|s)?$/;\n/** Pattern for a separator between keywords in a trigger expression. */\nconst SEPARATOR_PATTERN = /^\\s$/;\n/** Pairs of characters that form syntax that is comma-delimited. */\nconst COMMA_DELIMITED_SYNTAX = new Map([[$LBRACE, $RBRACE], [$LBRACKET, $RBRACKET], [$LPAREN, $RPAREN] // Function calls\n]);\n/** Possible types of `on` triggers. */\nvar OnTriggerType;\n(function (OnTriggerType) {\n OnTriggerType[\"IDLE\"] = \"idle\";\n OnTriggerType[\"TIMER\"] = \"timer\";\n OnTriggerType[\"INTERACTION\"] = \"interaction\";\n OnTriggerType[\"IMMEDIATE\"] = \"immediate\";\n OnTriggerType[\"HOVER\"] = \"hover\";\n OnTriggerType[\"VIEWPORT\"] = \"viewport\";\n})(OnTriggerType || (OnTriggerType = {}));\n/** Parses a `when` deferred trigger. */\nfunction parseWhenTrigger({\n expression,\n sourceSpan\n}, bindingParser, errors) {\n const whenIndex = expression.indexOf('when');\n // This is here just to be safe, we shouldn't enter this function\n // in the first place if a block doesn't have the \"when\" keyword.\n if (whenIndex === -1) {\n errors.push(new ParseError(sourceSpan, `Could not find \"when\" keyword in expression`));\n return null;\n }\n const start = getTriggerParametersStart(expression, whenIndex + 1);\n const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);\n return new BoundDeferredTrigger(parsed, sourceSpan);\n}\n/** Parses an `on` trigger */\nfunction parseOnTrigger({\n expression,\n sourceSpan\n}, errors) {\n const onIndex = expression.indexOf('on');\n // This is here just to be safe, we shouldn't enter this function\n // in the first place if a block doesn't have the \"on\" keyword.\n if (onIndex === -1) {\n errors.push(new ParseError(sourceSpan, `Could not find \"on\" keyword in expression`));\n return [];\n }\n const start = getTriggerParametersStart(expression, onIndex + 1);\n return new OnTriggerParser(expression, start, sourceSpan, errors).parse();\n}\nclass OnTriggerParser {\n constructor(expression, start, span, errors) {\n this.expression = expression;\n this.start = start;\n this.span = span;\n this.errors = errors;\n this.index = 0;\n this.triggers = [];\n this.tokens = new Lexer().tokenize(expression.slice(start));\n }\n parse() {\n while (this.tokens.length > 0 && this.index < this.tokens.length) {\n const token = this.token();\n if (!token.isIdentifier()) {\n this.unexpectedToken(token);\n break;\n }\n // An identifier immediately followed by a comma or the end of\n // the expression cannot have parameters so we can exit early.\n if (this.isFollowedByOrLast($COMMA)) {\n this.consumeTrigger(token, []);\n this.advance();\n } else if (this.isFollowedByOrLast($LPAREN)) {\n this.advance(); // Advance to the opening paren.\n const prevErrors = this.errors.length;\n const parameters = this.consumeParameters();\n if (this.errors.length !== prevErrors) {\n break;\n }\n this.consumeTrigger(token, parameters);\n this.advance(); // Advance past the closing paren.\n } else if (this.index < this.tokens.length - 1) {\n this.unexpectedToken(this.tokens[this.index + 1]);\n }\n this.advance();\n }\n return this.triggers;\n }\n advance() {\n this.index++;\n }\n isFollowedByOrLast(char) {\n if (this.index === this.tokens.length - 1) {\n return true;\n }\n return this.tokens[this.index + 1].isCharacter(char);\n }\n token() {\n return this.tokens[Math.min(this.index, this.tokens.length - 1)];\n }\n consumeTrigger(identifier, parameters) {\n const startSpan = this.span.start.moveBy(this.start + identifier.index - this.tokens[0].index);\n const endSpan = startSpan.moveBy(this.token().end - identifier.index);\n const sourceSpan = new ParseSourceSpan(startSpan, endSpan);\n try {\n switch (identifier.toString()) {\n case OnTriggerType.IDLE:\n this.triggers.push(createIdleTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.TIMER:\n this.triggers.push(createTimerTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.INTERACTION:\n this.triggers.push(createInteractionTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.IMMEDIATE:\n this.triggers.push(createImmediateTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.HOVER:\n this.triggers.push(createHoverTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.VIEWPORT:\n this.triggers.push(createViewportTrigger(parameters, sourceSpan));\n break;\n default:\n throw new Error(`Unrecognized trigger type \"${identifier}\"`);\n }\n } catch (e) {\n this.error(identifier, e.message);\n }\n }\n consumeParameters() {\n const parameters = [];\n if (!this.token().isCharacter($LPAREN)) {\n this.unexpectedToken(this.token());\n return parameters;\n }\n this.advance();\n const commaDelimStack = [];\n let current = '';\n while (this.index < this.tokens.length) {\n const token = this.token();\n // Stop parsing if we've hit the end character and we're outside of a comma-delimited syntax.\n // Note that we don't need to account for strings here since the lexer already parsed them\n // into string tokens.\n if (token.isCharacter($RPAREN) && commaDelimStack.length === 0) {\n if (current.length) {\n parameters.push(current);\n }\n break;\n }\n // In the `on` microsyntax \"top-level\" commas (e.g. ones outside of an parameters) separate\n // the different triggers (e.g. `on idle,timer(500)`). This is problematic, because the\n // function-like syntax also implies that multiple parameters can be passed into the\n // individual trigger (e.g. `on foo(a, b)`). To avoid tripping up the parser with commas that\n // are part of other sorts of syntax (object literals, arrays), we treat anything inside\n // a comma-delimited syntax block as plain text.\n if (token.type === TokenType.Character && COMMA_DELIMITED_SYNTAX.has(token.numValue)) {\n commaDelimStack.push(COMMA_DELIMITED_SYNTAX.get(token.numValue));\n }\n if (commaDelimStack.length > 0 && token.isCharacter(commaDelimStack[commaDelimStack.length - 1])) {\n commaDelimStack.pop();\n }\n // If we hit a comma outside of a comma-delimited syntax, it means\n // that we're at the top level and we're starting a new parameter.\n if (commaDelimStack.length === 0 && token.isCharacter($COMMA) && current.length > 0) {\n parameters.push(current);\n current = '';\n this.advance();\n continue;\n }\n // Otherwise treat the token as a plain text character in the current parameter.\n current += this.tokenText();\n this.advance();\n }\n if (!this.token().isCharacter($RPAREN) || commaDelimStack.length > 0) {\n this.error(this.token(), 'Unexpected end of expression');\n }\n if (this.index < this.tokens.length - 1 && !this.tokens[this.index + 1].isCharacter($COMMA)) {\n this.unexpectedToken(this.tokens[this.index + 1]);\n }\n return parameters;\n }\n tokenText() {\n // Tokens have a toString already which we could use, but for string tokens it omits the quotes.\n // Eventually we could expose this information on the token directly.\n return this.expression.slice(this.start + this.token().index, this.start + this.token().end);\n }\n error(token, message) {\n const newStart = this.span.start.moveBy(this.start + token.index);\n const newEnd = newStart.moveBy(token.end - token.index);\n this.errors.push(new ParseError(new ParseSourceSpan(newStart, newEnd), message));\n }\n unexpectedToken(token) {\n this.error(token, `Unexpected token \"${token}\"`);\n }\n}\nfunction createIdleTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IDLE}\" trigger cannot have parameters`);\n }\n return new IdleDeferredTrigger(sourceSpan);\n}\nfunction createTimerTrigger(parameters, sourceSpan) {\n if (parameters.length !== 1) {\n throw new Error(`\"${OnTriggerType.TIMER}\" trigger must have exactly one parameter`);\n }\n const delay = parseDeferredTime(parameters[0]);\n if (delay === null) {\n throw new Error(`Could not parse time value of trigger \"${OnTriggerType.TIMER}\"`);\n }\n return new TimerDeferredTrigger(delay, sourceSpan);\n}\nfunction createInteractionTrigger(parameters, sourceSpan) {\n if (parameters.length > 1) {\n throw new Error(`\"${OnTriggerType.INTERACTION}\" trigger can only have zero or one parameters`);\n }\n return new InteractionDeferredTrigger(parameters[0] ?? null, sourceSpan);\n}\nfunction createImmediateTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IMMEDIATE}\" trigger cannot have parameters`);\n }\n return new ImmediateDeferredTrigger(sourceSpan);\n}\nfunction createHoverTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.HOVER}\" trigger cannot have parameters`);\n }\n return new HoverDeferredTrigger(sourceSpan);\n}\nfunction createViewportTrigger(parameters, sourceSpan) {\n // TODO: the RFC has some more potential parameters for `viewport`.\n if (parameters.length > 1) {\n throw new Error(`\"${OnTriggerType.VIEWPORT}\" trigger can only have zero or one parameters`);\n }\n return new ViewportDeferredTrigger(parameters[0] ?? null, sourceSpan);\n}\n/** Gets the index within an expression at which the trigger parameters start. */\nfunction getTriggerParametersStart(value, startPosition = 0) {\n let hasFoundSeparator = false;\n for (let i = startPosition; i < value.length; i++) {\n if (SEPARATOR_PATTERN.test(value[i])) {\n hasFoundSeparator = true;\n } else if (hasFoundSeparator) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Parses a time expression from a deferred trigger to\n * milliseconds. Returns null if it cannot be parsed.\n */\nfunction parseDeferredTime(value) {\n const match = value.match(TIME_PATTERN);\n if (!match) {\n return null;\n }\n const [time, units] = match;\n return parseInt(time) * (units === 's' ? 1000 : 1);\n}\n\n/** Pattern to identify a `prefetch when` trigger. */\nconst PREFETCH_WHEN_PATTERN = /^prefetch\\s+when\\s/;\n/** Pattern to identify a `prefetch on` trigger. */\nconst PREFETCH_ON_PATTERN = /^prefetch\\s+on\\s/;\n/** Pattern to identify a `minimum` parameter in a block. */\nconst MINIMUM_PARAMETER_PATTERN = /^minimum\\s/;\n/** Pattern to identify a `after` parameter in a block. */\nconst AFTER_PARAMETER_PATTERN = /^after\\s/;\n/** Pattern to identify a `when` parameter in a block. */\nconst WHEN_PARAMETER_PATTERN = /^when\\s/;\n/** Pattern to identify a `on` parameter in a block. */\nconst ON_PARAMETER_PATTERN = /^on\\s/;\n/** Possible types of secondary deferred blocks. */\nvar SecondaryDeferredBlockType;\n(function (SecondaryDeferredBlockType) {\n SecondaryDeferredBlockType[\"PLACEHOLDER\"] = \"placeholder\";\n SecondaryDeferredBlockType[\"LOADING\"] = \"loading\";\n SecondaryDeferredBlockType[\"ERROR\"] = \"error\";\n})(SecondaryDeferredBlockType || (SecondaryDeferredBlockType = {}));\n/** Creates a deferred block from an HTML AST node. */\nfunction createDeferredBlock(ast, visitor, bindingParser) {\n const errors = [];\n const [primaryBlock, ...secondaryBlocks] = ast.blocks;\n const {\n triggers,\n prefetchTriggers\n } = parsePrimaryTriggers(primaryBlock.parameters, bindingParser, errors);\n const {\n placeholder,\n loading,\n error\n } = parseSecondaryBlocks(secondaryBlocks, errors, visitor);\n return {\n node: new DeferredBlock(visitAll(visitor, primaryBlock.children), triggers, prefetchTriggers, placeholder, loading, error, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan),\n errors\n };\n}\nfunction parseSecondaryBlocks(blocks, errors, visitor) {\n let placeholder = null;\n let loading = null;\n let error = null;\n for (const block of blocks) {\n try {\n switch (block.name) {\n case SecondaryDeferredBlockType.PLACEHOLDER:\n if (placeholder !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.PLACEHOLDER}\" block`));\n } else {\n placeholder = parsePlaceholderBlock(block, visitor);\n }\n break;\n case SecondaryDeferredBlockType.LOADING:\n if (loading !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.LOADING}\" block`));\n } else {\n loading = parseLoadingBlock(block, visitor);\n }\n break;\n case SecondaryDeferredBlockType.ERROR:\n if (error !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.ERROR}\" block`));\n } else {\n error = parseErrorBlock(block, visitor);\n }\n break;\n default:\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized block \"${block.name}\"`));\n break;\n }\n } catch (e) {\n errors.push(new ParseError(block.startSourceSpan, e.message));\n }\n }\n return {\n placeholder,\n loading,\n error\n };\n}\nfunction parsePlaceholderBlock(ast, visitor) {\n let minimumTime = null;\n for (const param of ast.parameters) {\n if (MINIMUM_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"minimum\"`);\n }\n minimumTime = parsedTime;\n } else {\n throw new Error(`Unrecognized parameter in \"${SecondaryDeferredBlockType.PLACEHOLDER}\" block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockPlaceholder(visitAll(visitor, ast.children), minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parseLoadingBlock(ast, visitor) {\n let afterTime = null;\n let minimumTime = null;\n for (const param of ast.parameters) {\n if (AFTER_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"after\"`);\n }\n afterTime = parsedTime;\n } else if (MINIMUM_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"minimum\"`);\n }\n minimumTime = parsedTime;\n } else {\n throw new Error(`Unrecognized parameter in \"${SecondaryDeferredBlockType.LOADING}\" block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockLoading(visitAll(visitor, ast.children), afterTime, minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parseErrorBlock(ast, visitor) {\n if (ast.parameters.length > 0) {\n throw new Error(`\"${SecondaryDeferredBlockType.ERROR}\" block cannot have parameters`);\n }\n return new DeferredBlockError(visitAll(visitor, ast.children), ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parsePrimaryTriggers(params, bindingParser, errors) {\n const triggers = [];\n const prefetchTriggers = [];\n for (const param of params) {\n // The lexer ignores the leading spaces so we can assume\n // that the expression starts with a keyword.\n if (WHEN_PARAMETER_PATTERN.test(param.expression)) {\n const result = parseWhenTrigger(param, bindingParser, errors);\n result !== null && triggers.push(result);\n } else if (ON_PARAMETER_PATTERN.test(param.expression)) {\n triggers.push(...parseOnTrigger(param, errors));\n } else if (PREFETCH_WHEN_PATTERN.test(param.expression)) {\n const result = parseWhenTrigger(param, bindingParser, errors);\n result !== null && prefetchTriggers.push(result);\n } else if (PREFETCH_ON_PATTERN.test(param.expression)) {\n prefetchTriggers.push(...parseOnTrigger(param, errors));\n } else {\n errors.push(new ParseError(param.sourceSpan, 'Unrecognized trigger'));\n }\n }\n return {\n triggers,\n prefetchTriggers\n };\n}\nconst BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;\n// Group 1 = \"bind-\"\nconst KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nconst KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nconst KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nconst KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nconst KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nconst KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nconst IDENT_KW_IDX = 7;\nconst BINDING_DELIMS = {\n BANANA_BOX: {\n start: '[(',\n end: ')]'\n },\n PROPERTY: {\n start: '[',\n end: ']'\n },\n EVENT: {\n start: '(',\n end: ')'\n }\n};\nconst TEMPLATE_ATTR_PREFIX = '*';\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser, options) {\n const transformer = new HtmlAstToIvyAst(bindingParser, options);\n const ivyNodes = visitAll(transformer, htmlNodes);\n // Errors might originate in either the binding parser or the html to ivy transformer\n const allErrors = bindingParser.errors.concat(transformer.errors);\n const result = {\n nodes: ivyNodes,\n errors: allErrors,\n styleUrls: transformer.styleUrls,\n styles: transformer.styles,\n ngContentSelectors: transformer.ngContentSelectors\n };\n if (options.collectCommentNodes) {\n result.commentNodes = transformer.commentNodes;\n }\n return result;\n}\nclass HtmlAstToIvyAst {\n constructor(bindingParser, options) {\n this.bindingParser = bindingParser;\n this.options = options;\n this.errors = [];\n this.styles = [];\n this.styleUrls = [];\n this.ngContentSelectors = [];\n // This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true\n this.commentNodes = [];\n this.inI18nBlock = false;\n }\n // HTML visitor\n visitElement(element) {\n const isI18nRootElement = isI18nRootNode(element.i18n);\n if (isI18nRootElement) {\n if (this.inI18nBlock) {\n this.reportError('Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.', element.sourceSpan);\n }\n this.inI18nBlock = true;\n }\n const preparsedElement = preparseElement(element);\n if (preparsedElement.type === PreparsedElementType.SCRIPT) {\n return null;\n } else if (preparsedElement.type === PreparsedElementType.STYLE) {\n const contents = textContents(element);\n if (contents !== null) {\n this.styles.push(contents);\n }\n return null;\n } else if (preparsedElement.type === PreparsedElementType.STYLESHEET && isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n this.styleUrls.push(preparsedElement.hrefAttr);\n return null;\n }\n // Whether the element is a `<ng-template>`\n const isTemplateElement = isNgTemplate(element.name);\n const parsedProperties = [];\n const boundEvents = [];\n const variables = [];\n const references = [];\n const attributes = [];\n const i18nAttrsMeta = {};\n const templateParsedProperties = [];\n const templateVariables = [];\n // Whether the element has any *-attribute\n let elementHasInlineTemplate = false;\n for (const attribute of element.attrs) {\n let hasBinding = false;\n const normalizedName = normalizeAttributeName(attribute.name);\n // `*attr` defines template bindings\n let isTemplateBinding = false;\n if (attribute.i18n) {\n i18nAttrsMeta[attribute.name] = attribute.i18n;\n }\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n // *-attributes\n if (elementHasInlineTemplate) {\n this.reportError(`Can't have multiple template bindings on one element. Use only one attribute prefixed with *`, attribute.sourceSpan);\n }\n isTemplateBinding = true;\n elementHasInlineTemplate = true;\n const templateValue = attribute.value;\n const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n const parsedVariables = [];\n const absoluteValueOffset = attribute.valueSpan ? attribute.valueSpan.start.offset :\n // If there is no value span the attribute does not have a value, like `attr` in\n //`<div attr></div>`. In this case, point to one character beyond the last character of\n // the attribute name.\n attribute.sourceSpan.start.offset + attribute.name.length;\n this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true /* isIvyAst */);\n templateVariables.push(...parsedVariables.map(v => new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan)));\n } else {\n // Check for variables, events, property bindings, interpolation\n hasBinding = this.parseAttribute(isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);\n }\n if (!hasBinding && !isTemplateBinding) {\n // don't include the bindings as attributes as well in the AST\n attributes.push(this.visitAttribute(attribute));\n }\n }\n let children;\n if (preparsedElement.nonBindable) {\n // The `NonBindableVisitor` may need to return an array of nodes for block groups so we need\n // to flatten the array here. Avoid doing this for the `HtmlAstToIvyAst` since `flat` creates\n // a new array.\n children = visitAll(NON_BINDABLE_VISITOR, element.children).flat(Infinity);\n } else {\n children = visitAll(this, element.children);\n }\n let parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n // `<ng-content>`\n if (element.children && !element.children.every(node => isEmptyTextNode(node) || isCommentNode(node))) {\n this.reportError(`<ng-content> element cannot have content.`, element.sourceSpan);\n }\n const selector = preparsedElement.selectAttr;\n const attrs = element.attrs.map(attr => this.visitAttribute(attr));\n parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);\n this.ngContentSelectors.push(selector);\n } else if (isTemplateElement) {\n // `<ng-template>`\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Template(element.name, attributes, attrs.bound, boundEvents, [/* no template attributes */], children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n } else {\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n if (elementHasInlineTemplate) {\n // If this node is an inline-template (e.g. has *ngFor) then we need to create a template\n // node that contains this node.\n // Moreover, if the node is an element, then we need to hoist its attributes to the template\n // node for matching against content projection selectors.\n const attrs = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);\n const templateAttrs = [];\n attrs.literal.forEach(attr => templateAttrs.push(attr));\n attrs.bound.forEach(attr => templateAttrs.push(attr));\n const hoistedAttrs = parsedElement instanceof Element$1 ? {\n attributes: parsedElement.attributes,\n inputs: parsedElement.inputs,\n outputs: parsedElement.outputs\n } : {\n attributes: [],\n inputs: [],\n outputs: []\n };\n // For <ng-template>s with structural directives on them, avoid passing i18n information to\n // the wrapping template to prevent unnecessary i18n instructions from being generated. The\n // necessary i18n meta information will be extracted from child elements.\n const i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n;\n const name = parsedElement instanceof Template ? null : parsedElement.name;\n parsedElement = new Template(name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [/* no references */], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);\n }\n if (isI18nRootElement) {\n this.inI18nBlock = false;\n }\n return parsedElement;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.tokens, text.i18n);\n }\n visitExpansion(expansion) {\n if (!expansion.i18n) {\n // do not generate Icu in case it was created\n // outside of i18n block in a template\n return null;\n }\n if (!isI18nRootNode(expansion.i18n)) {\n throw new Error(`Invalid type \"${expansion.i18n.constructor}\" for \"i18n\" property of ${expansion.sourceSpan.toString()}. Expected a \"Message\"`);\n }\n const message = expansion.i18n;\n const vars = {};\n const placeholders = {};\n // extract VARs from ICUs - we process them separately while\n // assembling resulting message via goog.getMsg function, since\n // we need to pass them to top-level goog.getMsg call\n Object.keys(message.placeholders).forEach(key => {\n const value = message.placeholders[key];\n if (key.startsWith(I18N_ICU_VAR_PREFIX)) {\n // Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g.\n // `{count, select , ...}`), these spaces are also included into the key names in ICU vars\n // (e.g. \"VAR_SELECT \"). These trailing spaces are not desirable, since they will later be\n // converted into `_` symbols while normalizing placeholder names, which might lead to\n // mismatches at runtime (i.e. placeholder will not be replaced with the correct value).\n const formattedKey = key.trim();\n const ast = this.bindingParser.parseInterpolationExpression(value.text, value.sourceSpan);\n vars[formattedKey] = new BoundText(ast, value.sourceSpan);\n } else {\n placeholders[key] = this._visitTextWithInterpolation(value.text, value.sourceSpan, null);\n }\n });\n return new Icu$1(vars, placeholders, expansion.sourceSpan, message);\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n visitComment(comment) {\n if (this.options.collectCommentNodes) {\n this.commentNodes.push(new Comment$1(comment.value || '', comment.sourceSpan));\n }\n return null;\n }\n visitBlockGroup(group, context) {\n const primaryBlock = group.blocks[0];\n // The HTML parser ensures that we don't hit this case, but we have an assertion just in case.\n if (!primaryBlock) {\n this.reportError('Block group must have at least one block.', group.sourceSpan);\n return null;\n }\n if (primaryBlock.name === 'defer' && this.options.enabledBlockTypes.has(primaryBlock.name)) {\n const {\n node,\n errors\n } = createDeferredBlock(group, this, this.bindingParser);\n this.errors.push(...errors);\n return node;\n }\n this.reportError(`Unrecognized block \"${primaryBlock.name}\".`, primaryBlock.sourceSpan);\n return null;\n }\n visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n // convert view engine `ParsedProperty` to a format suitable for IVY\n extractAttributes(elementName, properties, i18nPropsMeta) {\n const bound = [];\n const literal = [];\n properties.forEach(prop => {\n const i18n = i18nPropsMeta[prop.name];\n if (prop.isLiteral) {\n literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n));\n } else {\n // Note that validation is skipped and property mapping is disabled\n // due to the fact that we need to make sure a given prop is not an\n // input of a directive and directive matching happens at runtime.\n const bep = this.bindingParser.createBoundElementProperty(elementName, prop, /* skipValidation */true, /* mapPropertyName */false);\n bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));\n }\n });\n return {\n bound,\n literal\n };\n }\n parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {\n const name = normalizeAttributeName(attribute.name);\n const value = attribute.value;\n const srcSpan = attribute.sourceSpan;\n const absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;\n function createKeySpan(srcSpan, prefix, identifier) {\n // We need to adjust the start location for the keySpan to account for the removed 'data-'\n // prefix from `normalizeAttributeName`.\n const normalizationAdjustment = attribute.name.length - name.length;\n const keySpanStart = srcSpan.start.moveBy(prefix.length + normalizationAdjustment);\n const keySpanEnd = keySpanStart.moveBy(identifier.length);\n return new ParseSourceSpan(keySpanStart, keySpanEnd, keySpanStart, identifier);\n }\n const bindParts = name.match(BIND_NAME_REGEXP);\n if (bindParts) {\n if (bindParts[KW_BIND_IDX] != null) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BIND_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n } else if (bindParts[KW_LET_IDX]) {\n if (isTemplateElement) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_LET_IDX], identifier);\n this.parseVariable(identifier, value, srcSpan, keySpan, attribute.valueSpan, variables);\n } else {\n this.reportError(`\"let-\" is only supported on ng-template elements.`, srcSpan);\n }\n } else if (bindParts[KW_REF_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_REF_IDX], identifier);\n this.parseReference(identifier, value, srcSpan, keySpan, attribute.valueSpan, references);\n } else if (bindParts[KW_ON_IDX]) {\n const events = [];\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_ON_IDX], identifier);\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n } else if (bindParts[KW_BINDON_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n } else if (bindParts[KW_AT_IDX]) {\n const keySpan = createKeySpan(srcSpan, '', name);\n this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n return true;\n }\n // We didn't see a kw-prefixed property binding, but we have not yet checked\n // for the []/()/[()] syntax.\n let delims = null;\n if (name.startsWith(BINDING_DELIMS.BANANA_BOX.start)) {\n delims = BINDING_DELIMS.BANANA_BOX;\n } else if (name.startsWith(BINDING_DELIMS.PROPERTY.start)) {\n delims = BINDING_DELIMS.PROPERTY;\n } else if (name.startsWith(BINDING_DELIMS.EVENT.start)) {\n delims = BINDING_DELIMS.EVENT;\n }\n if (delims !== null &&\n // NOTE: older versions of the parser would match a start/end delimited\n // binding iff the property name was terminated by the ending delimiter\n // and the identifier in the binding was non-empty.\n // TODO(ayazhafiz): update this to handle malformed bindings.\n name.endsWith(delims.end) && name.length > delims.start.length + delims.end.length) {\n const identifier = name.substring(delims.start.length, name.length - delims.end.length);\n const keySpan = createKeySpan(srcSpan, delims.start, identifier);\n if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n } else if (delims.start === BINDING_DELIMS.PROPERTY.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n } else {\n const events = [];\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n }\n return true;\n }\n // No explicit binding found.\n const keySpan = createKeySpan(srcSpan, '' /* prefix */, name);\n const hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan, attribute.valueTokens ?? null);\n return hasBinding;\n }\n _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n) {\n const valueNoNgsp = replaceNgsp(value);\n const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan, interpolatedTokens);\n return expr ? new BoundText(expr, sourceSpan, i18n) : new Text$3(valueNoNgsp, sourceSpan);\n }\n parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in variable names`, sourceSpan);\n } else if (identifier.length === 0) {\n this.reportError(`Variable does not have a name`, sourceSpan);\n }\n variables.push(new Variable(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseReference(identifier, value, sourceSpan, keySpan, valueSpan, references) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in reference names`, sourceSpan);\n } else if (identifier.length === 0) {\n this.reportError(`Reference does not have a name`, sourceSpan);\n } else if (references.some(reference => reference.name === identifier)) {\n this.reportError(`Reference \"#${identifier}\" is defined more than once`, sourceSpan);\n }\n references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {\n const events = [];\n this.bindingParser.parseEvent(`${name}Change`, `${expression} =$event`, /* isAssignmentEvent */true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);\n addEvents(events, boundEvents);\n }\n reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n}\nclass NonBindableVisitor {\n visitElement(ast) {\n const preparsedElement = preparseElement(ast);\n if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE || preparsedElement.type === PreparsedElementType.STYLESHEET) {\n // Skipping <script> for security reasons\n // Skipping <style> and stylesheets as we already processed them\n // in the StyleCompiler\n return null;\n }\n const children = visitAll(this, ast.children, null);\n return new Element$1(ast.name, visitAll(this, ast.attrs), /* inputs */[], /* outputs */[], children, /* references */[], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n }\n visitComment(comment) {\n return null;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return new Text$3(text.value, text.sourceSpan);\n }\n visitExpansion(expansion) {\n return null;\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n visitBlockGroup(group, context) {\n const nodes = visitAll(this, group.blocks);\n // We only need to do the end tag since the start will be added as a part of the primary block.\n if (group.endSourceSpan !== null) {\n nodes.push(new Text$3(group.endSourceSpan.toString(), group.endSourceSpan));\n }\n return nodes;\n }\n visitBlock(block, context) {\n return [\n // In an ngNonBindable context we treat the opening/closing tags of block as plain text.\n // This is the as if the `tokenizeBlocks` option was disabled.\n new Text$3(block.startSourceSpan.toString(), block.startSourceSpan), ...visitAll(this, block.children)];\n }\n visitBlockParameter(parameter, context) {\n return null;\n }\n}\nconst NON_BINDABLE_VISITOR = new NonBindableVisitor();\nfunction normalizeAttributeName(attrName) {\n return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\nfunction addEvents(events, boundEvents) {\n boundEvents.push(...events.map(e => BoundEvent.fromParsedEvent(e)));\n}\nfunction isEmptyTextNode(node) {\n return node instanceof Text && node.value.trim().length == 0;\n}\nfunction isCommentNode(node) {\n return node instanceof Comment;\n}\nfunction textContents(node) {\n if (node.children.length !== 1 || !(node.children[0] instanceof Text)) {\n return null;\n } else {\n return node.children[0].value;\n }\n}\nvar TagType;\n(function (TagType) {\n TagType[TagType[\"ELEMENT\"] = 0] = \"ELEMENT\";\n TagType[TagType[\"TEMPLATE\"] = 1] = \"TEMPLATE\";\n})(TagType || (TagType = {}));\n/**\n * Generates an object that is used as a shared state between parent and all child contexts.\n */\nfunction setupRegistry() {\n return {\n getUniqueId: getSeqNumberGenerator(),\n icus: new Map()\n };\n}\n/**\n * I18nContext is a helper class which keeps track of all i18n-related aspects\n * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.\n *\n * When we enter a nested template, the top-level context is being passed down\n * to the nested component, which uses this context to generate a child instance\n * of I18nContext class (to handle nested template) and at the end, reconciles it back\n * with the parent context.\n *\n * @param index Instruction index of i18nStart, which initiates this context\n * @param ref Reference to a translation const that represents the content if thus context\n * @param level Nesting level defined for child contexts\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n */\nclass I18nContext {\n constructor(index, ref, level = 0, templateIndex = null, meta, registry) {\n this.index = index;\n this.ref = ref;\n this.level = level;\n this.templateIndex = templateIndex;\n this.meta = meta;\n this.registry = registry;\n this.bindings = new Set();\n this.placeholders = new Map();\n this.isEmitted = false;\n this._unresolvedCtxCount = 0;\n this._registry = registry || setupRegistry();\n this.id = this._registry.getUniqueId();\n }\n appendTag(type, node, index, closed) {\n if (node.isVoid && closed) {\n return; // ignore \"close\" for void tags\n }\n const ph = node.isVoid || !closed ? node.startName : node.closeName;\n const content = {\n type,\n index,\n ctx: this.id,\n isVoid: node.isVoid,\n closed\n };\n updatePlaceholderMap(this.placeholders, ph, content);\n }\n get icus() {\n return this._registry.icus;\n }\n get isRoot() {\n return this.level === 0;\n }\n get isResolved() {\n return this._unresolvedCtxCount === 0;\n }\n getSerializedPlaceholders() {\n const result = new Map();\n this.placeholders.forEach((values, key) => result.set(key, values.map(serializePlaceholderValue)));\n return result;\n }\n // public API to accumulate i18n-related content\n appendBinding(binding) {\n this.bindings.add(binding);\n }\n appendIcu(name, ref) {\n updatePlaceholderMap(this._registry.icus, name, ref);\n }\n appendBoundText(node) {\n const phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);\n phs.forEach((values, key) => updatePlaceholderMap(this.placeholders, key, ...values));\n }\n appendTemplate(node, index) {\n // add open and close tags at the same time,\n // since we process nested templates separately\n this.appendTag(TagType.TEMPLATE, node, index, false);\n this.appendTag(TagType.TEMPLATE, node, index, true);\n this._unresolvedCtxCount++;\n }\n appendElement(node, index, closed) {\n this.appendTag(TagType.ELEMENT, node, index, closed);\n }\n appendProjection(node, index) {\n // Add open and close tags at the same time, since `<ng-content>` has no content,\n // so when we come across `<ng-content>` we can register both open and close tags.\n // Note: runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and\n // regular element tag placeholders, so we generate element placeholders for both types.\n this.appendTag(TagType.ELEMENT, node, index, false);\n this.appendTag(TagType.ELEMENT, node, index, true);\n }\n /**\n * Generates an instance of a child context based on the root one,\n * when we enter a nested template within I18n section.\n *\n * @param index Instruction index of corresponding i18nStart, which initiates this context\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n *\n * @returns I18nContext instance\n */\n forkChildContext(index, templateIndex, meta) {\n return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);\n }\n /**\n * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).\n *\n * @param context Child I18nContext instance to be reconciled with parent context.\n */\n reconcileChildContext(context) {\n // set the right context id for open and close\n // template tags, so we can use it as sub-block ids\n ['start', 'close'].forEach(op => {\n const key = context.meta[`${op}Name`];\n const phs = this.placeholders.get(key) || [];\n const tag = phs.find(findTemplateFn(this.id, context.templateIndex));\n if (tag) {\n tag.ctx = context.id;\n }\n });\n // reconcile placeholders\n const childPhs = context.placeholders;\n childPhs.forEach((values, key) => {\n const phs = this.placeholders.get(key);\n if (!phs) {\n this.placeholders.set(key, values);\n return;\n }\n // try to find matching template...\n const tmplIdx = phs.findIndex(findTemplateFn(context.id, context.templateIndex));\n if (tmplIdx >= 0) {\n // ... if found - replace it with nested template content\n const isCloseTag = key.startsWith('CLOSE');\n const isTemplateTag = key.endsWith('NG-TEMPLATE');\n if (isTemplateTag) {\n // current template's content is placed before or after\n // parent template tag, depending on the open/close attribute\n phs.splice(tmplIdx + (isCloseTag ? 0 : 1), 0, ...values);\n } else {\n const idx = isCloseTag ? values.length - 1 : 0;\n values[idx].tmpl = phs[tmplIdx];\n phs.splice(tmplIdx, 1, ...values);\n }\n } else {\n // ... otherwise just append content to placeholder value\n phs.push(...values);\n }\n this.placeholders.set(key, phs);\n });\n this._unresolvedCtxCount--;\n }\n}\n//\n// Helper methods\n//\nfunction wrap(symbol, index, contextId, closed) {\n const state = closed ? '/' : '';\n return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);\n}\nfunction wrapTag(symbol, {\n index,\n ctx,\n isVoid\n}, closed) {\n return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) : wrap(symbol, index, ctx, closed);\n}\nfunction findTemplateFn(ctx, templateIndex) {\n return token => typeof token === 'object' && token.type === TagType.TEMPLATE && token.index === templateIndex && token.ctx === ctx;\n}\nfunction serializePlaceholderValue(value) {\n const element = (data, closed) => wrapTag('#', data, closed);\n const template = (data, closed) => wrapTag('*', data, closed);\n switch (value.type) {\n case TagType.ELEMENT:\n // close element tag\n if (value.closed) {\n return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');\n }\n // open element tag that also initiates a template\n if (value.tmpl) {\n return template(value.tmpl) + element(value) + (value.isVoid ? template(value.tmpl, true) : '');\n }\n return element(value);\n case TagType.TEMPLATE:\n return template(value, value.closed);\n default:\n return value;\n }\n}\nclass IcuSerializerVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n const result = `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n return result;\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ? this.formatPh(ph.startName) : `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n formatPh(value) {\n return `{${formatI18nPlaceholderName(value, /* useCamelCase */false)}}`;\n }\n}\nconst serializer = new IcuSerializerVisitor();\nfunction serializeIcuNode(icu) {\n return icu.visit(serializer);\n}\nconst 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 */\nclass PlaceholderRegistry {\n constructor() {\n // Count the occurrence of the base name top generate a unique name\n this._placeHolderNameCounts = {};\n // Maps signature to placeholder names\n this._signatureToName = {};\n }\n getStartTagPlaceholderName(tag, attrs, isVoid) {\n const signature = this._hashTag(tag, attrs, isVoid);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(isVoid ? baseName : `START_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getCloseTagPlaceholderName(tag) {\n const signature = this._hashClosingTag(tag);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(`CLOSE_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getPlaceholderName(name, content) {\n const upperName = name.toUpperCase();\n const signature = `PH: ${upperName}=${content}`;\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const uniqueName = this._generateUniqueName(upperName);\n this._signatureToName[signature] = uniqueName;\n return uniqueName;\n }\n getUniquePlaceholder(name) {\n return this._generateUniqueName(name.toUpperCase());\n }\n // Generate a hash for a tag - does not take attribute order into account\n _hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map(name => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }\n _hashClosingTag(tag) {\n return this._hashTag(`/${tag}`, {}, false);\n }\n _generateUniqueName(base) {\n const seen = this._placeHolderNameCounts.hasOwnProperty(base);\n if (!seen) {\n this._placeHolderNameCounts[base] = 1;\n return base;\n }\n const id = this._placeHolderNameCounts[base];\n this._placeHolderNameCounts[base] = id + 1;\n return `${base}_${id}`;\n }\n}\nconst _expParser = new Parser$1(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig) {\n const visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n}\nfunction noopVisitNodeFn(_html, i18n) {\n return i18n;\n}\nclass _I18nVisitor {\n constructor(_expressionParser, _interpolationConfig) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n }\n toI18nMessage(nodes, meaning = '', description = '', customId = '', visitNodeFn) {\n const context = {\n isIcu: nodes.length == 1 && nodes[0] instanceof Expansion,\n icuDepth: 0,\n placeholderRegistry: new PlaceholderRegistry(),\n placeholderToContent: {},\n placeholderToMessage: {},\n visitNodeFn: visitNodeFn || noopVisitNodeFn\n };\n const i18nodes = visitAll(this, nodes, context);\n return new Message(i18nodes, context.placeholderToContent, context.placeholderToMessage, meaning, description, customId);\n }\n visitElement(el, context) {\n const children = visitAll(this, el.children, context);\n const attrs = {};\n el.attrs.forEach(attr => {\n // Do not visit the attributes, translatable ones are top-level ASTs\n attrs[attr.name] = attr.value;\n });\n const isVoid = getHtmlTagDefinition(el.name).isVoid;\n const startPhName = context.placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n context.placeholderToContent[startPhName] = {\n text: el.startSourceSpan.toString(),\n sourceSpan: el.startSourceSpan\n };\n let closePhName = '';\n if (!isVoid) {\n closePhName = context.placeholderRegistry.getCloseTagPlaceholderName(el.name);\n context.placeholderToContent[closePhName] = {\n text: `</${el.name}>`,\n sourceSpan: el.endSourceSpan ?? el.sourceSpan\n };\n }\n const node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n return context.visitNodeFn(el, node);\n }\n visitAttribute(attribute, context) {\n const node = attribute.valueTokens === undefined || attribute.valueTokens.length === 1 ? new Text$2(attribute.value, attribute.valueSpan || attribute.sourceSpan) : this._visitTextWithInterpolation(attribute.valueTokens, attribute.valueSpan || attribute.sourceSpan, context, attribute.i18n);\n return context.visitNodeFn(attribute, node);\n }\n visitText(text, context) {\n const node = text.tokens.length === 1 ? new Text$2(text.value, text.sourceSpan) : this._visitTextWithInterpolation(text.tokens, text.sourceSpan, context, text.i18n);\n return context.visitNodeFn(text, node);\n }\n visitComment(comment, context) {\n return null;\n }\n visitExpansion(icu, context) {\n context.icuDepth++;\n const i18nIcuCases = {};\n const i18nIcu = new Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n icu.cases.forEach(caze => {\n i18nIcuCases[caze.value] = new Container(caze.expression.map(node => node.visit(this, context)), caze.expSourceSpan);\n });\n context.icuDepth--;\n if (context.isIcu || context.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 const expPh = context.placeholderRegistry.getUniquePlaceholder(`VAR_${icu.type}`);\n i18nIcu.expressionPlaceholder = expPh;\n context.placeholderToContent[expPh] = {\n text: icu.switchValue,\n sourceSpan: icu.switchValueSourceSpan\n };\n return context.visitNodeFn(icu, i18nIcu);\n }\n // Else returns a placeholder\n // ICU placeholders should not be replaced with their original content but with the their\n // translations.\n // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n const phName = context.placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n context.placeholderToMessage[phName] = this.toI18nMessage([icu], '', '', '', undefined);\n const node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n return context.visitNodeFn(icu, node);\n }\n visitExpansionCase(_icuCase, _context) {\n throw new Error('Unreachable code');\n }\n visitBlockGroup(group, context) {\n const children = visitAll(this, group.blocks, context);\n const node = new Container(children, group.sourceSpan);\n return context.visitNodeFn(group, node);\n }\n visitBlock(block, context) {\n const children = visitAll(this, block.children, context);\n const node = new Container(children, block.sourceSpan);\n return context.visitNodeFn(block, node);\n }\n visitBlockParameter(_parameter, _context) {}\n /**\n * Convert, text and interpolated tokens up into text and placeholder pieces.\n *\n * @param tokens The text and interpolated tokens.\n * @param sourceSpan The span of the whole of the `text` string.\n * @param context The current context of the visitor, used to compute and store placeholders.\n * @param previousI18n Any i18n metadata associated with this `text` from a previous pass.\n */\n _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {\n // Return a sequence of `Text` and `Placeholder` nodes grouped in a `Container`.\n const nodes = [];\n // We will only create a container if there are actually interpolations,\n // so this flag tracks that.\n let hasInterpolation = false;\n for (const token of tokens) {\n switch (token.type) {\n case 8 /* TokenType.INTERPOLATION */:\n case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:\n hasInterpolation = true;\n const expression = token.parts[1];\n const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';\n const phName = context.placeholderRegistry.getPlaceholderName(baseName, expression);\n context.placeholderToContent[phName] = {\n text: token.parts.join(''),\n sourceSpan: token.sourceSpan\n };\n nodes.push(new Placeholder(expression, phName, token.sourceSpan));\n break;\n default:\n if (token.parts[0].length > 0) {\n // This token is text or an encoded entity.\n // If it is following on from a previous text node then merge it into that node\n // Otherwise, if it is following an interpolation, then add a new node.\n const previous = nodes[nodes.length - 1];\n if (previous instanceof Text$2) {\n previous.value += token.parts[0];\n previous.sourceSpan = new ParseSourceSpan(previous.sourceSpan.start, token.sourceSpan.end, previous.sourceSpan.fullStart, previous.sourceSpan.details);\n } else {\n nodes.push(new Text$2(token.parts[0], token.sourceSpan));\n }\n }\n break;\n }\n }\n if (hasInterpolation) {\n // Whitespace removal may have invalidated the interpolation source-spans.\n reusePreviousSourceSpans(nodes, previousI18n);\n return new Container(nodes, sourceSpan);\n } else {\n return nodes[0];\n }\n }\n}\n/**\n * Re-use the source-spans from `previousI18n` metadata for the `nodes`.\n *\n * Whitespace removal can invalidate the source-spans of interpolation nodes, so we\n * reuse the source-span stored from a previous pass before the whitespace was removed.\n *\n * @param nodes The `Text` and `Placeholder` nodes to be processed.\n * @param previousI18n Any i18n metadata for these `nodes` stored from a previous pass.\n */\nfunction reusePreviousSourceSpans(nodes, previousI18n) {\n if (previousI18n instanceof Message) {\n // The `previousI18n` is an i18n `Message`, so we are processing an `Attribute` with i18n\n // metadata. The `Message` should consist only of a single `Container` that contains the\n // parts (`Text` and `Placeholder`) to process.\n assertSingleContainerMessage(previousI18n);\n previousI18n = previousI18n.nodes[0];\n }\n if (previousI18n instanceof Container) {\n // The `previousI18n` is a `Container`, which means that this is a second i18n extraction pass\n // after whitespace has been removed from the AST nodes.\n assertEquivalentNodes(previousI18n.children, nodes);\n // Reuse the source-spans from the first pass.\n for (let i = 0; i < nodes.length; i++) {\n nodes[i].sourceSpan = previousI18n.children[i].sourceSpan;\n }\n }\n}\n/**\n * Asserts that the `message` contains exactly one `Container` node.\n */\nfunction assertSingleContainerMessage(message) {\n const nodes = message.nodes;\n if (nodes.length !== 1 || !(nodes[0] instanceof Container)) {\n throw new Error('Unexpected previous i18n message - expected it to consist of only a single `Container` node.');\n }\n}\n/**\n * Asserts that the `previousNodes` and `node` collections have the same number of elements and\n * corresponding elements have the same node type.\n */\nfunction assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n if (previousNodes.some((node, i) => nodes[i].constructor !== node.constructor)) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}\nconst _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\nfunction extractPlaceholderName(input) {\n return input.split(_CUSTOM_PH_EXP)[2];\n}\n\n/**\n * An i18n error.\n */\nclass I18nError extends ParseError {\n constructor(span, msg) {\n super(span, msg);\n }\n}\nconst setI18nRefs = (htmlNode, i18nNode) => {\n if (htmlNode instanceof NodeWithI18n) {\n if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {\n // This html node represents an ICU but this is a second processing pass, and the legacy id\n // was computed in the previous pass and stored in the `i18n` property as a message.\n // We are about to wipe out that property so capture the previous message to be reused when\n // generating the message for this ICU later. See `_generateI18nMessage()`.\n i18nNode.previousMessage = htmlNode.i18n;\n }\n htmlNode.i18n = i18nNode;\n }\n return i18nNode;\n};\n/**\n * This visitor walks over HTML parse tree and converts information stored in\n * i18n-related attributes (\"i18n\" and \"i18n-*\") into i18n meta object that is\n * stored with other element's and attribute's information.\n */\nclass I18nMetaVisitor {\n constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {\n this.interpolationConfig = interpolationConfig;\n this.keepI18nAttrs = keepI18nAttrs;\n this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;\n // whether visited nodes contain i18n information\n this.hasI18nMeta = false;\n this._errors = [];\n }\n _generateI18nMessage(nodes, meta = '', visitNodeFn) {\n const {\n meaning,\n description,\n customId\n } = this._parseMetadata(meta);\n const createI18nMessage = createI18nMessageFactory(this.interpolationConfig);\n const message = createI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n this._setMessageId(message, meta);\n this._setLegacyIds(message, meta);\n return message;\n }\n visitAllWithErrors(nodes) {\n const result = nodes.map(node => node.visit(this, null));\n return new ParseTreeResult(result, this._errors);\n }\n visitElement(element) {\n let message = undefined;\n if (hasI18nAttrs(element)) {\n this.hasI18nMeta = true;\n const attrs = [];\n const attrsMeta = {};\n for (const attr of element.attrs) {\n if (attr.name === I18N_ATTR) {\n // root 'i18n' node attribute\n const i18n = element.i18n || attr.value;\n message = this._generateI18nMessage(element.children, i18n, setI18nRefs);\n if (message.nodes.length === 0) {\n // Ignore the message if it is empty.\n message = undefined;\n }\n // Store the message on the element\n element.i18n = message;\n } else if (attr.name.startsWith(I18N_ATTR_PREFIX)) {\n // 'i18n-*' attributes\n const name = attr.name.slice(I18N_ATTR_PREFIX.length);\n if (isTrustedTypesSink(element.name, name)) {\n this._reportError(attr, `Translating attribute '${name}' is disallowed for security reasons.`);\n } else {\n attrsMeta[name] = attr.value;\n }\n } else {\n // non-i18n attributes\n attrs.push(attr);\n }\n }\n // set i18n meta for attributes\n if (Object.keys(attrsMeta).length) {\n for (const attr of attrs) {\n const meta = attrsMeta[attr.name];\n // do not create translation for empty attributes\n if (meta !== undefined && attr.value) {\n attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);\n }\n }\n }\n if (!this.keepI18nAttrs) {\n // update element's attributes,\n // keeping only non-i18n related ones\n element.attrs = attrs;\n }\n }\n visitAll(this, element.children, message);\n return element;\n }\n visitExpansion(expansion, currentMessage) {\n let message;\n const meta = expansion.i18n;\n this.hasI18nMeta = true;\n if (meta instanceof IcuPlaceholder) {\n // set ICU placeholder name (e.g. \"ICU_1\"),\n // generated while processing root element contents,\n // so we can reference it when we output translation\n const name = meta.name;\n message = this._generateI18nMessage([expansion], meta);\n const icu = icuFromI18nMessage(message);\n icu.name = name;\n if (currentMessage !== null) {\n // Also update the placeholderToMessage map with this new message\n currentMessage.placeholderToMessage[name] = message;\n }\n } else {\n // ICU is a top level message, try to use metadata from container element if provided via\n // `context` argument. Note: context may not be available for standalone ICUs (without\n // wrapping element), so fallback to ICU metadata in this case.\n message = this._generateI18nMessage([expansion], currentMessage || meta);\n }\n expansion.i18n = message;\n return expansion;\n }\n visitText(text) {\n return text;\n }\n visitAttribute(attribute) {\n return attribute;\n }\n visitComment(comment) {\n return comment;\n }\n visitExpansionCase(expansionCase) {\n return expansionCase;\n }\n visitBlockGroup(group, context) {\n visitAll(this, group.blocks, context);\n return group;\n }\n visitBlock(block, context) {\n visitAll(this, block.children, context);\n return block;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n /**\n * Parse the general form `meta` passed into extract the explicit metadata needed to create a\n * `Message`.\n *\n * There are three possibilities for the `meta` variable\n * 1) a string from an `i18n` template attribute: parse it to extract the metadata values.\n * 2) a `Message` from a previous processing pass: reuse the metadata values in the message.\n * 4) other: ignore this and just process the message metadata as normal\n *\n * @param meta the bucket that holds information about the message\n * @returns the parsed metadata.\n */\n _parseMetadata(meta) {\n return typeof meta === 'string' ? parseI18nMeta(meta) : meta instanceof Message ? meta : {};\n }\n /**\n * Generate (or restore) message id if not specified already.\n */\n _setMessageId(message, meta) {\n if (!message.id) {\n message.id = meta instanceof Message && meta.id || decimalDigest(message);\n }\n }\n /**\n * Update the `message` with a `legacyId` if necessary.\n *\n * @param message the message whose legacy id should be set\n * @param meta information about the message being processed\n */\n _setLegacyIds(message, meta) {\n if (this.enableI18nLegacyMessageIdFormat) {\n message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];\n } else if (typeof meta !== 'string') {\n // This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in\n // `packages/compiler/src/render3/view/template.ts`).\n // In that case we want to reuse the legacy message generated in the 1st pass (see\n // `setI18nRefs()`).\n const previousMessage = meta instanceof Message ? meta : meta instanceof IcuPlaceholder ? meta.previousMessage : undefined;\n message.legacyIds = previousMessage ? previousMessage.legacyIds : [];\n }\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\n/** I18n separators for metadata **/\nconst I18N_MEANING_SEPARATOR = '|';\nconst I18N_ID_SEPARATOR = '@@';\n/**\n * Parses i18n metas like:\n * - \"@@id\",\n * - \"description[@@id]\",\n * - \"meaning|description[@@id]\"\n * and returns an object with parsed output.\n *\n * @param meta String that represents i18n meta\n * @returns Object with id, meaning and description fields\n */\nfunction parseI18nMeta(meta = '') {\n let customId;\n let meaning;\n let description;\n meta = meta.trim();\n if (meta) {\n const idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n const descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);\n let meaningAndDesc;\n [meaningAndDesc, customId] = idIndex > -1 ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];\n [meaning, description] = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc];\n }\n return {\n customId,\n meaning,\n description\n };\n}\n// Converts i18n meta information for a message (id, description, meaning)\n// to a JsDoc statement formatted as expected by the Closure compiler.\nfunction i18nMetaToJSDoc(meta) {\n const tags = [];\n if (meta.description) {\n tags.push({\n tagName: \"desc\" /* o.JSDocTagName.Desc */,\n text: meta.description\n });\n } else {\n // Suppress the JSCompiler warning that a `@desc` was not given for this message.\n tags.push({\n tagName: \"suppress\" /* o.JSDocTagName.Suppress */,\n text: '{msgDescriptions}'\n });\n }\n if (meta.meaning) {\n tags.push({\n tagName: \"meaning\" /* o.JSDocTagName.Meaning */,\n text: meta.meaning\n });\n }\n return jsDocComment(tags);\n}\n\n/** Closure uses `goog.getMsg(message)` to lookup translations */\nconst GOOG_GET_MSG = 'goog.getMsg';\n/**\n * Generates a `goog.getMsg()` statement and reassignment. The template:\n *\n * ```html\n * <div i18n>Sent from {{ sender }} to <span class=\"receiver\">{{ receiver }}</span></div>\n * ```\n *\n * Generates:\n *\n * ```typescript\n * const MSG_FOO = goog.getMsg(\n * // Message template.\n * 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',\n * // Placeholder values, set to magic strings which get replaced by the Angular runtime.\n * {\n * 'interpolation': '\\uFFFD0\\uFFFD',\n * 'startTagSpan': '\\uFFFD1\\uFFFD',\n * 'interpolation_1': '\\uFFFD2\\uFFFD',\n * 'closeTagSpan': '\\uFFFD3\\uFFFD',\n * },\n * // Options bag.\n * {\n * // Maps each placeholder to the original Angular source code which generates it's value.\n * original_code: {\n * 'interpolation': '{{ sender }}',\n * 'startTagSpan': '<span class=\"receiver\">',\n * 'interpolation_1': '{{ receiver }}',\n * 'closeTagSpan': '</span>',\n * },\n * },\n * );\n * const I18N_0 = MSG_FOO;\n * ```\n */\nfunction createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {\n const messageString = serializeI18nMessageForGetMsg(message);\n const args = [literal(messageString)];\n if (Object.keys(placeholderValues).length) {\n // Message template parameters containing the magic strings replaced by the Angular runtime with\n // real data, e.g. `{'interpolation': '\\uFFFD0\\uFFFD'}`.\n args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));\n // Message options object, which contains original source code for placeholders (as they are\n // present in a template, e.g.\n // `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.\n args.push(mapLiteral({\n original_code: literalMap(Object.keys(placeholderValues).map(param => ({\n key: formatI18nPlaceholderName(param),\n quoted: true,\n value: message.placeholders[param] ?\n // Get source span for typical placeholder if it exists.\n literal(message.placeholders[param].sourceSpan.toString()) :\n // Otherwise must be an ICU expression, get it's source span.\n literal(message.placeholderToMessage[param].nodes.map(node => node.sourceSpan.toString()).join(''))\n })))\n }));\n }\n // /**\n // * @desc description of message\n // * @meaning meaning of message\n // */\n // const MSG_... = goog.getMsg(..);\n // I18N_X = MSG_...;\n const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();\n googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));\n const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));\n return [googGetMsgStmt, i18nAssignmentStmt];\n}\n/**\n * This visitor walks over i18n tree and generates its string representation, including ICUs and\n * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.\n */\nclass GetMsgSerializerVisitor {\n formatPh(value) {\n return `{$${formatI18nPlaceholderName(value)}}`;\n }\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n return serializeIcuNode(icu);\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ? this.formatPh(ph.startName) : `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n}\nconst serializerVisitor = new GetMsgSerializerVisitor();\nfunction serializeI18nMessageForGetMsg(message) {\n return message.nodes.map(node => node.visit(serializerVisitor, null)).join('');\n}\nfunction createLocalizeStatements(variable, message, params) {\n const {\n messageParts,\n placeHolders\n } = serializeI18nMessageForLocalize(message);\n const sourceSpan = getSourceSpan(message);\n const expressions = placeHolders.map(ph => params[ph.text]);\n const localizedString$1 = localizedString(message, messageParts, placeHolders, expressions, sourceSpan);\n const variableInitialization = variable.set(localizedString$1);\n return [new ExpressionStatement(variableInitialization)];\n}\n/**\n * This visitor walks over an i18n tree, capturing literal strings and placeholders.\n *\n * The result can be used for generating the `$localize` tagged template literals.\n */\nclass LocalizeSerializerVisitor {\n constructor(placeholderToMessage, pieces) {\n this.placeholderToMessage = placeholderToMessage;\n this.pieces = pieces;\n }\n visitText(text) {\n if (this.pieces[this.pieces.length - 1] instanceof LiteralPiece) {\n // Two literal pieces in a row means that there was some comment node in-between.\n this.pieces[this.pieces.length - 1].text += text.value;\n } else {\n const sourceSpan = new ParseSourceSpan(text.sourceSpan.fullStart, text.sourceSpan.end, text.sourceSpan.fullStart, text.sourceSpan.details);\n this.pieces.push(new LiteralPiece(text.value, sourceSpan));\n }\n }\n visitContainer(container) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu) {\n this.pieces.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));\n }\n visitTagPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.startName, ph.startSourceSpan ?? ph.sourceSpan));\n if (!ph.isVoid) {\n ph.children.forEach(child => child.visit(this));\n this.pieces.push(this.createPlaceholderPiece(ph.closeName, ph.endSourceSpan ?? ph.sourceSpan));\n }\n }\n visitPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));\n }\n visitIcuPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));\n }\n createPlaceholderPiece(name, sourceSpan, associatedMessage) {\n return new PlaceholderPiece(formatI18nPlaceholderName(name, /* useCamelCase */false), sourceSpan, associatedMessage);\n }\n}\n/**\n * Serialize an i18n message into two arrays: messageParts and placeholders.\n *\n * These arrays will be used to generate `$localize` tagged template literals.\n *\n * @param message The message to be serialized.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction serializeI18nMessageForLocalize(message) {\n const pieces = [];\n const serializerVisitor = new LocalizeSerializerVisitor(message.placeholderToMessage, pieces);\n message.nodes.forEach(node => node.visit(serializerVisitor));\n return processMessagePieces(pieces);\n}\nfunction getSourceSpan(message) {\n const startNode = message.nodes[0];\n const endNode = message.nodes[message.nodes.length - 1];\n return new ParseSourceSpan(startNode.sourceSpan.fullStart, endNode.sourceSpan.end, startNode.sourceSpan.fullStart, startNode.sourceSpan.details);\n}\n/**\n * Convert the list of serialized MessagePieces into two arrays.\n *\n * One contains the literal string pieces and the other the placeholders that will be replaced by\n * expressions when rendering `$localize` tagged template literals.\n *\n * @param pieces The pieces to process.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction processMessagePieces(pieces) {\n const messageParts = [];\n const placeHolders = [];\n if (pieces[0] instanceof PlaceholderPiece) {\n // The first piece was a placeholder so we need to add an initial empty message part.\n messageParts.push(createEmptyMessagePart(pieces[0].sourceSpan.start));\n }\n for (let i = 0; i < pieces.length; i++) {\n const part = pieces[i];\n if (part instanceof LiteralPiece) {\n messageParts.push(part);\n } else {\n placeHolders.push(part);\n if (pieces[i - 1] instanceof PlaceholderPiece) {\n // There were two placeholders in a row, so we need to add an empty message part.\n messageParts.push(createEmptyMessagePart(pieces[i - 1].sourceSpan.end));\n }\n }\n }\n if (pieces[pieces.length - 1] instanceof PlaceholderPiece) {\n // The last piece was a placeholder so we need to add a final empty message part.\n messageParts.push(createEmptyMessagePart(pieces[pieces.length - 1].sourceSpan.end));\n }\n return {\n messageParts,\n placeHolders\n };\n}\nfunction createEmptyMessagePart(location) {\n return new LiteralPiece('', new ParseSourceSpan(location, location));\n}\n\n// Selector attribute name of `<ng-content>`\nconst NG_CONTENT_SELECT_ATTR = 'select';\n// Attribute name of `ngProjectAs`.\nconst NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Global symbols available only inside event bindings.\nconst EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);\n// List of supported global targets for event listeners\nconst GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\nfunction prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {\n const {\n type,\n name,\n target,\n phase,\n handler\n } = eventAst;\n if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {\n throw new Error(`Unexpected global target '${target}' defined for '${name}' event.\n Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS.keys())}.`);\n }\n const eventArgumentName = '$event';\n const implicitReceiverAccesses = new Set();\n const implicitReceiverExpr = scope === null || scope.bindingLevel === 0 ? variable(CONTEXT_NAME) : scope.getOrCreateSharedContextVar(0);\n const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);\n const statements = [];\n const variableDeclarations = scope?.variableDeclarations();\n const restoreViewStatement = scope?.restoreViewStatement();\n if (variableDeclarations) {\n // `variableDeclarations` needs to run first, because\n // `restoreViewStatement` depends on the result.\n statements.push(...variableDeclarations);\n }\n statements.push(...bindingStatements);\n if (restoreViewStatement) {\n statements.unshift(restoreViewStatement);\n // If there's a `restoreView` call, we need to reset the view at the end of the listener\n // in order to avoid a leak. If there's a `return` statement already, we wrap it in the\n // call, e.g. `return resetView(ctx.foo())`. Otherwise we add the call as the last statement.\n const lastStatement = statements[statements.length - 1];\n if (lastStatement instanceof ReturnStatement) {\n statements[statements.length - 1] = new ReturnStatement(invokeInstruction(lastStatement.value.sourceSpan, Identifiers.resetView, [lastStatement.value]));\n } else {\n statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));\n }\n }\n const eventName = type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerName(name, phase) : name;\n const fnName = handlerName && sanitizeIdentifier(handlerName);\n const fnArgs = [];\n if (implicitReceiverAccesses.has(eventArgumentName)) {\n fnArgs.push(new FnParam(eventArgumentName, DYNAMIC_TYPE));\n }\n const handlerFn = fn(fnArgs, statements, INFERRED_TYPE, null, fnName);\n const params = [literal(eventName), handlerFn];\n if (target) {\n params.push(literal(false),\n // `useCapture` flag, defaults to `false`\n importExpr(GLOBAL_TARGET_RESOLVERS.get(target)));\n }\n return params;\n}\nfunction createComponentDefConsts() {\n return {\n prepareStatements: [],\n constExpressions: [],\n i18nVarRefsCache: new Map()\n };\n}\nclass TemplateDefinitionBuilder {\n constructor(constantPool, parentBindingScope, level = 0, contextName, i18nContext, templateIndex, templateName, _namespace, relativeContextFilePath, i18nUseExternalIds, deferBlocks, _constants = createComponentDefConsts()) {\n this.constantPool = constantPool;\n this.level = level;\n this.contextName = contextName;\n this.i18nContext = i18nContext;\n this.templateIndex = templateIndex;\n this.templateName = templateName;\n this._namespace = _namespace;\n this.i18nUseExternalIds = i18nUseExternalIds;\n this.deferBlocks = deferBlocks;\n this._constants = _constants;\n this._dataIndex = 0;\n this._bindingContext = 0;\n this._prefixCode = [];\n /**\n * List of callbacks to generate creation mode instructions. We store them here as we process\n * the template so bindings in listeners are resolved only once all nodes have been visited.\n * This ensures all local refs and context variables are available for matching.\n */\n this._creationCodeFns = [];\n /**\n * List of callbacks to generate update mode instructions. We store them here as we process\n * the template so bindings are resolved only once all nodes have been visited. This ensures\n * all local refs and context variables are available for matching.\n */\n this._updateCodeFns = [];\n /** Index of the currently-selected node. */\n this._currentIndex = 0;\n /** Temporary variable declarations generated from visiting pipes, literals, etc. */\n this._tempVariables = [];\n /**\n * List of callbacks to build nested templates. Nested templates must not be visited until\n * after the parent template has finished visiting all of its nodes. This ensures that all\n * local ref bindings in nested templates are able to find local ref values if the refs\n * are defined after the template declaration.\n */\n this._nestedTemplateFns = [];\n // i18n context local to this template\n this.i18n = null;\n // Number of slots to reserve for pureFunctions\n this._pureFunctionSlots = 0;\n // Number of binding slots\n this._bindingSlots = 0;\n // Projection slots found in the template. Projection slots can distribute projected\n // nodes based on a selector, or can just use the wildcard selector to match\n // all nodes which aren't matching any selector.\n this._ngContentReservedSlots = [];\n // Number of non-default selectors found in all parent templates of this template. We need to\n // track it to properly adjust projection slot index in the `projection` instruction.\n this._ngContentSelectorsOffset = 0;\n // Expression that should be used as implicit receiver when converting template\n // expressions to output AST.\n this._implicitReceiverExpr = null;\n // These should be handled in the template or element directly.\n this.visitReference = invalid;\n this.visitVariable = invalid;\n this.visitTextAttribute = invalid;\n this.visitBoundAttribute = invalid;\n this.visitBoundEvent = invalid;\n this._bindingScope = parentBindingScope.nestedScope(level);\n // Turn the relative context file path into an identifier by replacing non-alphanumeric\n // characters with underscores.\n this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';\n this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), numSlots => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {\n this._bindingScope.set(this.level, localName, value);\n this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);\n });\n }\n buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {\n this._ngContentSelectorsOffset = ngContentSelectorsOffset;\n if (this._namespace !== Identifiers.namespaceHTML) {\n this.creationInstruction(null, this._namespace);\n }\n // Create variable bindings\n variables.forEach(v => this.registerContextVariables(v));\n // Initiate i18n context in case:\n // - this template has parent i18n context\n // - or the template has i18n meta associated with it,\n // but it's not initiated by the Element (e.g. <ng-template i18n>)\n const initI18nContext = this.i18nContext || isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n);\n const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);\n if (initI18nContext) {\n this.i18nStart(null, i18n, selfClosingI18nInstruction);\n }\n // This is the initial pass through the nodes of this template. In this pass, we\n // queue all creation mode and update mode instructions for generation in the second\n // pass. It's necessary to separate the passes to ensure local refs are defined before\n // resolving bindings. We also count bindings in this pass as we walk bound expressions.\n visitAll$1(this, nodes);\n // Add total binding count to pure function count so pure function instructions are\n // generated with the correct slot offset when update instructions are processed.\n this._pureFunctionSlots += this._bindingSlots;\n // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and\n // `pipeBind` update instructions), so we have to update the slot offsets manually\n // to account for bindings.\n this._valueConverter.updatePipeSlotOffsets(this._bindingSlots);\n // Nested templates must be processed before creation instructions so template()\n // instructions can be generated with the correct internal const count.\n this._nestedTemplateFns.forEach(buildTemplateFn => buildTemplateFn());\n // Output the `projectionDef` instruction when some `<ng-content>` tags are present.\n // The `projectionDef` instruction is only emitted for the component template and\n // is skipped for nested templates (<ng-template> tags).\n if (this.level === 0 && this._ngContentReservedSlots.length) {\n const parameters = [];\n // By default the `projectionDef` instructions creates one slot for the wildcard\n // selector if no parameters are passed. Therefore we only want to allocate a new\n // array for the projection slots if the default projection slot is not sufficient.\n if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {\n const r3ReservedSlots = this._ngContentReservedSlots.map(s => s !== '*' ? parseSelectorToR3Selector(s) : s);\n parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));\n }\n // Since we accumulate ngContent selectors while processing template elements,\n // we *prepend* `projectionDef` to creation instructions block, to put it before\n // any `projection` instructions\n this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */true);\n }\n if (initI18nContext) {\n this.i18nEnd(null, selfClosingI18nInstruction);\n }\n // Generate all the creation mode instructions (e.g. resolve bindings in listeners)\n const creationStatements = getInstructionStatements(this._creationCodeFns);\n // Generate all the update mode instructions (e.g. resolve property or text bindings)\n const updateStatements = getInstructionStatements(this._updateCodeFns);\n // Variable declaration must occur after binding resolution so we can generate context\n // instructions that build on each other.\n // e.g. const b = nextContext().$implicit(); const b = nextContext();\n const creationVariables = this._bindingScope.viewSnapshotStatements();\n const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);\n const creationBlock = creationStatements.length > 0 ? [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, creationVariables.concat(creationStatements))] : [];\n const updateBlock = updateStatements.length > 0 ? [renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(updateStatements))] : [];\n return fn(\n // i.e. (rf: RenderFlags, ctx: any)\n [new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n // Temporary variable declarations for query refresh (i.e. let _t: any;)\n ...this._prefixCode,\n // Creating mode (i.e. if (rf & RenderFlags.Create) { ... })\n ...creationBlock,\n // Binding and refresh mode (i.e. if (rf & RenderFlags.Update) {...})\n ...updateBlock], INFERRED_TYPE, null, this.templateName);\n }\n // LocalResolver\n getLocal(name) {\n return this._bindingScope.get(name);\n }\n // LocalResolver\n notifyImplicitReceiverUse() {\n this._bindingScope.notifyImplicitReceiverUse();\n }\n // LocalResolver\n maybeRestoreView() {\n this._bindingScope.maybeRestoreView();\n }\n i18nTranslate(message, params = {}, ref, transformFn) {\n const _ref = ref || this.i18nGenerateMainBlockVar();\n // Closure Compiler requires const names to start with `MSG_` but disallows any other const to\n // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call\n const closureVar = this.i18nGenerateClosureVar(message.id);\n const statements = getTranslationDeclStmts(message, _ref, closureVar, params, transformFn);\n this._constants.prepareStatements.push(...statements);\n return _ref;\n }\n registerContextVariables(variable$1) {\n const scopedName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variable$1.name + scopedName);\n this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* DeclarationPriority.CONTEXT */, (scope, relativeLevel) => {\n let rhs;\n if (scope.bindingLevel === retrievalLevel) {\n if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {\n // e.g. restoredCtx.\n // We have to get the context from a view reference, if one is available, because\n // the context that was passed in during creation may not be correct anymore.\n // For more information see: https://github.com/angular/angular/pull/40360.\n rhs = variable(RESTORED_VIEW_CONTEXT_NAME);\n scope.notifyRestoredViewContextUse();\n } else {\n // e.g. ctx\n rhs = variable(CONTEXT_NAME);\n }\n } else {\n const sharedCtxVar = scope.getSharedContextName(retrievalLevel);\n // e.g. ctx_r0 OR x(2);\n rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);\n }\n // e.g. const $item$ = x(2).$implicit;\n return [lhs.set(rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()];\n });\n }\n i18nAppendBindings(expressions) {\n if (expressions.length > 0) {\n expressions.forEach(expression => this.i18n.appendBinding(expression));\n }\n }\n i18nBindProps(props) {\n const bound = {};\n Object.keys(props).forEach(key => {\n const prop = props[key];\n if (prop instanceof Text$3) {\n bound[key] = literal(prop.value);\n } else {\n const value = prop.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n const {\n strings,\n expressions\n } = value;\n const {\n id,\n bindings\n } = this.i18n;\n const label = assembleI18nBoundString(strings, bindings.size, id);\n this.i18nAppendBindings(expressions);\n bound[key] = literal(label);\n }\n }\n });\n return bound;\n }\n // Generates top level vars for i18n blocks (i.e. `i18n_N`).\n i18nGenerateMainBlockVar() {\n return variable(this.constantPool.uniqueName(TRANSLATION_VAR_PREFIX));\n }\n // Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n i18nGenerateClosureVar(messageId) {\n let name;\n const suffix = this.fileBasedI18nSuffix.toUpperCase();\n if (this.i18nUseExternalIds) {\n const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n const uniqueSuffix = this.constantPool.uniqueName(suffix);\n name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n } else {\n const prefix = getTranslationConstPrefix(suffix);\n name = this.constantPool.uniqueName(prefix);\n }\n return variable(name);\n }\n i18nUpdateRef(context) {\n const {\n icus,\n meta,\n isRoot,\n isResolved,\n isEmitted\n } = context;\n if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {\n context.isEmitted = true;\n const placeholders = context.getSerializedPlaceholders();\n let icuMapping = {};\n let params = placeholders.size ? placeholdersToParams(placeholders) : {};\n if (icus.size) {\n icus.forEach((refs, key) => {\n if (refs.length === 1) {\n // if we have one ICU defined for a given\n // placeholder - just output its reference\n params[key] = refs[0];\n } else {\n // ... otherwise we need to activate post-processing\n // to replace ICU placeholders with proper values\n const placeholder = wrapI18nPlaceholder(`${I18N_ICU_MAPPING_PREFIX}${key}`);\n params[key] = literal(placeholder);\n icuMapping[key] = literalArr(refs);\n }\n });\n }\n // translation requires post processing in 2 cases:\n // - if we have placeholders with multiple values (ex. `START_DIV`: [<5B>#1<>, <20>#2<>, ...])\n // - if we have multiple ICUs that refer to the same placeholder name\n const needsPostprocessing = Array.from(placeholders.values()).some(value => value.length > 1) || Object.keys(icuMapping).length;\n let transformFn;\n if (needsPostprocessing) {\n transformFn = raw => {\n const args = [raw];\n if (Object.keys(icuMapping).length) {\n args.push(mapLiteral(icuMapping, true));\n }\n return invokeInstruction(null, Identifiers.i18nPostprocess, args);\n };\n }\n this.i18nTranslate(meta, params, context.ref, transformFn);\n }\n }\n i18nStart(span = null, meta, selfClosing) {\n const index = this.allocateDataSlot();\n this.i18n = this.i18nContext ? this.i18nContext.forkChildContext(index, this.templateIndex, meta) : new I18nContext(index, this.i18nGenerateMainBlockVar(), 0, this.templateIndex, meta);\n // generate i18nStart instruction\n const {\n id,\n ref\n } = this.i18n;\n const params = [literal(index), this.addToConsts(ref)];\n if (id > 0) {\n // do not push 3rd argument (sub-block id)\n // into i18nStart call for top level i18n context\n params.push(literal(id));\n }\n this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);\n }\n i18nEnd(span = null, selfClosing) {\n if (!this.i18n) {\n throw new Error('i18nEnd is executed with no i18n context present');\n }\n if (this.i18nContext) {\n this.i18nContext.reconcileChildContext(this.i18n);\n this.i18nUpdateRef(this.i18nContext);\n } else {\n this.i18nUpdateRef(this.i18n);\n }\n // setup accumulated bindings\n const {\n index,\n bindings\n } = this.i18n;\n if (bindings.size) {\n for (const binding of bindings) {\n // for i18n block, advance to the most recent element index (by taking the current number of\n // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the\n // necessary lifecycle hooks of components/directives are properly flushed.\n this.updateInstructionWithAdvance(this.getConstCount() - 1, span, Identifiers.i18nExp, () => this.convertPropertyBinding(binding));\n }\n this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);\n }\n if (!selfClosing) {\n this.creationInstruction(span, Identifiers.i18nEnd);\n }\n this.i18n = null; // reset local i18n context\n }\n i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {\n let hasBindings = false;\n const i18nAttrArgs = [];\n attrs.forEach(attr => {\n const message = attr.i18n;\n const converted = attr.value.visit(this._valueConverter);\n this.allocateBindingSlots(converted);\n if (converted instanceof Interpolation$1) {\n const placeholders = assembleBoundTextPlaceholders(message);\n const params = placeholdersToParams(placeholders);\n i18nAttrArgs.push(literal(attr.name), this.i18nTranslate(message, params));\n converted.expressions.forEach(expression => {\n hasBindings = true;\n this.updateInstructionWithAdvance(nodeIndex, sourceSpan, Identifiers.i18nExp, () => this.convertPropertyBinding(expression));\n });\n }\n });\n if (i18nAttrArgs.length > 0) {\n const index = literal(this.allocateDataSlot());\n const constIndex = this.addToConsts(literalArr(i18nAttrArgs));\n this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);\n if (hasBindings) {\n this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);\n }\n }\n }\n getNamespaceInstruction(namespaceKey) {\n switch (namespaceKey) {\n case 'math':\n return Identifiers.namespaceMathML;\n case 'svg':\n return Identifiers.namespaceSVG;\n default:\n return Identifiers.namespaceHTML;\n }\n }\n addNamespaceInstruction(nsInstruction, element) {\n this._namespace = nsInstruction;\n this.creationInstruction(element.startSourceSpan, nsInstruction);\n }\n /**\n * Adds an update instruction for an interpolated property or attribute, such as\n * `prop=\"{{value}}\"` or `attr.title=\"{{value}}\"`\n */\n interpolatedUpdateInstruction(instruction, elementIndex, attrName, input, value, params) {\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, instruction, () => [literal(attrName), ...this.getUpdateInstructionArguments(value), ...params]);\n }\n visitContent(ngContent) {\n const slot = this.allocateDataSlot();\n const projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;\n const parameters = [literal(slot)];\n this._ngContentReservedSlots.push(ngContent.selector);\n const nonContentSelectAttributes = ngContent.attributes.filter(attr => attr.name.toLowerCase() !== NG_CONTENT_SELECT_ATTR);\n const attributes = this.getAttributeExpressions(ngContent.name, nonContentSelectAttributes, [], []);\n if (attributes.length > 0) {\n parameters.push(literal(projectionSlotIdx), literalArr(attributes));\n } else if (projectionSlotIdx !== 0) {\n parameters.push(literal(projectionSlotIdx));\n }\n this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);\n if (this.i18n) {\n this.i18n.appendProjection(ngContent.i18n, slot);\n }\n }\n visitElement(element) {\n const elementIndex = this.allocateDataSlot();\n const stylingBuilder = new StylingBuilder(null);\n let isNonBindableMode = false;\n const isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);\n const outputAttrs = [];\n const [namespaceKey, elementName] = splitNsName(element.name);\n const isNgContainer$1 = isNgContainer(element.name);\n // Handle styling, i18n, ngNonBindable attributes\n for (const attr of element.attributes) {\n const {\n name,\n value\n } = attr;\n if (name === NON_BINDABLE_ATTR) {\n isNonBindableMode = true;\n } else if (name === 'style') {\n stylingBuilder.registerStyleAttr(value);\n } else if (name === 'class') {\n stylingBuilder.registerClassAttr(value);\n } else {\n outputAttrs.push(attr);\n }\n }\n // Regular element or ng-container creation mode\n const parameters = [literal(elementIndex)];\n if (!isNgContainer$1) {\n parameters.push(literal(elementName));\n }\n // Add the attributes\n const allOtherInputs = [];\n const boundI18nAttrs = [];\n element.inputs.forEach(input => {\n const stylingInputWasSet = stylingBuilder.registerBoundInput(input);\n if (!stylingInputWasSet) {\n if (input.type === 0 /* BindingType.Property */ && input.i18n) {\n boundI18nAttrs.push(input);\n } else {\n allOtherInputs.push(input);\n }\n }\n });\n // add attributes for directive and projection matching purposes\n const attributes = this.getAttributeExpressions(element.name, outputAttrs, allOtherInputs, element.outputs, stylingBuilder, [], boundI18nAttrs);\n parameters.push(this.addAttrsToConsts(attributes));\n // local refs (ex.: <div #foo #bar=\"baz\">)\n const refs = this.prepareRefsArray(element.references);\n parameters.push(this.addToConsts(refs));\n const wasInNamespace = this._namespace;\n const currentNamespace = this.getNamespaceInstruction(namespaceKey);\n // If the namespace is changing now, include an instruction to change it\n // during element creation.\n if (currentNamespace !== wasInNamespace) {\n this.addNamespaceInstruction(currentNamespace, element);\n }\n if (this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex);\n }\n // Note that we do not append text node instructions and ICUs inside i18n section,\n // so we exclude them while calculating whether current element has children\n const hasChildren = !isI18nRootElement && this.i18n ? !hasTextChildrenOnly(element.children) : element.children.length > 0;\n const createSelfClosingInstruction = !stylingBuilder.hasBindingsWithPipes && element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;\n const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);\n if (createSelfClosingInstruction) {\n this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));\n } else {\n this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));\n if (isNonBindableMode) {\n this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);\n }\n if (boundI18nAttrs.length > 0) {\n this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, element.startSourceSpan ?? element.sourceSpan);\n }\n // Generate Listeners (outputs)\n if (element.outputs.length > 0) {\n for (const outputAst of element.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element.name, outputAst, elementIndex));\n }\n }\n // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and\n // listeners, to make sure i18nAttributes instruction targets current element at runtime.\n if (isI18nRootElement) {\n this.i18nStart(element.startSourceSpan, element.i18n, createSelfClosingI18nInstruction);\n }\n }\n // the code here will collect all update-level styling instructions and add them to the\n // update block of the template function AOT code. Instructions like `styleProp`,\n // `styleMap`, `classMap`, `classProp`\n // are all generated and assigned in the code below.\n const stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);\n const limit = stylingInstructions.length - 1;\n for (let i = 0; i <= limit; i++) {\n const instruction = stylingInstructions[i];\n this._bindingSlots += this.processStylingUpdateInstruction(elementIndex, instruction);\n }\n // the reason why `undefined` is used is because the renderer understands this as a\n // special value to symbolize that there is no RHS to this binding\n // TODO (matsko): revisit this once FW-959 is approached\n const emptyValueBindInstruction = literal(undefined);\n const propertyBindings = [];\n const attributeBindings = [];\n // Generate element input bindings\n allOtherInputs.forEach(input => {\n const inputType = input.type;\n if (inputType === 4 /* BindingType.Animation */) {\n const value = input.value.visit(this._valueConverter);\n // animation bindings can be presented in the following formats:\n // 1. [@binding]=\"fooExp\"\n // 2. [@binding]=\"{value:fooExp, params:{...}}\"\n // 3. [@binding]\n // 4. @binding\n // All formats will be valid for when a synthetic binding is created.\n // The reasoning for this is because the renderer should get each\n // synthetic binding value in the order of the array that they are\n // defined in...\n const hasValue = value instanceof LiteralPrimitive ? !!value.value : true;\n this.allocateBindingSlots(value);\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))\n });\n } else {\n // we must skip attributes with associated i18n context, since these attributes are handled\n // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated\n if (input.i18n) return;\n const value = input.value.visit(this._valueConverter);\n if (value !== undefined) {\n const params = [];\n const [attrNamespace, attrName] = splitNsName(input.name);\n const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;\n let sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);\n if (!sanitizationRef) {\n // If there was no sanitization function found based on the security context\n // of an attribute/property - check whether this attribute/property is\n // one of the security-sensitive <iframe> attributes (and that the current\n // element is actually an <iframe>).\n if (isIframeElement(element.name) && isIframeSecuritySensitiveAttr(input.name)) {\n sanitizationRef = importExpr(Identifiers.validateIframeAttribute);\n }\n }\n if (sanitizationRef) {\n params.push(sanitizationRef);\n }\n if (attrNamespace) {\n const namespaceLiteral = literal(attrNamespace);\n if (sanitizationRef) {\n params.push(namespaceLiteral);\n } else {\n // If there wasn't a sanitization ref, we need to add\n // an extra param so that we can pass in the namespace.\n params.push(literal(null), namespaceLiteral);\n }\n }\n this.allocateBindingSlots(value);\n if (inputType === 0 /* BindingType.Property */) {\n if (value instanceof Interpolation$1) {\n // prop=\"{{value}}\" and friends\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);\n } else {\n // [prop]=\"value\"\n // Collect all the properties so that we can chain into a single function at the end.\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)\n });\n }\n } else if (inputType === 1 /* BindingType.Attribute */) {\n if (value instanceof Interpolation$1 && getInterpolationArgsLength(value) > 1) {\n // attr.name=\"text{{value}}\" and friends\n this.interpolatedUpdateInstruction(getAttributeInterpolationExpression(value), elementIndex, attrName, input, value, params);\n } else {\n const boundValue = value instanceof Interpolation$1 ? value.expressions[0] : value;\n // [attr.name]=\"value\" or attr.name=\"{{value}}\"\n // Collect the attribute bindings so that they can be chained at the end.\n attributeBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(boundValue), attrName, params)\n });\n }\n } else {\n // class prop\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {\n return [literal(elementIndex), literal(attrName), this.convertPropertyBinding(value), ...params];\n });\n }\n }\n }\n });\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n for (const attributeBinding of attributeBindings) {\n this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);\n }\n // Traverse element child nodes\n visitAll$1(this, element.children);\n if (!isI18nRootElement && this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex, true);\n }\n if (!createSelfClosingInstruction) {\n // Finish element construction mode.\n const span = element.endSourceSpan ?? element.sourceSpan;\n if (isI18nRootElement) {\n this.i18nEnd(span, createSelfClosingI18nInstruction);\n }\n if (isNonBindableMode) {\n this.creationInstruction(span, Identifiers.enableBindings);\n }\n this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);\n }\n }\n visitTemplate(template) {\n const NG_TEMPLATE_TAG_NAME = 'ng-template';\n const templateIndex = this.allocateDataSlot();\n if (this.i18n) {\n this.i18n.appendTemplate(template.i18n, templateIndex);\n }\n const tagNameWithoutNamespace = template.tagName ? splitNsName(template.tagName)[1] : template.tagName;\n const contextName = `${this.contextName}${template.tagName ? '_' + sanitizeIdentifier(template.tagName) : ''}_${templateIndex}`;\n const templateName = `${contextName}_Template`;\n const parameters = [literal(templateIndex), variable(templateName),\n // We don't care about the tag's namespace here, because we infer\n // it based on the parent nodes inside the template instruction.\n literal(tagNameWithoutNamespace)];\n // prepare attributes parameter (including attributes used for directive matching)\n const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template.attributes, template.inputs, template.outputs, undefined /* styles */, template.templateAttrs);\n parameters.push(this.addAttrsToConsts(attrsExprs));\n // local refs (ex.: <ng-template #foo>)\n if (template.references && template.references.length) {\n const refs = this.prepareRefsArray(template.references);\n parameters.push(this.addToConsts(refs));\n parameters.push(importExpr(Identifiers.templateRefExtractor));\n }\n // Create the template function\n const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this._constants);\n // Nested templates must not be visited until after their parent templates have completed\n // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't\n // be able to support bindings in nested templates to local refs that occur after the\n // template definition. e.g. <div *ngIf=\"showing\">{{ foo }}</div> <div #foo></div>\n this._nestedTemplateFns.push(() => {\n const templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, template.i18n);\n this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName));\n if (templateVisitor._ngContentReservedSlots.length) {\n this._ngContentReservedSlots.push(...templateVisitor._ngContentReservedSlots);\n }\n });\n // e.g. template(1, MyComp_Template_1)\n this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {\n parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));\n return trimTrailingNulls(parameters);\n });\n // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al;\n this.templatePropertyBindings(templateIndex, template.templateAttrs);\n // Only add normal input/output binding instructions on explicit <ng-template> elements.\n if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME) {\n const [i18nInputs, inputs] = partitionArray(template.inputs, hasI18nMeta);\n // Add i18n attributes that may act as inputs to directives. If such attributes are present,\n // generate `i18nAttributes` instruction. Note: we generate it only for explicit <ng-template>\n // elements, in case of inline templates, corresponding instructions will be generated in the\n // nested template function.\n if (i18nInputs.length > 0) {\n this.i18nAttributesInstruction(templateIndex, i18nInputs, template.startSourceSpan ?? template.sourceSpan);\n }\n // Add the input bindings\n if (inputs.length > 0) {\n this.templatePropertyBindings(templateIndex, inputs);\n }\n // Generate listeners for directive output\n for (const outputAst of template.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter('ng_template', outputAst, templateIndex));\n }\n }\n }\n visitBoundText(text) {\n if (this.i18n) {\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n this.i18n.appendBoundText(text.i18n);\n this.i18nAppendBindings(value.expressions);\n }\n return;\n }\n const nodeIndex = this.allocateDataSlot();\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n this.updateInstructionWithAdvance(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), () => this.getUpdateInstructionArguments(value));\n } else {\n error('Text nodes should be interpolated and never bound directly.');\n }\n }\n visitText(text) {\n // when a text element is located within a translatable\n // block, we exclude this text element from instructions set,\n // since it will be captured in i18n content and processed at runtime\n if (!this.i18n) {\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);\n }\n }\n visitIcu(icu) {\n let initWasInvoked = false;\n // if an ICU was created outside of i18n block, we still treat\n // it as a translatable entity and invoke i18nStart and i18nEnd\n // to generate i18n context and the necessary instructions\n if (!this.i18n) {\n initWasInvoked = true;\n this.i18nStart(null, icu.i18n, true);\n }\n const i18n = this.i18n;\n const vars = this.i18nBindProps(icu.vars);\n const placeholders = this.i18nBindProps(icu.placeholders);\n // output ICU directly and keep ICU reference in context\n const message = icu.i18n;\n // we always need post-processing function for ICUs, to make sure that:\n // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:\n // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders\n // inside ICUs)\n // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values\n const transformFn = raw => {\n const params = {\n ...vars,\n ...placeholders\n };\n const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */false);\n return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);\n };\n // in case the whole i18n message is a single ICU - we do not need to\n // create a separate top-level translation, we can use the root ref instead\n // and make this ICU a top-level translation\n // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function\n // separately, so we do not pass placeholders into `i18nTranslate` function.\n if (isSingleI18nIcu(i18n.meta)) {\n this.i18nTranslate(message, /* placeholders */{}, i18n.ref, transformFn);\n } else {\n // output ICU directly and keep ICU reference in context\n const ref = this.i18nTranslate(message, /* placeholders */{}, /* ref */undefined, transformFn);\n i18n.appendIcu(icuFromI18nMessage(message).name, ref);\n }\n if (initWasInvoked) {\n this.i18nEnd(null, true);\n }\n return null;\n }\n visitDeferredBlock(deferred) {\n const templateIndex = this.allocateDataSlot();\n const deferredDeps = this.deferBlocks.get(deferred);\n const contextName = `${this.contextName}_Defer_${templateIndex}`;\n const depsFnName = `${contextName}_DepsFn`;\n const parameters = [literal(templateIndex), deferredDeps ? variable(depsFnName) : TYPED_NULL_EXPR];\n if (deferredDeps) {\n // This defer block has deps for which we need to generate dynamic imports.\n const dependencyExp = [];\n for (const deferredDep of deferredDeps) {\n if (deferredDep.isDeferrable) {\n // Callback function, e.g. `function(m) { return m.MyCmp; }`.\n const innerFn = fn([new FnParam('m', DYNAMIC_TYPE)], [new ReturnStatement(variable('m').prop(deferredDep.symbolName))]);\n const fileName = deferredDep.importPath;\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = new DynamicImportExpr(fileName).prop('then').callFn([innerFn]);\n dependencyExp.push(importExpr);\n } else {\n // Non-deferrable symbol, just use a reference to the type.\n dependencyExp.push(deferredDep.type);\n }\n }\n const depsFnBody = [];\n depsFnBody.push(new ReturnStatement(literalArr(dependencyExp)));\n const depsFnExpr = fn([] /* args */, depsFnBody, INFERRED_TYPE, null, depsFnName);\n this.constantPool.statements.push(depsFnExpr.toDeclStmt(depsFnName));\n }\n // e.g. `defer(1, MyComp_Defer_1_DepsFn, ...)`\n this.creationInstruction(deferred.sourceSpan, Identifiers.defer, () => {\n return trimTrailingNulls(parameters);\n });\n }\n // TODO: implement nested deferred block instructions.\n visitDeferredTrigger(trigger) {}\n visitDeferredBlockPlaceholder(block) {}\n visitDeferredBlockError(block) {}\n visitDeferredBlockLoading(block) {}\n allocateDataSlot() {\n return this._dataIndex++;\n }\n getConstCount() {\n return this._dataIndex;\n }\n getVarCount() {\n return this._pureFunctionSlots;\n }\n getConsts() {\n return this._constants;\n }\n getNgContentSelectors() {\n return this._ngContentReservedSlots.length ? this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) : null;\n }\n bindingContext() {\n return `${this._bindingContext++}`;\n }\n templatePropertyBindings(templateIndex, attrs) {\n const propertyBindings = [];\n for (const input of attrs) {\n if (!(input instanceof BoundAttribute)) {\n continue;\n }\n const value = input.value.visit(this._valueConverter);\n if (value === undefined) {\n continue;\n }\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n // Params typically contain attribute namespace and value sanitizer, which is applicable\n // for regular HTML elements, but not applicable for <ng-template> (since props act as\n // inputs to directives), so keep params array empty.\n const params = [];\n // prop=\"{{value}}\" case\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), templateIndex, input.name, input, value, params);\n } else {\n // [prop]=\"value\" case\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), input.name)\n });\n }\n }\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(templateIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n }\n // Bindings must only be resolved after all local refs have been visited, so all\n // instructions are queued in callbacks that execute once the initial pass has completed.\n // Otherwise, we wouldn't be able to support local refs that are defined after their\n // bindings. e.g. {{ foo }} <div #foo></div>\n instructionFn(fns, span, reference, paramsOrFn, prepend = false) {\n fns[prepend ? 'unshift' : 'push']({\n span,\n reference,\n paramsOrFn\n });\n }\n processStylingUpdateInstruction(elementIndex, instruction) {\n let allocateBindingSlots = 0;\n if (instruction) {\n for (const call of instruction.calls) {\n allocateBindingSlots += call.allocateBindingSlots;\n this.updateInstructionWithAdvance(elementIndex, call.sourceSpan, instruction.reference, () => call.params(value => call.supportsInterpolation && value instanceof Interpolation$1 ? this.getUpdateInstructionArguments(value) : this.convertPropertyBinding(value)));\n }\n }\n return allocateBindingSlots;\n }\n creationInstruction(span, reference, paramsOrFn, prepend) {\n this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);\n }\n updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {\n this.addAdvanceInstructionIfNecessary(nodeIndex, span);\n this.updateInstruction(span, reference, paramsOrFn);\n }\n updateInstruction(span, reference, paramsOrFn) {\n this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);\n }\n addAdvanceInstructionIfNecessary(nodeIndex, span) {\n if (nodeIndex !== this._currentIndex) {\n const delta = nodeIndex - this._currentIndex;\n if (delta < 1) {\n throw new Error('advance instruction can only go forwards');\n }\n this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);\n this._currentIndex = nodeIndex;\n }\n }\n allocatePureFunctionSlots(numSlots) {\n const originalSlots = this._pureFunctionSlots;\n this._pureFunctionSlots += numSlots;\n return originalSlots;\n }\n allocateBindingSlots(value) {\n this._bindingSlots += value instanceof Interpolation$1 ? value.expressions.length : 1;\n }\n /**\n * Gets an expression that refers to the implicit receiver. The implicit\n * receiver is always the root level context.\n */\n getImplicitReceiverExpr() {\n if (this._implicitReceiverExpr) {\n return this._implicitReceiverExpr;\n }\n return this._implicitReceiverExpr = this.level === 0 ? variable(CONTEXT_NAME) : this._bindingScope.getOrCreateSharedContextVar(0);\n }\n convertPropertyBinding(value) {\n const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n const valExpr = convertedPropertyBinding.currValExpr;\n this._tempVariables.push(...convertedPropertyBinding.stmts);\n return valExpr;\n }\n /**\n * Gets a list of argument expressions to pass to an update instruction expression. Also updates\n * the temp variables state with temp variables that were identified as needing to be created\n * while visiting the arguments.\n * @param value The original expression we will be resolving an arguments list from.\n */\n getUpdateInstructionArguments(value) {\n const {\n args,\n stmts\n } = convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n this._tempVariables.push(...stmts);\n return args;\n }\n /**\n * Prepares all attribute expression values for the `TAttributes` array.\n *\n * The purpose of this function is to properly construct an attributes array that\n * is passed into the `elementStart` (or just `element`) functions. Because there\n * are many different types of attributes, the array needs to be constructed in a\n * special way so that `elementStart` can properly evaluate them.\n *\n * The format looks like this:\n *\n * ```\n * attrs = [prop, value, prop2, value2,\n * PROJECT_AS, selector,\n * CLASSES, class1, class2,\n * STYLES, style1, value1, style2, value2,\n * BINDINGS, name1, name2, name3,\n * TEMPLATE, name4, name5, name6,\n * I18N, name7, name8, ...]\n * ```\n *\n * Note that this function will fully ignore all synthetic (@foo) attribute values\n * because those values are intended to always be generated as property instructions.\n */\n getAttributeExpressions(elementName, renderAttributes, inputs, outputs, styles, templateAttrs = [], boundI18nAttrs = []) {\n const alreadySeen = new Set();\n const attrExprs = [];\n let ngProjectAsAttr;\n for (const attr of renderAttributes) {\n if (attr.name === NG_PROJECT_AS_ATTR_NAME) {\n ngProjectAsAttr = attr;\n }\n // Note that static i18n attributes aren't in the i18n array,\n // because they're treated in the same way as regular attributes.\n if (attr.i18n) {\n // When i18n attributes are present on elements with structural directives\n // (e.g. `<div *ngIf title=\"Hello\" i18n-title>`), we want to avoid generating\n // duplicate i18n translation blocks for `ɵɵtemplate` and `ɵɵelement` instruction\n // attributes. So we do a cache lookup to see if suitable i18n translation block\n // already exists.\n const {\n i18nVarRefsCache\n } = this._constants;\n let i18nVarRef;\n if (i18nVarRefsCache.has(attr.i18n)) {\n i18nVarRef = i18nVarRefsCache.get(attr.i18n);\n } else {\n i18nVarRef = this.i18nTranslate(attr.i18n);\n i18nVarRefsCache.set(attr.i18n, i18nVarRef);\n }\n attrExprs.push(literal(attr.name), i18nVarRef);\n } else {\n attrExprs.push(...getAttributeNameLiterals(attr.name), trustedConstAttribute(elementName, attr));\n }\n }\n // Keep ngProjectAs next to the other name, value pairs so we can verify that we match\n // ngProjectAs marker in the attribute name slot.\n if (ngProjectAsAttr) {\n attrExprs.push(...getNgProjectAsLiteral(ngProjectAsAttr));\n }\n function addAttrExpr(key, value) {\n if (typeof key === 'string') {\n if (!alreadySeen.has(key)) {\n attrExprs.push(...getAttributeNameLiterals(key));\n value !== undefined && attrExprs.push(value);\n alreadySeen.add(key);\n }\n } else {\n attrExprs.push(literal(key));\n }\n }\n // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`\n // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as\n // as single property value cell by cell.\n if (styles) {\n styles.populateInitialStylingAttrs(attrExprs);\n }\n if (inputs.length || outputs.length) {\n const attrsLengthBeforeInputs = attrExprs.length;\n for (let i = 0; i < inputs.length; i++) {\n const input = inputs[i];\n // We don't want the animation and attribute bindings in the\n // attributes array since they aren't used for directive matching.\n if (input.type !== 4 /* BindingType.Animation */ && input.type !== 1 /* BindingType.Attribute */) {\n addAttrExpr(input.name);\n }\n }\n for (let i = 0; i < outputs.length; i++) {\n const output = outputs[i];\n if (output.type !== 1 /* ParsedEventType.Animation */) {\n addAttrExpr(output.name);\n }\n }\n // this is a cheap way of adding the marker only after all the input/output\n // values have been filtered (by not including the animation ones) and added\n // to the expressions. The marker is important because it tells the runtime\n // code that this is where attributes without values start...\n if (attrExprs.length !== attrsLengthBeforeInputs) {\n attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* core.AttributeMarker.Bindings */));\n }\n }\n if (templateAttrs.length) {\n attrExprs.push(literal(4 /* core.AttributeMarker.Template */));\n templateAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n if (boundI18nAttrs.length) {\n attrExprs.push(literal(6 /* core.AttributeMarker.I18n */));\n boundI18nAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n return attrExprs;\n }\n addToConsts(expression) {\n if (isNull(expression)) {\n return TYPED_NULL_EXPR;\n }\n const consts = this._constants.constExpressions;\n // Try to reuse a literal that's already in the array, if possible.\n for (let i = 0; i < consts.length; i++) {\n if (consts[i].isEquivalent(expression)) {\n return literal(i);\n }\n }\n return literal(consts.push(expression) - 1);\n }\n addAttrsToConsts(attrs) {\n return attrs.length > 0 ? this.addToConsts(literalArr(attrs)) : TYPED_NULL_EXPR;\n }\n prepareRefsArray(references) {\n if (!references || references.length === 0) {\n return TYPED_NULL_EXPR;\n }\n const refsParam = references.flatMap(reference => {\n const slot = this.allocateDataSlot();\n // Generate the update temporary.\n const variableName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variableName);\n this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DeclarationPriority.DEFAULT */, (scope, relativeLevel) => {\n // e.g. nextContext(2);\n const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];\n // e.g. const $foo$ = reference(1);\n const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));\n return nextContextStmt.concat(refExpr.toConstDecl());\n }, true);\n return [reference.name, reference.value];\n });\n return asLiteral(refsParam);\n }\n prepareListenerParameter(tagName, outputAst, index) {\n return () => {\n const eventName = outputAst.name;\n const bindingFnName = outputAst.type === 1 /* ParsedEventType.Animation */ ?\n // synthetic @listener.foo values are treated the exact same as are standard listeners\n prepareSyntheticListenerFunctionName(eventName, outputAst.phase) : sanitizeIdentifier(eventName);\n const handlerName = `${this.templateName}_${tagName}_${bindingFnName}_${index}_listener`;\n const scope = this._bindingScope.nestedScope(this._bindingScope.bindingLevel, EVENT_BINDING_SCOPE_GLOBALS);\n return prepareEventListenerParameters(outputAst, handlerName, scope);\n };\n }\n}\nclass ValueConverter extends AstMemoryEfficientTransformer {\n constructor(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {\n super();\n this.constantPool = constantPool;\n this.allocateSlot = allocateSlot;\n this.allocatePureFunctionSlots = allocatePureFunctionSlots;\n this.definePipe = definePipe;\n this._pipeBindExprs = [];\n }\n // AstMemoryEfficientTransformer\n visitPipe(pipe, context) {\n // Allocate a slot to create the pipe\n const slot = this.allocateSlot();\n const slotPseudoLocal = `PIPE:${slot}`;\n // Allocate one slot for the result plus one slot per pipe argument\n const pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n const target = new PropertyRead(pipe.span, pipe.sourceSpan, pipe.nameSpan, new ImplicitReceiver(pipe.span, pipe.sourceSpan), slotPseudoLocal);\n const {\n identifier,\n isVarLength\n } = pipeBindingCallInfo(pipe.args);\n this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));\n const args = [pipe.exp, ...pipe.args];\n const convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe.span, pipe.sourceSpan, args)]) : this.visitAll(args);\n const pipeBindExpr = new Call(pipe.span, pipe.sourceSpan, target, [new LiteralPrimitive(pipe.span, pipe.sourceSpan, slot), new LiteralPrimitive(pipe.span, pipe.sourceSpan, pureFunctionSlot), ...convertedArgs], null);\n this._pipeBindExprs.push(pipeBindExpr);\n return pipeBindExpr;\n }\n updatePipeSlotOffsets(bindingSlots) {\n this._pipeBindExprs.forEach(pipe => {\n // update the slot offset arg (index 1) to account for binding slots\n const slotOffset = pipe.args[1];\n slotOffset.value += bindingSlots;\n });\n }\n visitLiteralArray(array, context) {\n return new BuiltinFunctionCall(array.span, array.sourceSpan, this.visitAll(array.expressions), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalArr(values);\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n visitLiteralMap(map, context) {\n return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalMap(values.map((value, index) => ({\n key: map.keys[index].key,\n value,\n quoted: map.keys[index].quoted\n })));\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n}\n// Pipes always have at least one parameter, the value they operate on\nconst pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];\nfunction pipeBindingCallInfo(args) {\n const identifier = pipeBindingIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pipeBindV,\n isVarLength: !identifier\n };\n}\nconst pureFunctionIdentifiers = [Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4, Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8];\nfunction pureFunctionCallInfo(args) {\n const identifier = pureFunctionIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pureFunctionV,\n isVarLength: !identifier\n };\n}\n// e.g. x(2);\nfunction generateNextContextExpr(relativeLevelDiff) {\n return importExpr(Identifiers.nextContext).callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);\n}\nfunction getLiteralFactory(constantPool, literal$1, allocateSlots) {\n const {\n literalFactory,\n literalFactoryArguments\n } = constantPool.getLiteralFactory(literal$1);\n // Allocate 1 slot for the result plus 1 per argument\n const startSlot = allocateSlots(1 + literalFactoryArguments.length);\n const {\n identifier,\n isVarLength\n } = pureFunctionCallInfo(literalFactoryArguments);\n // Literal factories are pure functions that only need to be re-invoked when the parameters\n // change.\n const args = [literal(startSlot), literalFactory];\n if (isVarLength) {\n args.push(literalArr(literalFactoryArguments));\n } else {\n args.push(...literalFactoryArguments);\n }\n return importExpr(identifier).callFn(args);\n}\n/**\n * Gets an array of literals that can be added to an expression\n * to represent the name and namespace of an attribute. E.g.\n * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.\n *\n * @param name Name of the attribute, including the namespace.\n */\nfunction getAttributeNameLiterals(name) {\n const [attributeNamespace, attributeName] = splitNsName(name);\n const nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral];\n }\n return [nameLiteral];\n}\n/** The prefix used to get a shared context in BindingScope's map. */\nconst SHARED_CONTEXT_KEY = '$$shared_ctx$$';\nclass BindingScope {\n static createRootScope() {\n return new BindingScope();\n }\n constructor(bindingLevel = 0, parent = null, globals) {\n this.bindingLevel = bindingLevel;\n this.parent = parent;\n this.globals = globals;\n /** Keeps a map from local variables to their BindingData. */\n this.map = new Map();\n this.referenceNameIndex = 0;\n this.restoreViewVariable = null;\n this.usesRestoredViewContext = false;\n if (globals !== undefined) {\n for (const name of globals) {\n this.set(0, name, variable(name));\n }\n }\n }\n get(name) {\n let current = this;\n while (current) {\n let value = current.map.get(name);\n if (value != null) {\n if (current !== this) {\n // make a local copy and reset the `declare` state\n value = {\n retrievalLevel: value.retrievalLevel,\n lhs: value.lhs,\n declareLocalCallback: value.declareLocalCallback,\n declare: false,\n priority: value.priority\n };\n // Cache the value locally.\n this.map.set(name, value);\n // Possibly generate a shared context var\n this.maybeGenerateSharedContextVar(value);\n this.maybeRestoreView();\n }\n if (value.declareLocalCallback && !value.declare) {\n value.declare = true;\n }\n return value.lhs;\n }\n current = current.parent;\n }\n // If we get to this point, we are looking for a property on the top level component\n // - If level === 0, we are on the top and don't need to re-declare `ctx`.\n // - If level > 0, we are in an embedded view. We need to retrieve the name of the\n // local var we used to store the component context, e.g. const $comp$ = x();\n return this.bindingLevel === 0 ? null : this.getComponentProperty(name);\n }\n /**\n * Create a local variable for later reference.\n *\n * @param retrievalLevel The level from which this value can be retrieved\n * @param name Name of the variable.\n * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n * @param priority The sorting priority of this var\n * @param declareLocalCallback The callback to invoke when declaring this local var\n * @param localRef Whether or not this is a local ref\n */\n set(retrievalLevel, name, lhs, priority = 0 /* DeclarationPriority.DEFAULT */, declareLocalCallback, localRef) {\n if (this.map.has(name)) {\n if (localRef) {\n // Do not throw an error if it's a local ref and do not update existing value,\n // so the first defined ref is always returned.\n return this;\n }\n error(`The name ${name} is already defined in scope to be ${this.map.get(name)}`);\n }\n this.map.set(name, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declare: false,\n declareLocalCallback: declareLocalCallback,\n priority: priority\n });\n return this;\n }\n // Implemented as part of LocalResolver.\n getLocal(name) {\n return this.get(name);\n }\n // Implemented as part of LocalResolver.\n notifyImplicitReceiverUse() {\n if (this.bindingLevel !== 0) {\n // Since the implicit receiver is accessed in an embedded view, we need to\n // ensure that we declare a shared context variable for the current template\n // in the update variables.\n this.map.get(SHARED_CONTEXT_KEY + 0).declare = true;\n }\n }\n nestedScope(level, globals) {\n const newScope = new BindingScope(level, this, globals);\n if (level > 0) newScope.generateSharedContextVar(0);\n return newScope;\n }\n /**\n * Gets or creates a shared context variable and returns its expression. Note that\n * this does not mean that the shared variable will be declared. Variables in the\n * binding scope will be only declared if they are used.\n */\n getOrCreateSharedContextVar(retrievalLevel) {\n const bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;\n if (!this.map.has(bindingKey)) {\n this.generateSharedContextVar(retrievalLevel);\n }\n // Shared context variables are always generated as \"ReadVarExpr\".\n return this.map.get(bindingKey).lhs;\n }\n getSharedContextName(retrievalLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel);\n // Shared context variables are always generated as \"ReadVarExpr\".\n return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;\n }\n maybeGenerateSharedContextVar(value) {\n if (value.priority === 1 /* DeclarationPriority.CONTEXT */ && value.retrievalLevel < this.bindingLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);\n if (sharedCtxObj) {\n sharedCtxObj.declare = true;\n } else {\n this.generateSharedContextVar(value.retrievalLevel);\n }\n }\n }\n generateSharedContextVar(retrievalLevel) {\n const lhs = variable(CONTEXT_NAME + this.freshReferenceName());\n this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declareLocalCallback: (scope, relativeLevel) => {\n // const ctx_r0 = nextContext(2);\n return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];\n },\n declare: false,\n priority: 2 /* DeclarationPriority.SHARED_CONTEXT */\n });\n }\n getComponentProperty(name) {\n const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);\n componentValue.declare = true;\n this.maybeRestoreView();\n return componentValue.lhs.prop(name);\n }\n maybeRestoreView() {\n // View restoration is required for listener instructions inside embedded views, because\n // they only run in creation mode and they can have references to the context object.\n // If the context object changes in update mode, the reference will be incorrect, because\n // it was established during creation.\n if (this.isListenerScope()) {\n if (!this.parent.restoreViewVariable) {\n // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction\n this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());\n }\n this.restoreViewVariable = this.parent.restoreViewVariable;\n }\n }\n restoreViewStatement() {\n if (this.restoreViewVariable) {\n const restoreCall = invokeInstruction(null, Identifiers.restoreView, [this.restoreViewVariable]);\n // Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`\n // depending on whether it is being used.\n return this.usesRestoredViewContext ? variable(RESTORED_VIEW_CONTEXT_NAME).set(restoreCall).toConstDecl() : restoreCall.toStmt();\n }\n return null;\n }\n viewSnapshotStatements() {\n // const $state$ = getCurrentView();\n return this.restoreViewVariable ? [this.restoreViewVariable.set(invokeInstruction(null, Identifiers.getCurrentView, [])).toConstDecl()] : [];\n }\n isListenerScope() {\n return this.parent && this.parent.bindingLevel === this.bindingLevel;\n }\n variableDeclarations() {\n let currentContextLevel = 0;\n return Array.from(this.map.values()).filter(value => value.declare).sort((a, b) => b.retrievalLevel - a.retrievalLevel || b.priority - a.priority).reduce((stmts, value) => {\n const levelDiff = this.bindingLevel - value.retrievalLevel;\n const currStmts = value.declareLocalCallback(this, levelDiff - currentContextLevel);\n currentContextLevel = levelDiff;\n return stmts.concat(currStmts);\n }, []);\n }\n freshReferenceName() {\n let current = this;\n // Find the top scope as it maintains the global reference count\n while (current.parent) current = current.parent;\n const ref = `${REFERENCE_PREFIX}${current.referenceNameIndex++}`;\n return ref;\n }\n hasRestoreViewVariable() {\n return !!this.restoreViewVariable;\n }\n notifyRestoredViewContextUse() {\n this.usesRestoredViewContext = true;\n }\n}\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\nfunction createCssSelector(elementName, attributes) {\n const cssSelector = new CssSelector();\n const elementNameNoNs = splitNsName(elementName)[1];\n cssSelector.setElement(elementNameNoNs);\n Object.getOwnPropertyNames(attributes).forEach(name => {\n const nameNoNs = splitNsName(name)[1];\n const value = attributes[name];\n cssSelector.addAttribute(nameNoNs, value);\n if (name.toLowerCase() === 'class') {\n const classes = value.trim().split(/\\s+/);\n classes.forEach(className => cssSelector.addClassName(className));\n }\n });\n return cssSelector;\n}\n/**\n * Creates an array of expressions out of an `ngProjectAs` attributes\n * which can be added to the instruction parameters.\n */\nfunction getNgProjectAsLiteral(attribute) {\n // Parse the attribute value into a CssSelectorList. Note that we only take the\n // first selector, because we don't support multiple selectors in ngProjectAs.\n const parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];\n return [literal(5 /* core.AttributeMarker.ProjectAs */), asLiteral(parsedR3Selector)];\n}\n/**\n * Gets the instruction to generate for an interpolated property\n * @param interpolation An Interpolation AST\n */\nfunction getPropertyInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.propertyInterpolate;\n case 3:\n return Identifiers.propertyInterpolate1;\n case 5:\n return Identifiers.propertyInterpolate2;\n case 7:\n return Identifiers.propertyInterpolate3;\n case 9:\n return Identifiers.propertyInterpolate4;\n case 11:\n return Identifiers.propertyInterpolate5;\n case 13:\n return Identifiers.propertyInterpolate6;\n case 15:\n return Identifiers.propertyInterpolate7;\n case 17:\n return Identifiers.propertyInterpolate8;\n default:\n return Identifiers.propertyInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated attribute\n * @param interpolation An Interpolation AST\n */\nfunction getAttributeInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 3:\n return Identifiers.attributeInterpolate1;\n case 5:\n return Identifiers.attributeInterpolate2;\n case 7:\n return Identifiers.attributeInterpolate3;\n case 9:\n return Identifiers.attributeInterpolate4;\n case 11:\n return Identifiers.attributeInterpolate5;\n case 13:\n return Identifiers.attributeInterpolate6;\n case 15:\n return Identifiers.attributeInterpolate7;\n case 17:\n return Identifiers.attributeInterpolate8;\n default:\n return Identifiers.attributeInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for interpolated text.\n * @param interpolation An Interpolation AST\n */\nfunction getTextInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.textInterpolate;\n case 3:\n return Identifiers.textInterpolate1;\n case 5:\n return Identifiers.textInterpolate2;\n case 7:\n return Identifiers.textInterpolate3;\n case 9:\n return Identifiers.textInterpolate4;\n case 11:\n return Identifiers.textInterpolate5;\n case 13:\n return Identifiers.textInterpolate6;\n case 15:\n return Identifiers.textInterpolate7;\n case 17:\n return Identifiers.textInterpolate8;\n default:\n return Identifiers.textInterpolateV;\n }\n}\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n * @param options options to modify how the template is parsed\n */\nfunction parseTemplate(template, templateUrl, options = {}) {\n const {\n interpolationConfig,\n preserveWhitespaces,\n enableI18nLegacyMessageIdFormat\n } = options;\n const bindingParser = makeBindingParser(interpolationConfig);\n const htmlParser = new HtmlParser();\n const parseResult = htmlParser.parse(template, templateUrl, {\n leadingTriviaChars: LEADING_TRIVIA_CHARS,\n ...options,\n tokenizeExpansionForms: true,\n tokenizeBlocks: options.enabledBlockTypes != null && options.enabledBlockTypes.size > 0\n });\n if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: parseResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n let rootNodes = parseResult.rootNodes;\n // process i18n meta information (scan attributes, generate ids)\n // before we run whitespace removal process, because existing i18n\n // extraction process (ng extract-i18n) relies on a raw content to generate\n // message ids\n const i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */!preserveWhitespaces, enableI18nLegacyMessageIdFormat);\n const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);\n if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors && i18nMetaResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: i18nMetaResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n rootNodes = i18nMetaResult.rootNodes;\n if (!preserveWhitespaces) {\n rootNodes = visitAll(new WhitespaceVisitor(), rootNodes);\n // run i18n meta visitor again in case whitespaces are removed (because that might affect\n // generated i18n message content) and first pass indicated that i18n content is present in a\n // template. During this pass i18n IDs generated at the first pass will be preserved, so we can\n // mimic existing extraction process (ng extract-i18n)\n if (i18nMetaVisitor.hasI18nMeta) {\n rootNodes = visitAll(new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */false), rootNodes);\n }\n }\n const {\n nodes,\n errors,\n styleUrls,\n styles,\n ngContentSelectors,\n commentNodes\n } = htmlAstToRender3Ast(rootNodes, bindingParser, {\n collectCommentNodes: !!options.collectCommentNodes,\n enabledBlockTypes: options.enabledBlockTypes || new Set()\n });\n errors.push(...parseResult.errors, ...i18nMetaResult.errors);\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: errors.length > 0 ? errors : null,\n nodes,\n styleUrls,\n styles,\n ngContentSelectors\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = commentNodes;\n }\n return parsedTemplate;\n}\nconst elementRegistry = new DomElementSchemaRegistry();\n/**\n * Construct a `BindingParser` with a default configuration.\n */\nfunction makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n return new BindingParser(new Parser$1(new Lexer()), interpolationConfig, elementRegistry, []);\n}\nfunction resolveSanitizationFn(context, isAttribute) {\n switch (context) {\n case SecurityContext.HTML:\n return importExpr(Identifiers.sanitizeHtml);\n case SecurityContext.SCRIPT:\n return importExpr(Identifiers.sanitizeScript);\n case SecurityContext.STYLE:\n // the compiler does not fill in an instruction for [style.prop?] binding\n // values because the style algorithm knows internally what props are subject\n // to sanitization (only [attr.style] values are explicitly sanitized)\n return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;\n case SecurityContext.URL:\n return importExpr(Identifiers.sanitizeUrl);\n case SecurityContext.RESOURCE_URL:\n return importExpr(Identifiers.sanitizeResourceUrl);\n default:\n return null;\n }\n}\nfunction trustedConstAttribute(tagName, attr) {\n const value = asLiteral(attr.value);\n if (isTrustedTypesSink(tagName, attr.name)) {\n switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */true)) {\n case SecurityContext.HTML:\n return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n // NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.\n case SecurityContext.RESOURCE_URL:\n return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n default:\n return value;\n }\n } else {\n return value;\n }\n}\nfunction isSingleElementTemplate(children) {\n return children.length === 1 && children[0] instanceof Element$1;\n}\nfunction isTextNode(node) {\n return node instanceof Text$3 || node instanceof BoundText || node instanceof Icu$1;\n}\nfunction isIframeElement(tagName) {\n return tagName.toLowerCase() === 'iframe';\n}\nfunction hasTextChildrenOnly(children) {\n return children.every(isTextNode);\n}\nfunction getBindingFunctionParams(deferredParams, name, eagerParams) {\n return () => {\n const value = deferredParams();\n const fnParams = Array.isArray(value) ? value : [value];\n if (eagerParams) {\n fnParams.push(...eagerParams);\n }\n if (name) {\n // We want the property name to always be the first function parameter.\n fnParams.unshift(literal(name));\n }\n return fnParams;\n };\n}\n/** Name of the global variable that is used to determine if we use Closure translations or not */\nconst NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';\n/**\n * Generate statements that define a given translation message.\n *\n * ```\n * var I18N_1;\n * if (typeof ngI18nClosureMode !== undefined && ngI18nClosureMode) {\n * var MSG_EXTERNAL_XXX = goog.getMsg(\n * \"Some message with {$interpolation}!\",\n * { \"interpolation\": \"\\uFFFD0\\uFFFD\" }\n * );\n * I18N_1 = MSG_EXTERNAL_XXX;\n * }\n * else {\n * I18N_1 = $localize`Some message with ${'\\uFFFD0\\uFFFD'}!`;\n * }\n * ```\n *\n * @param message The original i18n AST message node\n * @param variable The variable that will be assigned the translation, e.g. `I18N_1`.\n * @param closureVar The variable for Closure `goog.getMsg` calls, e.g. `MSG_EXTERNAL_XXX`.\n * @param params Object mapping placeholder names to their values (e.g.\n * `{ \"interpolation\": \"\\uFFFD0\\uFFFD\" }`).\n * @param transformFn Optional transformation function that will be applied to the translation (e.g.\n * post-processing).\n * @returns An array of statements that defined a given translation.\n */\nfunction getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {\n const statements = [declareI18nVariable(variable), ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */false)))];\n if (transformFn) {\n statements.push(new ExpressionStatement(variable.set(transformFn(variable))));\n }\n return statements;\n}\n/**\n * Create the expression that will be used to guard the closure mode block\n * It is equivalent to:\n *\n * ```\n * typeof ngI18nClosureMode !== undefined && ngI18nClosureMode\n * ```\n */\nfunction createClosureModeGuard() {\n return typeofExpr(variable(NG_I18N_CLOSURE_MODE)).notIdentical(literal('undefined', STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE));\n}\n\n// This regex matches any binding names that contain the \"attr.\" prefix, e.g. \"attr.required\"\n// If there is a match, the first matching group will contain the attribute name to bind.\nconst ATTR_REGEX = /attr\\.([^\\]]+)/;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction baseDirectiveFields(meta, constantPool, bindingParser) {\n const definitionMap = new DefinitionMap();\n const selectors = parseSelectorToR3Selector(meta.selector);\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.type.value);\n // e.g. `selectors: [['', 'someDir', '']]`\n if (selectors.length > 0) {\n definitionMap.set('selectors', asLiteral(selectors));\n }\n if (meta.queries.length > 0) {\n // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }\n definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));\n }\n if (meta.viewQueries.length) {\n definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));\n }\n // e.g. `hostBindings: (rf, ctx) => { ... }\n definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name, definitionMap));\n // e.g 'inputs: {a: 'a'}`\n definitionMap.set('inputs', conditionallyCreateDirectiveBindingLiteral(meta.inputs, true));\n // e.g 'outputs: {a: 'a'}`\n definitionMap.set('outputs', conditionallyCreateDirectiveBindingLiteral(meta.outputs));\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', literalArr(meta.exportAs.map(e => literal(e))));\n }\n if (meta.isStandalone) {\n definitionMap.set('standalone', literal(true));\n }\n if (meta.isSignal) {\n definitionMap.set('signals', literal(true));\n }\n return definitionMap;\n}\n/**\n * Add features to the definition map.\n */\nfunction addFeatures(definitionMap, meta) {\n // e.g. `features: [NgOnChangesFeature]`\n const features = [];\n const providers = meta.providers;\n const viewProviders = meta.viewProviders;\n const inputKeys = Object.keys(meta.inputs);\n if (providers || viewProviders) {\n const args = [providers || new LiteralArrayExpr([])];\n if (viewProviders) {\n args.push(viewProviders);\n }\n features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));\n }\n for (const key of inputKeys) {\n if (meta.inputs[key].transformFunction !== null) {\n features.push(importExpr(Identifiers.InputTransformsFeatureFeature));\n break;\n }\n }\n if (meta.usesInheritance) {\n features.push(importExpr(Identifiers.InheritDefinitionFeature));\n }\n if (meta.fullInheritance) {\n features.push(importExpr(Identifiers.CopyDefinitionFeature));\n }\n if (meta.lifecycle.usesOnChanges) {\n features.push(importExpr(Identifiers.NgOnChangesFeature));\n }\n // TODO: better way of differentiating component vs directive metadata.\n if (meta.hasOwnProperty('template') && meta.isStandalone) {\n features.push(importExpr(Identifiers.StandaloneFeature));\n }\n if (meta.hostDirectives?.length) {\n features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));\n }\n if (features.length) {\n definitionMap.set('features', literalArr(features));\n }\n}\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\nfunction compileDirectiveFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createDirectiveType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\nfunction compileComponentFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const selector = meta.selector && CssSelector.parse(meta.selector);\n const firstSelector = selector && selector[0];\n // e.g. `attr: [\"class\", \".my.app\"]`\n // This is optional an only included if the first selector of a component specifies attributes.\n if (firstSelector) {\n const selectorAttributes = firstSelector.getAttrs();\n if (selectorAttributes.length) {\n definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(value => value != null ? literal(value) : literal(undefined))), /* forceShared */true));\n }\n }\n // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n const templateTypeName = meta.name;\n const templateName = templateTypeName ? `${templateTypeName}_Template` : null;\n const changeDetection = meta.changeDetection;\n // Template compilation is currently conditional as we're in the process of rewriting it.\n if (!USE_TEMPLATE_PIPELINE) {\n // This is the main path currently used in compilation, which compiles the template with the\n // legacy `TemplateDefinitionBuilder`.\n const template = meta.template;\n const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks);\n const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);\n // We need to provide this so that dynamically generated components know what\n // projected content blocks to pass through to the component when it is\n // instantiated.\n const ngContentSelectors = templateBuilder.getNgContentSelectors();\n if (ngContentSelectors) {\n definitionMap.set('ngContentSelectors', ngContentSelectors);\n }\n // e.g. `decls: 2`\n // definitionMap.set('decls', o.literal(tpl.root.decls!));\n definitionMap.set('decls', literal(templateBuilder.getConstCount()));\n // e.g. `vars: 2`\n // definitionMap.set('vars', o.literal(tpl.root.vars!));\n definitionMap.set('vars', literal(templateBuilder.getVarCount()));\n // Generate `consts` section of ComponentDef:\n // - either as an array:\n // `consts: [['one', 'two'], ['three', 'four']]`\n // - or as a factory function in case additional statements are present (to support i18n):\n // `consts: function() { var i18n_0; if (ngI18nClosureMode) {...} else {...} return [i18n_0];\n // }`\n const {\n constExpressions,\n prepareStatements\n } = templateBuilder.getConsts();\n if (constExpressions.length > 0) {\n let constsExpr = literalArr(constExpressions);\n // Prepare statements are present - turn `consts` into a function.\n if (prepareStatements.length > 0) {\n constsExpr = fn([], [...prepareStatements, new ReturnStatement(constsExpr)]);\n }\n definitionMap.set('consts', constsExpr);\n }\n definitionMap.set('template', templateFunctionExpression);\n } else {\n // This path compiles the template using the prototype template pipeline. First the template is\n // ingested into IR:\n const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool);\n // Then the IR is transformed to prepare it for cod egeneration.\n transformTemplate(tpl);\n // Finally we emit the template function:\n const templateFn = emitTemplateFn(tpl, constantPool);\n definitionMap.set('decls', literal(tpl.root.decls));\n definitionMap.set('vars', literal(tpl.root.vars));\n if (tpl.consts.length > 0) {\n definitionMap.set('consts', literalArr(tpl.consts));\n }\n definitionMap.set('template', templateFn);\n }\n if (meta.declarations.length > 0) {\n definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));\n }\n if (meta.encapsulation === null) {\n meta.encapsulation = ViewEncapsulation.Emulated;\n }\n // e.g. `styles: [str1, str2]`\n if (meta.styles && meta.styles.length) {\n const styleValues = meta.encapsulation == ViewEncapsulation.Emulated ? compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) : meta.styles;\n const styleNodes = styleValues.reduce((result, style) => {\n if (style.trim().length > 0) {\n result.push(constantPool.getConstLiteral(literal(style)));\n }\n return result;\n }, []);\n if (styleNodes.length > 0) {\n definitionMap.set('styles', literalArr(styleNodes));\n }\n } else if (meta.encapsulation === ViewEncapsulation.Emulated) {\n // If there is no style, don't generate css selectors on elements\n meta.encapsulation = ViewEncapsulation.None;\n }\n // Only set view encapsulation if it's not the default value\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', literal(meta.encapsulation));\n }\n // e.g. `animation: [trigger('123', [])]`\n if (meta.animations !== null) {\n definitionMap.set('data', literalMap([{\n key: 'animation',\n value: meta.animations,\n quoted: false\n }]));\n }\n // Only set the change detection flag if it's defined and it's not the default.\n if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {\n definitionMap.set('changeDetection', literal(changeDetection));\n }\n const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createComponentType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Creates the type specification from the component meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createComponentType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));\n typeParams.push(expressionType(literal(meta.isStandalone)));\n typeParams.push(createHostDirectivesType(meta));\n // TODO(signals): Always include this metadata starting with v17. Right\n // now Angular v16.0.x does not support this field and library distributions\n // would then be incompatible with v16.0.x framework users.\n if (meta.isSignal) {\n typeParams.push(expressionType(literal(meta.isSignal)));\n }\n return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));\n}\n/**\n * Compiles the array literal of declarations into an expression according to the provided emit\n * mode.\n */\nfunction compileDeclarationList(list, mode) {\n switch (mode) {\n case 0 /* DeclarationListEmitMode.Direct */:\n // directives: [MyDir],\n return list;\n case 1 /* DeclarationListEmitMode.Closure */:\n // directives: function () { return [MyDir]; }\n return fn([], [new ReturnStatement(list)]);\n case 2 /* DeclarationListEmitMode.ClosureResolved */:\n // directives: function () { return [MyDir].map(ng.resolveForwardRef); }\n const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);\n return fn([], [new ReturnStatement(resolvedList)]);\n }\n}\nfunction prepareQueryParams(query, constantPool) {\n const parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];\n if (query.read) {\n parameters.push(query.read);\n }\n return parameters;\n}\n/**\n * Translates query flags into `TQueryFlags` type in packages/core/src/render3/interfaces/query.ts\n * @param query\n */\nfunction toQueryFlags(query) {\n return (query.descendants ? 1 /* QueryFlags.descendants */ : 0 /* QueryFlags.none */) | (query.static ? 2 /* QueryFlags.isStatic */ : 0 /* QueryFlags.none */) | (query.emitDistinctChangesOnly ? 4 /* QueryFlags.emitDistinctChangesOnly */ : 0 /* QueryFlags.none */);\n}\nfunction convertAttributesToExpressions(attributes) {\n const values = [];\n for (let key of Object.getOwnPropertyNames(attributes)) {\n const value = attributes[key];\n values.push(literal(key), value);\n }\n return values;\n}\n// Define and update any content queries\nfunction createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(Identifiers.contentQuery).callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)]).toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null), new FnParam('dirIndex', null)], [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements), renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)], INFERRED_TYPE, null, contentQueriesFnName);\n}\nfunction stringAsType(str) {\n return expressionType(literal(str));\n}\nfunction stringMapAsLiteralExpression(map) {\n const mapValues = Object.keys(map).map(key => {\n const value = Array.isArray(map[key]) ? map[key][0] : map[key];\n return {\n key,\n value: literal(value),\n quoted: true\n };\n });\n return literalMap(mapValues);\n}\nfunction stringArrayAsType(arr) {\n return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) : NONE_TYPE;\n}\nfunction createBaseDirectiveTypeParams(meta) {\n // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n // string literal, which must be on one line.\n const selectorForType = meta.selector !== null ? meta.selector.replace(/\\n/g, '') : null;\n return [typeWithParameters(meta.type.type, meta.typeArgumentCount), selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE, meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE, expressionType(getInputsTypeExpression(meta)), expressionType(stringMapAsLiteralExpression(meta.outputs)), stringArrayAsType(meta.queries.map(q => q.propertyName))];\n}\nfunction getInputsTypeExpression(meta) {\n return literalMap(Object.keys(meta.inputs).map(key => {\n const value = meta.inputs[key];\n return {\n key,\n value: literalMap([{\n key: 'alias',\n value: literal(value.bindingPropertyName),\n quoted: true\n }, {\n key: 'required',\n value: literal(value.required),\n quoted: true\n }]),\n quoted: true\n };\n }));\n}\n/**\n * Creates the type specification from the directive meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createDirectiveType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n // Directives have no NgContentSelectors slot, but instead express a `never` type\n // so that future fields align.\n typeParams.push(NONE_TYPE);\n typeParams.push(expressionType(literal(meta.isStandalone)));\n typeParams.push(createHostDirectivesType(meta));\n // TODO(signals): Always include this metadata starting with v17. Right\n // now Angular v16.0.x does not support this field and library distributions\n // would then be incompatible with v16.0.x framework users.\n if (meta.isSignal) {\n typeParams.push(expressionType(literal(meta.isSignal)));\n }\n return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n viewQueries.forEach(query => {\n // creation, e.g. r3.viewQuery(somePredicate, true);\n const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));\n createStatements.push(queryDefinition.toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n });\n const viewQueryFnName = name ? `${name}_Query` : null;\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements), renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {\n const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);\n // Calculate host event bindings\n const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);\n if (USE_TEMPLATE_PIPELINE) {\n // TODO: host binding metadata is not yet parsed in the template pipeline, so we need to extract\n // that code from below. Then, we will ingest a `HostBindingJob`, and run the template pipeline\n // phases.\n const hostJob = ingestHostBinding({\n componentName: name,\n properties: bindings,\n events: eventBindings\n }, bindingParser, constantPool);\n transformHostBinding(hostJob);\n const varCount = hostJob.root.vars;\n if (varCount !== null && varCount > 0) {\n definitionMap.set('hostVars', literal(varCount));\n }\n return emitHostBindingFunction(hostJob);\n }\n const bindingContext = variable(CONTEXT_NAME);\n const styleBuilder = new StylingBuilder(bindingContext);\n const {\n styleAttr,\n classAttr\n } = hostBindingsMetadata.specialAttributes;\n if (styleAttr !== undefined) {\n styleBuilder.registerStyleAttr(styleAttr);\n }\n if (classAttr !== undefined) {\n styleBuilder.registerClassAttr(classAttr);\n }\n const createInstructions = [];\n const updateInstructions = [];\n const updateVariables = [];\n const hostBindingSourceSpan = typeSourceSpan;\n if (eventBindings && eventBindings.length) {\n createInstructions.push(...createHostListeners(eventBindings, name));\n }\n // Calculate the host property bindings\n const allOtherBindings = [];\n // We need to calculate the total amount of binding slots required by\n // all the instructions together before any value conversions happen.\n // Value conversions may require additional slots for interpolation and\n // bindings with pipes. These calculates happen after this block.\n let totalHostVarsCount = 0;\n bindings && bindings.forEach(binding => {\n const stylingInputWasSet = styleBuilder.registerInputBasedOnName(binding.name, binding.expression, hostBindingSourceSpan);\n if (stylingInputWasSet) {\n totalHostVarsCount += MIN_STYLING_BINDING_SLOTS_REQUIRED;\n } else {\n allOtherBindings.push(binding);\n totalHostVarsCount++;\n }\n });\n let valueConverter;\n const getValueConverter = () => {\n if (!valueConverter) {\n const hostVarsCountFn = numSlots => {\n const originalVarsCount = totalHostVarsCount;\n totalHostVarsCount += numSlots;\n return originalVarsCount;\n };\n valueConverter = new ValueConverter(constantPool, () => error('Unexpected node'),\n // new nodes are illegal here\n hostVarsCountFn, () => error('Unexpected pipe')); // pipes are illegal here\n }\n return valueConverter;\n };\n const propertyBindings = [];\n const attributeBindings = [];\n const syntheticHostBindings = [];\n for (const binding of allOtherBindings) {\n // resolve literal arrays and literal objects\n const value = binding.expression.visit(getValueConverter());\n const bindingExpr = bindingFn(bindingContext, value);\n const {\n bindingName,\n instruction,\n isAttribute\n } = getBindingNameAndInstruction(binding);\n const securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute).filter(context => context !== SecurityContext.NONE);\n let sanitizerFn = null;\n if (securityContexts.length) {\n if (securityContexts.length === 2 && securityContexts.indexOf(SecurityContext.URL) > -1 && securityContexts.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n // Special case for some URL attributes (such as \"src\" and \"href\") that may be a part\n // of different security contexts. In this case we use special sanitization function and\n // select the actual sanitizer at runtime based on a tag name that is provided while\n // invoking sanitization function.\n sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);\n } else {\n sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);\n }\n }\n const instructionParams = [literal(bindingName), bindingExpr.currValExpr];\n if (sanitizerFn) {\n instructionParams.push(sanitizerFn);\n } else {\n // If there was no sanitization function found based on the security context\n // of an attribute/property binding - check whether this attribute/property is\n // one of the security-sensitive <iframe> attributes.\n // Note: for host bindings defined on a directive, we do not try to find all\n // possible places where it can be matched, so we can not determine whether\n // the host element is an <iframe>. In this case, if an attribute/binding\n // name is in the `IFRAME_SECURITY_SENSITIVE_ATTRS` set - append a validation\n // function, which would be invoked at runtime and would have access to the\n // underlying DOM element, check if it's an <iframe> and if so - runs extra checks.\n if (isIframeSecuritySensitiveAttr(bindingName)) {\n instructionParams.push(importExpr(Identifiers.validateIframeAttribute));\n }\n }\n updateVariables.push(...bindingExpr.stmts);\n if (instruction === Identifiers.hostProperty) {\n propertyBindings.push(instructionParams);\n } else if (instruction === Identifiers.attribute) {\n attributeBindings.push(instructionParams);\n } else if (instruction === Identifiers.syntheticHostProperty) {\n syntheticHostBindings.push(instructionParams);\n } else {\n updateInstructions.push({\n reference: instruction,\n paramsOrFn: instructionParams,\n span: null\n });\n }\n }\n for (const bindingParams of propertyBindings) {\n updateInstructions.push({\n reference: Identifiers.hostProperty,\n paramsOrFn: bindingParams,\n span: null\n });\n }\n for (const bindingParams of attributeBindings) {\n updateInstructions.push({\n reference: Identifiers.attribute,\n paramsOrFn: bindingParams,\n span: null\n });\n }\n for (const bindingParams of syntheticHostBindings) {\n updateInstructions.push({\n reference: Identifiers.syntheticHostProperty,\n paramsOrFn: bindingParams,\n span: null\n });\n }\n // since we're dealing with directives/components and both have hostBinding\n // functions, we need to generate a special hostAttrs instruction that deals\n // with both the assignment of styling as well as static attributes to the host\n // element. The instruction below will instruct all initial styling (styling\n // that is inside of a host binding within a directive/component) to be attached\n // to the host element alongside any of the provided host attributes that were\n // collected earlier.\n const hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);\n styleBuilder.assignHostAttrs(hostAttrs, definitionMap);\n if (styleBuilder.hasBindings) {\n // finally each binding that was registered in the statement above will need to be added to\n // the update block of a component/directive templateFn/hostBindingsFn so that the bindings\n // are evaluated and updated for the element.\n styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(instruction => {\n for (const call of instruction.calls) {\n // we subtract a value of `1` here because the binding slot was already allocated\n // at the top of this method when all the input bindings were counted.\n totalHostVarsCount += Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);\n updateInstructions.push({\n reference: instruction.reference,\n paramsOrFn: convertStylingCall(call, bindingContext, bindingFn),\n span: null\n });\n }\n });\n }\n if (totalHostVarsCount) {\n definitionMap.set('hostVars', literal(totalHostVarsCount));\n }\n if (createInstructions.length > 0 || updateInstructions.length > 0) {\n const hostBindingsFnName = name ? `${name}_HostBindings` : null;\n const statements = [];\n if (createInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, getInstructionStatements(createInstructions)));\n }\n if (updateInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));\n }\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);\n }\n return null;\n}\nfunction bindingFn(implicit, value) {\n return convertPropertyBinding(null, implicit, value, 'b');\n}\nfunction convertStylingCall(call, bindingContext, bindingFn) {\n return call.params(value => bindingFn(bindingContext, value).currValExpr);\n}\nfunction getBindingNameAndInstruction(binding) {\n let bindingName = binding.name;\n let instruction;\n // Check to see if this is an attr binding or a property binding\n const attrMatches = bindingName.match(ATTR_REGEX);\n if (attrMatches) {\n bindingName = attrMatches[1];\n instruction = Identifiers.attribute;\n } else {\n if (binding.isAnimation) {\n bindingName = prepareSyntheticPropertyName(bindingName);\n // host bindings that have a synthetic property (e.g. @foo) should always be rendered\n // in the context of the component and not the parent. Therefore there is a special\n // compatibility instruction available for this purpose.\n instruction = Identifiers.syntheticHostProperty;\n } else {\n instruction = Identifiers.hostProperty;\n }\n }\n return {\n bindingName,\n instruction,\n isAttribute: !!attrMatches\n };\n}\nfunction createHostListeners(eventBindings, name) {\n const listenerParams = [];\n const syntheticListenerParams = [];\n const instructions = [];\n for (const binding of eventBindings) {\n let bindingName = binding.name && sanitizeIdentifier(binding.name);\n const bindingFnName = binding.type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) : bindingName;\n const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;\n const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);\n if (binding.type == 1 /* ParsedEventType.Animation */) {\n syntheticListenerParams.push(params);\n } else {\n listenerParams.push(params);\n }\n }\n for (const params of syntheticListenerParams) {\n instructions.push({\n reference: Identifiers.syntheticHostListener,\n paramsOrFn: params,\n span: null\n });\n }\n for (const params of listenerParams) {\n instructions.push({\n reference: Identifiers.listener,\n paramsOrFn: params,\n span: null\n });\n }\n return instructions;\n}\nconst HOST_REG_EXP = /^(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\))$/;\nfunction parseHostBindings(host) {\n const attributes = {};\n const listeners = {};\n const properties = {};\n const specialAttributes = {};\n for (const key of Object.keys(host)) {\n const value = host[key];\n const matches = key.match(HOST_REG_EXP);\n if (matches === null) {\n switch (key) {\n case 'class':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Class binding must be string`);\n }\n specialAttributes.classAttr = value;\n break;\n case 'style':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Style binding must be string`);\n }\n specialAttributes.styleAttr = value;\n break;\n default:\n if (typeof value === 'string') {\n attributes[key] = literal(value);\n } else {\n attributes[key] = value;\n }\n }\n } else if (matches[1 /* HostBindingGroup.Binding */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Property binding must be string`);\n }\n // synthetic properties (the ones that have a `@` as a prefix)\n // are still treated the same as regular properties. Therefore\n // there is no point in storing them in a separate map.\n properties[matches[1 /* HostBindingGroup.Binding */]] = value;\n } else if (matches[2 /* HostBindingGroup.Event */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Event binding must be string`);\n }\n listeners[matches[2 /* HostBindingGroup.Event */]] = value;\n }\n }\n return {\n attributes,\n listeners,\n properties,\n specialAttributes\n };\n}\n/**\n * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a\n * given set of host bindings has no errors.\n *\n * @param bindings set of host bindings to verify.\n * @param sourceSpan source span where host bindings were defined.\n * @returns array of errors associated with a given set of host bindings.\n */\nfunction verifyHostBindings(bindings, sourceSpan) {\n // TODO: abstract out host bindings verification logic and use it instead of\n // creating events and properties ASTs to detect errors (FW-996)\n const bindingParser = makeBindingParser();\n bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);\n bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);\n return bindingParser.errors;\n}\nfunction compileStyles(styles, selector, hostSelector) {\n const shadowCss = new ShadowCss();\n return styles.map(style => {\n return shadowCss.shimCssText(style, selector, hostSelector);\n });\n}\nfunction createHostDirectivesType(meta) {\n if (!meta.hostDirectives?.length) {\n return NONE_TYPE;\n }\n return expressionType(literalArr(meta.hostDirectives.map(hostMeta => literalMap([{\n key: 'directive',\n value: typeofExpr(hostMeta.directive.type),\n quoted: false\n }, {\n key: 'inputs',\n value: stringMapAsLiteralExpression(hostMeta.inputs || {}),\n quoted: false\n }, {\n key: 'outputs',\n value: stringMapAsLiteralExpression(hostMeta.outputs || {}),\n quoted: false\n }]))));\n}\nfunction createHostDirectivesFeatureArg(hostDirectives) {\n const expressions = [];\n let hasForwardRef = false;\n for (const current of hostDirectives) {\n // Use a shorthand if there are no inputs or outputs.\n if (!current.inputs && !current.outputs) {\n expressions.push(current.directive.type);\n } else {\n const keys = [{\n key: 'directive',\n value: current.directive.type,\n quoted: false\n }];\n if (current.inputs) {\n const inputsLiteral = createHostDirectivesMappingArray(current.inputs);\n if (inputsLiteral) {\n keys.push({\n key: 'inputs',\n value: inputsLiteral,\n quoted: false\n });\n }\n }\n if (current.outputs) {\n const outputsLiteral = createHostDirectivesMappingArray(current.outputs);\n if (outputsLiteral) {\n keys.push({\n key: 'outputs',\n value: outputsLiteral,\n quoted: false\n });\n }\n }\n expressions.push(literalMap(keys));\n }\n if (current.isForwardReference) {\n hasForwardRef = true;\n }\n }\n // If there's a forward reference, we generate a `function() { return [HostDir] }`,\n // otherwise we can save some bytes by using a plain array, e.g. `[HostDir]`.\n return hasForwardRef ? new FunctionExpr([], [new ReturnStatement(literalArr(expressions))]) : literalArr(expressions);\n}\n/**\n * Converts an input/output mapping object literal into an array where the even keys are the\n * public name of the binding and the odd ones are the name it was aliased to. E.g.\n * `{inputOne: 'aliasOne', inputTwo: 'aliasTwo'}` will become\n * `['inputOne', 'aliasOne', 'inputTwo', 'aliasTwo']`.\n *\n * This conversion is necessary, because hosts bind to the public name of the host directive and\n * keeping the mapping in an object literal will break for apps using property renaming.\n */\nfunction createHostDirectivesMappingArray(mapping) {\n const elements = [];\n for (const publicName in mapping) {\n if (mapping.hasOwnProperty(publicName)) {\n elements.push(literal(publicName), literal(mapping[publicName]));\n }\n }\n return elements.length > 0 ? literalArr(elements) : null;\n}\n\n/**\n * An interface for retrieving documents by URL that the compiler uses to\n * load templates.\n *\n * This is an abstract class, rather than an interface, so that it can be used\n * as injection token.\n */\nclass ResourceLoader {}\nlet enabledBlockTypes;\n/** Temporary utility that enables specific block types in JIT compilations. */\nfunction ɵsetEnabledBlockTypes(types) {\n enabledBlockTypes = types.length > 0 ? new Set(types) : undefined;\n}\nclass CompilerFacadeImpl {\n constructor(jitEvaluator = new JitEvaluator()) {\n this.jitEvaluator = jitEvaluator;\n this.FactoryTarget = FactoryTarget$1;\n this.ResourceLoader = ResourceLoader;\n this.elementSchemaRegistry = new DomElementSchemaRegistry();\n }\n compilePipe(angularCoreEnv, sourceMapUrl, facade) {\n const metadata = {\n name: facade.name,\n type: wrapReference(facade.type),\n typeArgumentCount: 0,\n deps: null,\n pipeName: facade.pipeName,\n pure: facade.pure,\n isStandalone: facade.isStandalone\n };\n const res = compilePipeFromMetadata(metadata);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compilePipeDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclarePipeFacadeToMetadata(declaration);\n const res = compilePipeFromMetadata(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectable(angularCoreEnv, sourceMapUrl, facade) {\n const {\n expression,\n statements\n } = compileInjectable({\n name: facade.name,\n type: wrapReference(facade.type),\n typeArgumentCount: facade.typeArgumentCount,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DependencyMetadata)\n }, /* resolveForwardRefs */true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjectableDeclaration(angularCoreEnv, sourceMapUrl, facade) {\n const {\n expression,\n statements\n } = compileInjectable({\n name: facade.type.name,\n type: wrapReference(facade.type),\n typeArgumentCount: 0,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DeclareDependencyMetadata)\n }, /* resolveForwardRefs */true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjector(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n name: facade.name,\n type: wrapReference(facade.type),\n providers: facade.providers && facade.providers.length > 0 ? new WrappedNodeExpr(facade.providers) : null,\n imports: facade.imports.map(i => new WrappedNodeExpr(i))\n };\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectorDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclareInjectorFacadeToMetadata(declaration);\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModule(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n kind: R3NgModuleMetadataKind.Global,\n type: wrapReference(facade.type),\n bootstrap: facade.bootstrap.map(wrapReference),\n declarations: facade.declarations.map(wrapReference),\n publicDeclarationTypes: null,\n imports: facade.imports.map(wrapReference),\n includeImportTypes: true,\n exports: facade.exports.map(wrapReference),\n selectorScopeMode: R3SelectorScopeMode.Inline,\n containsForwardDecls: false,\n schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,\n id: facade.id ? new WrappedNodeExpr(facade.id) : null\n };\n const res = compileNgModule(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModuleDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const expression = compileNgModuleDeclarationExpression(declaration);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileDirective(angularCoreEnv, sourceMapUrl, facade) {\n const meta = convertDirectiveFacadeToMetadata(facade);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Directive', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser();\n const res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileComponent(angularCoreEnv, sourceMapUrl, facade) {\n // Parse the template and check for errors.\n const {\n template,\n interpolation\n } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);\n // Compile the component metadata, including template, into an expression.\n const meta = {\n ...facade,\n ...convertDirectiveFacadeToMetadata(facade),\n selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),\n template,\n declarations: facade.declarations.map(convertDeclarationFacadeToMetadata),\n declarationListEmitMode: 0 /* DeclarationListEmitMode.Direct */,\n\n // TODO: leaving empty in JIT mode for now,\n // to be implemented as one of the next steps.\n deferBlocks: new Map(),\n deferrableDeclToImportDecl: new Map(),\n styles: [...facade.styles, ...template.styles],\n encapsulation: facade.encapsulation,\n interpolation,\n changeDetection: facade.changeDetection,\n animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,\n viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,\n relativeContextFilePath: '',\n i18nUseExternalIds: true\n };\n const jitExpressionSourceMap = `ng:///${facade.name}.js`;\n return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);\n }\n compileComponentDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Component', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl);\n return this.compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser(meta.interpolation);\n const res = compileComponentFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileFactory(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.name,\n type: wrapReference(meta.type),\n typeArgumentCount: meta.typeArgumentCount,\n deps: convertR3DependencyMetadataArray(meta.deps),\n target: meta.target\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n compileFactoryDeclaration(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.type.name,\n type: wrapReference(meta.type),\n typeArgumentCount: 0,\n deps: Array.isArray(meta.deps) ? meta.deps.map(convertR3DeclareDependencyMetadata) : meta.deps,\n target: meta.target\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n createParseSourceSpan(kind, typeName, sourceUrl) {\n return r3JitTypeSourceSpan(kind, typeName, sourceUrl);\n }\n /**\n * JIT compiles an expression and returns the result of executing that expression.\n *\n * @param def the definition which will be compiled and executed to get the value to patch\n * @param context an object map of @angular/core symbol names to symbols which will be available\n * in the context of the compiled expression\n * @param sourceUrl a URL to use for the source map of the compiled expression\n * @param preStatements a collection of statements that should be evaluated before the expression.\n */\n jitExpression(def, context, sourceUrl, preStatements) {\n // The ConstantPool may contain Statements which declare variables used in the final expression.\n // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n // declaration of $def which is set to the expression being compiled.\n const statements = [...preStatements, new DeclareVarStmt('$def', def, undefined, StmtModifier.Exported)];\n const res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new R3JitReflector(context), /* enableSourceMaps */true);\n return res['$def'];\n }\n}\nfunction convertToR3QueryMetadata(facade) {\n return {\n ...facade,\n predicate: convertQueryPredicate(facade.predicate),\n read: facade.read ? new WrappedNodeExpr(facade.read) : null,\n static: facade.static,\n emitDistinctChangesOnly: facade.emitDistinctChangesOnly\n };\n}\nfunction convertQueryDeclarationToMetadata(declaration) {\n return {\n propertyName: declaration.propertyName,\n first: declaration.first ?? false,\n predicate: convertQueryPredicate(declaration.predicate),\n descendants: declaration.descendants ?? false,\n read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,\n static: declaration.static ?? false,\n emitDistinctChangesOnly: declaration.emitDistinctChangesOnly ?? true\n };\n}\nfunction convertQueryPredicate(predicate) {\n return Array.isArray(predicate) ?\n // The predicate is an array of strings so pass it through.\n predicate :\n // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.\n createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* ForwardRefHandling.Wrapped */);\n}\nfunction convertDirectiveFacadeToMetadata(facade) {\n const inputsFromMetadata = parseInputsArray(facade.inputs || []);\n const outputsFromMetadata = parseMappingStringArray(facade.outputs || []);\n const propMetadata = facade.propMetadata;\n const inputsFromType = {};\n const outputsFromType = {};\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isInput(ann)) {\n inputsFromType[field] = {\n bindingPropertyName: ann.alias || field,\n classPropertyName: field,\n required: ann.required || false,\n transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null\n };\n } else if (isOutput(ann)) {\n outputsFromType[field] = ann.alias || field;\n }\n });\n }\n }\n return {\n ...facade,\n typeArgumentCount: 0,\n typeSourceSpan: facade.typeSourceSpan,\n type: wrapReference(facade.type),\n deps: null,\n host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n inputs: {\n ...inputsFromMetadata,\n ...inputsFromType\n },\n outputs: {\n ...outputsFromMetadata,\n ...outputsFromType\n },\n queries: facade.queries.map(convertToR3QueryMetadata),\n providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,\n viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),\n fullInheritance: false,\n hostDirectives: convertHostDirectivesToMetadata(facade)\n };\n}\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeSourceSpan,\n selector: declaration.selector ?? null,\n inputs: declaration.inputs ? inputsMappingToInputMetadata(declaration.inputs) : {},\n outputs: declaration.outputs ?? {},\n host: convertHostDeclarationToMetadata(declaration.host),\n queries: (declaration.queries ?? []).map(convertQueryDeclarationToMetadata),\n viewQueries: (declaration.viewQueries ?? []).map(convertQueryDeclarationToMetadata),\n providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) : null,\n exportAs: declaration.exportAs ?? null,\n usesInheritance: declaration.usesInheritance ?? false,\n lifecycle: {\n usesOnChanges: declaration.usesOnChanges ?? false\n },\n deps: null,\n typeArgumentCount: 0,\n fullInheritance: false,\n isStandalone: declaration.isStandalone ?? false,\n isSignal: declaration.isSignal ?? false,\n hostDirectives: convertHostDirectivesToMetadata(declaration)\n };\n}\nfunction convertHostDeclarationToMetadata(host = {}) {\n return {\n attributes: convertOpaqueValuesToExpressions(host.attributes ?? {}),\n listeners: host.listeners ?? {},\n properties: host.properties ?? {},\n specialAttributes: {\n classAttr: host.classAttribute,\n styleAttr: host.styleAttribute\n }\n };\n}\nfunction convertHostDirectivesToMetadata(metadata) {\n if (metadata.hostDirectives?.length) {\n return metadata.hostDirectives.map(hostDirective => {\n return typeof hostDirective === 'function' ? {\n directive: wrapReference(hostDirective),\n inputs: null,\n outputs: null,\n isForwardReference: false\n } : {\n directive: wrapReference(hostDirective.directive),\n isForwardReference: false,\n inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,\n outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null\n };\n });\n }\n return null;\n}\nfunction convertOpaqueValuesToExpressions(obj) {\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = new WrappedNodeExpr(obj[key]);\n }\n return result;\n}\nfunction convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {\n const {\n template,\n interpolation\n } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation);\n const declarations = [];\n if (decl.dependencies) {\n for (const innerDep of decl.dependencies) {\n switch (innerDep.kind) {\n case 'directive':\n case 'component':\n declarations.push(convertDirectiveDeclarationToMetadata(innerDep));\n break;\n case 'pipe':\n declarations.push(convertPipeDeclarationToMetadata(innerDep));\n break;\n }\n }\n } else if (decl.components || decl.directives || decl.pipes) {\n // Existing declarations on NPM may not be using the new `dependencies` merged field, and may\n // have separate fields for dependencies instead. Unify them for JIT compilation.\n decl.components && declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */true)));\n decl.directives && declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));\n decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));\n }\n return {\n ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),\n template,\n styles: decl.styles ?? [],\n declarations,\n viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) : null,\n animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null,\n // TODO: leaving empty in JIT mode for now,\n // to be implemented as one of the next steps.\n deferBlocks: new Map(),\n deferrableDeclToImportDecl: new Map(),\n changeDetection: decl.changeDetection ?? ChangeDetectionStrategy.Default,\n encapsulation: decl.encapsulation ?? ViewEncapsulation.Emulated,\n interpolation,\n declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */,\n relativeContextFilePath: '',\n i18nUseExternalIds: true\n };\n}\nfunction convertDeclarationFacadeToMetadata(declaration) {\n return {\n ...declaration,\n type: new WrappedNodeExpr(declaration.type)\n };\n}\nfunction convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {\n return {\n kind: R3TemplateDependencyKind.Directive,\n isComponent: isComponent || declaration.kind === 'component',\n selector: declaration.selector,\n type: new WrappedNodeExpr(declaration.type),\n inputs: declaration.inputs ?? [],\n outputs: declaration.outputs ?? [],\n exportAs: declaration.exportAs ?? null\n };\n}\nfunction convertPipeMapToMetadata(pipes) {\n if (!pipes) {\n return [];\n }\n return Object.keys(pipes).map(name => {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name,\n type: new WrappedNodeExpr(pipes[name])\n };\n });\n}\nfunction convertPipeDeclarationToMetadata(pipe) {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name: pipe.name,\n type: new WrappedNodeExpr(pipe.type)\n };\n}\nfunction parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {\n const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;\n // Parse the template and check for errors.\n const parsed = parseTemplate(template, sourceMapUrl, {\n preserveWhitespaces,\n interpolationConfig,\n enabledBlockTypes\n });\n if (parsed.errors !== null) {\n const errors = parsed.errors.map(err => err.toString()).join(', ');\n throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);\n }\n return {\n template: parsed,\n interpolation: interpolationConfig\n };\n}\n/**\n * Convert the expression, if present to an `R3ProviderExpression`.\n *\n * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because,\n * if it is referencing a type that has not yet been defined, it will have already been wrapped in\n * a `forwardRef()` - either by the application developer or during partial-compilation. Thus we can\n * use `ForwardRefHandling.None`.\n */\nfunction convertToProviderExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* ForwardRefHandling.None */);\n } else {\n return undefined;\n }\n}\nfunction wrapExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return new WrappedNodeExpr(obj[property]);\n } else {\n return undefined;\n }\n}\nfunction computeProvidedIn(providedIn) {\n const expression = typeof providedIn === 'function' ? new WrappedNodeExpr(providedIn) : new LiteralExpr(providedIn ?? null);\n // See `convertToProviderExpression()` for why this uses `ForwardRefHandling.None`.\n return createMayBeForwardRefExpression(expression, 0 /* ForwardRefHandling.None */);\n}\nfunction convertR3DependencyMetadataArray(facades) {\n return facades == null ? null : facades.map(convertR3DependencyMetadata);\n}\nfunction convertR3DependencyMetadata(facade) {\n const isAttributeDep = facade.attribute != null; // both `null` and `undefined`\n const rawToken = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n // In JIT mode, if the dep is an `@Attribute()` then we use the attribute name given in\n // `attribute` rather than the `token`.\n const token = isAttributeDep ? new WrappedNodeExpr(facade.attribute) : rawToken;\n return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);\n}\nfunction convertR3DeclareDependencyMetadata(facade) {\n const isAttributeDep = facade.attribute ?? false;\n const token = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n return createR3DependencyMetadata(token, isAttributeDep, facade.host ?? false, facade.optional ?? false, facade.self ?? false, facade.skipSelf ?? false);\n}\nfunction createR3DependencyMetadata(token, isAttributeDep, host, optional, self, skipSelf) {\n // If the dep is an `@Attribute()` the `attributeNameType` ought to be the `unknown` type.\n // But types are not available at runtime so we just use a literal `\"<unknown>\"` string as a dummy\n // marker.\n const attributeNameType = isAttributeDep ? literal('unknown') : null;\n return {\n token,\n attributeNameType,\n host,\n optional,\n self,\n skipSelf\n };\n}\nfunction extractHostBindings(propMetadata, sourceSpan, host) {\n // First parse the declarations from the metadata.\n const bindings = parseHostBindings(host || {});\n // After that check host bindings for errors\n const errors = verifyHostBindings(bindings, sourceSpan);\n if (errors.length) {\n throw new Error(errors.map(error => error.msg).join('\\n'));\n }\n // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isHostBinding(ann)) {\n // Since this is a decorator, we know that the value is a class member. Always access it\n // through `this` so that further down the line it can't be confused for a literal value\n // (e.g. if there's a property called `true`).\n bindings.properties[ann.hostPropertyName || field] = getSafePropertyAccessString('this', field);\n } else if (isHostListener(ann)) {\n bindings.listeners[ann.eventName || field] = `${field}(${(ann.args || []).join(',')})`;\n }\n });\n }\n }\n return bindings;\n}\nfunction isHostBinding(value) {\n return value.ngMetadataName === 'HostBinding';\n}\nfunction isHostListener(value) {\n return value.ngMetadataName === 'HostListener';\n}\nfunction isInput(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction isOutput(value) {\n return value.ngMetadataName === 'Output';\n}\nfunction inputsMappingToInputMetadata(inputs) {\n return Object.keys(inputs).reduce((result, key) => {\n const value = inputs[key];\n if (typeof value === 'string') {\n result[key] = {\n bindingPropertyName: value,\n classPropertyName: value,\n transformFunction: null,\n required: false\n };\n } else {\n result[key] = {\n bindingPropertyName: value[0],\n classPropertyName: value[1],\n transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,\n required: false\n };\n }\n return result;\n }, {});\n}\nfunction parseInputsArray(values) {\n return values.reduce((results, value) => {\n if (typeof value === 'string') {\n const [bindingPropertyName, classPropertyName] = parseMappingString(value);\n results[classPropertyName] = {\n bindingPropertyName,\n classPropertyName,\n required: false,\n transformFunction: null\n };\n } else {\n results[value.name] = {\n bindingPropertyName: value.alias || value.name,\n classPropertyName: value.name,\n required: value.required || false,\n transformFunction: value.transform != null ? new WrappedNodeExpr(value.transform) : null\n };\n }\n return results;\n }, {});\n}\nfunction parseMappingStringArray(values) {\n return values.reduce((results, value) => {\n const [alias, fieldName] = parseMappingString(value);\n results[fieldName] = alias;\n return results;\n }, {});\n}\nfunction parseMappingString(value) {\n // Either the value is 'field' or 'field: property'. In the first case, `property` will\n // be undefined, in which case the field name should also be used as the property name.\n const [fieldName, bindingPropertyName] = value.split(':', 2).map(str => str.trim());\n return [bindingPropertyName ?? fieldName, fieldName];\n}\nfunction convertDeclarePipeFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeArgumentCount: 0,\n pipeName: declaration.name,\n deps: null,\n pure: declaration.pure ?? true,\n isStandalone: declaration.isStandalone ?? false\n };\n}\nfunction convertDeclareInjectorFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n providers: declaration.providers !== undefined && declaration.providers.length > 0 ? new WrappedNodeExpr(declaration.providers) : null,\n imports: declaration.imports !== undefined ? declaration.imports.map(i => new WrappedNodeExpr(i)) : []\n };\n}\nfunction publishFacade(global) {\n const ng = global.ng || (global.ng = {});\n ng.ɵcompilerFacade = new CompilerFacadeImpl();\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the compiler package.\n */\nconst VERSION = new Version('16.2.12');\nclass CompilerConfig {\n constructor({\n defaultEncapsulation = ViewEncapsulation.Emulated,\n useJit = true,\n missingTranslation = null,\n preserveWhitespaces,\n strictInjectionParameters\n } = {}) {\n this.defaultEncapsulation = defaultEncapsulation;\n this.useJit = !!useJit;\n this.missingTranslation = missingTranslation;\n this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n this.strictInjectionParameters = strictInjectionParameters === true;\n }\n}\nfunction preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting = false) {\n return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\nconst _I18N_ATTR = 'i18n';\nconst _I18N_ATTR_PREFIX = 'i18n-';\nconst _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nconst MEANING_SEPARATOR = '|';\nconst ID_SEPARATOR = '@@';\nlet i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n */\nfunction extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n}\nfunction mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.merge(nodes, translations, interpolationConfig);\n}\nclass ExtractionResult {\n constructor(messages, errors) {\n this.messages = messages;\n this.errors = errors;\n }\n}\nvar _VisitorMode;\n(function (_VisitorMode) {\n _VisitorMode[_VisitorMode[\"Extract\"] = 0] = \"Extract\";\n _VisitorMode[_VisitorMode[\"Merge\"] = 1] = \"Merge\";\n})(_VisitorMode || (_VisitorMode = {}));\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 */\nclass _Visitor {\n constructor(_implicitTags, _implicitAttrs) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n }\n /**\n * Extracts the messages from the tree\n */\n extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => 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 merge(nodes, translations, interpolationConfig) {\n this._init(_VisitorMode.Merge, interpolationConfig);\n this._translations = translations;\n // Construct a single fake root element\n const wrapper = new Element('wrapper', [], nodes, undefined, undefined, undefined);\n const 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 visitExpansionCase(icuCase, context) {\n // Parse cases for translatable html attributes\n const expression = visitAll(this, icuCase.expression, context);\n if (this._mode === _VisitorMode.Merge) {\n return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n }\n }\n visitExpansion(icu, context) {\n this._mayBeAddBlockChildren(icu);\n const 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 const cases = visitAll(this, icu.cases, context);\n if (this._mode === _VisitorMode.Merge) {\n icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n }\n this._inIcu = wasInIcu;\n return icu;\n }\n visitComment(comment, context) {\n const 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 const 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 <ng-container i18n> instead of i18n comments\n if (!i18nCommentsWarned && console && console.warn) {\n i18nCommentsWarned = true;\n const 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 <ng-container> element instead (${comment.sourceSpan.start}${details})`);\n }\n this._inI18nBlock = true;\n this._blockStartDepth = this._depth;\n this._blockChildren = [];\n this._blockMeaningAndDesc = comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n this._openTranslatableSection(comment);\n }\n } else {\n if (isClosing) {\n if (this._depth == this._blockStartDepth) {\n this._closeTranslatableSection(comment, this._blockChildren);\n this._inI18nBlock = false;\n const message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc);\n // merge attributes in sections\n const nodes = this._translateMessage(comment, message);\n return visitAll(this, nodes);\n } else {\n this._reportError(comment, 'I18N blocks should not cross element boundaries');\n return;\n }\n }\n }\n }\n }\n visitText(text, context) {\n if (this._isInTranslatableSection) {\n this._mayBeAddBlockChildren(text);\n }\n return text;\n }\n visitElement(el, context) {\n this._mayBeAddBlockChildren(el);\n this._depth++;\n const wasInI18nNode = this._inI18nNode;\n const wasInImplicitNode = this._inImplicitNode;\n let childNodes = [];\n let translatedChildNodes = undefined;\n // Extract:\n // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n // - ICU messages\n const i18nAttr = _getI18nAttr(el);\n const i18nMeta = i18nAttr ? i18nAttr.value : '';\n const isImplicit = this._implicitTags.some(tag => el.name === tag) && !this._inIcu && !this._isInTranslatableSection;\n const isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n this._inImplicitNode = wasInImplicitNode || isImplicit;\n if (!this._isInTranslatableSection && !this._inIcu) {\n if (i18nAttr || isTopLevelImplicit) {\n this._inI18nNode = true;\n const message = this._addMessage(el.children, i18nMeta);\n translatedChildNodes = this._translateMessage(el, message);\n }\n if (this._mode == _VisitorMode.Extract) {\n const isTranslatable = i18nAttr || isTopLevelImplicit;\n if (isTranslatable) this._openTranslatableSection(el);\n visitAll(this, el.children);\n if (isTranslatable) this._closeTranslatableSection(el, el.children);\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 visitAll(this, el.children);\n }\n }\n if (this._mode === _VisitorMode.Merge) {\n const visitNodes = translatedChildNodes || el.children;\n visitNodes.forEach(child => {\n const 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 `<!-- /i18n -->`)\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 const translatedAttrs = this._translateAttributes(el);\n return new Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n }\n return null;\n }\n visitAttribute(attribute, context) {\n throw new Error('unreachable code');\n }\n visitBlockGroup(group, context) {\n visitAll(this, group.blocks, context);\n }\n visitBlock(block, context) {\n visitAll(this, block.children, context);\n }\n visitBlockParameter(parameter, context) {}\n _init(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 // looks for translatable attributes\n _visitAttributesOf(el) {\n const explicitAttrNameToValue = {};\n const implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs.filter(attr => attr.name.startsWith(_I18N_ATTR_PREFIX)).forEach(attr => explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] = attr.value);\n el.attrs.forEach(attr => {\n if (attr.name in explicitAttrNameToValue) {\n this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n } else if (implicitAttrNames.some(name => attr.name === name)) {\n this._addMessage([attr]);\n }\n });\n }\n // add a translatable message\n _addMessage(ast, msgMeta) {\n if (ast.length == 0 || ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const {\n meaning,\n description,\n id\n } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }\n // Translates the given message given the `TranslationBundle`\n // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n // no-op when called in extraction mode (returns [])\n _translateMessage(el, message) {\n if (message && this._mode === _VisitorMode.Merge) {\n const 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 // translate the attributes of an element and remove i18n specific attributes\n _translateAttributes(el) {\n const attributes = el.attrs;\n const i18nParsedMessageMeta = {};\n attributes.forEach(attr => {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] = _parseMessageMeta(attr.value);\n }\n });\n const translatedAttributes = [];\n attributes.forEach(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 const {\n meaning,\n description,\n id\n } = i18nParsedMessageMeta[attr.name];\n const message = this._createI18nMessage([attr], meaning, description, id);\n const nodes = this._translations.get(message);\n if (nodes) {\n if (nodes.length == 0) {\n translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\n } else if (nodes[0] instanceof Text) {\n const value = nodes[0].value;\n translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\n } else {\n this._reportError(el, `Unexpected translation for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\n }\n } else {\n this._reportError(el, `Translation unavailable for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\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 */\n _mayBeAddBlockChildren(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 */\n _openTranslatableSection(node) {\n if (this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section start');\n } else {\n this._msgCountAtSectionStart = this._messages.length;\n }\n }\n /**\n * A translatable section could be:\n * - the content of translatable element,\n * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n */\n get _isInTranslatableSection() {\n return this._msgCountAtSectionStart !== void 0;\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 * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n * - one for the <p> 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 */\n _closeTranslatableSection(node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n const startIndex = this._msgCountAtSectionStart;\n const significantChildren = directChildren.reduce((count, node) => count + (node instanceof Comment ? 0 : 1), 0);\n if (significantChildren == 1) {\n for (let i = this._messages.length - 1; i >= startIndex; i--) {\n const ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof Text$2)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = undefined;\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\nfunction _isOpeningComment(n) {\n return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));\n}\nfunction _isClosingComment(n) {\n return !!(n instanceof Comment && n.value && n.value === '/i18n');\n}\nfunction _getI18nAttr(p) {\n return p.attrs.find(attr => attr.name === _I18N_ATTR) || null;\n}\nfunction _parseMessageMeta(i18n) {\n if (!i18n) return {\n meaning: '',\n description: '',\n id: ''\n };\n const idIndex = i18n.indexOf(ID_SEPARATOR);\n const descIndex = i18n.indexOf(MEANING_SEPARATOR);\n const [meaningAndDesc, id] = idIndex > -1 ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''];\n const [meaning, description] = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc];\n return {\n meaning,\n description,\n id: id.trim()\n };\n}\nclass XmlTagDefinition {\n constructor() {\n this.closedByParent = false;\n this.implicitNamespacePrefix = null;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n this.preventNamespaceInheritance = false;\n }\n requireExtraParent(currentParent) {\n return false;\n }\n isClosedByChild(name) {\n return false;\n }\n getContentType() {\n return TagContentType.PARSABLE_DATA;\n }\n}\nconst _TAG_DEFINITION = new XmlTagDefinition();\nfunction getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n}\nclass XmlParser extends Parser {\n constructor() {\n super(getXmlTagDefinition);\n }\n parse(source, url, options = {}) {\n // Blocks aren't supported in an XML context.\n return super.parse(source, url, {\n ...options,\n tokenizeBlocks: false\n });\n }\n}\nconst _VERSION$1 = '1.2';\nconst _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG$1 = 'en';\nconst _PLACEHOLDER_TAG$2 = 'x';\nconst _MARKER_TAG$1 = 'mrk';\nconst _FILE_TAG = 'file';\nconst _SOURCE_TAG$1 = 'source';\nconst _SEGMENT_SOURCE_TAG = 'seg-source';\nconst _ALT_TRANS_TAG = 'alt-trans';\nconst _TARGET_TAG$1 = 'target';\nconst _UNIT_TAG$1 = 'trans-unit';\nconst _CONTEXT_GROUP_TAG = 'context-group';\nconst _CONTEXT_TAG = 'context';\n// https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\nclass Xliff extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor$1();\n const transUnits = [];\n messages.forEach(message => {\n let contextTags = [];\n message.sources.forEach(source => {\n let contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, {\n purpose: 'location'\n });\n contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, {\n 'context-type': 'sourcefile'\n }, [new Text$1(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, {\n 'context-type': 'linenumber'\n }, [new Text$1(`${source.startLine}`)]), new CR(8));\n contextTags.push(new CR(8), contextGroupTag);\n });\n const transUnit = new Tag(_UNIT_TAG$1, {\n id: message.id,\n datatype: 'html'\n });\n transUnit.children.push(new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes)), ...contextTags);\n if (message.description) {\n transUnit.children.push(new CR(8), new Tag('note', {\n priority: '1',\n from: 'description'\n }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new CR(8), new Tag('note', {\n priority: '1',\n from: 'meaning'\n }, [new Text$1(message.meaning)]));\n }\n transUnit.children.push(new CR(6));\n transUnits.push(new CR(6), transUnit);\n });\n const body = new Tag('body', {}, [...transUnits, new CR(4)]);\n const file = new Tag('file', {\n 'source-language': locale || _DEFAULT_SOURCE_LANG$1,\n datatype: 'plaintext',\n original: 'ng2.template'\n }, [new CR(4), body, new CR(2)]);\n const xliff = new Tag('xliff', {\n version: _VERSION$1,\n xmlns: _XMLNS$1\n }, [new CR(2), file, new CR()]);\n return serialize([new Declaration({\n version: '1.0',\n encoding: 'UTF-8'\n }), new CR(), xliff, new CR()]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliffParser = new XliffParser();\n const {\n locale,\n msgIdToHtml,\n errors\n } = xliffParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$2();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const {\n i18nNodes,\n errors: e\n } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(`xliff parse errors:\\n${errors.join('\\n')}`);\n }\n return {\n locale: locale,\n i18nNodesByMsgId\n };\n }\n digest(message) {\n return digest$1(message);\n }\n}\nclass _WriteVisitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach(node => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach(c => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const ctype = getCtypeForTag(ph.tag);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.startName,\n ctype,\n 'equiv-text': `<${ph.tag}/>`\n })];\n }\n const startTagPh = new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.startName,\n ctype,\n 'equiv-text': `<${ph.tag}>`\n });\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.closeName,\n ctype,\n 'equiv-text': `</${ph.tag}>`\n });\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n return [new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.name,\n 'equiv-text': `{{${ph.value}}}`\n })];\n }\n visitIcuPlaceholder(ph, context) {\n const equivText = `{${ph.value.expression}, ${ph.value.type}, ${Object.keys(ph.value.cases).map(value => value + ' {...}').join(' ')}}`;\n return [new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.name,\n 'equiv-text': equivText\n })];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\nclass XliffParser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG$1:\n this._unitMlString = null;\n const idAttr = element.attrs.find(attr => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG$1}> misses the \"id\" attribute`);\n } else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n } else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n } else {\n this._addError(element, `Message ${id} misses a translation`);\n }\n }\n }\n break;\n // ignore those tags\n case _SOURCE_TAG$1:\n case _SEGMENT_SOURCE_TAG:\n case _ALT_TRANS_TAG:\n break;\n case _TARGET_TAG$1:\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _FILE_TAG:\n const localeAttr = element.attrs.find(attr => attr.name === 'target-language');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n 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 visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) {}\n visitText(text, context) {}\n visitComment(comment, context) {}\n visitExpansion(expansion, context) {}\n visitExpansionCase(expansionCase, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$2 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, {\n tokenizeExpansionForms: true\n });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG$2) {\n const nameAttr = el.attrs.find(attr => attr.name === 'id');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$2}> misses the \"id\" attribute`);\n return null;\n }\n if (el.name === _MARKER_TAG$1) {\n return [].concat(...visitAll(this, el.children));\n }\n this._addError(el, `Unexpected tag`);\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach(c => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression)\n };\n }\n visitComment(comment, context) {}\n visitAttribute(attribute, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\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}\nconst _VERSION = '2.0';\nconst _XMLNS = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG = 'en';\nconst _PLACEHOLDER_TAG$1 = 'ph';\nconst _PLACEHOLDER_SPANNING_TAG = 'pc';\nconst _MARKER_TAG = 'mrk';\nconst _XLIFF_TAG = 'xliff';\nconst _SOURCE_TAG = 'source';\nconst _TARGET_TAG = 'target';\nconst _UNIT_TAG = 'unit';\n// https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\nclass Xliff2 extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor();\n const units = [];\n messages.forEach(message => {\n const unit = new Tag(_UNIT_TAG, {\n id: message.id\n });\n const notes = new Tag('notes');\n if (message.description || message.meaning) {\n if (message.description) {\n notes.children.push(new CR(8), new Tag('note', {\n category: 'description'\n }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n notes.children.push(new CR(8), new Tag('note', {\n category: 'meaning'\n }, [new Text$1(message.meaning)]));\n }\n }\n message.sources.forEach(source => {\n notes.children.push(new CR(8), new Tag('note', {\n category: 'location'\n }, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)]));\n });\n notes.children.push(new CR(6));\n unit.children.push(new CR(6), notes);\n const segment = new Tag('segment');\n segment.children.push(new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new CR(6));\n unit.children.push(new CR(6), segment, new CR(4));\n units.push(new CR(4), unit);\n });\n const file = new Tag('file', {\n 'original': 'ng.template',\n id: 'ngi18n'\n }, [...units, new CR(2)]);\n const xliff = new Tag(_XLIFF_TAG, {\n version: _VERSION,\n xmlns: _XMLNS,\n srcLang: locale || _DEFAULT_SOURCE_LANG\n }, [new CR(2), file, new CR()]);\n return serialize([new Declaration({\n version: '1.0',\n encoding: 'UTF-8'\n }), new CR(), xliff, new CR()]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliff2Parser = new Xliff2Parser();\n const {\n locale,\n msgIdToHtml,\n errors\n } = xliff2Parser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$1();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const {\n i18nNodes,\n errors: e\n } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(`xliff2 parse errors:\\n${errors.join('\\n')}`);\n }\n return {\n locale: locale,\n i18nNodesByMsgId\n };\n }\n digest(message) {\n return decimalDigest(message);\n }\n}\nclass _WriteVisitor {\n constructor() {\n this._nextPlaceholderId = 0;\n }\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach(node => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach(c => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const type = getTypeForTag(ph.tag);\n if (ph.isVoid) {\n const tagPh = new Tag(_PLACEHOLDER_TAG$1, {\n id: (this._nextPlaceholderId++).toString(),\n equiv: ph.startName,\n type: type,\n disp: `<${ph.tag}/>`\n });\n return [tagPh];\n }\n const tagPc = new 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: `</${ph.tag}>`\n });\n const nodes = [].concat(...ph.children.map(node => node.visit(this)));\n if (nodes.length) {\n nodes.forEach(node => tagPc.children.push(node));\n } else {\n tagPc.children.push(new Text$1(''));\n }\n return [tagPc];\n }\n visitPlaceholder(ph, context) {\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{{${ph.value}}}`\n })];\n }\n visitIcuPlaceholder(ph, context) {\n const cases = Object.keys(ph.value.cases).map(value => value + ' {...}').join(' ');\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{${ph.value.expression}, ${ph.value.type}, ${cases}}`\n })];\n }\n serialize(nodes) {\n this._nextPlaceholderId = 0;\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// Extract messages as xml nodes from the xliff file\nclass Xliff2Parser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = null;\n const idAttr = element.attrs.find(attr => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG}> misses the \"id\" attribute`);\n } else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n } else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\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 const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _XLIFF_TAG:\n const localeAttr = element.attrs.find(attr => attr.name === 'trgLang');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n const versionAttr = element.attrs.find(attr => attr.name === 'version');\n if (versionAttr) {\n const 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 } else {\n visitAll(this, element.children, null);\n }\n }\n break;\n default:\n visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) {}\n visitText(text, context) {}\n visitComment(comment, context) {}\n visitExpansion(expansion, context) {}\n visitExpansionCase(expansionCase, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$1 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, {\n tokenizeExpansionForms: true\n });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes,\n errors: this._errors\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n switch (el.name) {\n case _PLACEHOLDER_TAG$1:\n const nameAttr = el.attrs.find(attr => attr.name === 'equiv');\n if (nameAttr) {\n return [new Placeholder('', nameAttr.value, el.sourceSpan)];\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equiv\" attribute`);\n break;\n case _PLACEHOLDER_SPANNING_TAG:\n const startAttr = el.attrs.find(attr => attr.name === 'equivStart');\n const endAttr = el.attrs.find(attr => attr.name === 'equivEnd');\n if (!startAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivStart\" attribute`);\n } else if (!endAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivEnd\" attribute`);\n } else {\n const startId = startAttr.value;\n const endId = endAttr.value;\n const nodes = [];\n return nodes.concat(new Placeholder('', startId, el.sourceSpan), ...el.children.map(node => node.visit(this, null)), new Placeholder('', endId, el.sourceSpan));\n }\n break;\n case _MARKER_TAG:\n return [].concat(...visitAll(this, el.children));\n default:\n this._addError(el, `Unexpected tag`);\n }\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach(c => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: [].concat(...visitAll(this, icuCase.expression))\n };\n }\n visitComment(comment, context) {}\n visitAttribute(attribute, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\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}\nconst _TRANSLATIONS_TAG = 'translationbundle';\nconst _TRANSLATION_TAG = 'translation';\nconst _PLACEHOLDER_TAG = 'ph';\nclass Xtb extends Serializer {\n write(messages, locale) {\n throw new Error('Unsupported');\n }\n load(content, url) {\n // xtb to xml nodes\n const xtbParser = new XtbParser();\n const {\n locale,\n msgIdToHtml,\n errors\n } = xtbParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const 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(msgId => {\n const valueFn = function () {\n const {\n i18nNodes,\n errors\n } = converter.convert(msgIdToHtml[msgId], url);\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 {\n locale: locale,\n i18nNodesByMsgId\n };\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nfunction createLazyProperty(messages, id, valueFn) {\n Object.defineProperty(messages, id, {\n configurable: true,\n enumerable: true,\n get: function () {\n const value = valueFn();\n Object.defineProperty(messages, id, {\n enumerable: true,\n value\n });\n return value;\n },\n set: _ => {\n throw new Error('Could not overwrite an XTB translation');\n }\n });\n}\n// Extract messages as xml nodes from the xtb file\nclass XtbParser {\n constructor() {\n this._locale = null;\n }\n parse(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 const xml = new XmlParser().parse(xtb, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale\n };\n }\n visitElement(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 const langAttr = element.attrs.find(attr => attr.name === 'lang');\n if (langAttr) {\n this._locale = langAttr.value;\n }\n visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n const idAttr = element.attrs.find(attr => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_TRANSLATION_TAG}> misses the \"id\" attribute`);\n } else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n } else {\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._msgIdToHtml[id] = innerText;\n }\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n }\n visitAttribute(attribute, context) {}\n visitText(text, context) {}\n visitComment(comment, context) {}\n visitExpansion(expansion, context) {}\n visitExpansionCase(expansionCase, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(block, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xtb syntax) to i18n nodes\nclass XmlToI18n {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, {\n tokenizeExpansionForms: true\n });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : visitAll(this, xmlIcu.rootNodes);\n return {\n i18nNodes,\n errors: this._errors\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach(c => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression)\n };\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n const nameAttr = el.attrs.find(attr => attr.name === 'name');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"name\" attribute`);\n } else {\n this._addError(el, `Unexpected tag`);\n }\n return null;\n }\n visitComment(comment, context) {}\n visitAttribute(attribute, context) {}\n visitBlockGroup(group, context) {}\n visitBlock(block, context) {}\n visitBlockParameter(block, context) {}\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n\n/**\n * A container for translated messages\n */\nclass TranslationBundle {\n constructor(_i18nNodesByMsgId = {}, locale, digest, mapperFactory, missingTranslationStrategy = MissingTranslationStrategy.Warning, console) {\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this.digest = digest;\n this.mapperFactory = mapperFactory;\n this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);\n }\n // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n static load(content, url, serializer, missingTranslationStrategy, console) {\n const {\n locale,\n i18nNodesByMsgId\n } = serializer.load(content, url);\n const digestFn = m => serializer.digest(m);\n const mapperFactory = m => 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 get(srcMsg) {\n const 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 has(srcMsg) {\n return this.digest(srcMsg) in this._i18nNodesByMsgId;\n }\n}\nclass I18nToHtmlVisitor {\n constructor(_i18nNodesByMsgId = {}, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {\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._errors = [];\n this._contextStack = [];\n }\n convert(srcMsg) {\n this._contextStack.length = 0;\n this._errors.length = 0;\n // i18n to text\n const text = this._convertToText(srcMsg);\n // text to html\n const url = srcMsg.nodes[0].sourceSpan.start.file.url;\n const html = new HtmlParser().parse(text, url, {\n tokenizeExpansionForms: true\n });\n return {\n nodes: html.rootNodes,\n errors: [...this._errors, ...html.errors]\n };\n }\n visitText(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 visitContainer(container, context) {\n return container.children.map(n => n.visit(this)).join('');\n }\n visitIcu(icu, context) {\n const cases = Object.keys(icu.cases).map(k => `${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 const exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ? this._srcMsg.placeholders[icu.expression].text : icu.expression;\n return `{${exp}, ${icu.type}, ${cases.join(' ')}}`;\n }\n visitPlaceholder(ph, context) {\n const phName = this._mapper(ph.name);\n if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n return this._srcMsg.placeholders[phName].text;\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 visitTagPlaceholder(ph, context) {\n const tag = `${ph.tag}`;\n const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n if (ph.isVoid) {\n return `<${tag} ${attrs}/>`;\n }\n const children = ph.children.map(c => c.visit(this)).join('');\n return `<${tag} ${attrs}>${children}</${tag}>`;\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 visitIcuPlaceholder(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 */\n _convertToText(srcMsg) {\n const id = this._digest(srcMsg);\n const mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n let nodes;\n this._contextStack.push({\n msg: this._srcMsg,\n mapper: this._mapper\n });\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 = name => mapper ? mapper.toInternalName(name) : name;\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 const ctx = this._locale ? ` for locale \"${this._locale}\"` : '';\n this._addError(srcMsg.nodes[0], `Missing translation for message \"${id}\"${ctx}`);\n } else if (this._console && this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n const 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 = name => name;\n }\n const text = nodes.map(node => node.visit(this)).join('');\n const context = this._contextStack.pop();\n this._srcMsg = context.msg;\n this._mapper = context.mapper;\n return text;\n }\n _addError(el, msg) {\n this._errors.push(new I18nError(el.sourceSpan, msg));\n }\n}\nclass I18NHtmlParser {\n constructor(_htmlParser, translations, translationsFormat, missingTranslation = MissingTranslationStrategy.Warning, console) {\n this._htmlParser = _htmlParser;\n if (translations) {\n const serializer = createSerializer(translationsFormat);\n this._translationBundle = TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n } else {\n this._translationBundle = new TranslationBundle({}, null, digest$1, undefined, missingTranslation, console);\n }\n }\n parse(source, url, options = {}) {\n const interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n const parseResult = this._htmlParser.parse(source, url, {\n interpolationConfig,\n ...options\n });\n if (parseResult.errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n }\n return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n }\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\n/**\n * A container for message extracted from the templates.\n */\nclass MessageBundle {\n constructor(_htmlParser, _implicitTags, _implicitAttrs, _locale = null) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._messages = [];\n }\n updateFromTemplate(html, url, interpolationConfig) {\n const htmlParserResult = this._htmlParser.parse(html, url, {\n tokenizeExpansionForms: true,\n interpolationConfig\n });\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n const i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n if (i18nParserResult.errors.length) {\n return i18nParserResult.errors;\n }\n this._messages.push(...i18nParserResult.messages);\n return [];\n }\n // Return the message in the internal format\n // The public (serialized) format might be different, see the `write` method.\n getMessages() {\n return this._messages;\n }\n write(serializer, filterSources) {\n const messages = {};\n const mapperVisitor = new MapPlaceholderNames();\n // Deduplicate messages based on their ID\n this._messages.forEach(message => {\n const id = serializer.digest(message);\n if (!messages.hasOwnProperty(id)) {\n messages[id] = message;\n } else {\n messages[id].sources.push(...message.sources);\n }\n });\n // Transform placeholder names using the serializer mapping\n const msgList = Object.keys(messages).map(id => {\n const mapper = serializer.createNameMapper(messages[id]);\n const src = messages[id];\n const nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n let transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);\n transformedMessage.sources = src.sources;\n if (filterSources) {\n transformedMessage.sources.forEach(source => source.filePath = filterSources(source.filePath));\n }\n return transformedMessage;\n });\n return serializer.write(msgList, this._locale);\n }\n}\n// Transform an i18n AST by renaming the placeholder nodes with the given mapper\nclass MapPlaceholderNames extends CloneVisitor {\n convert(nodes, mapper) {\n return mapper ? nodes.map(n => n.visit(this, mapper)) : nodes;\n }\n visitTagPlaceholder(ph, mapper) {\n const startName = mapper.toPublicName(ph.startName);\n const closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;\n const children = ph.children.map(n => n.visit(this, mapper));\n return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, mapper) {\n return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, mapper) {\n return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n}\nvar FactoryTarget;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\n\n/**\n * Processes `Target`s with a given set of directives and performs a binding operation, which\n * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the\n * target.\n */\nclass R3TargetBinder {\n constructor(directiveMatcher) {\n this.directiveMatcher = directiveMatcher;\n }\n /**\n * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains\n * metadata about the types referenced in the template.\n */\n bind(target) {\n if (!target.template) {\n // TODO(alxhub): handle targets which contain things like HostBindings, etc.\n throw new Error('Binding without a template not yet supported');\n }\n // First, parse the template into a `Scope` structure. This operation captures the syntactic\n // scopes in the template and makes them available for later use.\n const scope = Scope.apply(target.template);\n // Use the `Scope` to extract the entities present at every level of the template.\n const templateEntities = extractTemplateEntities(scope);\n // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:\n // - directives: Map of nodes (elements & ng-templates) to the directives on them.\n // - bindings: Map of inputs, outputs, and attributes to the directive/element that claims\n // them. TODO(alxhub): handle multiple directives claiming an input/output/etc.\n // - references: Map of #references to their targets.\n const {\n directives,\n eagerDirectives,\n bindings,\n references\n } = DirectiveBinder.apply(target.template, this.directiveMatcher);\n // Finally, run the TemplateBinder to bind references, variables, and other entities within the\n // template. This extracts all the metadata that doesn't depend on directive matching.\n const {\n expressions,\n symbols,\n nestingLevel,\n usedPipes,\n eagerPipes,\n deferBlocks\n } = TemplateBinder.applyWithScope(target.template, scope);\n return new R3BoundTarget(target, directives, eagerDirectives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes, eagerPipes, deferBlocks);\n }\n}\n/**\n * Represents a binding scope within a template.\n *\n * Any variables, references, or other named entities declared within the template will\n * be captured and available by name in `namedEntities`. Additionally, child templates will\n * be analyzed and have their child `Scope`s available in `childScopes`.\n */\nclass Scope {\n constructor(parentScope, template) {\n this.parentScope = parentScope;\n this.template = template;\n /**\n * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n */\n this.namedEntities = new Map();\n /**\n * Child `Scope`s for immediately nested `Template`s.\n */\n this.childScopes = new Map();\n }\n static newRootScope() {\n return new Scope(null, null);\n }\n /**\n * Process a template (either as a `Template` sub-template with variables, or a plain array of\n * template `Node`s) and construct its `Scope`.\n */\n static apply(template) {\n const scope = Scope.newRootScope();\n scope.ingest(template);\n return scope;\n }\n /**\n * Internal method to process the template and populate the `Scope`.\n */\n ingest(template) {\n if (template instanceof Template) {\n // Variables on an <ng-template> are defined in the inner scope.\n template.variables.forEach(node => this.visitVariable(node));\n // Process the nodes of the template.\n template.children.forEach(node => node.visit(this));\n } else {\n // No overarching `Template` instance, so process the nodes directly.\n template.forEach(node => node.visit(this));\n }\n }\n visitElement(element) {\n // `Element`s in the template may have `Reference`s which are captured in the scope.\n element.references.forEach(node => this.visitReference(node));\n // Recurse into the `Element`'s children.\n element.children.forEach(node => node.visit(this));\n }\n visitTemplate(template) {\n // References on a <ng-template> are defined in the outer scope, so capture them before\n // processing the template's child scope.\n template.references.forEach(node => this.visitReference(node));\n // Next, create an inner scope and process the template within it.\n const scope = new Scope(this, template);\n scope.ingest(template);\n this.childScopes.set(template, scope);\n }\n visitVariable(variable) {\n // Declare the variable if it's not already.\n this.maybeDeclare(variable);\n }\n visitReference(reference) {\n // Declare the variable if it's not already.\n this.maybeDeclare(reference);\n }\n visitDeferredBlock(deferred) {\n deferred.children.forEach(node => node.visit(this));\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitDeferredBlockError(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(node => node.visit(this));\n }\n // Unused visitors.\n visitContent(content) {}\n visitBoundAttribute(attr) {}\n visitBoundEvent(event) {}\n visitBoundText(text) {}\n visitText(text) {}\n visitTextAttribute(attr) {}\n visitIcu(icu) {}\n visitDeferredTrigger(trigger) {}\n maybeDeclare(thing) {\n // Declare something with a name, as long as that name isn't taken.\n if (!this.namedEntities.has(thing.name)) {\n this.namedEntities.set(thing.name, thing);\n }\n }\n /**\n * Look up a variable within this `Scope`.\n *\n * This can recurse into a parent `Scope` if it's available.\n */\n lookup(name) {\n if (this.namedEntities.has(name)) {\n // Found in the local scope.\n return this.namedEntities.get(name);\n } else if (this.parentScope !== null) {\n // Not in the local scope, but there's a parent scope so check there.\n return this.parentScope.lookup(name);\n } else {\n // At the top level and it wasn't found.\n return null;\n }\n }\n /**\n * Get the child scope for a `Template`.\n *\n * This should always be defined.\n */\n getChildScope(template) {\n const res = this.childScopes.get(template);\n if (res === undefined) {\n throw new Error(`Assertion error: child scope for ${template} not found`);\n }\n return res;\n }\n}\n/**\n * Processes a template and matches directives on nodes (elements and templates).\n *\n * Usually used via the static `apply()` method.\n */\nclass DirectiveBinder {\n constructor(matcher, directives, eagerDirectives, bindings, references) {\n this.matcher = matcher;\n this.directives = directives;\n this.eagerDirectives = eagerDirectives;\n this.bindings = bindings;\n this.references = references;\n // Indicates whether we are visiting elements within a {#defer} block\n this.isInDeferBlock = false;\n }\n /**\n * Process a template (list of `Node`s) and perform directive matching against each node.\n *\n * @param template the list of template `Node`s to match (recursively).\n * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for\n * this template.\n * @returns three maps which contain information about directives in the template: the\n * `directives` map which lists directives matched on each node, the `bindings` map which\n * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`\n * map which resolves #references (`Reference`s) within the template to the named directive or\n * template node.\n */\n static apply(template, selectorMatcher) {\n const directives = new Map();\n const bindings = new Map();\n const references = new Map();\n const eagerDirectives = [];\n const matcher = new DirectiveBinder(selectorMatcher, directives, eagerDirectives, bindings, references);\n matcher.ingest(template);\n return {\n directives,\n eagerDirectives,\n bindings,\n references\n };\n }\n ingest(template) {\n template.forEach(node => node.visit(this));\n }\n visitElement(element) {\n this.visitElementOrTemplate(element.name, element);\n }\n visitTemplate(template) {\n this.visitElementOrTemplate('ng-template', template);\n }\n visitElementOrTemplate(elementName, node) {\n // First, determine the HTML shape of the node for the purpose of directive matching.\n // Do this by building up a `CssSelector` for the node.\n const cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node));\n // Next, use the `SelectorMatcher` to get the list of directives on the node.\n const directives = [];\n this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));\n if (directives.length > 0) {\n this.directives.set(node, directives);\n if (!this.isInDeferBlock) {\n this.eagerDirectives.push(...directives);\n }\n }\n // Resolve any references that are created on this node.\n node.references.forEach(ref => {\n let dirTarget = null;\n // If the reference expression is empty, then it matches the \"primary\" directive on the node\n // (if there is one). Otherwise it matches the host node itself (either an element or\n // <ng-template> node).\n if (ref.value.trim() === '') {\n // This could be a reference to a component if there is one.\n dirTarget = directives.find(dir => dir.isComponent) || null;\n } else {\n // This should be a reference to a directive exported via exportAs.\n dirTarget = directives.find(dir => dir.exportAs !== null && dir.exportAs.some(value => value === ref.value)) || null;\n // Check if a matching directive was found.\n if (dirTarget === null) {\n // No matching directive was found - this reference points to an unknown target. Leave it\n // unmapped.\n return;\n }\n }\n if (dirTarget !== null) {\n // This reference points to a directive.\n this.references.set(ref, {\n directive: dirTarget,\n node\n });\n } else {\n // This reference points to the node itself.\n this.references.set(ref, node);\n }\n });\n const setAttributeBinding = (attribute, ioType) => {\n const dir = directives.find(dir => dir[ioType].hasBindingPropertyName(attribute.name));\n const binding = dir !== undefined ? dir : node;\n this.bindings.set(attribute, binding);\n };\n // Node inputs (bound attributes) and text attributes can be bound to an\n // input on a directive.\n node.inputs.forEach(input => setAttributeBinding(input, 'inputs'));\n node.attributes.forEach(attr => setAttributeBinding(attr, 'inputs'));\n if (node instanceof Template) {\n node.templateAttrs.forEach(attr => setAttributeBinding(attr, 'inputs'));\n }\n // Node outputs (bound events) can be bound to an output on a directive.\n node.outputs.forEach(output => setAttributeBinding(output, 'outputs'));\n // Recurse into the node's children.\n node.children.forEach(child => child.visit(this));\n }\n visitDeferredBlock(deferred) {\n this.isInDeferBlock = true;\n deferred.children.forEach(child => child.visit(this));\n this.isInDeferBlock = false;\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(child => child.visit(this));\n }\n visitDeferredBlockError(block) {\n block.children.forEach(child => child.visit(this));\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(child => child.visit(this));\n }\n // Unused visitors.\n visitContent(content) {}\n visitVariable(variable) {}\n visitReference(reference) {}\n visitTextAttribute(attribute) {}\n visitBoundAttribute(attribute) {}\n visitBoundEvent(attribute) {}\n visitBoundAttributeOrEvent(node) {}\n visitText(text) {}\n visitBoundText(text) {}\n visitIcu(icu) {}\n visitDeferredTrigger(trigger) {}\n}\n/**\n * Processes a template and extract metadata about expressions and symbols within.\n *\n * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched\n * within the template in order to operate.\n *\n * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided\n * by overridden methods from that visitor.\n */\nclass TemplateBinder extends RecursiveAstVisitor {\n constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template, level) {\n super();\n this.bindings = bindings;\n this.symbols = symbols;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferBlocks = deferBlocks;\n this.nestingLevel = nestingLevel;\n this.scope = scope;\n this.template = template;\n this.level = level;\n // Indicates whether we are visiting elements within a {#defer} block\n this.isInDeferBlock = false;\n // Save a bit of processing time by constructing this closure in advance.\n this.visitNode = node => node.visit(this);\n }\n // This method is defined to reconcile the type of TemplateBinder since both\n // RecursiveAstVisitor and Visitor define the visit() method in their\n // interfaces.\n visit(node, context) {\n if (node instanceof AST) {\n node.visit(this, context);\n } else {\n node.visit(this);\n }\n }\n /**\n * Process a template and extract metadata about expressions and symbols within.\n *\n * @param nodes the nodes of the template to process\n * @param scope the `Scope` of the template being processed.\n * @returns three maps which contain metadata about the template: `expressions` which interprets\n * special `AST` nodes in expressions as pointing to references or variables declared within the\n * template, `symbols` which maps those variables and references to the nested `Template` which\n * declares them, if any, and `nestingLevel` which associates each `Template` with a integer\n * nesting level (how many levels deep within the template structure the `Template` is), starting\n * at 1.\n */\n static applyWithScope(nodes, scope) {\n const expressions = new Map();\n const symbols = new Map();\n const nestingLevel = new Map();\n const usedPipes = new Set();\n const eagerPipes = new Set();\n const template = nodes instanceof Template ? nodes : null;\n const deferBlocks = new Set();\n // The top-level template has nesting level 0.\n const binder = new TemplateBinder(expressions, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template, 0);\n binder.ingest(nodes);\n return {\n expressions,\n symbols,\n nestingLevel,\n usedPipes,\n eagerPipes,\n deferBlocks\n };\n }\n ingest(template) {\n if (template instanceof Template) {\n // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,\n // and references were all processed in the scope of the containing template.\n template.variables.forEach(this.visitNode);\n template.children.forEach(this.visitNode);\n // Set the nesting level.\n this.nestingLevel.set(template, this.level);\n } else {\n // Visit each node from the top-level template.\n template.forEach(this.visitNode);\n }\n }\n visitElement(element) {\n // Visit the inputs, outputs, and children of the element.\n element.inputs.forEach(this.visitNode);\n element.outputs.forEach(this.visitNode);\n element.children.forEach(this.visitNode);\n }\n visitTemplate(template) {\n // First, visit inputs, outputs and template attributes of the template node.\n template.inputs.forEach(this.visitNode);\n template.outputs.forEach(this.visitNode);\n template.templateAttrs.forEach(this.visitNode);\n // References are also evaluated in the outer context.\n template.references.forEach(this.visitNode);\n // Next, recurse into the template using its scope, and bumping the nesting level up by one.\n const childScope = this.scope.getChildScope(template);\n const binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, template, this.level + 1);\n binder.ingest(template);\n }\n visitVariable(variable) {\n // Register the `Variable` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(variable, this.template);\n }\n }\n visitReference(reference) {\n // Register the `Reference` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(reference, this.template);\n }\n }\n // Unused template visitors\n visitText(text) {}\n visitContent(content) {}\n visitTextAttribute(attribute) {}\n visitIcu(icu) {\n Object.keys(icu.vars).forEach(key => icu.vars[key].visit(this));\n Object.keys(icu.placeholders).forEach(key => icu.placeholders[key].visit(this));\n }\n // The remaining visitors are concerned with processing AST expressions within template bindings\n visitBoundAttribute(attribute) {\n attribute.value.visit(this);\n }\n visitBoundEvent(event) {\n event.handler.visit(this);\n }\n visitDeferredBlock(deferred) {\n this.deferBlocks.add(deferred);\n this.isInDeferBlock = true;\n deferred.children.forEach(this.visitNode);\n this.isInDeferBlock = false;\n deferred.triggers.forEach(this.visitNode);\n deferred.prefetchTriggers.forEach(this.visitNode);\n deferred.placeholder && this.visitNode(deferred.placeholder);\n deferred.loading && this.visitNode(deferred.loading);\n deferred.error && this.visitNode(deferred.error);\n }\n visitDeferredTrigger(trigger) {\n if (trigger instanceof BoundDeferredTrigger) {\n trigger.value.visit(this);\n }\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(this.visitNode);\n }\n visitDeferredBlockError(block) {\n block.children.forEach(this.visitNode);\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(this.visitNode);\n }\n visitBoundText(text) {\n text.value.visit(this);\n }\n visitPipe(ast, context) {\n this.usedPipes.add(ast.name);\n if (!this.isInDeferBlock) {\n this.eagerPipes.add(ast.name);\n }\n return super.visitPipe(ast, context);\n }\n // These five types of AST expressions can refer to expression roots, which could be variables\n // or references in the current scope.\n visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }\n visitSafePropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitSafePropertyRead(ast, context);\n }\n visitPropertyWrite(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyWrite(ast, context);\n }\n maybeMap(scope, ast, name) {\n // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an\n // `AST` expression that maps to a `Variable` or `Reference`.\n if (!(ast.receiver instanceof ImplicitReceiver)) {\n return;\n }\n // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is\n // probably a property on the top-level component context.\n let target = this.scope.lookup(name);\n if (target !== null) {\n this.bindings.set(ast, target);\n }\n }\n}\n/**\n * Metadata container for a `Target` that allows queries for specific bits of metadata.\n *\n * See `BoundTarget` for documentation on the individual methods.\n */\nclass R3BoundTarget {\n constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, templateEntities, usedPipes, eagerPipes, deferredBlocks) {\n this.target = target;\n this.directives = directives;\n this.eagerDirectives = eagerDirectives;\n this.bindings = bindings;\n this.references = references;\n this.exprTargets = exprTargets;\n this.symbols = symbols;\n this.nestingLevel = nestingLevel;\n this.templateEntities = templateEntities;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferredBlocks = deferredBlocks;\n }\n getEntitiesInTemplateScope(template) {\n return this.templateEntities.get(template) ?? new Set();\n }\n getDirectivesOfNode(node) {\n return this.directives.get(node) || null;\n }\n getReferenceTarget(ref) {\n return this.references.get(ref) || null;\n }\n getConsumerOfBinding(binding) {\n return this.bindings.get(binding) || null;\n }\n getExpressionTarget(expr) {\n return this.exprTargets.get(expr) || null;\n }\n getTemplateOfSymbol(symbol) {\n return this.symbols.get(symbol) || null;\n }\n getNestingLevel(template) {\n return this.nestingLevel.get(template) || 0;\n }\n getUsedDirectives() {\n const set = new Set();\n this.directives.forEach(dirs => dirs.forEach(dir => set.add(dir)));\n return Array.from(set.values());\n }\n getEagerlyUsedDirectives() {\n const set = new Set(this.eagerDirectives);\n return Array.from(set.values());\n }\n getUsedPipes() {\n return Array.from(this.usedPipes);\n }\n getEagerlyUsedPipes() {\n return Array.from(this.eagerPipes);\n }\n getDeferBlocks() {\n return Array.from(this.deferredBlocks);\n }\n}\nfunction extractTemplateEntities(rootScope) {\n const entityMap = new Map();\n function extractScopeEntities(scope) {\n if (entityMap.has(scope.template)) {\n return entityMap.get(scope.template);\n }\n const currentEntities = scope.namedEntities;\n let templateEntities;\n if (scope.parentScope !== null) {\n templateEntities = new Map([...extractScopeEntities(scope.parentScope), ...currentEntities]);\n } else {\n templateEntities = new Map(currentEntities);\n }\n entityMap.set(scope.template, templateEntities);\n return templateEntities;\n }\n const scopesToProcess = [rootScope];\n while (scopesToProcess.length > 0) {\n const scope = scopesToProcess.pop();\n for (const childScope of scope.childScopes.values()) {\n scopesToProcess.push(childScope);\n }\n extractScopeEntities(scope);\n }\n const templateEntities = new Map();\n for (const [template, entities] of entityMap) {\n templateEntities.set(template, new Set(entities.values()));\n }\n return templateEntities;\n}\nfunction compileClassMetadata(metadata) {\n // Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its\n // metadata.\n const fnCall = importExpr(Identifiers.setClassMetadata).callFn([metadata.type, metadata.decorators, metadata.ctorParameters ?? literal(null), metadata.propDecorators ?? literal(null)]);\n const iife = fn([], [devOnlyGuardedExpression(fnCall).toStmt()]);\n return iife.callFn([]);\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';\nfunction compileDeclareClassMetadata(metadata) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', metadata.type);\n definitionMap.set('decorators', metadata.decorators);\n definitionMap.set('ctorParameters', metadata.ctorParameters);\n definitionMap.set('propDecorators', metadata.propDecorators);\n return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);\n}\n\n/**\n * Creates an array literal expression from the given array, mapping all values to an expression\n * using the provided mapping function. If the array is empty or null, then null is returned.\n *\n * @param values The array to transfer into literal array expression.\n * @param mapper The logic to use for creating an expression for the array's values.\n * @returns An array literal expression representing `values`, or null if `values` is empty or\n * is itself null.\n */\nfunction toOptionalLiteralArray(values, mapper) {\n if (values === null || values.length === 0) {\n return null;\n }\n return literalArr(values.map(value => mapper(value)));\n}\n/**\n * Creates an object literal expression from the given object, mapping all values to an expression\n * using the provided mapping function. If the object has no keys, then null is returned.\n *\n * @param object The object to transfer into an object literal expression.\n * @param mapper The logic to use for creating an expression for the object's values.\n * @returns An object literal expression representing `object`, or null if `object` does not have\n * any keys.\n */\nfunction toOptionalLiteralMap(object, mapper) {\n const entries = Object.keys(object).map(key => {\n const value = object[key];\n return {\n key,\n value: mapper(value),\n quoted: true\n };\n });\n if (entries.length > 0) {\n return literalMap(entries);\n } else {\n return null;\n }\n}\nfunction compileDependencies(deps) {\n if (deps === 'invalid') {\n // The `deps` can be set to the string \"invalid\" by the `unwrapConstructorDependencies()`\n // function, which tries to convert `ConstructorDeps` into `R3DependencyMetadata[]`.\n return literal('invalid');\n } else if (deps === null) {\n return literal(null);\n } else {\n return literalArr(deps.map(compileDependency));\n }\n}\nfunction compileDependency(dep) {\n const depMeta = new DefinitionMap();\n depMeta.set('token', dep.token);\n if (dep.attributeNameType !== null) {\n depMeta.set('attribute', literal(true));\n }\n if (dep.host) {\n depMeta.set('host', literal(true));\n }\n if (dep.optional) {\n depMeta.set('optional', literal(true));\n }\n if (dep.self) {\n depMeta.set('self', literal(true));\n }\n if (dep.skipSelf) {\n depMeta.set('skipSelf', literal(true));\n }\n return depMeta.toLiteralMap();\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$5 = '16.1.0';\n/**\n * Compile a directive declaration defined by the `R3DirectiveMetadata`.\n */\nfunction compileDeclareDirectiveFromMetadata(meta) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);\n const type = createDirectiveType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for a directive into a `DefinitionMap`. This allows for reusing\n * this logic for components, as they extend the directive metadata.\n */\nfunction createDirectiveDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n const hasTransformFunctions = Object.values(meta.inputs).some(input => input.transformFunction !== null);\n // Note: in order to allow consuming Angular libraries that have been compiled with 16.1+ in\n // Angular 16.0, we only force a minimum version of 16.1 if input transform feature as introduced\n // in 16.1 is actually used.\n const minVersion = hasTransformFunctions ? MINIMUM_PARTIAL_LINKER_VERSION$5 : '14.0.0';\n definitionMap.set('minVersion', literal(minVersion));\n definitionMap.set('version', literal('16.2.12'));\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.type.value);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n if (meta.isSignal) {\n definitionMap.set('isSignal', literal(meta.isSignal));\n }\n // e.g. `selector: 'some-dir'`\n if (meta.selector !== null) {\n definitionMap.set('selector', literal(meta.selector));\n }\n definitionMap.set('inputs', conditionallyCreateDirectiveBindingLiteral(meta.inputs, true));\n definitionMap.set('outputs', conditionallyCreateDirectiveBindingLiteral(meta.outputs));\n definitionMap.set('host', compileHostMetadata(meta.host));\n definitionMap.set('providers', meta.providers);\n if (meta.queries.length > 0) {\n definitionMap.set('queries', literalArr(meta.queries.map(compileQuery)));\n }\n if (meta.viewQueries.length > 0) {\n definitionMap.set('viewQueries', literalArr(meta.viewQueries.map(compileQuery)));\n }\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', asLiteral(meta.exportAs));\n }\n if (meta.usesInheritance) {\n definitionMap.set('usesInheritance', literal(true));\n }\n if (meta.lifecycle.usesOnChanges) {\n definitionMap.set('usesOnChanges', literal(true));\n }\n if (meta.hostDirectives?.length) {\n definitionMap.set('hostDirectives', createHostDirectives(meta.hostDirectives));\n }\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n return definitionMap;\n}\n/**\n * Compiles the metadata of a single query into its partial declaration form as declared\n * by `R3DeclareQueryMetadata`.\n */\nfunction compileQuery(query) {\n const meta = new DefinitionMap();\n meta.set('propertyName', literal(query.propertyName));\n if (query.first) {\n meta.set('first', literal(true));\n }\n meta.set('predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) : convertFromMaybeForwardRefExpression(query.predicate));\n if (!query.emitDistinctChangesOnly) {\n // `emitDistinctChangesOnly` is special because we expect it to be `true`.\n // Therefore we explicitly emit the field, and explicitly place it only when it's `false`.\n meta.set('emitDistinctChangesOnly', literal(false));\n } else {\n // The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.\n }\n if (query.descendants) {\n meta.set('descendants', literal(true));\n }\n meta.set('read', query.read);\n if (query.static) {\n meta.set('static', literal(true));\n }\n return meta.toLiteralMap();\n}\n/**\n * Compiles the host metadata into its partial declaration form as declared\n * in `R3DeclareDirectiveMetadata['host']`\n */\nfunction compileHostMetadata(meta) {\n const hostMetadata = new DefinitionMap();\n hostMetadata.set('attributes', toOptionalLiteralMap(meta.attributes, expression => expression));\n hostMetadata.set('listeners', toOptionalLiteralMap(meta.listeners, literal));\n hostMetadata.set('properties', toOptionalLiteralMap(meta.properties, literal));\n if (meta.specialAttributes.styleAttr) {\n hostMetadata.set('styleAttribute', literal(meta.specialAttributes.styleAttr));\n }\n if (meta.specialAttributes.classAttr) {\n hostMetadata.set('classAttribute', literal(meta.specialAttributes.classAttr));\n }\n if (hostMetadata.values.length > 0) {\n return hostMetadata.toLiteralMap();\n } else {\n return null;\n }\n}\nfunction createHostDirectives(hostDirectives) {\n const expressions = hostDirectives.map(current => {\n const keys = [{\n key: 'directive',\n value: current.isForwardReference ? generateForwardRef(current.directive.type) : current.directive.type,\n quoted: false\n }];\n const inputsLiteral = current.inputs ? createHostDirectivesMappingArray(current.inputs) : null;\n const outputsLiteral = current.outputs ? createHostDirectivesMappingArray(current.outputs) : null;\n if (inputsLiteral) {\n keys.push({\n key: 'inputs',\n value: inputsLiteral,\n quoted: false\n });\n }\n if (outputsLiteral) {\n keys.push({\n key: 'outputs',\n value: outputsLiteral,\n quoted: false\n });\n }\n return literalMap(keys);\n });\n // If there's a forward reference, we generate a `function() { return [{directive: HostDir}] }`,\n // otherwise we can save some bytes by using a plain array, e.g. `[{directive: HostDir}]`.\n return literalArr(expressions);\n}\n\n/**\n * Compile a component declaration defined by the `R3ComponentMetadata`.\n */\nfunction compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {\n const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);\n const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);\n const type = createComponentType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for a component into a `DefinitionMap`.\n */\nfunction createComponentDefinitionMap(meta, template, templateInfo) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n definitionMap.set('template', getTemplateExpression(template, templateInfo));\n if (templateInfo.isInline) {\n definitionMap.set('isInline', literal(true));\n }\n definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));\n definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));\n definitionMap.set('viewProviders', meta.viewProviders);\n definitionMap.set('animations', meta.animations);\n if (meta.changeDetection !== undefined) {\n definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy).prop(ChangeDetectionStrategy[meta.changeDetection]));\n }\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));\n }\n if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {\n definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));\n }\n if (template.preserveWhitespaces === true) {\n definitionMap.set('preserveWhitespaces', literal(true));\n }\n return definitionMap;\n}\nfunction getTemplateExpression(template, templateInfo) {\n // If the template has been defined using a direct literal, we use that expression directly\n // without any modifications. This is ensures proper source mapping from the partially\n // compiled code to the source file declaring the template. Note that this does not capture\n // template literals referenced indirectly through an identifier.\n if (templateInfo.inlineTemplateLiteralExpression !== null) {\n return templateInfo.inlineTemplateLiteralExpression;\n }\n // If the template is defined inline but not through a literal, the template has been resolved\n // through static interpretation. We create a literal but cannot provide any source span. Note\n // that we cannot use the expression defining the template because the linker expects the template\n // to be defined as a literal in the declaration.\n if (templateInfo.isInline) {\n return literal(templateInfo.content, null, null);\n }\n // The template is external so we must synthesize an expression node with\n // the appropriate source-span.\n const contents = templateInfo.content;\n const file = new ParseSourceFile(contents, templateInfo.sourceUrl);\n const start = new ParseLocation(file, 0, 0, 0);\n const end = computeEndLocation(file, contents);\n const span = new ParseSourceSpan(start, end);\n return literal(contents, null, span);\n}\nfunction computeEndLocation(file, contents) {\n const length = contents.length;\n let lineStart = 0;\n let lastLineStart = 0;\n let line = 0;\n do {\n lineStart = contents.indexOf('\\n', lastLineStart);\n if (lineStart !== -1) {\n lastLineStart = lineStart + 1;\n line++;\n }\n } while (lineStart !== -1);\n return new ParseLocation(file, length, line, length - lastLineStart);\n}\nfunction compileUsedDependenciesMetadata(meta) {\n const wrapType = meta.declarationListEmitMode !== 0 /* DeclarationListEmitMode.Direct */ ? generateForwardRef : expr => expr;\n return toOptionalLiteralArray(meta.declarations, decl => {\n switch (decl.kind) {\n case R3TemplateDependencyKind.Directive:\n const dirMeta = new DefinitionMap();\n dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));\n dirMeta.set('type', wrapType(decl.type));\n dirMeta.set('selector', literal(decl.selector));\n dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));\n dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));\n dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));\n return dirMeta.toLiteralMap();\n case R3TemplateDependencyKind.Pipe:\n const pipeMeta = new DefinitionMap();\n pipeMeta.set('kind', literal('pipe'));\n pipeMeta.set('type', wrapType(decl.type));\n pipeMeta.set('name', literal(decl.name));\n return pipeMeta.toLiteralMap();\n case R3TemplateDependencyKind.NgModule:\n const ngModuleMeta = new DefinitionMap();\n ngModuleMeta.set('kind', literal('ngmodule'));\n ngModuleMeta.set('type', wrapType(decl.type));\n return ngModuleMeta.toLiteralMap();\n }\n });\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';\nfunction compileDeclareFactoryFunction(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n definitionMap.set('deps', compileDependencies(meta.deps));\n definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));\n return {\n expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),\n statements: [],\n type: createFactoryType(meta)\n };\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';\n/**\n * Compile a Injectable declaration defined by the `R3InjectableMetadata`.\n */\nfunction compileDeclareInjectableFromMetadata(meta) {\n const definitionMap = createInjectableDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectableType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for a Injectable into a `DefinitionMap`.\n */\nfunction createInjectableDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn !== undefined) {\n const providedIn = convertFromMaybeForwardRefExpression(meta.providedIn);\n if (providedIn.value !== null) {\n definitionMap.set('providedIn', providedIn);\n }\n }\n if (meta.useClass !== undefined) {\n definitionMap.set('useClass', convertFromMaybeForwardRefExpression(meta.useClass));\n }\n if (meta.useExisting !== undefined) {\n definitionMap.set('useExisting', convertFromMaybeForwardRefExpression(meta.useExisting));\n }\n if (meta.useValue !== undefined) {\n definitionMap.set('useValue', convertFromMaybeForwardRefExpression(meta.useValue));\n }\n // Factories do not contain `ForwardRef`s since any types are already wrapped in a function call\n // so the types will not be eagerly evaluated. Therefore we do not need to process this expression\n // with `convertFromProviderExpression()`.\n if (meta.useFactory !== undefined) {\n definitionMap.set('useFactory', meta.useFactory);\n }\n if (meta.deps !== undefined) {\n definitionMap.set('deps', literalArr(meta.deps.map(compileDependency)));\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';\nfunction compileDeclareInjectorFromMetadata(meta) {\n const definitionMap = createInjectorDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectorType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for an Injector into a `DefinitionMap`.\n */\nfunction createInjectorDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n definitionMap.set('providers', meta.providers);\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$1 = '14.0.0';\nfunction compileDeclareNgModuleFromMetadata(meta) {\n const definitionMap = createNgModuleDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);\n const type = createNgModuleType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for an NgModule into a `DefinitionMap`.\n */\nfunction createNgModuleDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.kind === R3NgModuleMetadataKind.Local) {\n throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');\n }\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n // We only generate the keys in the metadata if the arrays contain values.\n // We must wrap the arrays inside a function if any of the values are a forward reference to a\n // not-yet-declared class. This is to support JIT execution of the `ɵɵngDeclareNgModule()` call.\n // In the linker these wrappers are stripped and then reapplied for the `ɵɵdefineNgModule()` call.\n if (meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n }\n if (meta.declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n if (meta.exports.length > 0) {\n definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n if (meta.schemas !== null && meta.schemas.length > 0) {\n definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));\n }\n if (meta.id !== null) {\n definitionMap.set('id', meta.id);\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION = '14.0.0';\n/**\n * Compile a Pipe declaration defined by the `R3PipeMetadata`.\n */\nfunction compileDeclarePipeFromMetadata(meta) {\n const definitionMap = createPipeDefinitionMap(meta);\n const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);\n const type = createPipeType(meta);\n return {\n expression,\n type,\n statements: []\n };\n}\n/**\n * Gathers the declaration fields for a Pipe into a `DefinitionMap`.\n */\nfunction createPipeDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n // e.g. `type: MyPipe`\n definitionMap.set('type', meta.type.value);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n // e.g. `name: \"myPipe\"`\n definitionMap.set('name', literal(meta.pipeName));\n if (meta.pure === false) {\n // e.g. `pure: false`\n definitionMap.set('pure', literal(meta.pure));\n }\n return definitionMap;\n}\n\n//////////////////////////////////////\n// This file only reexports content of the `src` folder. Keep it that way.\n// This function call has a global side effects and publishes the compiler into global namespace for\n// the late binding of the Compiler to the @angular/core for jit compilation.\npublishFacade(_global);\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n// This file is not used to build this module. It is only used during editing\n\nexport { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, Block, BlockGroup, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };","map":{"version":3,"names":["_SELECTOR_REGEXP","RegExp","CssSelector","constructor","element","classNames","attrs","notSelectors","parse","selector","results","_addResult","res","cssSel","length","push","cssSelector","match","current","inNot","lastIndex","exec","Error","tag","prefix","addAttribute","slice","addClassName","setElement","attribute","unescapeAttribute","attr","result","escaping","i","char","charAt","escapeAttribute","replace","isElementSelector","hasElementSelector","getAttrs","join","concat","name","value","toLowerCase","toString","forEach","klass","notSelector","SelectorMatcher","_elementMap","Map","_elementPartialMap","_classMap","_classPartialMap","_attrValueMap","_attrValuePartialMap","_listContexts","createNotMatcher","notMatcher","addSelectables","cssSelectors","callbackCtxt","listContext","SelectorListContext","_addSelectable","matcher","selectable","SelectorContext","isTerminal","_addTerminal","_addPartial","className","terminalMap","terminalValuesMap","get","set","partialMap","partialValuesMap","map","terminalList","matchedCallback","alreadyMatched","_matchTerminal","_matchPartial","selectables","starSelectables","finalize","nestedSelector","selectors","cbContext","callback","emitDistinctChangesOnlyDefaultValue","ViewEncapsulation","ChangeDetectionStrategy","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","Type$1","Function","SecurityContext","MissingTranslationStrategy","parserSelectorToSimpleSelector","classes","elementName","parserSelectorToNegativeSelector","parserSelectorToR3Selector","positive","negative","parseSelectorToR3Selector","core","Object","freeze","__proto__","Type","BigInteger","zero","one","digits","clone","add","other","addToSelf","maxNrOfDigits","Math","max","carry","digitSum","BigIntForMultiplication","powerOfTwos","getValue","multiplyBy","num","product","multiplyByAndAddTo","exponent","getMultipliedByPowerOfTwo","previousPower","BigIntExponentiation","base","exponents","toThePowerOf","textEncoder","digest$1","message","id","computeDigest","sha1","serializeNodes","nodes","meaning","decimalDigest","computeDecimalDigest","visitor","_SerializerIgnoreIcuExpVisitor","parts","a","visit","computeMsgId","_SerializerVisitor","visitText","text","context","visitContainer","container","children","child","visitIcu","icu","strCases","keys","cases","k","expression","type","visitTagPlaceholder","ph","isVoid","startName","closeName","visitPlaceholder","visitIcuPlaceholder","serializerVisitor$1","str","TextEncoder","utf8","encode","words32","bytesToWords32","Endian","Big","len","w","Uint32Array","b","c","d","e","h0","h1","h2","h3","h4","j","rol32","fkVal","fk","f","temp","reduce","add32","toHexU32","padStart","index","fingerprint","view","DataView","buffer","byteOffset","byteLength","hi","hash32","lo","msg","msgFingerprint","meaningFingerprint","add64","rol64","wordsToDecimalString","end","getUint32","mix","remainder","getUint8","add32to64","low","high","ah","al","bh","bl","l","h","count","bytes","endian","size","wordAt","byteAt","word","base256","decimal","TypeModifier","modifiers","None","hasModifier","modifier","BuiltinTypeName","BuiltinType","visitType","visitBuiltinType","ExpressionType","typeParams","visitExpressionType","ArrayType","of","visitArrayType","MapType","valueType","visitMapType","TransplantedType","visitTransplantedType","DYNAMIC_TYPE","Dynamic","INFERRED_TYPE","Inferred","BOOL_TYPE","Bool","INT_TYPE","Int","NUMBER_TYPE","Number","STRING_TYPE","String","FUNCTION_TYPE","NONE_TYPE","UnaryOperator","BinaryOperator","nullSafeIsEquivalent","isEquivalent","areAllEquivalentPredicate","equivalentPredicate","areAllEquivalent","baseElement","otherElement","Expression","sourceSpan","prop","ReadPropExpr","key","ReadKeyExpr","callFn","params","pure","InvokeFunctionExpr","instantiate","InstantiateExpr","conditional","trueCase","falseCase","ConditionalExpr","equals","rhs","BinaryOperatorExpr","Equals","notEquals","NotEquals","identical","Identical","notIdentical","NotIdentical","minus","Minus","plus","Plus","divide","Divide","multiply","Multiply","modulo","Modulo","and","And","bitwiseAnd","parens","BitwiseAnd","or","Or","lower","Lower","lowerEquals","LowerEquals","bigger","Bigger","biggerEquals","BiggerEquals","isBlank","TYPED_NULL_EXPR","nullishCoalesce","NullishCoalesce","toStmt","ExpressionStatement","ReadVarExpr","isConstant","visitExpression","visitReadVarExpr","WriteVarExpr","TypeofExpr","expr","visitTypeofExpr","WrappedNodeExpr","node","visitWrappedNodeExpr","visitWriteVarExpr","toDeclStmt","DeclareVarStmt","toConstDecl","StmtModifier","Final","WriteKeyExpr","receiver","visitWriteKeyExpr","WritePropExpr","visitWritePropExpr","fn","args","visitInvokeFunctionExpr","arg","TaggedTemplateExpr","template","elements","expressions","visitTaggedTemplateExpr","classExpr","visitInstantiateExpr","LiteralExpr","visitLiteralExpr","TemplateLiteral","el","TemplateLiteralElement","rawText","escapeForTemplateLiteral","escapeSlashes","LiteralPiece","PlaceholderPiece","associatedMessage","MEANING_SEPARATOR$1","ID_SEPARATOR$1","LEGACY_ID_INDICATOR","LocalizedString","metaBlock","messageParts","placeHolderNames","visitLocalizedString","serializeI18nHead","description","customId","legacyIds","legacyId","createCookedRawString","getMessagePartSourceSpan","getPlaceholderSourceSpan","serializeI18nTemplatePart","partIndex","placeholder","messagePart","messageString","escapeStartingColon","escapeColons","range","cooked","raw","ExternalExpr","moduleName","runtime","visitExternalExpr","ExternalReference","condition","visitConditionalExpr","DynamicImportExpr","url","visitDynamicImportExpr","NotExpr","visitNotExpr","FnParam","param","FunctionExpr","statements","visitFunctionExpr","DeclareFunctionStmt","p","UnaryOperatorExpr","operator","visitUnaryOperatorExpr","lhs","visitBinaryOperatorExpr","visitReadPropExpr","visitReadKeyExpr","LiteralArrayExpr","entries","every","visitLiteralArrayExpr","LiteralMapEntry","quoted","LiteralMapExpr","visitLiteralMapExpr","entriesClone","entry","CommaExpr","visitCommaExpr","NULL_EXPR","LeadingComment","multiline","trailingNewline","JSDocComment","tags","serializeTags","Statement","leadingComments","addLeadingComment","leadingComment","stmt","visitStatement","visitDeclareVarStmt","visitDeclareFunctionStmt","visitExpressionStmt","ReturnStatement","visitReturnStmt","IfStmt","visitIfStmt","RecursiveAstVisitor$1","ast","visitAllExpressions","visitAllStatements","exprs","stmts","jsDocComment","variable","importExpr","importType","typeModifiers","expressionType","transplantedType","typeofExpr","literalArr","values","literalMap","unary","not","body","ifStmt","thenClause","elseClause","taggedTemplate","literal","localizedString","placeholderNames","isNull","exp","tagToString","out","tagName","output_ast","RecursiveAstVisitor","CONSTANT_PREFIX","UNKNOWN_VALUE_KEY","KEY_CONTEXT","POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS","FixupExpression","resolved","shared","original","fixup","ConstantPool","isClosureCompilerEnabled","literals","literalFactories","sharedConstants","nextNameIndex","getConstLiteral","forceShared","isLongStringLiteral","GenericKeyFn","INSTANCE","keyOf","newValue","freshName","definition","usage","getSharedConstant","def","has","toSharedConstantDeclaration","getLiteralFactory","argumentsForKey","_getLiteralFactory","expressionForKey","resultMap","literalFactory","literalFactoryArguments","filter","resultExpressions","parameters","isVariable","pureFunctionDeclaration","uniqueName","CORE","Identifiers","NEW_METHOD","TRANSFORM_METHOD","PATCH_DEPS","namespaceHTML","namespaceMathML","namespaceSVG","elementStart","elementEnd","advance","syntheticHostProperty","syntheticHostListener","attributeInterpolate1","attributeInterpolate2","attributeInterpolate3","attributeInterpolate4","attributeInterpolate5","attributeInterpolate6","attributeInterpolate7","attributeInterpolate8","attributeInterpolateV","classProp","elementContainerStart","elementContainerEnd","elementContainer","styleMap","styleMapInterpolate1","styleMapInterpolate2","styleMapInterpolate3","styleMapInterpolate4","styleMapInterpolate5","styleMapInterpolate6","styleMapInterpolate7","styleMapInterpolate8","styleMapInterpolateV","classMap","classMapInterpolate1","classMapInterpolate2","classMapInterpolate3","classMapInterpolate4","classMapInterpolate5","classMapInterpolate6","classMapInterpolate7","classMapInterpolate8","classMapInterpolateV","styleProp","stylePropInterpolate1","stylePropInterpolate2","stylePropInterpolate3","stylePropInterpolate4","stylePropInterpolate5","stylePropInterpolate6","stylePropInterpolate7","stylePropInterpolate8","stylePropInterpolateV","nextContext","resetView","templateCreate","defer","enableBindings","disableBindings","getCurrentView","textInterpolate","textInterpolate1","textInterpolate2","textInterpolate3","textInterpolate4","textInterpolate5","textInterpolate6","textInterpolate7","textInterpolate8","textInterpolateV","restoreView","pureFunction0","pureFunction1","pureFunction2","pureFunction3","pureFunction4","pureFunction5","pureFunction6","pureFunction7","pureFunction8","pureFunctionV","pipeBind1","pipeBind2","pipeBind3","pipeBind4","pipeBindV","hostProperty","property","propertyInterpolate","propertyInterpolate1","propertyInterpolate2","propertyInterpolate3","propertyInterpolate4","propertyInterpolate5","propertyInterpolate6","propertyInterpolate7","propertyInterpolate8","propertyInterpolateV","i18n","i18nAttributes","i18nExp","i18nStart","i18nEnd","i18nApply","i18nPostprocess","pipe","projection","projectionDef","reference","inject","injectAttribute","directiveInject","invalidFactory","invalidFactoryDep","templateRefExtractor","forwardRef","resolveForwardRef","ɵɵdefineInjectable","declareInjectable","InjectableDeclaration","resolveWindow","resolveDocument","resolveBody","defineComponent","declareComponent","setComponentScope","ComponentDeclaration","FactoryDeclaration","declareFactory","FactoryTarget","defineDirective","declareDirective","DirectiveDeclaration","InjectorDef","InjectorDeclaration","defineInjector","declareInjector","NgModuleDeclaration","ModuleWithProviders","defineNgModule","declareNgModule","setNgModuleScope","registerNgModuleType","PipeDeclaration","definePipe","declarePipe","declareClassMetadata","setClassMetadata","queryRefresh","viewQuery","loadQuery","contentQuery","NgOnChangesFeature","InheritDefinitionFeature","CopyDefinitionFeature","StandaloneFeature","ProvidersFeature","HostDirectivesFeature","InputTransformsFeatureFeature","listener","getInheritedFactory","sanitizeHtml","sanitizeStyle","sanitizeResourceUrl","sanitizeScript","sanitizeUrl","sanitizeUrlOrResourceUrl","trustConstantHtml","trustConstantResourceUrl","validateIframeAttribute","DASH_CASE_REGEXP","dashCaseToCamelCase","input","m","toUpperCase","splitAtColon","defaultValues","_splitAt","splitAtPeriod","character","characterIndex","indexOf","trim","noUndefined","val","undefined","error","escapeRegExp","s","utf8Encode","encoded","codePoint","charCodeAt","stringify","token","Array","isArray","overriddenName","newLineIndex","substring","Version","full","splits","split","major","minor","patch","_global","globalThis","newArray","list","partitionArray","arr","conditionFn","truthy","falsy","item","VERSION$1","JS_B64_PREFIX","SourceMapGenerator","file","sourcesContent","lines","lastCol0","hasMappings","addSource","content","addLine","addMapping","col0","sourceUrl","sourceLine0","sourceCol0","currentLine","toJSON","sourcesIndex","sources","from","mappings","lastSourceIndex","lastSourceLine0","lastSourceCol0","segments","segment","segAsStr","toBase64VLQ","toJsComment","toBase64String","JSON","b64","i1","i2","i3","toBase64Digit","digit","B64_DIGITS","_SINGLE_QUOTE_ESCAPE_STRING_RE","_LEGAL_IDENTIFIER_RE","_INDENT_WITH","_EmittedLine","indent","partsLength","srcSpans","EmitterVisitorContext","createRoot","_indent","_lines","_currentLine","println","lastPart","print","lineIsEmpty","lineLength","part","newLine","removeEmptyLastLine","pop","incIndent","decIndent","toSource","sourceLines","_createIndent","toSourceMapGenerator","genFilePath","startsAtLine","firstOffsetMapped","mapFirstOffsetIfNeeded","line","lineIdx","spans","spanIdx","span","source","start","sourceLine","sourceCol","col","spanOf","column","emittedLine","columnsLeft","AbstractEmitterVisitor","_escapeDollarInStrings","printLeadingComments","ctx","comment","hasElseCase","lineWasEmpty","escapeIdentifier","head","opStr","visitAllObjects","separator","handler","incrementedIndent","escapeDollar","alwaysQuote","requiresQuotes","test","typeWithParameters","numParams","ANIMATE_SYMBOL_PREFIX","prepareSyntheticPropertyName","prepareSyntheticListenerName","phase","getSafePropertyAccessString","accessor","escapedName","prepareSyntheticListenerFunctionName","jitOnlyGuardedExpression","guardedExpression","devOnlyGuardedExpression","guard","guardExpr","guardNotDefined","guardUndefinedOrTrue","wrapReference","wrapped","refsToArray","refs","shouldForwardDeclare","ref","createMayBeForwardRefExpression","convertFromMaybeForwardRefExpression","generateForwardRef","R3FactoryDelegateType","FactoryTarget$1","compileFactoryFunction","meta","t","baseFactoryVar","typeForCtor","isDelegatedFactoryMetadata","ctorExpr","deps","injectDependencies","target","retExpr","makeConditionalFactory","nonCtorExpr","r","ctorStmt","delegateArgs","delegateDeps","factoryExpr","delegateType","Class","delegate","isExpressionFactoryMetadata","getInheritedFactoryCall","baseFactory","factoryFn","createFactoryType","ctorDepsType","createCtorDepsType","typeArgumentCount","dep","compileInjectDependency","attributeNameType","flags","self","skipSelf","host","optional","Pipe","flagsParam","injectArgs","injectFn","getInjectFn","hasTypes","attributeTypes","createCtorDepType","Component","Directive","NgModule","Injectable","Comment$1","_visitor","Text$3","BoundText","visitBoundText","TextAttribute","keySpan","valueSpan","visitTextAttribute","BoundAttribute","securityContext","unit","fromBoundElementProperty","visitBoundAttribute","BoundEvent","handlerSpan","fromParsedEvent","event","targetOrPhase","visitBoundEvent","Element$1","attributes","inputs","outputs","references","startSourceSpan","endSourceSpan","visitElement","DeferredTrigger","visitDeferredTrigger","BoundDeferredTrigger","IdleDeferredTrigger","ImmediateDeferredTrigger","HoverDeferredTrigger","TimerDeferredTrigger","delay","InteractionDeferredTrigger","ViewportDeferredTrigger","DeferredBlockPlaceholder","minimumTime","visitDeferredBlockPlaceholder","DeferredBlockLoading","afterTime","visitDeferredBlockLoading","DeferredBlockError","visitDeferredBlockError","DeferredBlock","triggers","prefetchTriggers","loading","visitDeferredBlock","Template","templateAttrs","variables","visitTemplate","Content","visitContent","Variable","visitVariable","Reference","visitReference","Icu$1","vars","placeholders","RecursiveVisitor$1","visitAll$1","deferred","block","trigger","newNode","Message","placeholderToMessage","serializeMessage","filePath","startLine","startCol","endLine","endCol","Text$2","Container","Icu","expressionPlaceholder","TagPlaceholder","Placeholder","IcuPlaceholder","CloneVisitor","n","RecurseVisitor","messageNodes","LocalizeMessageStringVisitor","Serializer","createNameMapper","SimplePlaceholderMapper","mapName","internalToPublic","publicToNextId","publicToInternal","toPublicName","internalName","hasOwnProperty","toInternalName","publicName","visitPlaceholderName","nextId","_Visitor$2","visitTag","strAttrs","_serializeAttributes","strChildren","visitDeclaration","decl","visitDoctype","doctype","rootTag","dtd","serialize","Declaration","unescapedAttrs","escapeXml","Doctype","Tag","Text$1","unescapedValue","CR","ws","_ESCAPED_CHARS","_MESSAGES_TAG","_MESSAGE_TAG","_PLACEHOLDER_TAG$3","_EXAMPLE_TAG","_SOURCE_TAG$2","_DOCTYPE","Xmb","write","messages","locale","exampleVisitor","ExampleVisitor","_Visitor$1","rootNode","sourceTags","version","encoding","addDefaultExamples","load","digest","startTagAsText","startEx","startTagPh","closeTagAsText","closeEx","closeTagPh","interpolationAsText","exTag","icuExpression","icuType","icuCases","icuAsText","exText","CLOSURE_TRANSLATION_VAR_PREFIX","TRANSLATION_VAR_PREFIX","I18N_ATTR","I18N_ATTR_PREFIX","I18N_ICU_VAR_PREFIX","I18N_ICU_MAPPING_PREFIX","I18N_PLACEHOLDER_SYMBOL","isI18nAttribute","startsWith","isI18nRootNode","isSingleI18nIcu","hasI18nMeta","hasI18nAttrs","some","icuFromI18nMessage","wrapI18nPlaceholder","contextId","blockId","assembleI18nBoundString","strings","bindingStartIndex","acc","lastIdx","getSeqNumberGenerator","startsAt","placeholdersToParams","updatePlaceholderMap","assembleBoundTextPlaceholders","startIdx","find","idx","formatI18nPlaceholderNamesInMap","useCamelCase","_params","formatI18nPlaceholderName","chunks","postfix","shift","getTranslationConstPrefix","extra","declareI18nVariable","UNSAFE_OBJECT_KEY_NAME_REGEXP","TEMPORARY_NAME","CONTEXT_NAME","RENDER_FLAGS","REFERENCE_PREFIX","IMPLICIT_REFERENCE","NON_BINDABLE_ATTR","RESTORED_VIEW_CONTEXT_NAME","MAX_CHAIN_LENGTH","CHAINABLE_INSTRUCTIONS","Set","invokeInstruction","temporaryAllocator","invalid","asLiteral","conditionallyCreateDirectiveBindingLiteral","keepDeclared","getOwnPropertyNames","declaredName","minifiedName","expressionValue","classPropertyName","bindingPropertyName","transformFunction","expressionKeys","trimTrailingNulls","getQueryPredicate","query","constantPool","predicate","DefinitionMap","toLiteralMap","getAttrsForDirectiveMatching","elOrTpl","attributesMap","o","getInterpolationArgsLength","interpolation","getInstructionStatements","instructions","pendingExpression","pendingExpressionType","chainLength","resolvedParams","paramsOrFn","compileInjectable","resolveForwardRefs","factoryMeta","useClass","useClassOnSelf","delegateToFactory","useFactory","useValue","useExisting","injectableProps","providedIn","createInjectableType","useType","unwrapForwardRefs","createFactoryFunction","unwrappedType","UNUSABLE_INTERPOLATION_REGEXPS","assertInterpolationSymbols","identifier","regexp","InterpolationConfig","fromArray","markers","DEFAULT_INTERPOLATION_CONFIG","$EOF","$BSPACE","$TAB","$LF","$VTAB","$FF","$CR","$SPACE","$BANG","$DQ","$HASH","$$","$PERCENT","$AMPERSAND","$SQ","$LPAREN","$RPAREN","$STAR","$PLUS","$COMMA","$MINUS","$PERIOD","$SLASH","$COLON","$SEMICOLON","$LT","$EQ","$GT","$QUESTION","$0","$7","$9","$A","$E","$F","$X","$Z","$LBRACKET","$BACKSLASH","$RBRACKET","$CARET","$_","$a","$b","$e","$f","$n","$r","$t","$u","$v","$x","$z","$LBRACE","$BAR","$RBRACE","$NBSP","$PIPE","$TILDA","$AT","$BT","isWhitespace","code","isDigit","isAsciiLetter","isAsciiHexDigit","isNewLine","isOctalDigit","isQuote","ParseLocation","offset","moveBy","delta","ch","priorLine","lastIndexOf","fromCharCode","getContext","maxChars","maxLines","startOffset","endOffset","ctxChars","ctxLines","before","after","ParseSourceFile","ParseSourceSpan","fullStart","details","ParseErrorLevel","ParseError","level","ERROR","contextualMessage","r3JitTypeSourceSpan","kind","typeName","sourceFileName","sourceFile","_anonymousTypeIndex","identifierName","compileIdentifier","sanitizeIdentifier","makeTemplateObjectPolyfill","AbstractJsEmitterVisitor","_visitParams","policy","getPolicy","trustedTypes","createPolicy","createScript","trustedScriptFromString","script","newTrustedFunctionForJIT","fnArgs","fnBody","bind","JitEvaluator","evaluateStatements","refResolver","createSourceMaps","converter","JitEmitterVisitor","isUseStrictStatement","createReturnStmt","evaluateCode","getArgs","createSourceMap","fnArgNames","fnArgValues","argName","emptyFn","headerLines","executeFunction","_evalArgNames","_evalArgValues","_evalExportedVars","resultVar","_emitReferenceToExternal","resolveExternalReference","Exported","statement","compileInjector","definitionMap","providers","imports","createInjectorType","R3JitReflector","R3SelectorScopeMode","R3NgModuleMetadataKind","compileNgModule","Global","bootstrap","containsForwardDecls","bootstrapExpression","selectorScopeMode","Inline","declarations","exports","SideEffect","setNgModuleScopeCall","generateSetNgModuleScopeCall","schemas","createNgModuleType","compileNgModuleDeclarationExpression","Local","moduleType","includeImportTypes","publicDeclarationTypes","tupleTypeOf","tupleOfTypes","scopeMap","declarationsExpression","importsExpression","exportsExpression","fnCall","guardedCall","iife","iifeCall","types","typeofTypes","compilePipeFromMetadata","metadata","definitionMapValues","pipeName","isStandalone","createPipeType","R3TemplateDependencyKind","ParserError","errLocation","ctxLocation","ParseSpan","toAbsolute","absoluteOffset","AbsoluteSourceSpan","AST","ASTWithName","nameSpan","EmptyExpr$1","ImplicitReceiver","visitImplicitReceiver","ThisReceiver","visitThisReceiver","Chain","visitChain","Conditional","trueExp","falseExp","visitConditional","PropertyRead","visitPropertyRead","PropertyWrite","visitPropertyWrite","SafePropertyRead","visitSafePropertyRead","KeyedRead","visitKeyedRead","SafeKeyedRead","visitSafeKeyedRead","KeyedWrite","visitKeyedWrite","BindingPipe","visitPipe","LiteralPrimitive","visitLiteralPrimitive","LiteralArray","visitLiteralArray","LiteralMap","visitLiteralMap","Interpolation$1","visitInterpolation","Binary","operation","left","right","visitBinary","Unary","createMinus","createPlus","binaryOp","binaryLeft","binaryRight","visitUnary","PrefixNot","visitPrefixNot","NonNullAssert","visitNonNullAssert","Call","argumentSpan","visitCall","SafeCall","visitSafeCall","ASTWithSource","location","errors","visitASTWithSource","VariableBinding","ExpressionBinding","visitAll","asts","AstTransformer","AstMemoryEfficientTransformer","obj","modified","ParsedProperty","isLiteral","ParsedPropertyType","LITERAL_ATTR","isAnimation","ANIMATION","ParsedEvent","ParsedVariable","BoundElementProperty","EventHandlerVars","convertActionBinding","localResolver","implicitReceiver","action","bindingId","baseSourceSpan","implicitReceiverAccesses","globals","DefaultLocalResolver","actionWithoutBuiltins","convertPropertyBindingBuiltins","createLiteralArrayConverter","argCount","createLiteralMapConverter","createPipeConverter","_AstToIrVisitor","actionStmts","flattenStatements","_Mode","prependTemporaryDecls","temporaryCount","usesImplicitReceiver","notifyImplicitReceiverUse","lastStatement","converterFactory","convertBuiltins","ConvertPropertyBindingResult","currValExpr","convertPropertyBinding","expressionWithoutBuiltins","outputExpr","getStatementsFromVisitor","convertUpdateArguments","contextVariableExpression","expressionWithArgumentsToExtract","temporaryDeclaration","_BuiltinAstConverter","temporaryName","temporaryNumber","unshift","ensureStatementMode","mode","ensureExpressionMode","convertToStatementIfNeeded","_converterFactory","BuiltinFunctionCall","_localResolver","_implicitReceiver","supportsInterpolation","_nodeMap","_resultMap","_currentTemporary","op","_visit","convertSourceSpan","convertNullishCoalesce","InterpolationExpression","leftMostSafe","leftMostSafeNode","convertSafeAccess","maybeRestoreView","_getLocal","getLocal","prevUsesImplicitReceiver","addImplicitReceiverAccess","varExpr","localExpr","convertedArgs","call","temporary","needsTemporaryInSafeAccess","allocateTemporary","access","delete","releaseTemporary","visitSome","tempNumber","output","unsupported","_SECURITY_SCHEMA","SECURITY_SCHEMA","registerContext","HTML","STYLE","URL","RESOURCE_URL","specs","spec","IFRAME_SECURITY_SENSITIVE_ATTRS","isIframeSecuritySensitiveAttr","attrName","animationKeywords","ShadowCss","_animationDeclarationKeyframesRe","shimCssText","cssText","hostSelector","comments","_commentRe","_commentWithHashRe","newLinesMatches","_newLinesRe","COMMENT_PLACEHOLDER","_insertDirectives","scopedCssText","_scopeCssText","commentIdx","_commentWithHashPlaceHolderRe","_insertPolyfillDirectivesInCssText","_insertPolyfillRulesInCssText","_scopeKeyframesRelatedCss","scopeSelector","unscopedKeyframesSet","scopedKeyframesCssText","processRules","rule","_scopeLocalKeyframeDeclarations","_scopeAnimationRule","_","quote","keyframeName","endSpaces","unescapeQuotes","_scopeAnimationKeyframe","keyframe","spaces1","spaces2","animationDeclarations","leadingSpaces","quotedName","nonQuotedName","_match","commaSeparatedKeyframes","_cssContentNextSelectorRe","_cssContentRuleRe","unscopedRules","_extractUnscopedRulesFromCssText","_insertPolyfillHostInCssText","_convertColonHost","_convertColonHostContext","_convertShadowDOMSelectors","_scopeSelectors","_cssContentUnscopedRuleRe","_cssColonHostRe","hostSelectors","otherSelectors","convertedSelectors","hostSelectorArray","convertedSelector","_polyfillHostNoCombinator","_polyfillHost","_cssColonHostContextReGlobal","selectorText","contextSelectorGroups","_cssColonHostContextRe","newContextSelectors","contextSelectorGroupsLength","repeatGroups","contextSelectors","combineHostContextSelectors","_shadowDOMSelectorsRe","pattern","_scopeSelector","_stripScopingSelectors","CssRule","_shadowDeepSelectors","_polyfillHostNoCombinatorRe","deepParts","shallowPart","otherParts","applyScope","_selectorNeedsScoping","_applySelectorScope","re","_makeScopeMatcher","lre","rre","_selectorReSuffix","_applySimpleSelectorScope","_polyfillHostRe","replaceBy","hnc","colon","isRe","_scopeSelectorPart","scopedP","matches","safeContent","SafeSelector","scopedSelector","startIndex","sep","hasHost","shouldScope","_placeholderRe","scopedPart","restore","_colonHostContextRe","_polyfillHostContext","_colonHostRe","_escapeRegexMatches","_content","pseudo","_ph","keep","_parenSuffix","BLOCK_PLACEHOLDER","_ruleRe","CONTENT_PAIRS","COMMA_IN_PLACEHOLDER","SEMI_IN_PLACEHOLDER","COLON_IN_PLACEHOLDER","_cssCommaInPlaceholderReGlobal","_cssSemiInPlaceholderReGlobal","_cssColonInPlaceholderReGlobal","ruleCallback","escaped","escapeInStrings","inputWithEscapedBlocks","escapeBlocks","nextBlockIndex","escapedResult","escapedString","suffix","contentPrefix","blocks","unescapeInStrings","StringWithEscapedBlocks","charPairs","resultParts","escapedBlocks","openCharCount","nonBlockStartIndex","blockStartIndex","openChar","closeChar","ESCAPE_IN_STRING_MAP","currentQuoteChar","substr","isQuoted","hostMarker","otherSelectorsHasHost","combined","contextSelector","previousSelectors","groups","multiples","TagContentType","splitNsName","colonIndex","isNgContainer","isNgContent","isNgTemplate","getNsPrefix","fullName","mergeNsAndName","localName","BindingKind","FLYWEIGHT_ARRAY","ElementAttributes","known","byKind","projectAs","Attribute","ClassName","styles","StyleProperty","bindings","Property","I18n","array","arrayFor","getAttributeNameLiterals$1","attributeNamespace","attributeName","nameLiteral","assertIsElementAttributes","OpKind","ExpressionKind","SemanticVariableKind","CompatibilityMode","SanitizerFn","ConsumesSlot","Symbol","DependsOnSlotContext","UsesSlotIndex","ConsumesVarsTrait","UsesVarOffset","TRAIT_CONSUMES_SLOT","slot","numSlotsUsed","TRAIT_USES_SLOT_INDEX","TRAIT_DEPENDS_ON_SLOT_CONTEXT","TRAIT_CONSUMES_VARS","TRAIT_USES_VAR_OFFSET","varOffset","hasConsumesSlotTrait","hasDependsOnSlotContextTrait","hasConsumesVarsTrait","hasUsesVarOffsetTrait","hasUsesSlotIndexTrait","createStatementOp","NEW_OP","createVariableOp","xref","initializer","debugListId","prev","next","createInterpolateTextOp","InterpolateText","Interpolation","createBindingOp","isTemplate","Binding","bindingKind","createPropertyOp","isAnimationTrigger","sanitizer","createStylePropOp","StyleProp","createClassPropOp","ClassProp","createStyleMapOp","StyleMap","createClassMapOp","ClassMap","createAttributeOp","createAdvanceOp","Advance","_a","_b","_c","_d","_e","_f","_g","_h","_j","isIrExpression","ExpressionBase","LexicalReadExpr","LexicalRead","transformInternalExpressions","ReferenceExpr","ContextExpr","Context","NextContextExpr","NextContext","steps","GetCurrentViewExpr","GetCurrentView","RestoreViewExpr","RestoreView","transform","transformExpressionsInExpression","ResetViewExpr","ResetView","ReadVariableExpr","ReadVariable","PureFunctionExpr","VisitorContextFlag","InChildOperation","PureFunctionParameterExpr","PipeBindingExpr","PipeBinding","PipeBindingVariadicExpr","numArgs","PipeBindingVariadic","SafePropertyReadExpr","SafeKeyedReadExpr","SafeInvokeFunctionExpr","SafeInvokeFunction","SafeTernaryExpr","EmptyExpr","arguments","AssignTemporaryExpr","ReadTemporaryExpr","SanitizerExpr","visitExpressionsInOp","transformExpressionsInOp","transformExpressionsInInterpolation","HostProperty","transformExpressionsInStatement","Listener","innerOp","handlerOps","Element","ElementStart","ElementEnd","ContainerStart","ContainerEnd","DisableBindings","EnableBindings","Text","Namespace","OpList","nextListId","ListEnd","tail","assertIsNotEnd","assertIsUnowned","oldLast","prepend","ops","first","iterator","assertIsOwned","reversed","oldOp","newOp","replaceWithMany","newOps","remove","listId","oldPrev","oldNext","last","insertBefore","insertAfter","byList","elementContainerOpKinds","isElementOrContainerOp","createElementStartOp","namespace","localRefs","nonBindable","createTemplateOp","decls","createElementEndOp","createDisableBindingsOp","createEnableBindingsOp","createTextOp","initialValue","createListenerOp","handlerFnName","consumesDollarEvent","isAnimationListener","animationPhase","createListenerOpForAnimation","createPipeOp","createNamespaceOp","active","createHostPropertyOp","CompilationUnit","create","update","fnName","listenerOp","HostBindingCompilationJob","componentName","pool","compatibility","fnSuffix","units","nextXrefId","job","root","allocateXrefId","ComponentCompilationJob","views","consts","ViewCompilationUnit","allocateView","parent","addConst","newConst","contextVariables","phaseVarCounting","varCount","varsUsedByOp","varsUsedByIrExpression","childView","slots","phaseAlignPipeVariadicVarOffset","cpl","phaseFindAnyCasts","removeAnys","parenDepth","valueStart","propStart","currentProp","hyphenate$1","styleVal","v","getElementsByXrefId","phaseAttributeExtraction","populateElementAttributes","lookupElement$2","ownerOp","extractAttributeOp","TemplateDefinitionBuilder","isStringLiteral","NONE","parsedStyles","extractable","lookupElement$1","phaseBindingSpecialization","Animation","CHAINABLE","phaseChaining","chainOperationsInList","opList","chain","instruction","phaseConstCollection","attrArray","serializeAttributes","REPLACEMENTS","phaseEmptyElements","opReplacements","startKind","mergedKind","phaseExpandSafeReads","safeTransform","ternaryTransform","requiresTemporary","temporariesIn","temporaries","eliminateTemporaryAssignments","tmps","read","safeTernaryWithTemporary","isSafeAccessExpression","isUnsafeAccessExpression","isAccessExpression","deepestSafeTernary","st","dst","phaseGenerateAdvance","slotMap","slotContext","phaseGenerateVariables","recursivelyProcessView","parentScope","scope","getScopeForView","generateVariablesInScopeForView","preambleOps","viewContextVariable","Identifier","targetId","STYLE_DOT","CLASS_DOT","phaseHostStylePropertyParsing","isCssCustomProperty$1","hyphenate","parseProperty$1","overrideIndex","unitIndex","phaseLocalRefs","serializeLocalRefs","constRefs","phaseNamespace","activeNamespace","BINARY_OPERATORS","NAMESPACES","SVG","namespaceForKey","namespacePrefixKey","keyForNamespace","prefixWithNamespace","strippedTag","phaseNaming","addNamesToView","baseName","state","varNames","safeTagName","getVariableName","normalizeStylePropName","stripImportant","importantIndex","phaseMergeNextContext","mergeNextContextsInOps","mergeSteps","tryToMerge","candidate","CONTAINER_TAG","phaseNgContainer","updatedElementXrefs","phaseNoListenersOnTemplates","inTemplate","lookupElement","phaseNonbindable","phaseNullishCoalescing","assignment","phasePipeCreation","processPipeBindingsInView","updateOp","addPipeToCreationBlock","afterTargetXref","binding","phasePipeVariadic","kindTest","ORDERING","keepLast","handledOpKinds","phasePropertyOrdering","opsToOrder","orderedOp","reorder","groupIndex","findIndex","flatMap","group","phasePureFunctionExtraction","constantDef","PureFunctionConstant","declName","keyExpr","fnParams","returnExpr","phasePureLiteralStructures","transformLiteralArray","transformLiteralMap","derivedEntries","nonConstantArgs","constIndex","localRefIndex","elementOrContainerBase","templateFnRef","handlerFn","namespaceMath","savedView","returnValue","PIPE_BINDINGS","pipeBind","interpolationArgs","callVariadicInstruction","TEXT_INTERPOLATE_CONFIG","collateInterpolationArgs","extraArgs","PROPERTY_INTERPOLATE_CONFIG","attributeInterpolate","ATTRIBUTE_INTERPOLATE_CONFIG","stylePropInterpolate","STYLE_PROP_INTERPOLATE_CONFIG","styleMapInterpolate","STYLE_MAP_INTERPOLATE_CONFIG","classMapInterpolate","CLASS_MAP_INTERPOLATE_CONFIG","pureFunction","callVariadicInstructionExpr","PURE_FUNCTION_CONFIG","constant","mapping","config","baseArgs","sanitizerIdentifierMap","Html","IframeAttribute","ResourceUrl","Script","Style","Url","phaseReify","reifyCreateOperations","reifyUpdateOperations","reifyIrExpression","listenerFn","reifyListenerHandler","_unit","handlerStmts","phaseRemoveEmptyBindings","phaseResolveContexts","processLexicalScope$1","phaseResolveDollarEvent","resolveDollarEvent","phaseResolveNames","processLexicalScope","SavedView","sanitizers","SCRIPT","phaseResolveSanitizers","sanitizerFn","isIframeElement$1","phaseSaveRestoreView","needsRestoreView","handlerOp","addSaveRestoreViewOperationToListener","phaseSlotAllocation","slotCount","phaseStyleBindingSpecialization","phaseTemporaryVariables","opCount","generatedStatements","finalReads","assigned","released","defs","assignName","names","phaseVariableOptimization","optimizeVariablesInOpList","Fence","varDecls","varUsages","varRemoteUsages","opMap","collectOpInfo","countVariableUsages","contextIsUsed","opInfo","fences","ViewContextWrite","SideEffectful","stmtOp","uncountVariableUsages","ViewContextRead","toInline","varInfo","targetOp","variablesUsed","allowConservativeInlining","tryInlineVariableInitializer","safeToInlinePastFences","fencesForIrExpression","varRemoteUsage","declFences","inlined","inliningAllowed","exprFences","transformTemplate","transformHostBinding","emitTemplateFn","tpl","rootFn","emitView","emitChildViews","viewFn","createStatements","updateStatements","createCond","maybeGenerateRfBlock","updateCond","flag","emitHostBindingFunction","compatibilityMode","ingestComponent","ingestNodes","ingestHostBinding","bindingParser","properties","ingestHostProperty","events","ingestHostEvent","convertAst","ingestElement","ingestTemplate","ingestText","ingestBoundText","staticAttributes","namespaceKey","startOp","ingestBindings","ingestReferences","tmpl","tagNameWithoutNamespace","namespacePrefix","tplOp","textXref","ingestBinding","inputExprs","BINDING_KINDS","isTemplateBinding","assertIsArray","USE_TEMPLATE_PIPELINE","IMPORTANT_FLAG","MIN_STYLING_BINDING_SLOTS_REQUIRED","StylingBuilder","_directiveExpr","_hasInitialValues","hasBindings","hasBindingsWithPipes","_classMapInput","_styleMapInput","_singleStyleInputs","_singleClassInputs","_lastStylingInput","_firstStylingInput","_stylesIndex","_classesIndex","_initialStyleValues","_initialClassValues","registerBoundInput","registerInputBasedOnName","registerStyleInput","registerClassInput","isStyle","isClass","isMapBased","isEmptyExpression","isCssCustomProperty","hasOverrideFlag","bindingSuffix","parseProperty","registerIntoMap","_checkForPipes","registerStyleAttr","registerClassAttr","populateInitialStylingAttrs","assignHostAttrs","buildClassMapInstruction","valueConverter","_buildMapBasedInstruction","buildStyleMapInstruction","isClassBased","stylingInput","totalBindingSlotsRequired","mapValue","getClassMapInterpolationExpression","getStyleMapInterpolationExpression","calls","allocateBindingSlots","convertFn","convertResult","_buildSingleInputs","getInterpolationExpressionFn","previousInstruction","referenceForCall","_buildClassInputs","_buildStyleInputs","getStylePropInterpolationExpression","buildUpdateLevelInstructions","styleMapInstruction","classMapInstruction","TokenType","KEYWORDS","Lexer","tokenize","scanner","_Scanner","tokens","scanToken","Token","numValue","strValue","isCharacter","Character","isNumber","isString","isOperator","Operator","isIdentifier","isPrivateIdentifier","PrivateIdentifier","isKeyword","Keyword","isKeywordLet","isKeywordAs","isKeywordNull","isKeywordUndefined","isKeywordTrue","isKeywordFalse","isKeywordThis","isError","toNumber","newCharacterToken","newIdentifierToken","newPrivateIdentifierToken","newKeywordToken","newOperatorToken","newStringToken","newNumberToken","newErrorToken","EOF","peek","isIdentifierStart","scanIdentifier","scanNumber","scanCharacter","scanString","scanPrivateIdentifier","scanOperator","scanQuestion","scanComplexOperator","twoCode","two","threeCode","three","isIdentifierPart","simple","hasSeparators","isExponentStart","isExponentSign","parseIntAutoRadix","parseFloat","marker","unescapedCode","hex","parseInt","unescape","position","isNaN","SplitInterpolation","offsets","TemplateBindingParseResult","templateBindings","warnings","Parser$1","_lexer","parseAction","isAssignmentEvent","interpolationConfig","_checkNoInterpolation","sourceToLex","_stripComments","_ParseAST","parseChain","parseBinding","_parseBindingAst","checkSimpleExpression","checker","SimpleExpressionChecker","parseSimpleBinding","_reportError","parseTemplateBindings","templateKey","templateValue","templateUrl","absoluteKeyOffset","absoluteValueOffset","parser","parseInterpolation","interpolatedTokens","splitInterpolation","expressionNodes","expressionText","createInterpolationAst","parseInterpolationExpression","inputToTemplateIndexMap","getIndexMapForOriginalTemplate","atInterpolation","extendLastString","interpStart","interpEnd","exprStart","exprEnd","_getInterpolationEndIndex","fullEnd","startInOriginalTemplate","piece","wrapLiteralPrimitive","_commentStart","outerQuote","nextChar","endIndex","charIndex","_forEachUnquotedChar","expressionEnd","currentQuote","escapeCount","ParseContextFlags","parseFlags","rparensExpected","rbracketsExpected","rbracesExpected","sourceSpanCache","atEOF","inputIndex","currentEndIndex","curToken","currentAbsoluteOffset","artificialEndIndex","tmp","serial","withContext","cb","ret","consumeOptionalCharacter","peekKeywordLet","peekKeywordAs","expectCharacter","consumeOptionalOperator","expectOperator","prettyPrintToken","tok","expectIdentifierOrKeyword","_reportErrorForPrivateIdentifier","expectIdentifierOrKeywordOrString","parsePipe","errorIndex","artificialStart","artificialEnd","parseExpression","nameStart","nameId","fullSpanEnd","parseConditional","parseLogicalOr","yes","no","parseLogicalAnd","parseNullishCoalescing","parseEquality","parseRelational","parseAdditive","parseMultiplicative","parsePrefix","parseCallChain","parsePrimary","parseAccessMember","parseCall","parseKeyedReadOrWrite","parseExpressionList","parseLiteralMap","literalValue","terminator","keyStart","readReceiver","isSafe","Writable","consumeOptionalAssignment","argumentStart","parseCallArguments","positionals","expectTemplateBindingKey","operatorFound","parseDirectiveKeywordBindings","letBinding","parseLetBinding","parseAsBinding","consumeStatementTerminator","getDirectiveBoundTarget","spanEnd","asBinding","spanStart","locationText","skip","extraMessage","errorMessage","offsetMap","consumedInOriginalTemplate","consumedInInput","tokenIndex","currentToken","decoded","lengthOfParts","sum","NodeWithI18n","Expansion","switchValue","switchValueSourceSpan","visitExpansion","ExpansionCase","valueSourceSpan","expSourceSpan","visitExpansionCase","valueTokens","visitAttribute","Comment","visitComment","BlockGroup","visitBlockGroup","Block","visitBlock","BlockParameter","visitBlockParameter","astResult","RecursiveVisitor","visitChildren","prototype","apply","ElementSchemaRegistry","BOOLEAN","NUMBER","STRING","OBJECT","SCHEMA","_ATTR_TO_PROP","_PROP_TO_ATTR","inverted","propertyName","DomElementSchemaRegistry","_schema","_eventSchema","encodedType","strType","strProperties","typeNames","superName","superType","superEvent","hasProperty","propName","schemaMetas","schema","elementProperties","hasElement","isAttribute","getMappedPropName","getDefaultComponentElementName","validateProperty","validateAttribute","allKnownElementNames","allKnownAttributesOfElement","allKnownEventsOfElement","normalizeAnimationStyleProperty","normalizeAnimationStyleValue","camelCaseProp","userProvidedProp","strVal","errorMsg","_isPixelDimensionStyle","valAndSuffixMatch","HtmlTagDefinition","closedByChildren","implicitNamespacePrefix","contentType","PARSABLE_DATA","closedByParent","ignoreFirstLf","preventNamespaceInheritance","canSelfClose","isClosedByChild","getContentType","overrideType","default","DEFAULT_TAG_DEFINITION","TAG_DEFINITIONS","getHtmlTagDefinition","RAW_TEXT","ESCAPABLE_RAW_TEXT","svg","knownTagName","NAMED_ENTITIES","NGSP_UNICODE","TokenError","tokenType","TokenizeResult","nonNormalizedIcuExpressions","getTagDefinition","options","tokenizer","_Tokenizer","mergeTextTokens","_CR_OR_CRLF_REGEXP","_unexpectedCharacterErrorMsg","charCode","_unknownEntityErrorMsg","entitySrc","_unparsableEntityErrorMsg","entityStr","CharacterReferenceType","_ControlFlowError","_file","_getTagDefinition","_currentTokenStart","_currentTokenType","_expansionCaseStack","_inInterpolation","_tokenizeIcu","tokenizeExpansionForms","_interpolationConfig","_leadingTriviaCodePoints","leadingTriviaChars","codePointAt","endPos","startPos","_cursor","EscapedCharacterCursor","PlainCharacterCursor","_preserveLineEndings","preserveLineEndings","_i18nNormalizeLineEndingsInICUs","i18nNormalizeLineEndingsInICUs","_tokenizeBlocks","tokenizeBlocks","init","handleError","_processCarriageReturns","_attemptCharCode","_consumeCdata","_consumeComment","_consumeDocType","_consumeTagClose","_consumeTagOpen","_attemptStr","_consumeBlockGroupOpen","_consumeBlockGroupClose","_consumeBlock","_tokenizeExpansionForm","_consumeWithInterpolation","_isTextEnd","_isTagStart","_beginToken","_endToken","nameCursor","_attemptCharCodeUntilFn","isBlockNameChar","getChars","_consumeBlockParameters","_requireCharCode","isBlockParameterChar","inQuote","openBraces","isExpansionFormStart","_consumeExpansionFormStart","isExpansionCaseStart","_isInExpansionForm","_consumeExpansionCaseStart","_isInExpansionCase","_consumeExpansionCaseEnd","_consumeExpansionFormEnd","getSpan","_createError","CursorError","cursor","_attemptCharCodeCaseInsensitive","compareCharCodeCaseInsensitive","chars","charsLeft","initialPosition","_attemptStrCaseInsensitive","_requireStr","_requireCharCodeUntilFn","diff","_attemptUntilChar","_readChar","fromCodePoint","_consumeEntity","textTokenType","isHex","codeStart","isDigitEntityEnd","entityType","HEX","DEC","strNum","isNamedEntityEnd","_consumeRawText","consumeEntities","endMarkerPredicate","tagCloseStart","foundEndMarker","contentStart","_consumePrefixAndName","nameOrPrefixStart","isPrefixEnd","isNameEnd","openTagToken","_consumeTagOpenStart","isNotWhitespace","_consumeAttributeName","_consumeAttributeValue","_consumeTagOpenEnd","contentTokenType","_consumeRawTextWithTagClose","attrNameStart","prefixAndName","quoteChar","_consumeQuote","endPredicate","_readUntil","normalizedCondition","conditionToken","interpolationTokenType","endInterpolation","_consumeInterpolation","interpolationStart","prematureEndPredicate","expressionStart","inComment","_getProcessedChars","_isBlockStart","isInterpolation","code1","code2","toUpperCaseCharCode","srcTokens","dstTokens","lastDstToken","fileOrCursor","advanceState","updatePeek","leadingTriviaCodePoints","startLocation","locationFromCursor","endLocation","fullStartLocation","pos","currentChar","internalState","processEscapeSequence","digitStart","decodeHexDigits","octal","previous","TreeError","ParseTreeResult","rootNodes","Parser","tokenizeResult","_TreeBuilder","build","_index","_containerStack","_advance","_peek","_consumeStartTag","_consumeEndTag","_closeVoidElement","_consumeText","_consumeExpansion","_advanceIf","_startToken","endToken","_addToParent","expCase","_parseExpansionCase","_collectExpansionExpTokens","expansionCaseParser","expansionFormStack","lastOnStack","startSpan","_getContainer","decodeEntity","endSpan","startTagToken","_consumeAttr","_getElementFullName","_getClosestParentElement","selfClosing","tagDef","parentEl","_pushContainer","_popContainer","endTagToken","errMsg","expectedType","unexpectedCloseTagDetected","stackIndex","splice","attrEnd","valueStartSpan","valueEnd","nextTokenType","valueToken","quoteToken","blockGroup","implicitBlock","closeToken","_conditionallyClosePreviousBlock","paramToken","previousContainer","lastChild","parentElement","parentTagName","parentTagDefinition","stack","entity","HtmlParser","PRESERVE_WS_ATTR_NAME","SKIP_WS_TRIM_TAGS","WS_CHARS","NO_WS_REGEXP","WS_REPLACE_REGEXP","hasPreserveWhitespacesAttr","replaceNgsp","WhitespaceVisitor","visitAllWithSiblings","isNotBlank","hasExpansionSibling","createWhitespaceProcessedTextToken","processWhitespace","expansion","expansionCase","parameter","removeWhitespaces","htmlAstWithErrors","mapEntry","mapLiteral","TRUSTED_TYPES_SINKS","isTrustedTypesSink","PROPERTY_PARTS_SEPARATOR","ATTRIBUTE_PREFIX","CLASS_PREFIX","STYLE_PREFIX","TEMPLATE_ATTR_PREFIX$1","ANIMATE_PROP_PREFIX","BindingParser","_exprParser","_schemaRegistry","createBoundHostProperties","boundProps","parsePropertyBinding","createDirectiveHostEventAsts","hostListeners","targetEvents","parseEvent","sourceInfo","_reportExpressionParserErrors","parseInlineTemplateBinding","tplKey","tplValue","targetMatchableAttrs","targetProps","targetVars","isIvyAst","_parseTemplateBindings","bindingSpan","moveParseSourceSpan","srcSpan","_parsePropertyAst","parseLiteralAttr","bindingsResult","warning","WARNING","isAnimationLabel","_parseAnimation","isHost","isAnimationProp","parsePropertyInterpolation","DEFAULT","isHostBinding","createBoundElementProperty","elementSelector","boundProp","skipValidation","mapPropertyName","bindingType","boundPropertyName","securityContexts","_validatePropertyOrAttributeName","calcPossibleSecurityContexts","nsSeparatorIdx","ns","mappedPropName","_parseAnimationEvent","_parseRegularEvent","eventName","_parseAction","isAttr","report","PipeCollector","pipes","registry","ctxs","elementNames","notElementNames","possibleElementNames","sort","absoluteSpan","startDiff","endDiff","isStyleUrlResolvable","schemeMatch","URL_WITH_SCHEMA_REGEXP","NG_CONTENT_SELECT_ATTR$1","LINK_ELEMENT","LINK_STYLE_REL_ATTR","LINK_STYLE_HREF_ATTR","LINK_STYLE_REL_VALUE","STYLE_ELEMENT","SCRIPT_ELEMENT","NG_NON_BINDABLE_ATTR","NG_PROJECT_AS","preparseElement","selectAttr","hrefAttr","relAttr","lcAttrName","normalizeNgContentSelect","nodeName","PreparsedElementType","OTHER","NG_CONTENT","STYLESHEET","PreparsedElement","TIME_PATTERN","SEPARATOR_PATTERN","COMMA_DELIMITED_SYNTAX","OnTriggerType","parseWhenTrigger","whenIndex","getTriggerParametersStart","parsed","parseOnTrigger","onIndex","OnTriggerParser","unexpectedToken","isFollowedByOrLast","consumeTrigger","prevErrors","consumeParameters","min","IDLE","createIdleTrigger","TIMER","createTimerTrigger","INTERACTION","createInteractionTrigger","IMMEDIATE","createImmediateTrigger","HOVER","createHoverTrigger","VIEWPORT","createViewportTrigger","commaDelimStack","tokenText","newStart","newEnd","parseDeferredTime","startPosition","hasFoundSeparator","time","PREFETCH_WHEN_PATTERN","PREFETCH_ON_PATTERN","MINIMUM_PARAMETER_PATTERN","AFTER_PARAMETER_PATTERN","WHEN_PARAMETER_PATTERN","ON_PARAMETER_PATTERN","SecondaryDeferredBlockType","createDeferredBlock","primaryBlock","secondaryBlocks","parsePrimaryTriggers","parseSecondaryBlocks","PLACEHOLDER","parsePlaceholderBlock","LOADING","parseLoadingBlock","parseErrorBlock","parsedTime","BIND_NAME_REGEXP","KW_BIND_IDX","KW_LET_IDX","KW_REF_IDX","KW_ON_IDX","KW_BINDON_IDX","KW_AT_IDX","IDENT_KW_IDX","BINDING_DELIMS","BANANA_BOX","PROPERTY","EVENT","TEMPLATE_ATTR_PREFIX","htmlAstToRender3Ast","htmlNodes","transformer","HtmlAstToIvyAst","ivyNodes","allErrors","styleUrls","ngContentSelectors","collectCommentNodes","commentNodes","inI18nBlock","isI18nRootElement","reportError","preparsedElement","contents","textContents","isTemplateElement","parsedProperties","boundEvents","i18nAttrsMeta","templateParsedProperties","templateVariables","elementHasInlineTemplate","hasBinding","normalizedName","normalizeAttributeName","parsedVariables","parseAttribute","NON_BINDABLE_VISITOR","flat","Infinity","parsedElement","isEmptyTextNode","isCommentNode","extractAttributes","bound","hoistedAttrs","_visitTextWithInterpolation","formattedKey","enabledBlockTypes","i18nPropsMeta","bep","matchableAttributes","createKeySpan","normalizationAdjustment","keySpanStart","keySpanEnd","bindParts","parseVariable","parseReference","addEvents","parseAssignmentEvent","delims","endsWith","valueNoNgsp","NonBindableVisitor","TagType","setupRegistry","getUniqueId","icus","I18nContext","templateIndex","isEmitted","_unresolvedCtxCount","_registry","appendTag","closed","isRoot","isResolved","getSerializedPlaceholders","serializePlaceholderValue","appendBinding","appendIcu","appendBoundText","phs","appendTemplate","TEMPLATE","appendElement","ELEMENT","appendProjection","forkChildContext","reconcileChildContext","findTemplateFn","childPhs","tmplIdx","isCloseTag","isTemplateTag","wrap","symbol","wrapTag","data","IcuSerializerVisitor","formatPh","serializer","serializeIcuNode","TAG_TO_PLACEHOLDER_NAMES","PlaceholderRegistry","_placeHolderNameCounts","_signatureToName","getStartTagPlaceholderName","signature","_hashTag","upperTag","_generateUniqueName","getCloseTagPlaceholderName","_hashClosingTag","getPlaceholderName","upperName","getUniquePlaceholder","seen","_expParser","createI18nMessageFactory","_I18nVisitor","visitNodeFn","toI18nMessage","noopVisitNodeFn","_html","_expressionParser","isIcu","icuDepth","placeholderRegistry","placeholderToContent","i18nodes","startPhName","closePhName","i18nIcuCases","i18nIcu","caze","expPh","phName","_icuCase","_context","_parameter","previousI18n","hasInterpolation","extractPlaceholderName","reusePreviousSourceSpans","assertSingleContainerMessage","assertEquivalentNodes","previousNodes","_CUSTOM_PH_EXP","I18nError","setI18nRefs","htmlNode","i18nNode","previousMessage","I18nMetaVisitor","keepI18nAttrs","enableI18nLegacyMessageIdFormat","_errors","_generateI18nMessage","_parseMetadata","createI18nMessage","_setMessageId","_setLegacyIds","visitAllWithErrors","attrsMeta","currentMessage","parseI18nMeta","I18N_MEANING_SEPARATOR","I18N_ID_SEPARATOR","idIndex","descIndex","meaningAndDesc","i18nMetaToJSDoc","GOOG_GET_MSG","createGoogleGetMsgStatements","variable$1","closureVar","placeholderValues","serializeI18nMessageForGetMsg","original_code","googGetMsgStmt","i18nAssignmentStmt","GetMsgSerializerVisitor","serializerVisitor","createLocalizeStatements","placeHolders","serializeI18nMessageForLocalize","getSourceSpan","localizedString$1","variableInitialization","LocalizeSerializerVisitor","pieces","createPlaceholderPiece","processMessagePieces","startNode","endNode","createEmptyMessagePart","NG_CONTENT_SELECT_ATTR","NG_PROJECT_AS_ATTR_NAME","EVENT_BINDING_SCOPE_GLOBALS","GLOBAL_TARGET_RESOLVERS","LEADING_TRIVIA_CHARS","renderFlagCheckIfStmt","prepareEventListenerParameters","eventAst","handlerName","eventArgumentName","implicitReceiverExpr","bindingLevel","getOrCreateSharedContextVar","bindingStatements","variableDeclarations","restoreViewStatement","createComponentDefConsts","prepareStatements","constExpressions","i18nVarRefsCache","parentBindingScope","contextName","i18nContext","templateName","_namespace","relativeContextFilePath","i18nUseExternalIds","deferBlocks","_constants","_dataIndex","_bindingContext","_prefixCode","_creationCodeFns","_updateCodeFns","_currentIndex","_tempVariables","_nestedTemplateFns","_pureFunctionSlots","_bindingSlots","_ngContentReservedSlots","_ngContentSelectorsOffset","_implicitReceiverExpr","_bindingScope","nestedScope","fileBasedI18nSuffix","_valueConverter","ValueConverter","allocateDataSlot","numSlots","allocatePureFunctionSlots","creationInstruction","buildTemplateFunction","ngContentSelectorsOffset","registerContextVariables","initI18nContext","isSingleElementTemplate","selfClosingI18nInstruction","hasTextChildrenOnly","updatePipeSlotOffsets","buildTemplateFn","r3ReservedSlots","creationStatements","creationVariables","viewSnapshotStatements","updateVariables","creationBlock","updateBlock","i18nTranslate","transformFn","_ref","i18nGenerateMainBlockVar","i18nGenerateClosureVar","getTranslationDeclStmts","scopedName","freshReferenceName","retrievalLevel","relativeLevel","isListenerScope","hasRestoreViewVariable","notifyRestoredViewContextUse","sharedCtxVar","getSharedContextName","generateNextContextExpr","i18nAppendBindings","i18nBindProps","props","label","messageId","uniqueSuffix","i18nUpdateRef","icuMapping","needsPostprocessing","addToConsts","updateInstructionWithAdvance","getConstCount","updateInstruction","i18nAttributesInstruction","nodeIndex","i18nAttrArgs","converted","getNamespaceInstruction","addNamespaceInstruction","nsInstruction","interpolatedUpdateInstruction","elementIndex","getUpdateInstructionArguments","ngContent","projectionSlotIdx","nonContentSelectAttributes","getAttributeExpressions","stylingBuilder","isNonBindableMode","outputAttrs","isNgContainer$1","allOtherInputs","boundI18nAttrs","stylingInputWasSet","addAttrsToConsts","prepareRefsArray","wasInNamespace","currentNamespace","hasChildren","createSelfClosingInstruction","createSelfClosingI18nInstruction","outputAst","prepareListenerParameter","stylingInstructions","limit","processStylingUpdateInstruction","emptyValueBindInstruction","propertyBindings","attributeBindings","inputType","hasValue","getBindingFunctionParams","attrNamespace","isAttributeBinding","sanitizationRef","resolveSanitizationFn","isIframeElement","namespaceLiteral","getPropertyInterpolationExpression","getAttributeInterpolationExpression","boundValue","propertyBinding","attributeBinding","NG_TEMPLATE_TAG_NAME","attrsExprs","templateVisitor","templateFunctionExpr","getVarCount","templatePropertyBindings","i18nInputs","getTextInterpolationExpression","initWasInvoked","formatted","deferredDeps","depsFnName","dependencyExp","deferredDep","isDeferrable","innerFn","symbolName","fileName","importPath","depsFnBody","depsFnExpr","getConsts","getNgContentSelectors","bindingContext","instructionFn","fns","addAdvanceInstructionIfNecessary","originalSlots","getImplicitReceiverExpr","convertedPropertyBinding","valExpr","renderAttributes","alreadySeen","attrExprs","ngProjectAsAttr","i18nVarRef","getAttributeNameLiterals","trustedConstAttribute","getNgProjectAsLiteral","addAttrExpr","attrsLengthBeforeInputs","refsParam","variableName","nextContextStmt","refExpr","bindingFnName","allocateSlot","_pipeBindExprs","slotPseudoLocal","pureFunctionSlot","isVarLength","pipeBindingCallInfo","pipeBindExpr","bindingSlots","slotOffset","pipeBindingIdentifiers","pureFunctionIdentifiers","pureFunctionCallInfo","relativeLevelDiff","literal$1","allocateSlots","startSlot","SHARED_CONTEXT_KEY","BindingScope","createRootScope","referenceNameIndex","restoreViewVariable","usesRestoredViewContext","declareLocalCallback","declare","priority","maybeGenerateSharedContextVar","getComponentProperty","localRef","newScope","generateSharedContextVar","bindingKey","sharedCtxObj","componentValue","restoreCall","currentContextLevel","levelDiff","currStmts","createCssSelector","elementNameNoNs","nameNoNs","parsedR3Selector","parseTemplate","preserveWhitespaces","makeBindingParser","htmlParser","parseResult","alwaysAttemptHtmlToR3AstConversion","parsedTemplate","i18nMetaVisitor","i18nMetaResult","elementRegistry","isTextNode","deferredParams","eagerParams","NG_I18N_CLOSURE_MODE","createClosureModeGuard","ATTR_REGEX","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","baseDirectiveFields","queries","createContentQueriesFunction","viewQueries","createViewQueriesFunction","createHostBindingsFunction","typeSourceSpan","exportAs","isSignal","addFeatures","features","viewProviders","inputKeys","usesInheritance","fullInheritance","lifecycle","usesOnChanges","hostDirectives","createHostDirectivesFeatureArg","compileDirectiveFromMetadata","createDirectiveType","compileComponentFromMetadata","firstSelector","selectorAttributes","templateTypeName","changeDetection","templateBuilder","templateFunctionExpression","constsExpr","templateFn","compileDeclarationList","declarationListEmitMode","encapsulation","Emulated","styleValues","compileStyles","styleNodes","style","animations","Default","createComponentType","createBaseDirectiveTypeParams","stringArrayAsType","createHostDirectivesType","resolvedList","prepareQueryParams","toQueryFlags","descendants","static","emitDistinctChangesOnly","convertAttributesToExpressions","tempAllocator","getQueryList","refresh","updateDirective","contentQueriesFnName","stringAsType","stringMapAsLiteralExpression","mapValues","selectorForType","getInputsTypeExpression","q","required","queryDefinition","viewQueryFnName","hostBindingsMetadata","eventBindings","listeners","hostJob","styleBuilder","styleAttr","classAttr","specialAttributes","createInstructions","updateInstructions","hostBindingSourceSpan","createHostListeners","allOtherBindings","totalHostVarsCount","getValueConverter","hostVarsCountFn","originalVarsCount","syntheticHostBindings","bindingExpr","bindingFn","bindingName","getBindingNameAndInstruction","instructionParams","bindingParams","hostAttrs","convertStylingCall","hostBindingsFnName","implicit","attrMatches","listenerParams","syntheticListenerParams","HOST_REG_EXP","parseHostBindings","verifyHostBindings","shadowCss","hostMeta","directive","hasForwardRef","inputsLiteral","createHostDirectivesMappingArray","outputsLiteral","isForwardReference","ResourceLoader","ɵsetEnabledBlockTypes","CompilerFacadeImpl","jitEvaluator","elementSchemaRegistry","compilePipe","angularCoreEnv","sourceMapUrl","facade","jitExpression","compilePipeDeclaration","declaration","convertDeclarePipeFacadeToMetadata","computeProvidedIn","convertToProviderExpression","wrapExpression","convertR3DependencyMetadata","compileInjectableDeclaration","convertR3DeclareDependencyMetadata","compileInjectorDeclaration","convertDeclareInjectorFacadeToMetadata","compileNgModuleDeclaration","compileDirective","convertDirectiveFacadeToMetadata","compileDirectiveFromMeta","compileDirectiveDeclaration","createParseSourceSpan","convertDeclareDirectiveFacadeToMetadata","compileComponent","parseJitTemplate","convertDeclarationFacadeToMetadata","deferrableDeclToImportDecl","jitExpressionSourceMap","compileComponentFromMeta","compileComponentDeclaration","convertDeclareComponentFacadeToMetadata","compileFactory","factoryRes","convertR3DependencyMetadataArray","compileFactoryDeclaration","preStatements","convertToR3QueryMetadata","convertQueryPredicate","convertQueryDeclarationToMetadata","inputsFromMetadata","parseInputsArray","outputsFromMetadata","parseMappingStringArray","propMetadata","inputsFromType","outputsFromType","field","ann","isInput","alias","isOutput","extractHostBindings","convertHostDirectivesToMetadata","inputsMappingToInputMetadata","convertHostDeclarationToMetadata","convertOpaqueValuesToExpressions","classAttribute","styleAttribute","hostDirective","dependencies","innerDep","convertDirectiveDeclarationToMetadata","convertPipeDeclarationToMetadata","components","directives","dir","convertPipeMapToMetadata","isComponent","err","facades","isAttributeDep","rawToken","createR3DependencyMetadata","hostPropertyName","isHostListener","ngMetadataName","parseMappingString","fieldName","publishFacade","global","ng","ɵcompilerFacade","VERSION","CompilerConfig","defaultEncapsulation","useJit","missingTranslation","strictInjectionParameters","preserveWhitespacesDefault","preserveWhitespacesOption","defaultSetting","_I18N_ATTR","_I18N_ATTR_PREFIX","_I18N_COMMENT_PREFIX_REGEXP","MEANING_SEPARATOR","ID_SEPARATOR","i18nCommentsWarned","extractMessages","implicitTags","implicitAttrs","_Visitor","extract","mergeTranslations","translations","merge","ExtractionResult","_VisitorMode","_implicitTags","_implicitAttrs","_init","Extract","_inI18nBlock","_messages","Merge","_translations","wrapper","translatedNode","icuCase","_mode","_mayBeAddBlockChildren","wasInIcu","_inIcu","_isInTranslatableSection","_addMessage","isOpening","_isOpeningComment","isClosing","_isClosingComment","_inI18nNode","console","warn","_blockStartDepth","_depth","_blockChildren","_blockMeaningAndDesc","_openTranslatableSection","_closeTranslatableSection","_translateMessage","wasInI18nNode","wasInImplicitNode","_inImplicitNode","childNodes","translatedChildNodes","i18nAttr","_getI18nAttr","i18nMeta","isImplicit","isTopLevelImplicit","isTranslatable","visitNodes","visited","_visitAttributesOf","translatedAttrs","_translateAttributes","_msgCountAtSectionStart","_createI18nMessage","explicitAttrNameToValue","implicitAttrNames","msgMeta","_parseMessageMeta","i18nParsedMessageMeta","translatedAttributes","directChildren","significantChildren","XmlTagDefinition","requireExtraParent","currentParent","_TAG_DEFINITION","getXmlTagDefinition","XmlParser","_VERSION$1","_XMLNS$1","_DEFAULT_SOURCE_LANG$1","_PLACEHOLDER_TAG$2","_MARKER_TAG$1","_FILE_TAG","_SOURCE_TAG$1","_SEGMENT_SOURCE_TAG","_ALT_TRANS_TAG","_TARGET_TAG$1","_UNIT_TAG$1","_CONTEXT_GROUP_TAG","_CONTEXT_TAG","Xliff","_WriteVisitor$1","transUnits","contextTags","contextGroupTag","purpose","transUnit","datatype","xliff","xmlns","xliffParser","XliffParser","msgIdToHtml","i18nNodesByMsgId","XmlToI18n$2","msgId","i18nNodes","convert","ctype","getCtypeForTag","equivText","_locale","_unitMlString","_msgIdToHtml","xml","idAttr","_addError","innerTextStart","innerTextEnd","innerText","localeAttr","xmlIcu","nameAttr","caseMap","_VERSION","_XMLNS","_DEFAULT_SOURCE_LANG","_PLACEHOLDER_TAG$1","_PLACEHOLDER_SPANNING_TAG","_MARKER_TAG","_XLIFF_TAG","_SOURCE_TAG","_TARGET_TAG","_UNIT_TAG","Xliff2","_WriteVisitor","notes","category","srcLang","xliff2Parser","Xliff2Parser","XmlToI18n$1","_nextPlaceholderId","getTypeForTag","tagPh","equiv","disp","tagPc","equivStart","equivEnd","dispStart","dispEnd","idStr","versionAttr","startAttr","endAttr","startId","endId","_TRANSLATIONS_TAG","_TRANSLATION_TAG","_PLACEHOLDER_TAG","Xtb","xtbParser","XtbParser","XmlToI18n","valueFn","createLazyProperty","defineProperty","configurable","enumerable","xtb","_bundleDepth","langAttr","TranslationBundle","_i18nNodesByMsgId","mapperFactory","missingTranslationStrategy","Warning","_i18nToHtml","I18nToHtmlVisitor","digestFn","srcMsg","html","_digest","_mapperFactory","_missingTranslationStrategy","_console","_contextStack","_convertToText","_srcMsg","_mapper","mapper","I18NHtmlParser","_htmlParser","translationsFormat","createSerializer","_translationBundle","format","MessageBundle","updateFromTemplate","htmlParserResult","i18nParserResult","getMessages","filterSources","mapperVisitor","MapPlaceholderNames","msgList","src","transformedMessage","R3TargetBinder","directiveMatcher","Scope","templateEntities","extractTemplateEntities","eagerDirectives","DirectiveBinder","symbols","nestingLevel","usedPipes","eagerPipes","TemplateBinder","applyWithScope","R3BoundTarget","namedEntities","childScopes","newRootScope","ingest","maybeDeclare","thing","lookup","getChildScope","isInDeferBlock","selectorMatcher","visitElementOrTemplate","_selector","dirTarget","setAttributeBinding","ioType","hasBindingPropertyName","visitBoundAttributeOrEvent","visitNode","binder","childScope","maybeMap","exprTargets","deferredBlocks","getEntitiesInTemplateScope","getDirectivesOfNode","getReferenceTarget","getConsumerOfBinding","getExpressionTarget","getTemplateOfSymbol","getNestingLevel","getUsedDirectives","dirs","getEagerlyUsedDirectives","getUsedPipes","getEagerlyUsedPipes","getDeferBlocks","rootScope","entityMap","extractScopeEntities","currentEntities","scopesToProcess","entities","compileClassMetadata","decorators","ctorParameters","propDecorators","MINIMUM_PARTIAL_LINKER_VERSION$6","compileDeclareClassMetadata","toOptionalLiteralArray","toOptionalLiteralMap","object","compileDependencies","compileDependency","depMeta","MINIMUM_PARTIAL_LINKER_VERSION$5","compileDeclareDirectiveFromMetadata","createDirectiveDefinitionMap","hasTransformFunctions","minVersion","compileHostMetadata","compileQuery","createHostDirectives","hostMetadata","compileDeclareComponentFromMetadata","additionalTemplateInfo","createComponentDefinitionMap","templateInfo","getTemplateExpression","isInline","compileUsedDependenciesMetadata","inlineTemplateLiteralExpression","computeEndLocation","lineStart","lastLineStart","wrapType","dirMeta","pipeMeta","ngModuleMeta","MINIMUM_PARTIAL_LINKER_VERSION$4","compileDeclareFactoryFunction","MINIMUM_PARTIAL_LINKER_VERSION$3","compileDeclareInjectableFromMetadata","createInjectableDefinitionMap","MINIMUM_PARTIAL_LINKER_VERSION$2","compileDeclareInjectorFromMetadata","createInjectorDefinitionMap","MINIMUM_PARTIAL_LINKER_VERSION$1","compileDeclareNgModuleFromMetadata","createNgModuleDefinitionMap","MINIMUM_PARTIAL_LINKER_VERSION","compileDeclarePipeFromMetadata","createPipeDefinitionMap","R3Identifiers","TmplAstBoundAttribute","TmplAstBoundDeferredTrigger","TmplAstBoundEvent","TmplAstBoundText","TmplAstContent","TmplAstDeferredBlock","TmplAstDeferredBlockError","TmplAstDeferredBlockLoading","TmplAstDeferredBlockPlaceholder","TmplAstDeferredTrigger","TmplAstElement","TmplAstHoverDeferredTrigger","TmplAstIcu","TmplAstIdleDeferredTrigger","TmplAstImmediateDeferredTrigger","TmplAstInteractionDeferredTrigger","TmplAstRecursiveVisitor","TmplAstReference","TmplAstTemplate","TmplAstText","TmplAstTextAttribute","TmplAstTimerDeferredTrigger","TmplAstVariable","TmplAstViewportDeferredTrigger"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/@angular/compiler/fesm2022/compiler.mjs"],"sourcesContent":["/**\n * @license Angular v16.2.12\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nconst _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' + // 1: \":not(\"\n '(([\\\\.\\\\#]?)[-\\\\w]+)|' + // 2: \"tag\"; 3: \".\"/\"#\";\n // \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n // 4: attribute; 5: attribute_string; 6: attribute_value\n '(?:\\\\[([-.\\\\w*\\\\\\\\$]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n // \"[name=\"value\"]\",\n // \"[name='value']\"\n '(\\\\))|' + // 7: \")\"\n '(\\\\s*,\\\\s*)', // 8: \",\"\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 */\nclass CssSelector {\n constructor() {\n this.element = null;\n this.classNames = [];\n /**\n * The selectors are encoded in pairs where:\n * - even locations are attribute names\n * - odd locations are attribute values.\n *\n * Example:\n * Selector: `[key1=value1][key2]` would parse to:\n * ```\n * ['key1', 'value1', 'key2', '']\n * ```\n */\n this.attrs = [];\n this.notSelectors = [];\n }\n static parse(selector) {\n const results = [];\n const _addResult = (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 let cssSelector = new CssSelector();\n let match;\n let current = cssSelector;\n let inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1 /* SelectorRegexp.NOT */]) {\n if (inNot) {\n throw new Error('Nesting :not in a selector is not allowed');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n const tag = match[2 /* SelectorRegexp.TAG */];\n if (tag) {\n const prefix = match[3 /* SelectorRegexp.PREFIX */];\n if (prefix === '#') {\n // #hash\n current.addAttribute('id', tag.slice(1));\n }\n else if (prefix === '.') {\n // Class\n current.addClassName(tag.slice(1));\n }\n else {\n // Element\n current.setElement(tag);\n }\n }\n const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];\n if (attribute) {\n current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);\n }\n if (match[7 /* SelectorRegexp.NOT_END */]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8 /* SelectorRegexp.SEPARATOR */]) {\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 * Unescape `\\$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * but we might want to match an attribute that contains `$`.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to unescape.\n * @returns the unescaped string.\n */\n unescapeAttribute(attr) {\n let result = '';\n let escaping = false;\n for (let i = 0; i < attr.length; i++) {\n const char = attr.charAt(i);\n if (char === '\\\\') {\n escaping = true;\n continue;\n }\n if (char === '$' && !escaping) {\n throw new Error(`Error in attribute selector \"${attr}\". ` +\n `Unescaped \"$\" is not supported. Please escape with \"\\\\$\".`);\n }\n escaping = false;\n result += char;\n }\n return result;\n }\n /**\n * Escape `$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * with this method we are escaping `$` with `\\$'.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to escape.\n * @returns the escaped string.\n */\n escapeAttribute(attr) {\n return attr.replace(/\\\\/g, '\\\\\\\\').replace(/\\$/g, '\\\\$');\n }\n isElementSelector() {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n this.notSelectors.length === 0;\n }\n hasElementSelector() {\n return !!this.element;\n }\n setElement(element = null) {\n this.element = element;\n }\n getAttrs() {\n const result = [];\n if (this.classNames.length > 0) {\n result.push('class', this.classNames.join(' '));\n }\n return result.concat(this.attrs);\n }\n addAttribute(name, value = '') {\n this.attrs.push(name, value && value.toLowerCase() || '');\n }\n addClassName(name) {\n this.classNames.push(name.toLowerCase());\n }\n toString() {\n let res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(klass => res += `.${klass}`);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length; i += 2) {\n const name = this.escapeAttribute(this.attrs[i]);\n const value = this.attrs[i + 1];\n res += `[${name}${value ? '=' + value : ''}]`;\n }\n }\n this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`);\n return res;\n }\n}\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nclass SelectorMatcher {\n constructor() {\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 static createNotMatcher(notSelectors) {\n const notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n }\n addSelectables(cssSelectors, callbackCtxt) {\n let listContext = null;\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (let 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 */\n _addSelectable(cssSelector, callbackCtxt, listContext) {\n let matcher = this;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n const 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 (let i = 0; i < classNames.length; i++) {\n const isTerminal = attrs.length === 0 && i === classNames.length - 1;\n const 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 (let i = 0; i < attrs.length; i += 2) {\n const isTerminal = i === attrs.length - 2;\n const name = attrs[i];\n const value = attrs[i + 1];\n if (isTerminal) {\n const terminalMap = matcher._attrValueMap;\n let terminalValuesMap = terminalMap.get(name);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n }\n else {\n const partialMap = matcher._attrValuePartialMap;\n let partialValuesMap = partialMap.get(name);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n }\n _addTerminal(map, name, selectable) {\n let terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n }\n _addPartial(map, name) {\n let 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 match(cssSelector, matchedCallback) {\n let result = false;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n for (let 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 (let i = 0; i < classNames.length; i++) {\n const 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 (let i = 0; i < attrs.length; i += 2) {\n const name = attrs[i];\n const value = attrs[i + 1];\n const terminalValuesMap = this._attrValueMap.get(name);\n if (value) {\n result =\n this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n const partialValuesMap = this._attrValuePartialMap.get(name);\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 _matchTerminal(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n let selectables = map.get(name) || [];\n const starSelectables = map.get('*');\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n let selectable;\n let result = false;\n for (let 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 _matchPartial(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n const 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}\nclass SelectorListContext {\n constructor(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n}\n// Store context to pass back selector and context when a selector is matched\nclass SelectorContext {\n constructor(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n finalize(cssSelector, callback) {\n let result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n const 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}\n\n// Attention:\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nconst Type$1 = Function;\nvar SecurityContext;\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\nfunction parserSelectorToSimpleSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n const elementName = selector.element && selector.element !== '*' ? selector.element : '';\n return [elementName, ...selector.attrs, ...classes];\n}\nfunction parserSelectorToNegativeSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n if (selector.element) {\n return [\n 1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes\n ];\n }\n else if (selector.attrs.length) {\n return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];\n }\n else {\n return selector.classNames && selector.classNames.length ?\n [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n }\n}\nfunction parserSelectorToR3Selector(selector) {\n const positive = parserSelectorToSimpleSelector(selector);\n const negative = selector.notSelectors && selector.notSelectors.length ?\n selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) :\n [];\n return positive.concat(...negative);\n}\nfunction parseSelectorToR3Selector(selector) {\n return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\n\nvar core = /*#__PURE__*/Object.freeze({\n __proto__: null,\n emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,\n get ViewEncapsulation () { return ViewEncapsulation; },\n get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },\n CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n Type: Type$1,\n get SecurityContext () { return SecurityContext; },\n get MissingTranslationStrategy () { return MissingTranslationStrategy; },\n parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n\n/**\n * Represents a big integer using a buffer of its individual digits, with the least significant\n * digit stored at the beginning of the array (little endian).\n *\n * For performance reasons, each instance is mutable. The addition operation can be done in-place\n * to reduce memory pressure of allocation for the digits array.\n */\nclass BigInteger {\n static zero() {\n return new BigInteger([0]);\n }\n static one() {\n return new BigInteger([1]);\n }\n /**\n * Creates a big integer using its individual digits in little endian storage.\n */\n constructor(digits) {\n this.digits = digits;\n }\n /**\n * Creates a clone of this instance.\n */\n clone() {\n return new BigInteger(this.digits.slice());\n }\n /**\n * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate\n * `this` but instead returns a new instance, unlike `addToSelf`.\n */\n add(other) {\n const result = this.clone();\n result.addToSelf(other);\n return result;\n }\n /**\n * Adds `other` to the instance itself, thereby mutating its value.\n */\n addToSelf(other) {\n const maxNrOfDigits = Math.max(this.digits.length, other.digits.length);\n let carry = 0;\n for (let i = 0; i < maxNrOfDigits; i++) {\n let digitSum = carry;\n if (i < this.digits.length) {\n digitSum += this.digits[i];\n }\n if (i < other.digits.length) {\n digitSum += other.digits[i];\n }\n if (digitSum >= 10) {\n this.digits[i] = digitSum - 10;\n carry = 1;\n }\n else {\n this.digits[i] = digitSum;\n carry = 0;\n }\n }\n // Apply a remaining carry if needed.\n if (carry > 0) {\n this.digits[maxNrOfDigits] = 1;\n }\n }\n /**\n * Builds the decimal string representation of the big integer. As this is stored in\n * little endian, the digits are concatenated in reverse order.\n */\n toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[i];\n }\n return res;\n }\n}\n/**\n * Represents a big integer which is optimized for multiplication operations, as its power-of-twos\n * are memoized. See `multiplyBy()` for details on the multiplication algorithm.\n */\nclass BigIntForMultiplication {\n constructor(value) {\n this.powerOfTwos = [value];\n }\n /**\n * Returns the big integer itself.\n */\n getValue() {\n return this.powerOfTwos[0];\n }\n /**\n * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The\n * value for `b` is represented by a storage model that is optimized for this computation.\n *\n * This operation is implemented in N(log2(num)) by continuous halving of the number, where the\n * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is\n * used as exponent into the power-of-two multiplication of `b`.\n *\n * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the\n * algorithm unrolls into the following iterations:\n *\n * Iteration | num | LSB | b * 2^iter | Add? | product\n * -----------|------------|------|------------|------|--------\n * 0 | 0b00101010 | 0 | 1337 | No | 0\n * 1 | 0b00010101 | 1 | 2674 | Yes | 2674\n * 2 | 0b00001010 | 0 | 5348 | No | 2674\n * 3 | 0b00000101 | 1 | 10696 | Yes | 13370\n * 4 | 0b00000010 | 0 | 21392 | No | 13370\n * 5 | 0b00000001 | 1 | 42784 | Yes | 56154\n * 6 | 0b00000000 | 0 | 85568 | No | 56154\n *\n * The computed product of 56154 is indeed the correct result.\n *\n * The `BigIntForMultiplication` representation for a big integer provides memoized access to the\n * power-of-two values to reduce the workload in computing those values.\n */\n multiplyBy(num) {\n const product = BigInteger.zero();\n this.multiplyByAndAddTo(num, product);\n return product;\n }\n /**\n * See `multiplyBy()` for details. This function allows for the computed product to be added\n * directly to the provided result big integer.\n */\n multiplyByAndAddTo(num, result) {\n for (let exponent = 0; num !== 0; num = num >>> 1, exponent++) {\n if (num & 1) {\n const value = this.getMultipliedByPowerOfTwo(exponent);\n result.addToSelf(value);\n }\n }\n }\n /**\n * Computes and memoizes the big integer value for `this.number * 2^exponent`.\n */\n getMultipliedByPowerOfTwo(exponent) {\n // Compute the powers up until the requested exponent, where each value is computed from its\n // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.\n // added to itself) to reach `this.number * 2^exponent`.\n for (let i = this.powerOfTwos.length; i <= exponent; i++) {\n const previousPower = this.powerOfTwos[i - 1];\n this.powerOfTwos[i] = previousPower.add(previousPower);\n }\n return this.powerOfTwos[exponent];\n }\n}\n/**\n * Represents an exponentiation operation for the provided base, of which exponents are computed and\n * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for\n * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix\n * representation that is lazily computed upon request.\n */\nclass BigIntExponentiation {\n constructor(base) {\n this.base = base;\n this.exponents = [new BigIntForMultiplication(BigInteger.one())];\n }\n /**\n * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for\n * further multiplication operations.\n */\n toThePowerOf(exponent) {\n // Compute the results up until the requested exponent, where every value is computed from its\n // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`\n // to reach `this.base^exponent`.\n for (let i = this.exponents.length; i <= exponent; i++) {\n const value = this.exponents[i - 1].multiplyBy(this.base);\n this.exponents[i] = new BigIntForMultiplication(value);\n }\n return this.exponents[exponent];\n }\n}\n\n/**\n * A lazily created TextEncoder instance for converting strings into UTF-8 bytes\n */\nlet textEncoder;\n/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\nfunction digest$1(message) {\n return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\nfunction computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\nfunction decimalDigest(message) {\n return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message) {\n const visitor = new _SerializerIgnoreIcuExpVisitor();\n const parts = message.nodes.map(a => 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 */\nclass _SerializerVisitor {\n visitText(text, context) {\n return text.value;\n }\n visitContainer(container, context) {\n return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n }\n visitIcu(icu, context) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n }\n visitTagPlaceholder(ph, context) {\n return ph.isVoid ?\n `<ph tag name=\"${ph.startName}\"/>` :\n `<ph tag name=\"${ph.startName}\">${ph.children.map(child => child.visit(this)).join(', ')}</ph name=\"${ph.closeName}\">`;\n }\n visitPlaceholder(ph, context) {\n return ph.value ? `<ph name=\"${ph.name}\">${ph.value}</ph>` : `<ph name=\"${ph.name}\"/>`;\n }\n visitIcuPlaceholder(ph, context) {\n return `<ph icu name=\"${ph.name}\">${ph.value.visit(this)}</ph>`;\n }\n}\nconst serializerVisitor$1 = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(a => a.visit(serializerVisitor$1, 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 */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n visitIcu(icu, context) {\n let strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n // Do not take the expression into account\n return `{${icu.type}, ${strCases.join(', ')}}`;\n }\n}\n/**\n * Compute the SHA1 of the given string\n *\n * see https://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 */\nfunction sha1(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = [...textEncoder.encode(str)];\n const words32 = bytesToWords32(utf8, Endian.Big);\n const len = utf8.length * 8;\n const w = new Uint32Array(80);\n let a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476, e = 0xc3d2e1f0;\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (let i = 0; i < words32.length; i += 16) {\n const h0 = a, h1 = b, h2 = c, h3 = d, h4 = e;\n for (let 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 const fkVal = fk(j, b, c, d);\n const f = fkVal[0];\n const k = fkVal[1];\n const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n e = d;\n d = c;\n c = rol32(b, 30);\n b = a;\n a = temp;\n }\n a = add32(a, h0);\n b = add32(b, h1);\n c = add32(c, h2);\n d = add32(d, h3);\n e = add32(e, h4);\n }\n // Convert the output parts to a 160-bit hexadecimal string\n return toHexU32(a) + toHexU32(b) + toHexU32(c) + toHexU32(d) + toHexU32(e);\n}\n/**\n * Convert and format a number as a string representing a 32-bit unsigned hexadecimal number.\n * @param value The value to format as a string.\n * @returns A hexadecimal string representing the value.\n */\nfunction toHexU32(value) {\n // unsigned right shift of zero ensures an unsigned 32-bit number\n return (value >>> 0).toString(16).padStart(8, '0');\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 */\nfunction fingerprint(str) {\n textEncoder ??= new TextEncoder();\n const utf8 = textEncoder.encode(str);\n const view = new DataView(utf8.buffer, utf8.byteOffset, utf8.byteLength);\n let hi = hash32(view, utf8.length, 0);\n let lo = hash32(view, utf8.length, 102072);\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n const meaningFingerprint = fingerprint(meaning);\n msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);\n }\n const hi = msgFingerprint[0];\n const lo = msgFingerprint[1];\n return wordsToDecimalString(hi & 0x7fffffff, lo);\n}\nfunction hash32(view, length, c) {\n let a = 0x9e3779b9, b = 0x9e3779b9;\n let index = 0;\n const end = length - 12;\n for (; index <= end; index += 12) {\n a += view.getUint32(index, true);\n b += view.getUint32(index + 4, true);\n c += view.getUint32(index + 8, true);\n const res = mix(a, b, c);\n a = res[0], b = res[1], c = res[2];\n }\n const remainder = length - index;\n // the first byte of c is reserved for the length\n c += length;\n if (remainder >= 4) {\n a += view.getUint32(index, true);\n index += 4;\n if (remainder >= 8) {\n b += view.getUint32(index, true);\n index += 4;\n // Partial 32-bit word for c\n if (remainder >= 9) {\n c += view.getUint8(index++) << 8;\n }\n if (remainder >= 10) {\n c += view.getUint8(index++) << 16;\n }\n if (remainder === 11) {\n c += view.getUint8(index++) << 24;\n }\n }\n else {\n // Partial 32-bit word for b\n if (remainder >= 5) {\n b += view.getUint8(index++);\n }\n if (remainder >= 6) {\n b += view.getUint8(index++) << 8;\n }\n if (remainder === 7) {\n b += view.getUint8(index++) << 16;\n }\n }\n }\n else {\n // Partial 32-bit word for a\n if (remainder >= 1) {\n a += view.getUint8(index++);\n }\n if (remainder >= 2) {\n a += view.getUint8(index++) << 8;\n }\n if (remainder === 3) {\n a += view.getUint8(index++) << 16;\n }\n }\n return mix(a, b, c)[2];\n}\n// clang-format off\nfunction mix(a, b, c) {\n a -= b;\n a -= c;\n a ^= c >>> 13;\n b -= c;\n b -= a;\n b ^= a << 8;\n c -= a;\n c -= b;\n c ^= b >>> 13;\n a -= b;\n a -= c;\n a ^= c >>> 12;\n b -= c;\n b -= a;\n b ^= a << 16;\n c -= a;\n c -= b;\n c ^= b >>> 5;\n a -= b;\n a -= c;\n a ^= c >>> 3;\n b -= c;\n b -= a;\n b ^= a << 10;\n c -= a;\n c -= b;\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n const low = (a & 0xffff) + (b & 0xffff);\n const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\nfunction add64(a, b) {\n const ah = a[0], al = a[1];\n const bh = b[0], bl = b[1];\n const result = add32to64(al, bl);\n const carry = result[0];\n const l = result[1];\n const h = add32(add32(ah, bh), carry);\n return [h, l];\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\n// Rotate a 64b number left `count` position\nfunction rol64(num, count) {\n const hi = num[0], lo = num[1];\n const h = (hi << count) | (lo >>> (32 - count));\n const l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}\nfunction bytesToWords32(bytes, endian) {\n const size = (bytes.length + 3) >>> 2;\n const words32 = [];\n for (let i = 0; i < size; i++) {\n words32[i] = wordAt(bytes, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(bytes, index) {\n return index >= bytes.length ? 0 : bytes[index];\n}\nfunction wordAt(bytes, index, endian) {\n let word = 0;\n if (endian === Endian.Big) {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 8 * i;\n }\n }\n return word;\n}\n/**\n * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized\n * power-of-256 results with memoized power-of-two computations for efficient multiplication.\n *\n * For our purposes, this can be safely stored as a global without memory concerns. The reason is\n * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)\n * exponent.\n */\nconst base256 = new BigIntExponentiation(256);\n/**\n * Represents two 32-bit words as a single decimal number. This requires a big integer storage\n * model as JS numbers are not accurate enough to represent the 64-bit number.\n *\n * Based on https://www.danvk.org/hex2dec.html\n */\nfunction wordsToDecimalString(hi, lo) {\n // Encode the four bytes in lo in the lower digits of the decimal number.\n // Note: the multiplication results in lo itself but represented by a big integer using its\n // decimal digits.\n const decimal = base256.toThePowerOf(0).multiplyBy(lo);\n // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why\n // this multiplication factor is applied.\n base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);\n return decimal.toString();\n}\n\n//// Types\nvar TypeModifier;\n(function (TypeModifier) {\n TypeModifier[TypeModifier[\"None\"] = 0] = \"None\";\n TypeModifier[TypeModifier[\"Const\"] = 1] = \"Const\";\n})(TypeModifier || (TypeModifier = {}));\nclass Type {\n constructor(modifiers = TypeModifier.None) {\n this.modifiers = modifiers;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n}\nvar BuiltinTypeName;\n(function (BuiltinTypeName) {\n BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n BuiltinTypeName[BuiltinTypeName[\"None\"] = 7] = \"None\";\n})(BuiltinTypeName || (BuiltinTypeName = {}));\nclass BuiltinType extends Type {\n constructor(name, modifiers) {\n super(modifiers);\n this.name = name;\n }\n visitType(visitor, context) {\n return visitor.visitBuiltinType(this, context);\n }\n}\nclass ExpressionType extends Type {\n constructor(value, modifiers, typeParams = null) {\n super(modifiers);\n this.value = value;\n this.typeParams = typeParams;\n }\n visitType(visitor, context) {\n return visitor.visitExpressionType(this, context);\n }\n}\nclass ArrayType extends Type {\n constructor(of, modifiers) {\n super(modifiers);\n this.of = of;\n }\n visitType(visitor, context) {\n return visitor.visitArrayType(this, context);\n }\n}\nclass MapType extends Type {\n constructor(valueType, modifiers) {\n super(modifiers);\n this.valueType = valueType || null;\n }\n visitType(visitor, context) {\n return visitor.visitMapType(this, context);\n }\n}\nclass TransplantedType extends Type {\n constructor(type, modifiers) {\n super(modifiers);\n this.type = type;\n }\n visitType(visitor, context) {\n return visitor.visitTransplantedType(this, context);\n }\n}\nconst DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nconst INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nconst BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nconst INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nconst NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nconst STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nconst FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\nconst NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\n///// Expressions\nvar UnaryOperator;\n(function (UnaryOperator) {\n UnaryOperator[UnaryOperator[\"Minus\"] = 0] = \"Minus\";\n UnaryOperator[UnaryOperator[\"Plus\"] = 1] = \"Plus\";\n})(UnaryOperator || (UnaryOperator = {}));\nvar BinaryOperator;\n(function (BinaryOperator) {\n BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 16] = \"NullishCoalesce\";\n})(BinaryOperator || (BinaryOperator = {}));\nfunction nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\nfunction areAllEquivalentPredicate(base, other, equivalentPredicate) {\n const len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (!equivalentPredicate(base[i], other[i])) {\n return false;\n }\n }\n return true;\n}\nfunction areAllEquivalent(base, other) {\n return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));\n}\nclass Expression {\n constructor(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n prop(name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n }\n key(index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n }\n callFn(params, sourceSpan, pure) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);\n }\n instantiate(params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n }\n conditional(trueCase, falseCase = null, sourceSpan) {\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n }\n equals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n }\n notEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n }\n identical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n }\n notIdentical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n }\n minus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n }\n plus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n }\n divide(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n }\n multiply(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n }\n modulo(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n }\n and(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n }\n bitwiseAnd(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n }\n or(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n }\n lower(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n }\n lowerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n }\n bigger(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n }\n biggerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n }\n isBlank(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 nullishCoalesce(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);\n }\n toStmt() {\n return new ExpressionStatement(this, null);\n }\n}\nclass ReadVarExpr extends Expression {\n constructor(name, type, sourceSpan) {\n super(type, sourceSpan);\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadVarExpr && this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n }\n clone() {\n return new ReadVarExpr(this.name, this.type, this.sourceSpan);\n }\n set(value) {\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n }\n}\nclass TypeofExpr extends Expression {\n constructor(expr, type, sourceSpan) {\n super(type, sourceSpan);\n this.expr = expr;\n }\n visitExpression(visitor, context) {\n return visitor.visitTypeofExpr(this, context);\n }\n isEquivalent(e) {\n return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n clone() {\n return new TypeofExpr(this.expr.clone());\n }\n}\nclass WrappedNodeExpr extends Expression {\n constructor(node, type, sourceSpan) {\n super(type, sourceSpan);\n this.node = node;\n }\n isEquivalent(e) {\n return e instanceof WrappedNodeExpr && this.node === e.node;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWrappedNodeExpr(this, context);\n }\n clone() {\n return new WrappedNodeExpr(this.node, this.type, this.sourceSpan);\n }\n}\nclass WriteVarExpr extends Expression {\n constructor(name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n }\n clone() {\n return new WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan);\n }\n toDeclStmt(type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n }\n toConstDecl() {\n return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);\n }\n}\nclass WriteKeyExpr extends Expression {\n constructor(receiver, index, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n }\n clone() {\n return new WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);\n }\n}\nclass WritePropExpr extends Expression {\n constructor(receiver, name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n }\n clone() {\n return new WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);\n }\n}\nclass InvokeFunctionExpr extends Expression {\n constructor(fn, args, type, sourceSpan, pure = false) {\n super(type, sourceSpan);\n this.fn = fn;\n this.args = args;\n this.pure = pure;\n }\n // An alias for fn, which allows other logic to handle calls and property reads together.\n get receiver() {\n return this.fn;\n }\n isEquivalent(e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n }\n clone() {\n return new InvokeFunctionExpr(this.fn.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan, this.pure);\n }\n}\nclass TaggedTemplateExpr extends Expression {\n constructor(tag, template, type, sourceSpan) {\n super(type, sourceSpan);\n this.tag = tag;\n this.template = template;\n }\n isEquivalent(e) {\n return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) &&\n areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) &&\n areAllEquivalent(this.template.expressions, e.template.expressions);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitTaggedTemplateExpr(this, context);\n }\n clone() {\n return new TaggedTemplateExpr(this.tag.clone(), this.template.clone(), this.type, this.sourceSpan);\n }\n}\nclass InstantiateExpr extends Expression {\n constructor(classExpr, args, type, sourceSpan) {\n super(type, sourceSpan);\n this.classExpr = classExpr;\n this.args = args;\n }\n isEquivalent(e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n areAllEquivalent(this.args, e.args);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n }\n clone() {\n return new InstantiateExpr(this.classExpr.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan);\n }\n}\nclass LiteralExpr extends Expression {\n constructor(value, type, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof LiteralExpr && this.value === e.value;\n }\n isConstant() {\n return true;\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n }\n clone() {\n return new LiteralExpr(this.value, this.type, this.sourceSpan);\n }\n}\nclass TemplateLiteral {\n constructor(elements, expressions) {\n this.elements = elements;\n this.expressions = expressions;\n }\n clone() {\n return new TemplateLiteral(this.elements.map(el => el.clone()), this.expressions.map(expr => expr.clone()));\n }\n}\nclass TemplateLiteralElement {\n constructor(text, sourceSpan, rawText) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n // If `rawText` is not provided, try to extract the raw string from its\n // associated `sourceSpan`. If that is also not available, \"fake\" the raw\n // string instead by escaping the following control sequences:\n // - \"\\\" would otherwise indicate that the next character is a control character.\n // - \"`\" and \"${\" are template string control sequences that would otherwise prematurely\n // indicate the end of the template literal element.\n this.rawText =\n rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text));\n }\n clone() {\n return new TemplateLiteralElement(this.text, this.sourceSpan, this.rawText);\n }\n}\nclass LiteralPiece {\n constructor(text, sourceSpan) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n }\n}\nclass PlaceholderPiece {\n /**\n * Create a new instance of a `PlaceholderPiece`.\n *\n * @param text the name of this placeholder (e.g. `PH_1`).\n * @param sourceSpan the location of this placeholder in its localized message the source code.\n * @param associatedMessage reference to another message that this placeholder is associated with.\n * The `associatedMessage` is mainly used to provide a relationship to an ICU message that has\n * been extracted out from the message containing the placeholder.\n */\n constructor(text, sourceSpan, associatedMessage) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n this.associatedMessage = associatedMessage;\n }\n}\nconst MEANING_SEPARATOR$1 = '|';\nconst ID_SEPARATOR$1 = '@@';\nconst LEGACY_ID_INDICATOR = '␟';\nclass LocalizedString extends Expression {\n constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {\n super(STRING_TYPE, sourceSpan);\n this.metaBlock = metaBlock;\n this.messageParts = messageParts;\n this.placeHolderNames = placeHolderNames;\n this.expressions = expressions;\n }\n isEquivalent(e) {\n // return e instanceof LocalizedString && this.message === e.message;\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitLocalizedString(this, context);\n }\n clone() {\n return new LocalizedString(this.metaBlock, this.messageParts, this.placeHolderNames, this.expressions.map(expr => expr.clone()), this.sourceSpan);\n }\n /**\n * Serialize the given `meta` and `messagePart` into \"cooked\" and \"raw\" strings that can be used\n * in a `$localize` tagged string. The format of the metadata is the same as that parsed by\n * `parseI18nMeta()`.\n *\n * @param meta The metadata to serialize\n * @param messagePart The first part of the tagged string\n */\n serializeI18nHead() {\n let metaBlock = this.metaBlock.description || '';\n if (this.metaBlock.meaning) {\n metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR$1}${metaBlock}`;\n }\n if (this.metaBlock.customId) {\n metaBlock = `${metaBlock}${ID_SEPARATOR$1}${this.metaBlock.customId}`;\n }\n if (this.metaBlock.legacyIds) {\n this.metaBlock.legacyIds.forEach(legacyId => {\n metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`;\n });\n }\n return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));\n }\n getMessagePartSourceSpan(i) {\n return this.messageParts[i]?.sourceSpan ?? this.sourceSpan;\n }\n getPlaceholderSourceSpan(i) {\n return this.placeHolderNames[i]?.sourceSpan ?? this.expressions[i]?.sourceSpan ??\n this.sourceSpan;\n }\n /**\n * Serialize the given `placeholderName` and `messagePart` into \"cooked\" and \"raw\" strings that\n * can be used in a `$localize` tagged string.\n *\n * The format is `:<placeholder-name>[@@<associated-id>]:`.\n *\n * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder\n * refers.\n *\n * @param partIndex The index of the message part to serialize.\n */\n serializeI18nTemplatePart(partIndex) {\n const placeholder = this.placeHolderNames[partIndex - 1];\n const messagePart = this.messageParts[partIndex];\n let metaBlock = placeholder.text;\n if (placeholder.associatedMessage?.legacyIds.length === 0) {\n metaBlock += `${ID_SEPARATOR$1}${computeMsgId(placeholder.associatedMessage.messageString, placeholder.associatedMessage.meaning)}`;\n }\n return createCookedRawString(metaBlock, messagePart.text, this.getMessagePartSourceSpan(partIndex));\n }\n}\nconst escapeSlashes = (str) => str.replace(/\\\\/g, '\\\\\\\\');\nconst escapeStartingColon = (str) => str.replace(/^:/, '\\\\:');\nconst escapeColons = (str) => str.replace(/:/g, '\\\\:');\nconst escapeForTemplateLiteral = (str) => str.replace(/`/g, '\\\\`').replace(/\\${/g, '$\\\\{');\n/**\n * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.\n *\n * The `raw` text must have various character sequences escaped:\n * * \"\\\" would otherwise indicate that the next character is a control character.\n * * \"`\" and \"${\" are template string control sequences that would otherwise prematurely indicate\n * the end of a message part.\n * * \":\" inside a metablock would prematurely indicate the end of the metablock.\n * * \":\" at the start of a messagePart with no metablock would erroneously indicate the start of a\n * metablock.\n *\n * @param metaBlock Any metadata that should be prepended to the string\n * @param messagePart The message part of the string\n */\nfunction createCookedRawString(metaBlock, messagePart, range) {\n if (metaBlock === '') {\n return {\n cooked: messagePart,\n raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),\n range,\n };\n }\n else {\n return {\n cooked: `:${metaBlock}:${messagePart}`,\n raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`),\n range,\n };\n }\n}\nclass ExternalExpr extends Expression {\n constructor(value, type, typeParams = null, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n this.typeParams = typeParams;\n }\n isEquivalent(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 isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitExternalExpr(this, context);\n }\n clone() {\n return new ExternalExpr(this.value, this.type, this.typeParams, this.sourceSpan);\n }\n}\nclass ExternalReference {\n constructor(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n}\nclass ConditionalExpr extends Expression {\n constructor(condition, trueCase, falseCase = null, type, sourceSpan) {\n super(type || trueCase.type, sourceSpan);\n this.condition = condition;\n this.falseCase = falseCase;\n this.trueCase = trueCase;\n }\n isEquivalent(e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n }\n clone() {\n return new ConditionalExpr(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);\n }\n}\nclass DynamicImportExpr extends Expression {\n constructor(url, sourceSpan) {\n super(null, sourceSpan);\n this.url = url;\n }\n isEquivalent(e) {\n return e instanceof DynamicImportExpr && this.url === e.url;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitDynamicImportExpr(this, context);\n }\n clone() {\n return new DynamicImportExpr(this.url, this.sourceSpan);\n }\n}\nclass NotExpr extends Expression {\n constructor(condition, sourceSpan) {\n super(BOOL_TYPE, sourceSpan);\n this.condition = condition;\n }\n isEquivalent(e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitNotExpr(this, context);\n }\n clone() {\n return new NotExpr(this.condition.clone(), this.sourceSpan);\n }\n}\nclass FnParam {\n constructor(name, type = null) {\n this.name = name;\n this.type = type;\n }\n isEquivalent(param) {\n return this.name === param.name;\n }\n clone() {\n return new FnParam(this.name, this.type);\n }\n}\nclass FunctionExpr extends Expression {\n constructor(params, statements, type, sourceSpan, name) {\n super(type, sourceSpan);\n this.params = params;\n this.statements = statements;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n areAllEquivalent(this.statements, e.statements);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n }\n clone() {\n // TODO: Should we deep clone statements?\n return new FunctionExpr(this.params.map(p => p.clone()), this.statements, this.type, this.sourceSpan, this.name);\n }\n}\nclass UnaryOperatorExpr extends Expression {\n constructor(operator, expr, type, sourceSpan, parens = true) {\n super(type || NUMBER_TYPE, sourceSpan);\n this.operator = operator;\n this.expr = expr;\n this.parens = parens;\n }\n isEquivalent(e) {\n return e instanceof UnaryOperatorExpr && this.operator === e.operator &&\n this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitUnaryOperatorExpr(this, context);\n }\n clone() {\n return new UnaryOperatorExpr(this.operator, this.expr.clone(), this.type, this.sourceSpan, this.parens);\n }\n}\nclass BinaryOperatorExpr extends Expression {\n constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {\n super(type || lhs.type, sourceSpan);\n this.operator = operator;\n this.rhs = rhs;\n this.parens = parens;\n this.lhs = lhs;\n }\n isEquivalent(e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n }\n clone() {\n return new BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan, this.parens);\n }\n}\nclass ReadPropExpr extends Expression {\n constructor(receiver, name, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n }\n // An alias for name, which allows other logic to handle property reads and keyed reads together.\n get index() {\n return this.name;\n }\n isEquivalent(e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n }\n set(value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n }\n clone() {\n return new ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);\n }\n}\nclass ReadKeyExpr extends Expression {\n constructor(receiver, index, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n }\n isEquivalent(e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n }\n set(value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n }\n clone() {\n return new ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);\n }\n}\nclass LiteralArrayExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n }\n isConstant() {\n return this.entries.every(e => e.isConstant());\n }\n isEquivalent(e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n }\n clone() {\n return new LiteralArrayExpr(this.entries.map(e => e.clone()), this.type, this.sourceSpan);\n }\n}\nclass LiteralMapEntry {\n constructor(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n isEquivalent(e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n }\n clone() {\n return new LiteralMapEntry(this.key, this.value.clone(), this.quoted);\n }\n}\nclass LiteralMapExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n this.valueType = null;\n if (type) {\n this.valueType = type.valueType;\n }\n }\n isEquivalent(e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n }\n isConstant() {\n return this.entries.every(e => e.value.isConstant());\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n }\n clone() {\n const entriesClone = this.entries.map(entry => entry.clone());\n return new LiteralMapExpr(entriesClone, this.type, this.sourceSpan);\n }\n}\nclass CommaExpr extends Expression {\n constructor(parts, sourceSpan) {\n super(parts[parts.length - 1].type, sourceSpan);\n this.parts = parts;\n }\n isEquivalent(e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitCommaExpr(this, context);\n }\n clone() {\n return new CommaExpr(this.parts.map(p => p.clone()));\n }\n}\nconst NULL_EXPR = new LiteralExpr(null, null, null);\nconst TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n//// Statements\nvar StmtModifier;\n(function (StmtModifier) {\n StmtModifier[StmtModifier[\"None\"] = 0] = \"None\";\n StmtModifier[StmtModifier[\"Final\"] = 1] = \"Final\";\n StmtModifier[StmtModifier[\"Private\"] = 2] = \"Private\";\n StmtModifier[StmtModifier[\"Exported\"] = 4] = \"Exported\";\n StmtModifier[StmtModifier[\"Static\"] = 8] = \"Static\";\n})(StmtModifier || (StmtModifier = {}));\nclass LeadingComment {\n constructor(text, multiline, trailingNewline) {\n this.text = text;\n this.multiline = multiline;\n this.trailingNewline = trailingNewline;\n }\n toString() {\n return this.multiline ? ` ${this.text} ` : this.text;\n }\n}\nclass JSDocComment extends LeadingComment {\n constructor(tags) {\n super('', /* multiline */ true, /* trailingNewline */ true);\n this.tags = tags;\n }\n toString() {\n return serializeTags(this.tags);\n }\n}\nclass Statement {\n constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {\n this.modifiers = modifiers;\n this.sourceSpan = sourceSpan;\n this.leadingComments = leadingComments;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n addLeadingComment(leadingComment) {\n this.leadingComments = this.leadingComments ?? [];\n this.leadingComments.push(leadingComment);\n }\n}\nclass DeclareVarStmt extends Statement {\n constructor(name, value, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.value = value;\n this.type = type || (value && value.type) || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n }\n}\nclass DeclareFunctionStmt extends Statement {\n constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.params = params;\n this.statements = statements;\n this.type = type || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n areAllEquivalent(this.statements, stmt.statements);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n }\n}\nclass ExpressionStatement extends Statement {\n constructor(expr, sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.expr = expr;\n }\n isEquivalent(stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n }\n visitStatement(visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n }\n}\nclass ReturnStatement extends Statement {\n constructor(value, sourceSpan = null, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.value = value;\n }\n isEquivalent(stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitReturnStmt(this, context);\n }\n}\nclass IfStmt extends Statement {\n constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.condition = condition;\n this.trueCase = trueCase;\n this.falseCase = falseCase;\n }\n isEquivalent(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 visitStatement(visitor, context) {\n return visitor.visitIfStmt(this, context);\n }\n}\nclass RecursiveAstVisitor$1 {\n visitType(ast, context) {\n return ast;\n }\n visitExpression(ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n }\n visitBuiltinType(type, context) {\n return this.visitType(type, context);\n }\n visitExpressionType(type, context) {\n type.value.visitExpression(this, context);\n if (type.typeParams !== null) {\n type.typeParams.forEach(param => this.visitType(param, context));\n }\n return this.visitType(type, context);\n }\n visitArrayType(type, context) {\n return this.visitType(type, context);\n }\n visitMapType(type, context) {\n return this.visitType(type, context);\n }\n visitTransplantedType(type, context) {\n return type;\n }\n visitWrappedNodeExpr(ast, context) {\n return ast;\n }\n visitTypeofExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitReadVarExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitWriteVarExpr(ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWriteKeyExpr(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 visitWritePropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitDynamicImportExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitInvokeFunctionExpr(ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitTaggedTemplateExpr(ast, context) {\n ast.tag.visitExpression(this, context);\n this.visitAllExpressions(ast.template.expressions, context);\n return this.visitExpression(ast, context);\n }\n visitInstantiateExpr(ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitLocalizedString(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitExternalExpr(ast, context) {\n if (ast.typeParams) {\n ast.typeParams.forEach(type => type.visitType(this, context));\n }\n return this.visitExpression(ast, context);\n }\n visitConditionalExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context);\n ast.falseCase.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitNotExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitFunctionExpr(ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n }\n visitUnaryOperatorExpr(ast, context) {\n ast.expr.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitBinaryOperatorExpr(ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadPropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralArrayExpr(ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralMapExpr(ast, context) {\n ast.entries.forEach((entry) => entry.value.visitExpression(this, context));\n return this.visitExpression(ast, context);\n }\n visitCommaExpr(ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n }\n visitAllExpressions(exprs, context) {\n exprs.forEach(expr => expr.visitExpression(this, context));\n }\n visitDeclareVarStmt(stmt, context) {\n if (stmt.value) {\n stmt.value.visitExpression(this, context);\n }\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitDeclareFunctionStmt(stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitExpressionStmt(stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n }\n visitReturnStmt(stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n }\n visitIfStmt(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 visitAllStatements(stmts, context) {\n stmts.forEach(stmt => stmt.visitStatement(this, context));\n }\n}\nfunction leadingComment(text, multiline = false, trailingNewline = true) {\n return new LeadingComment(text, multiline, trailingNewline);\n}\nfunction jsDocComment(tags = []) {\n return new JSDocComment(tags);\n}\nfunction variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\nfunction importExpr(id, typeParams = null, sourceSpan) {\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\nfunction importType(id, typeParams, typeModifiers) {\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\nfunction expressionType(expr, typeModifiers, typeParams) {\n return new ExpressionType(expr, typeModifiers, typeParams);\n}\nfunction transplantedType(type, typeModifiers) {\n return new TransplantedType(type, typeModifiers);\n}\nfunction typeofExpr(expr) {\n return new TypeofExpr(expr);\n}\nfunction literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\nfunction literalMap(values, type = null) {\n return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);\n}\nfunction unary(operator, expr, type, sourceSpan) {\n return new UnaryOperatorExpr(operator, expr, type, sourceSpan);\n}\nfunction not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\nfunction fn(params, body, type, sourceSpan, name) {\n return new FunctionExpr(params, body, type, sourceSpan, name);\n}\nfunction ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {\n return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);\n}\nfunction taggedTemplate(tag, template, type, sourceSpan) {\n return new TaggedTemplateExpr(tag, template, type, sourceSpan);\n}\nfunction literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\nfunction localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {\n return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);\n}\nfunction isNull(exp) {\n return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag) {\n let out = '';\n if (tag.tagName) {\n out += ` @${tag.tagName}`;\n }\n if (tag.text) {\n if (tag.text.match(/\\/\\*|\\*\\//)) {\n throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n }\n out += ' ' + tag.text.replace(/@/g, '\\\\@');\n }\n return out;\n}\nfunction serializeTags(tags) {\n if (tags.length === 0)\n return '';\n if (tags.length === 1 && tags[0].tagName && !tags[0].text) {\n // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.\n return `*${tagToString(tags[0])} `;\n }\n let out = '*\\n';\n for (const tag of tags) {\n out += ' *';\n // If the tagToString is multi-line, insert \" * \" prefixes on lines.\n out += tagToString(tag).replace(/\\n/g, '\\n * ');\n out += '\\n';\n }\n out += ' ';\n return out;\n}\n\nvar output_ast = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get TypeModifier () { return TypeModifier; },\n Type: Type,\n get BuiltinTypeName () { return BuiltinTypeName; },\n BuiltinType: BuiltinType,\n ExpressionType: ExpressionType,\n ArrayType: ArrayType,\n MapType: MapType,\n TransplantedType: TransplantedType,\n DYNAMIC_TYPE: DYNAMIC_TYPE,\n INFERRED_TYPE: INFERRED_TYPE,\n BOOL_TYPE: BOOL_TYPE,\n INT_TYPE: INT_TYPE,\n NUMBER_TYPE: NUMBER_TYPE,\n STRING_TYPE: STRING_TYPE,\n FUNCTION_TYPE: FUNCTION_TYPE,\n NONE_TYPE: NONE_TYPE,\n get UnaryOperator () { return UnaryOperator; },\n get BinaryOperator () { return BinaryOperator; },\n nullSafeIsEquivalent: nullSafeIsEquivalent,\n areAllEquivalent: areAllEquivalent,\n Expression: Expression,\n ReadVarExpr: ReadVarExpr,\n TypeofExpr: TypeofExpr,\n WrappedNodeExpr: WrappedNodeExpr,\n WriteVarExpr: WriteVarExpr,\n WriteKeyExpr: WriteKeyExpr,\n WritePropExpr: WritePropExpr,\n InvokeFunctionExpr: InvokeFunctionExpr,\n TaggedTemplateExpr: TaggedTemplateExpr,\n InstantiateExpr: InstantiateExpr,\n LiteralExpr: LiteralExpr,\n TemplateLiteral: TemplateLiteral,\n TemplateLiteralElement: TemplateLiteralElement,\n LiteralPiece: LiteralPiece,\n PlaceholderPiece: PlaceholderPiece,\n LocalizedString: LocalizedString,\n ExternalExpr: ExternalExpr,\n ExternalReference: ExternalReference,\n ConditionalExpr: ConditionalExpr,\n DynamicImportExpr: DynamicImportExpr,\n NotExpr: NotExpr,\n FnParam: FnParam,\n FunctionExpr: FunctionExpr,\n UnaryOperatorExpr: UnaryOperatorExpr,\n BinaryOperatorExpr: BinaryOperatorExpr,\n ReadPropExpr: ReadPropExpr,\n ReadKeyExpr: ReadKeyExpr,\n LiteralArrayExpr: LiteralArrayExpr,\n LiteralMapEntry: LiteralMapEntry,\n LiteralMapExpr: LiteralMapExpr,\n CommaExpr: CommaExpr,\n NULL_EXPR: NULL_EXPR,\n TYPED_NULL_EXPR: TYPED_NULL_EXPR,\n get StmtModifier () { return StmtModifier; },\n LeadingComment: LeadingComment,\n JSDocComment: JSDocComment,\n Statement: Statement,\n DeclareVarStmt: DeclareVarStmt,\n DeclareFunctionStmt: DeclareFunctionStmt,\n ExpressionStatement: ExpressionStatement,\n ReturnStatement: ReturnStatement,\n IfStmt: IfStmt,\n RecursiveAstVisitor: RecursiveAstVisitor$1,\n leadingComment: leadingComment,\n jsDocComment: jsDocComment,\n variable: variable,\n importExpr: importExpr,\n importType: importType,\n expressionType: expressionType,\n transplantedType: transplantedType,\n typeofExpr: typeofExpr,\n literalArr: literalArr,\n literalMap: literalMap,\n unary: unary,\n not: not,\n fn: fn,\n ifStmt: ifStmt,\n taggedTemplate: taggedTemplate,\n literal: literal,\n localizedString: localizedString,\n isNull: isNull\n});\n\nconst CONSTANT_PREFIX = '_c';\n/**\n * `ConstantPool` tries to reuse literal factories when two or more literals are identical.\n * We determine whether literals are identical by creating a key out of their AST using the\n * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely\n * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what\n * the result of `bar` will be, we create a key that looks like `{foo: <unknown>}`. Note\n * that we use a variable, rather than something like `null` in order to avoid collisions.\n */\nconst UNKNOWN_VALUE_KEY = variable('<unknown>');\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nconst KEY_CONTEXT = {};\n/**\n * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion\n * for strings that reach a certain length threshold. This constant defines the length threshold for\n * strings.\n */\nconst POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nclass FixupExpression extends Expression {\n constructor(resolved) {\n super(resolved.type);\n this.resolved = resolved;\n this.shared = false;\n this.original = resolved;\n }\n visitExpression(visitor, context) {\n if (context === KEY_CONTEXT) {\n // When producing a key we want to traverse the constant not the\n // variable used to refer to it.\n return this.original.visitExpression(visitor, context);\n }\n else {\n return this.resolved.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n }\n isConstant() {\n return true;\n }\n clone() {\n throw new Error(`Not supported.`);\n }\n fixup(expression) {\n this.resolved = expression;\n this.shared = true;\n }\n}\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nclass ConstantPool {\n constructor(isClosureCompilerEnabled = false) {\n this.isClosureCompilerEnabled = isClosureCompilerEnabled;\n this.statements = [];\n this.literals = new Map();\n this.literalFactories = new Map();\n this.sharedConstants = new Map();\n this.nextNameIndex = 0;\n }\n getConstLiteral(literal, forceShared) {\n if ((literal instanceof LiteralExpr && !isLongStringLiteral(literal)) ||\n literal instanceof FixupExpression) {\n // Do no put simple literals into the constant pool or try to produce a constant for a\n // reference to a constant.\n return literal;\n }\n const key = GenericKeyFn.INSTANCE.keyOf(literal);\n let fixup = this.literals.get(key);\n let newValue = false;\n if (!fixup) {\n fixup = new FixupExpression(literal);\n this.literals.set(key, fixup);\n newValue = true;\n }\n if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n // Replace the expression with a variable\n const name = this.freshName();\n let definition;\n let usage;\n if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {\n // For string literals, Closure will **always** inline the string at\n // **all** usages, duplicating it each time. For large strings, this\n // unnecessarily bloats bundle size. To work around this restriction, we\n // wrap the string in a function, and call that function for each usage.\n // This tricks Closure into using inline logic for functions instead of\n // string literals. Function calls are only inlined if the body is small\n // enough to be worth it. By doing this, very large strings will be\n // shared across multiple usages, rather than duplicating the string at\n // each usage site.\n //\n // const myStr = function() { return \"very very very long string\"; };\n // const usage1 = myStr();\n // const usage2 = myStr();\n definition = variable(name).set(new FunctionExpr([], // Params.\n [\n // Statements.\n new ReturnStatement(literal),\n ]));\n usage = variable(name).callFn([]);\n }\n else {\n // Just declare and use the variable directly, without a function call\n // indirection. This saves a few bytes and avoids an unnecessary call.\n definition = variable(name).set(literal);\n usage = variable(name);\n }\n this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n fixup.fixup(usage);\n }\n return fixup;\n }\n getSharedConstant(def, expr) {\n const key = def.keyOf(expr);\n if (!this.sharedConstants.has(key)) {\n const id = this.freshName();\n this.sharedConstants.set(key, variable(id));\n this.statements.push(def.toSharedConstantDeclaration(id, expr));\n }\n return this.sharedConstants.get(key);\n }\n getLiteralFactory(literal) {\n // Create a pure function that builds an array of a mix of constant and variable expressions\n if (literal instanceof LiteralArrayExpr) {\n const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY);\n const key = GenericKeyFn.INSTANCE.keyOf(literalArr(argumentsForKey));\n return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries));\n }\n else {\n const expressionForKey = literalMap(literal.entries.map(e => ({\n key: e.key,\n value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,\n quoted: e.quoted\n })));\n const key = GenericKeyFn.INSTANCE.keyOf(expressionForKey);\n return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({\n key: literal.entries[index].key,\n value,\n quoted: literal.entries[index].quoted\n }))));\n }\n }\n _getLiteralFactory(key, values, resultMap) {\n let literalFactory = this.literalFactories.get(key);\n const literalFactoryArguments = values.filter((e => !e.isConstant()));\n if (!literalFactory) {\n const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`));\n const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE));\n const pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n const name = this.freshName();\n this.statements.push(variable(name)\n .set(pureFunctionDeclaration)\n .toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n literalFactory = variable(name);\n this.literalFactories.set(key, literalFactory);\n }\n return { literalFactory, literalFactoryArguments };\n }\n /**\n * Produce a unique name.\n *\n * The name might be unique among different prefixes if any of the prefixes end in\n * a digit so the prefix should be a constant string (not based on user input) and\n * must not end in a digit.\n */\n uniqueName(prefix) {\n return `${prefix}${this.nextNameIndex++}`;\n }\n freshName() {\n return this.uniqueName(CONSTANT_PREFIX);\n }\n}\nclass GenericKeyFn {\n static { this.INSTANCE = new GenericKeyFn(); }\n keyOf(expr) {\n if (expr instanceof LiteralExpr && typeof expr.value === 'string') {\n return `\"${expr.value}\"`;\n }\n else if (expr instanceof LiteralExpr) {\n return String(expr.value);\n }\n else if (expr instanceof LiteralArrayExpr) {\n const entries = [];\n for (const entry of expr.entries) {\n entries.push(this.keyOf(entry));\n }\n return `[${entries.join(',')}]`;\n }\n else if (expr instanceof LiteralMapExpr) {\n const entries = [];\n for (const entry of expr.entries) {\n let key = entry.key;\n if (entry.quoted) {\n key = `\"${key}\"`;\n }\n entries.push(key + ':' + this.keyOf(entry.value));\n }\n return `{${entries.join(',')}}`;\n }\n else if (expr instanceof ExternalExpr) {\n return `import(\"${expr.value.moduleName}\", ${expr.value.name})`;\n }\n else if (expr instanceof ReadVarExpr) {\n return `read(${expr.name})`;\n }\n else if (expr instanceof TypeofExpr) {\n return `typeof(${this.keyOf(expr.expr)})`;\n }\n else {\n throw new Error(`${this.constructor.name} does not handle expressions of type ${expr.constructor.name}`);\n }\n }\n}\nfunction isVariable(e) {\n return e instanceof ReadVarExpr;\n}\nfunction isLongStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string' &&\n expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;\n}\n\nconst CORE = '@angular/core';\nclass Identifiers {\n /* Methods */\n static { this.NEW_METHOD = 'factory'; }\n static { this.TRANSFORM_METHOD = 'transform'; }\n static { this.PATCH_DEPS = 'patchedDeps'; }\n static { this.core = { name: null, moduleName: CORE }; }\n /* Instructions */\n static { this.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE }; }\n static { this.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE }; }\n static { this.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE }; }\n static { this.element = { name: 'ɵɵelement', moduleName: CORE }; }\n static { this.elementStart = { name: 'ɵɵelementStart', moduleName: CORE }; }\n static { this.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE }; }\n static { this.advance = { name: 'ɵɵadvance', moduleName: CORE }; }\n static { this.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE }; }\n static { this.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE }; }\n static { this.attribute = { name: 'ɵɵattribute', moduleName: CORE }; }\n static { this.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE }; }\n static { this.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE }; }\n static { this.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE }; }\n static { this.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE }; }\n static { this.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE }; }\n static { this.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE }; }\n static { this.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE }; }\n static { this.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE }; }\n static { this.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE }; }\n static { this.classProp = { name: 'ɵɵclassProp', moduleName: CORE }; }\n static { this.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE }; }\n static { this.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE }; }\n static { this.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE }; }\n static { this.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE }; }\n static { this.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE }; }\n static { this.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE }; }\n static { this.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE }; }\n static { this.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE }; }\n static { this.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE }; }\n static { this.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE }; }\n static { this.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE }; }\n static { this.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE }; }\n static { this.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE }; }\n static { this.classMap = { name: 'ɵɵclassMap', moduleName: CORE }; }\n static { this.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE }; }\n static { this.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE }; }\n static { this.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE }; }\n static { this.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE }; }\n static { this.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE }; }\n static { this.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE }; }\n static { this.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE }; }\n static { this.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE }; }\n static { this.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE }; }\n static { this.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE }; }\n static { this.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE }; }\n static { this.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE }; }\n static { this.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE }; }\n static { this.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE }; }\n static { this.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE }; }\n static { this.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE }; }\n static { this.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE }; }\n static { this.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE }; }\n static { this.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE }; }\n static { this.nextContext = { name: 'ɵɵnextContext', moduleName: CORE }; }\n static { this.resetView = { name: 'ɵɵresetView', moduleName: CORE }; }\n static { this.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE }; }\n static { this.defer = { name: 'ɵɵdefer', moduleName: CORE }; }\n static { this.text = { name: 'ɵɵtext', moduleName: CORE }; }\n static { this.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE }; }\n static { this.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE }; }\n static { this.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE }; }\n static { this.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE }; }\n static { this.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE }; }\n static { this.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE }; }\n static { this.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE }; }\n static { this.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE }; }\n static { this.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE }; }\n static { this.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE }; }\n static { this.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE }; }\n static { this.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE }; }\n static { this.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE }; }\n static { this.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE }; }\n static { this.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE }; }\n static { this.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE }; }\n static { this.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE }; }\n static { this.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE }; }\n static { this.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE }; }\n static { this.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE }; }\n static { this.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE }; }\n static { this.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE }; }\n static { this.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE }; }\n static { this.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE }; }\n static { this.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE }; }\n static { this.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE }; }\n static { this.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE }; }\n static { this.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE }; }\n static { this.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE }; }\n static { this.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE }; }\n static { this.property = { name: 'ɵɵproperty', moduleName: CORE }; }\n static { this.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE }; }\n static { this.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE }; }\n static { this.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE }; }\n static { this.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE }; }\n static { this.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE }; }\n static { this.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE }; }\n static { this.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE }; }\n static { this.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE }; }\n static { this.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE }; }\n static { this.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE }; }\n static { this.i18n = { name: 'ɵɵi18n', moduleName: CORE }; }\n static { this.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE }; }\n static { this.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE }; }\n static { this.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE }; }\n static { this.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE }; }\n static { this.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE }; }\n static { this.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE }; }\n static { this.pipe = { name: 'ɵɵpipe', moduleName: CORE }; }\n static { this.projection = { name: 'ɵɵprojection', moduleName: CORE }; }\n static { this.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE }; }\n static { this.reference = { name: 'ɵɵreference', moduleName: CORE }; }\n static { this.inject = { name: 'ɵɵinject', moduleName: CORE }; }\n static { this.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE }; }\n static { this.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE }; }\n static { this.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE }; }\n static { this.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE }; }\n static { this.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE }; }\n static { this.forwardRef = { name: 'forwardRef', moduleName: CORE }; }\n static { this.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE }; }\n static { this.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE }; }\n static { this.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE }; }\n static { this.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE }; }\n static { this.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE }; }\n static { this.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE }; }\n static { this.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE }; }\n static { this.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE }; }\n static { this.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE }; }\n static { this.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE }; }\n static { this.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE,\n }; }\n static { this.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE,\n }; }\n static { this.ComponentDeclaration = {\n name: 'ɵɵComponentDeclaration',\n moduleName: CORE,\n }; }\n static { this.FactoryDeclaration = {\n name: 'ɵɵFactoryDeclaration',\n moduleName: CORE,\n }; }\n static { this.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE }; }\n static { this.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE }; }\n static { this.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE }; }\n static { this.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE }; }\n static { this.DirectiveDeclaration = {\n name: 'ɵɵDirectiveDeclaration',\n moduleName: CORE,\n }; }\n static { this.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE }; }\n static { this.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE }; }\n static { this.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE }; }\n static { this.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE }; }\n static { this.NgModuleDeclaration = {\n name: 'ɵɵNgModuleDeclaration',\n moduleName: CORE,\n }; }\n static { this.ModuleWithProviders = {\n name: 'ModuleWithProviders',\n moduleName: CORE,\n }; }\n static { this.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE }; }\n static { this.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE }; }\n static { this.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE }; }\n static { this.registerNgModuleType = { name: 'ɵɵregisterNgModuleType', moduleName: CORE }; }\n static { this.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE }; }\n static { this.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE }; }\n static { this.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE }; }\n static { this.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE }; }\n static { this.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE }; }\n static { this.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE }; }\n static { this.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE }; }\n static { this.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE }; }\n static { this.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE }; }\n static { this.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE }; }\n static { this.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE }; }\n static { this.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE }; }\n static { this.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE }; }\n static { this.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE }; }\n static { this.HostDirectivesFeature = { name: 'ɵɵHostDirectivesFeature', moduleName: CORE }; }\n static { this.InputTransformsFeatureFeature = { name: 'ɵɵInputTransformsFeature', moduleName: CORE }; }\n static { this.listener = { name: 'ɵɵlistener', moduleName: CORE }; }\n static { this.getInheritedFactory = {\n name: 'ɵɵgetInheritedFactory',\n moduleName: CORE,\n }; }\n // sanitization-related functions\n static { this.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE }; }\n static { this.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE }; }\n static { this.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE }; }\n static { this.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE }; }\n static { this.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE }; }\n static { this.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE }; }\n static { this.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE }; }\n static { this.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE }; }\n static { this.validateIframeAttribute = { name: 'ɵɵvalidateIframeAttribute', moduleName: CORE }; }\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\nfunction splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\nfunction _splitAt(input, character, defaultValues) {\n const characterIndex = input.indexOf(character);\n if (characterIndex == -1)\n return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\nfunction noUndefined(val) {\n return val === undefined ? null : val;\n}\nfunction error(msg) {\n throw new Error(`Internal Error: ${msg}`);\n}\n// Escape characters that have a special meaning in Regular Expressions\nfunction escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nfunction utf8Encode(str) {\n let encoded = [];\n for (let index = 0; index < str.length; index++) {\n let 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 const 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.push(codePoint);\n }\n else if (codePoint <= 0x7ff) {\n encoded.push(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0xffff) {\n encoded.push((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0x1fffff) {\n encoded.push(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n }\n return encoded;\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\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 if (!token.toString) {\n return 'object';\n }\n // WARNING: do not try to `JSON.stringify(token)` here\n // see https://github.com/angular/angular/issues/23440\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\nclass Version {\n constructor(full) {\n this.full = full;\n const splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n}\nconst _global = globalThis;\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Partitions a given array into 2 arrays, based on a boolean value returned by the condition\n * function.\n *\n * @param arr Input array that should be partitioned\n * @param conditionFn Condition function that is called for each item in a given array and returns a\n * boolean value.\n */\nfunction partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}\n\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nconst VERSION$1 = 3;\nconst JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nclass SourceMapGenerator {\n constructor(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 addSource(url, content = null) {\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n }\n addLine() {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n }\n addMapping(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, sourceUrl, sourceLine0, sourceCol0 });\n return this;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get currentLine() {\n return this.lines.slice(-1)[0];\n }\n toJSON() {\n if (!this.hasMappings) {\n return null;\n }\n const sourcesIndex = new Map();\n const sources = [];\n const sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach((url, i) => {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(this.sourcesContent.get(url) || null);\n });\n let mappings = '';\n let lastCol0 = 0;\n let lastSourceIndex = 0;\n let lastSourceLine0 = 0;\n let lastSourceCol0 = 0;\n this.lines.forEach(segments => {\n lastCol0 = 0;\n mappings += segments\n .map(segment => {\n // zero-based starting column of the line in the generated code\n let 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(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n lastSourceIndex = sourcesIndex.get(segment.sourceUrl);\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n lastSourceLine0 = segment.sourceLine0;\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n lastSourceCol0 = 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$1,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings,\n };\n }\n toJsComment() {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n '';\n }\n}\nfunction toBase64String(value) {\n let b64 = '';\n const encoded = utf8Encode(value);\n for (let i = 0; i < encoded.length;) {\n const i1 = encoded[i++];\n const i2 = i < encoded.length ? encoded[i++] : null;\n const i3 = i < encoded.length ? encoded[i++] : null;\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit(((i1 & 3) << 4) | (i2 === null ? 0 : i2 >> 4));\n b64 += i2 === null ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 === null ? 0 : i3 >> 6));\n b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\nfunction toBase64VLQ(value) {\n value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n let out = '';\n do {\n let 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}\nconst B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\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\nconst _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nconst _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nconst _INDENT_WITH = ' ';\nclass _EmittedLine {\n constructor(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n}\nclass EmitterVisitorContext {\n static createRoot() {\n return new EmitterVisitorContext(0);\n }\n constructor(_indent) {\n this._indent = _indent;\n this._lines = [new _EmittedLine(_indent)];\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get _currentLine() {\n return this._lines[this._lines.length - 1];\n }\n println(from, lastPart = '') {\n this.print(from || null, lastPart, true);\n }\n lineIsEmpty() {\n return this._currentLine.parts.length === 0;\n }\n lineLength() {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n }\n print(from, part, 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 removeEmptyLastLine() {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n }\n incIndent() {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n decIndent() {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n toSource() {\n return this.sourceLines\n .map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '')\n .join('\\n');\n }\n toSourceMapGenerator(genFilePath, startsAtLine = 0) {\n const map = new SourceMapGenerator(genFilePath);\n let firstOffsetMapped = false;\n const mapFirstOffsetIfNeeded = () => {\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 (let i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach((line, lineIdx) => {\n map.addLine();\n const spans = line.srcSpans;\n const parts = line.parts;\n let col0 = line.indent * _INDENT_WITH.length;\n let 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 const span = spans[spanIdx];\n const source = span.start.file;\n const sourceLine = span.start.line;\n const 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 spanOf(line, column) {\n const emittedLine = this._lines[line];\n if (emittedLine) {\n let columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n const 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 /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get sourceLines() {\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}\nclass AbstractEmitterVisitor {\n constructor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n printLeadingComments(stmt, ctx) {\n if (stmt.leadingComments === undefined) {\n return;\n }\n for (const comment of stmt.leadingComments) {\n if (comment instanceof JSDocComment) {\n ctx.print(stmt, `/*${comment.toString()}*/`, comment.trailingNewline);\n }\n else {\n if (comment.multiline) {\n ctx.print(stmt, `/* ${comment.text} */`, comment.trailingNewline);\n }\n else {\n comment.text.split('\\n').forEach((line) => {\n ctx.println(stmt, `// ${line}`);\n });\n }\n }\n }\n }\n visitExpressionStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitReturnStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `return `);\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitIfStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `if (`);\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, `) {`);\n const 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 visitWriteVarExpr(expr, ctx) {\n const 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 visitWriteKeyExpr(expr, ctx) {\n const 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 visitWritePropExpr(expr, ctx) {\n const 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 visitInvokeFunctionExpr(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 visitTaggedTemplateExpr(expr, ctx) {\n expr.tag.visitExpression(this, ctx);\n ctx.print(expr, '`' + expr.template.elements[0].rawText);\n for (let i = 1; i < expr.template.elements.length; i++) {\n ctx.print(expr, '${');\n expr.template.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(expr, `}${expr.template.elements[i].rawText}`);\n }\n ctx.print(expr, '`');\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n }\n visitTypeofExpr(expr, ctx) {\n ctx.print(expr, 'typeof ');\n expr.expr.visitExpression(this, ctx);\n }\n visitReadVarExpr(ast, ctx) {\n ctx.print(ast, ast.name);\n return null;\n }\n visitInstantiateExpr(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 visitLiteralExpr(ast, ctx) {\n const 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 visitLocalizedString(ast, ctx) {\n const head = ast.serializeI18nHead();\n ctx.print(ast, '$localize `' + head.raw);\n for (let i = 1; i < ast.messageParts.length; i++) {\n ctx.print(ast, '${');\n ast.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(ast, `}${ast.serializeI18nTemplatePart(i).raw}`);\n }\n ctx.print(ast, '`');\n return null;\n }\n visitConditionalExpr(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, ': ');\n ast.falseCase.visitExpression(this, ctx);\n ctx.print(ast, `)`);\n return null;\n }\n visitDynamicImportExpr(ast, ctx) {\n ctx.print(ast, `import(${ast.url})`);\n }\n visitNotExpr(ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n }\n visitUnaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case UnaryOperator.Plus:\n opStr = '+';\n break;\n case UnaryOperator.Minus:\n opStr = '-';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ctx.print(ast, opStr);\n ast.expr.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitBinaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case BinaryOperator.Equals:\n opStr = '==';\n break;\n case BinaryOperator.Identical:\n opStr = '===';\n break;\n case BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case BinaryOperator.And:\n opStr = '&&';\n break;\n case BinaryOperator.BitwiseAnd:\n opStr = '&';\n break;\n case BinaryOperator.Or:\n opStr = '||';\n break;\n case BinaryOperator.Plus:\n opStr = '+';\n break;\n case BinaryOperator.Minus:\n opStr = '-';\n break;\n case BinaryOperator.Divide:\n opStr = '/';\n break;\n case BinaryOperator.Multiply:\n opStr = '*';\n break;\n case BinaryOperator.Modulo:\n opStr = '%';\n break;\n case BinaryOperator.Lower:\n opStr = '<';\n break;\n case BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case BinaryOperator.Bigger:\n opStr = '>';\n break;\n case BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n case BinaryOperator.NullishCoalesce:\n opStr = '??';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, ` ${opStr} `);\n ast.rhs.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitReadPropExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `.`);\n ctx.print(ast, ast.name);\n return null;\n }\n visitReadKeyExpr(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 visitLiteralArrayExpr(ast, ctx) {\n ctx.print(ast, `[`);\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralMapExpr(ast, ctx) {\n ctx.print(ast, `{`);\n this.visitAllObjects(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 visitCommaExpr(ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n }\n visitAllExpressions(expressions, ctx, separator) {\n this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);\n }\n visitAllObjects(handler, expressions, ctx, separator) {\n let incrementedIndent = false;\n for (let 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 visitAllStatements(statements, ctx) {\n statements.forEach((stmt) => stmt.visitStatement(this, ctx));\n }\n}\nfunction escapeIdentifier(input, escapeDollar, alwaysQuote = true) {\n if (input == null) {\n return null;\n }\n const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match) => {\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 const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? `'${body}'` : body;\n}\nfunction _createIndent(count) {\n let res = '';\n for (let i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\n\nfunction typeWithParameters(type, numParams) {\n if (numParams === 0) {\n return expressionType(type);\n }\n const params = [];\n for (let i = 0; i < numParams; i++) {\n params.push(DYNAMIC_TYPE);\n }\n return expressionType(type, undefined, params);\n}\nconst ANIMATE_SYMBOL_PREFIX = '@';\nfunction prepareSyntheticPropertyName(name) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}`;\n}\nfunction prepareSyntheticListenerName(name, phase) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;\n}\nfunction getSafePropertyAccessString(accessor, name) {\n const escapedName = escapeIdentifier(name, false, false);\n return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`;\n}\nfunction prepareSyntheticListenerFunctionName(name, phase) {\n return `animation_${name}_${phase}`;\n}\nfunction jitOnlyGuardedExpression(expr) {\n return guardedExpression('ngJitMode', expr);\n}\nfunction devOnlyGuardedExpression(expr) {\n return guardedExpression('ngDevMode', expr);\n}\nfunction guardedExpression(guard, expr) {\n const guardExpr = new ExternalExpr({ name: guard, moduleName: null });\n const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined'));\n const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr, /* type */ undefined, \n /* sourceSpan */ undefined, true);\n return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);\n}\nfunction wrapReference(value) {\n const wrapped = new WrappedNodeExpr(value);\n return { value: wrapped, type: wrapped };\n}\nfunction refsToArray(refs, shouldForwardDeclare) {\n const values = literalArr(refs.map(ref => ref.value));\n return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;\n}\nfunction createMayBeForwardRefExpression(expression, forwardRef) {\n return { expression, forwardRef };\n}\n/**\n * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a\n * `forwardRef()` call.\n *\n * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression\n * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated\n * in the code.\n *\n * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and\n * `packages/compiler/src/jit_compiler_facade.ts` for more information.\n */\nfunction convertFromMaybeForwardRefExpression({ expression, forwardRef }) {\n switch (forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 1 /* ForwardRefHandling.Wrapped */:\n return expression;\n case 2 /* ForwardRefHandling.Unwrapped */:\n return generateForwardRef(expression);\n }\n}\n/**\n * Generate an expression that has the given `expr` wrapped in the following form:\n *\n * ```\n * forwardRef(() => expr)\n * ```\n */\nfunction generateForwardRef(expr) {\n return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);\n}\n\nvar R3FactoryDelegateType;\n(function (R3FactoryDelegateType) {\n R3FactoryDelegateType[R3FactoryDelegateType[\"Class\"] = 0] = \"Class\";\n R3FactoryDelegateType[R3FactoryDelegateType[\"Function\"] = 1] = \"Function\";\n})(R3FactoryDelegateType || (R3FactoryDelegateType = {}));\nvar FactoryTarget$1;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget$1 || (FactoryTarget$1 = {}));\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nfunction compileFactoryFunction(meta) {\n const t = variable('t');\n let baseFactoryVar = null;\n // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n // this type is always created by constructor invocation, then this is the type-to-create\n // parameter provided by the user (t) if specified, or the current type if not. If there is a\n // delegated factory (which is used to create the current type) then this is only the type-to-\n // create parameter (t).\n const typeForCtor = !isDelegatedFactoryMetadata(meta) ?\n new BinaryOperatorExpr(BinaryOperator.Or, t, meta.type.value) :\n t;\n let ctorExpr = null;\n if (meta.deps !== null) {\n // There is a constructor (either explicitly or implicitly defined).\n if (meta.deps !== 'invalid') {\n ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target));\n }\n }\n else {\n // There is no constructor, use the base class' factory to construct typeForCtor.\n baseFactoryVar = variable(`ɵ${meta.name}_BaseFactory`);\n ctorExpr = baseFactoryVar.callFn([typeForCtor]);\n }\n const body = [];\n let retExpr = null;\n function makeConditionalFactory(nonCtorExpr) {\n const r = variable('r');\n body.push(r.set(NULL_EXPR).toDeclStmt());\n const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :\n importExpr(Identifiers.invalidFactory).callFn([]).toStmt();\n body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n return r;\n }\n if (isDelegatedFactoryMetadata(meta)) {\n // This type is created with a delegated factory. If a type parameter is not specified, call\n // the factory instead.\n const delegateArgs = injectDependencies(meta.delegateDeps, meta.target);\n // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.\n const factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ?\n InstantiateExpr :\n InvokeFunctionExpr)(meta.delegate, delegateArgs);\n retExpr = makeConditionalFactory(factoryExpr);\n }\n else if (isExpressionFactoryMetadata(meta)) {\n // TODO(alxhub): decide whether to lower the value here or in the caller\n retExpr = makeConditionalFactory(meta.expression);\n }\n else {\n retExpr = ctorExpr;\n }\n if (retExpr === null) {\n // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.\n body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());\n }\n else if (baseFactoryVar !== null) {\n // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.\n const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.type.value]);\n // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`\n const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));\n body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));\n }\n else {\n // This is straightforward factory, just return it.\n body.push(new ReturnStatement(retExpr));\n }\n let factoryFn = fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, `${meta.name}_Factory`);\n if (baseFactoryVar !== null) {\n // There is a base factory variable so wrap its declaration along with the factory function into\n // an IIFE.\n factoryFn = fn([], [\n new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)\n ]).callFn([], /* sourceSpan */ undefined, /* pure */ true);\n }\n return {\n expression: factoryFn,\n statements: [],\n type: createFactoryType(meta),\n };\n}\nfunction createFactoryType(meta) {\n const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;\n return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));\n}\nfunction injectDependencies(deps, target) {\n return deps.map((dep, index) => compileInjectDependency(dep, target, index));\n}\nfunction compileInjectDependency(dep, target, index) {\n // Interpret the dependency according to its resolved type.\n if (dep.token === null) {\n return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);\n }\n else if (dep.attributeNameType === null) {\n // Build up the injection flags according to the metadata.\n const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) |\n (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) |\n (dep.optional ? 8 /* InjectFlags.Optional */ : 0) |\n (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);\n // If this dependency is optional or otherwise has non-default flags, then additional\n // parameters describing how to inject the dependency must be passed to the inject function\n // that's being used.\n let flagsParam = (flags !== 0 /* InjectFlags.Default */ || dep.optional) ? literal(flags) : null;\n // Build up the arguments to the injectFn call.\n const injectArgs = [dep.token];\n if (flagsParam) {\n injectArgs.push(flagsParam);\n }\n const injectFn = getInjectFn(target);\n return importExpr(injectFn).callFn(injectArgs);\n }\n else {\n // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`\n // type dependency. For the generated JS we still want to use the `dep.token` value in case the\n // name given for the attribute is not a string literal. For example given `@Attribute(foo())`,\n // we want to generate `ɵɵinjectAttribute(foo())`.\n //\n // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate\n // typings.\n return importExpr(Identifiers.injectAttribute).callFn([dep.token]);\n }\n}\nfunction createCtorDepsType(deps) {\n let hasTypes = false;\n const attributeTypes = deps.map(dep => {\n const type = createCtorDepType(dep);\n if (type !== null) {\n hasTypes = true;\n return type;\n }\n else {\n return literal(null);\n }\n });\n if (hasTypes) {\n return expressionType(literalArr(attributeTypes));\n }\n else {\n return NONE_TYPE;\n }\n}\nfunction createCtorDepType(dep) {\n const entries = [];\n if (dep.attributeNameType !== null) {\n entries.push({ key: 'attribute', value: dep.attributeNameType, quoted: false });\n }\n if (dep.optional) {\n entries.push({ key: 'optional', value: literal(true), quoted: false });\n }\n if (dep.host) {\n entries.push({ key: 'host', value: literal(true), quoted: false });\n }\n if (dep.self) {\n entries.push({ key: 'self', value: literal(true), quoted: false });\n }\n if (dep.skipSelf) {\n entries.push({ key: 'skipSelf', value: literal(true), quoted: false });\n }\n return entries.length > 0 ? literalMap(entries) : null;\n}\nfunction isDelegatedFactoryMetadata(meta) {\n return meta.delegateType !== undefined;\n}\nfunction isExpressionFactoryMetadata(meta) {\n return meta.expression !== undefined;\n}\nfunction getInjectFn(target) {\n switch (target) {\n case FactoryTarget$1.Component:\n case FactoryTarget$1.Directive:\n case FactoryTarget$1.Pipe:\n return Identifiers.directiveInject;\n case FactoryTarget$1.NgModule:\n case FactoryTarget$1.Injectable:\n default:\n return Identifiers.inject;\n }\n}\n\n/**\n * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently\n * require the implementation of a visitor for Comments as they are only collected at\n * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`\n * is true.\n */\nclass Comment$1 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(_visitor) {\n throw new Error('visit() not implemented for Comment');\n }\n}\nclass Text$3 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass BoundText {\n constructor(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitBoundText(this);\n }\n}\n/**\n * Represents a text attribute in the template.\n *\n * `valueSpan` may not be present in cases where there is no value `<div a></div>`.\n * `keySpan` may also not be present for synthetic attributes from ICU expansions.\n */\nclass TextAttribute {\n constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTextAttribute(this);\n }\n}\nclass BoundAttribute {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {\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.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n static fromBoundElementProperty(prop, i18n) {\n if (prop.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`);\n }\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);\n }\n visit(visitor) {\n return visitor.visitBoundAttribute(this);\n }\n}\nclass BoundEvent {\n constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.type = type;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n static fromParsedEvent(event) {\n const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;\n const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;\n if (event.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);\n }\n return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan);\n }\n visit(visitor) {\n return visitor.visitBoundEvent(this);\n }\n}\nclass Element$1 {\n constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitElement(this);\n }\n}\nclass DeferredTrigger {\n constructor(sourceSpan) {\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredTrigger(this);\n }\n}\nclass BoundDeferredTrigger extends DeferredTrigger {\n constructor(value, sourceSpan) {\n super(sourceSpan);\n this.value = value;\n }\n}\nclass IdleDeferredTrigger extends DeferredTrigger {\n}\nclass ImmediateDeferredTrigger extends DeferredTrigger {\n}\nclass HoverDeferredTrigger extends DeferredTrigger {\n}\nclass TimerDeferredTrigger extends DeferredTrigger {\n constructor(delay, sourceSpan) {\n super(sourceSpan);\n this.delay = delay;\n }\n}\nclass InteractionDeferredTrigger extends DeferredTrigger {\n constructor(reference, sourceSpan) {\n super(sourceSpan);\n this.reference = reference;\n }\n}\nclass ViewportDeferredTrigger extends DeferredTrigger {\n constructor(reference, sourceSpan) {\n super(sourceSpan);\n this.reference = reference;\n }\n}\nclass DeferredBlockPlaceholder {\n constructor(children, minimumTime, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.minimumTime = minimumTime;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockPlaceholder(this);\n }\n}\nclass DeferredBlockLoading {\n constructor(children, afterTime, minimumTime, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.afterTime = afterTime;\n this.minimumTime = minimumTime;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockLoading(this);\n }\n}\nclass DeferredBlockError {\n constructor(children, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockError(this);\n }\n}\nclass DeferredBlock {\n constructor(children, triggers, prefetchTriggers, placeholder, loading, error, sourceSpan, startSourceSpan, endSourceSpan) {\n this.children = children;\n this.triggers = triggers;\n this.prefetchTriggers = prefetchTriggers;\n this.placeholder = placeholder;\n this.loading = loading;\n this.error = error;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredBlock(this);\n }\n}\nclass Template {\n constructor(\n // tagName is the name of the container element, if applicable.\n // `null` is a special case for when there is a structural directive on an `ng-template` so\n // the renderer can differentiate between the synthetic template and the one written in the\n // file.\n tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.tagName = tagName;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.templateAttrs = templateAttrs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTemplate(this);\n }\n}\nclass Content {\n constructor(selector, attributes, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n this.name = 'ng-content';\n }\n visit(visitor) {\n return visitor.visitContent(this);\n }\n}\nclass Variable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitVariable(this);\n }\n}\nclass Reference {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitReference(this);\n }\n}\nclass Icu$1 {\n constructor(vars, placeholders, sourceSpan, i18n) {\n this.vars = vars;\n this.placeholders = placeholders;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIcu(this);\n }\n}\nclass RecursiveVisitor$1 {\n visitElement(element) {\n visitAll$1(this, element.attributes);\n visitAll$1(this, element.inputs);\n visitAll$1(this, element.outputs);\n visitAll$1(this, element.children);\n visitAll$1(this, element.references);\n }\n visitTemplate(template) {\n visitAll$1(this, template.attributes);\n visitAll$1(this, template.inputs);\n visitAll$1(this, template.outputs);\n visitAll$1(this, template.children);\n visitAll$1(this, template.references);\n visitAll$1(this, template.variables);\n }\n visitDeferredBlock(deferred) {\n visitAll$1(this, deferred.triggers);\n visitAll$1(this, deferred.prefetchTriggers);\n visitAll$1(this, deferred.children);\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n visitAll$1(this, block.children);\n }\n visitDeferredBlockError(block) {\n visitAll$1(this, block.children);\n }\n visitDeferredBlockLoading(block) {\n visitAll$1(this, block.children);\n }\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n visitDeferredTrigger(trigger) { }\n}\nfunction visitAll$1(visitor, nodes) {\n const result = [];\n if (visitor.visit) {\n for (const node of nodes) {\n visitor.visit(node) || node.visit(visitor);\n }\n }\n else {\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n return result;\n}\n\nclass Message {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content and their source spans\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param customId\n */\n constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.customId = customId;\n /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */\n this.legacyIds = [];\n this.id = this.customId;\n this.messageString = serializeMessage(this.nodes);\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}\nclass Text$2 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\n// TODO(vicb): do we really need this node (vs an array) ?\nclass Container {\n constructor(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitContainer(this, context);\n }\n}\nclass Icu {\n constructor(expression, type, cases, sourceSpan, expressionPlaceholder) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n this.expressionPlaceholder = expressionPlaceholder;\n }\n visit(visitor, context) {\n return visitor.visitIcu(this, context);\n }\n}\nclass TagPlaceholder {\n constructor(tag, attrs, startName, closeName, children, isVoid, \n // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)\n sourceSpan, startSourceSpan, endSourceSpan) {\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 this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitTagPlaceholder(this, context);\n }\n}\nclass Placeholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitPlaceholder(this, context);\n }\n}\nclass IcuPlaceholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcuPlaceholder(this, context);\n }\n}\n// Clone the AST\nclass CloneVisitor {\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitContainer(container, context) {\n const children = container.children.map(n => n.visit(this, context));\n return new Container(children, container.sourceSpan);\n }\n visitIcu(icu, context) {\n const cases = {};\n Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context));\n const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan, icu.expressionPlaceholder);\n return msg;\n }\n visitTagPlaceholder(ph, context) {\n const children = ph.children.map(n => n.visit(this, context));\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n }\n}\n// Visit all the nodes recursively\nclass RecurseVisitor {\n visitText(text, context) { }\n visitContainer(container, context) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu, context) {\n Object.keys(icu.cases).forEach(k => {\n icu.cases[k].visit(this);\n });\n }\n visitTagPlaceholder(ph, context) {\n ph.children.forEach(child => child.visit(this));\n }\n visitPlaceholder(ph, context) { }\n visitIcuPlaceholder(ph, context) { }\n}\n/**\n * Serialize the message to the Localize backtick string format that would appear in compiled code.\n */\nfunction serializeMessage(messageNodes) {\n const visitor = new LocalizeMessageStringVisitor();\n const str = messageNodes.map(n => n.visit(visitor)).join('');\n return str;\n}\nclass LocalizeMessageStringVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n }\n visitTagPlaceholder(ph) {\n const children = ph.children.map(child => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\n }\n visitPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n visitIcuPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n}\n\nclass Serializer {\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n createNameMapper(message) {\n return null;\n }\n}\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nclass SimplePlaceholderMapper extends RecurseVisitor {\n // create a mapping from the message\n constructor(message, mapName) {\n super();\n this.mapName = mapName;\n this.internalToPublic = {};\n this.publicToNextId = {};\n this.publicToInternal = {};\n message.nodes.forEach(node => node.visit(this));\n }\n toPublicName(internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ?\n this.internalToPublic[internalName] :\n null;\n }\n toInternalName(publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n null;\n }\n visitText(text, context) {\n return null;\n }\n visitTagPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitTagPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\n }\n visitPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n // XMB placeholders could only contains A-Z, 0-9 and _\n visitPlaceholderName(internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n let publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n const 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}\n\nclass _Visitor$2 {\n visitTag(tag) {\n const strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return `<${tag.name}${strAttrs}/>`;\n }\n const strChildren = tag.children.map(node => node.visit(this));\n return `<${tag.name}${strAttrs}>${strChildren.join('')}</${tag.name}>`;\n }\n visitText(text) {\n return text.value;\n }\n visitDeclaration(decl) {\n return `<?xml${this._serializeAttributes(decl.attrs)} ?>`;\n }\n _serializeAttributes(attrs) {\n const strAttrs = Object.keys(attrs).map((name) => `${name}=\"${attrs[name]}\"`).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n }\n visitDoctype(doctype) {\n return `<!DOCTYPE ${doctype.rootTag} [\\n${doctype.dtd}\\n]>`;\n }\n}\nconst _visitor = new _Visitor$2();\nfunction serialize(nodes) {\n return nodes.map((node) => node.visit(_visitor)).join('');\n}\nclass Declaration {\n constructor(unescapedAttrs) {\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitDeclaration(this);\n }\n}\nclass Doctype {\n constructor(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n visit(visitor) {\n return visitor.visitDoctype(this);\n }\n}\nclass Tag {\n constructor(name, unescapedAttrs = {}, children = []) {\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitTag(this);\n }\n}\nclass Text$1 {\n constructor(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass CR extends Text$1 {\n constructor(ws = 0) {\n super(`\\n${new Array(ws + 1).join(' ')}`);\n }\n}\nconst _ESCAPED_CHARS = [\n [/&/g, '&amp;'],\n [/\"/g, '&quot;'],\n [/'/g, '&apos;'],\n [/</g, '&lt;'],\n [/>/g, '&gt;'],\n];\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nfunction escapeXml(text) {\n return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text);\n}\n\nconst _MESSAGES_TAG = 'messagebundle';\nconst _MESSAGE_TAG = 'msg';\nconst _PLACEHOLDER_TAG$3 = 'ph';\nconst _EXAMPLE_TAG = 'ex';\nconst _SOURCE_TAG$2 = 'source';\nconst _DOCTYPE = `<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>`;\nclass Xmb extends Serializer {\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n let rootNode = new Tag(_MESSAGES_TAG);\n messages.forEach(message => {\n const 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 let sourceTags = [];\n message.sources.forEach((source) => {\n sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)]));\n });\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));\n });\n rootNode.children.push(new CR());\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n new Doctype(_MESSAGES_TAG, _DOCTYPE),\n new CR(),\n exampleVisitor.addDefaultExamples(rootNode),\n new CR(),\n ]);\n }\n load(content, url) {\n throw new Error('Unsupported');\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nclass _Visitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const startTagAsText = new Text$1(`<${ph.tag}>`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const startTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.startName }, [startEx, startTagAsText]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n const closeTagAsText = new Text$1(`</${ph.tag}>`);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.closeName }, [closeEx, closeTagAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n const interpolationAsText = new Text$1(`{{${ph.value}}}`);\n // Example tag needs to be not-empty for TC.\n const exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, interpolationAsText])\n ];\n }\n visitIcuPlaceholder(ph, context) {\n const icuExpression = ph.value.expression;\n const icuType = ph.value.type;\n const icuCases = Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ');\n const icuAsText = new Text$1(`{${icuExpression}, ${icuType}, ${icuCases}}`);\n const exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, icuAsText])\n ];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\nfunction digest(message) {\n return decimalDigest(message);\n}\n// TC requires at least one non-empty example on placeholders\nclass ExampleVisitor {\n addDefaultExamples(node) {\n node.visit(this);\n return node;\n }\n visitTag(tag) {\n if (tag.name === _PLACEHOLDER_TAG$3) {\n if (!tag.children || tag.children.length == 0) {\n const exText = new Text$1(tag.attrs['name'] || '...');\n tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];\n }\n }\n else if (tag.children) {\n tag.children.forEach(node => node.visit(this));\n }\n }\n visitText(text) { }\n visitDeclaration(decl) { }\n visitDoctype(doctype) { }\n}\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nfunction toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\n/**\n * Prefix for non-`goog.getMsg` i18n-related vars.\n * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that\n * considers variables like `I18N_0` as constants and throws an error when their value changes.\n */\nconst TRANSLATION_VAR_PREFIX = 'i18n_';\n/** Name of the i18n attributes **/\nconst I18N_ATTR = 'i18n';\nconst I18N_ATTR_PREFIX = 'i18n-';\n/** Prefix of var expressions used in ICUs */\nconst I18N_ICU_VAR_PREFIX = 'VAR_';\n/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/** Placeholder wrapper for i18n expressions **/\nconst I18N_PLACEHOLDER_SYMBOL = '<27>';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction isI18nRootNode(meta) {\n return meta instanceof Message;\n}\nfunction isSingleI18nIcu(meta) {\n return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu;\n}\nfunction hasI18nMeta(node) {\n return !!node.i18n;\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some((attr) => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\n}\nfunction wrapI18nPlaceholder(content, contextId = 0) {\n const blockId = contextId > 0 ? `:${contextId}` : '';\n return `${I18N_PLACEHOLDER_SYMBOL}${content}${blockId}${I18N_PLACEHOLDER_SYMBOL}`;\n}\nfunction assembleI18nBoundString(strings, bindingStartIndex = 0, contextId = 0) {\n if (!strings.length)\n return '';\n let acc = '';\n const lastIdx = strings.length - 1;\n for (let i = 0; i < lastIdx; i++) {\n acc += `${strings[i]}${wrapI18nPlaceholder(bindingStartIndex + i, contextId)}`;\n }\n acc += strings[lastIdx];\n return acc;\n}\nfunction getSeqNumberGenerator(startsAt = 0) {\n let current = startsAt;\n return () => current++;\n}\nfunction placeholdersToParams(placeholders) {\n const params = {};\n placeholders.forEach((values, key) => {\n params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);\n });\n return params;\n}\nfunction updatePlaceholderMap(map, name, ...values) {\n const current = map.get(name) || [];\n current.push(...values);\n map.set(name, current);\n}\nfunction assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId = 0) {\n const startIdx = bindingStartIndex;\n const placeholders = new Map();\n const node = meta instanceof Message ? meta.nodes.find(node => node instanceof Container) : meta;\n if (node) {\n node\n .children\n .filter((child) => child instanceof Placeholder)\n .forEach((child, idx) => {\n const content = wrapI18nPlaceholder(startIdx + idx, contextId);\n updatePlaceholderMap(placeholders, child.name, content);\n });\n }\n return placeholders;\n}\n/**\n * Format the placeholder names in a map of placeholders to expressions.\n *\n * The placeholder names are converted from \"internal\" format (e.g. `START_TAG_DIV_1`) to \"external\"\n * format (e.g. `startTagDiv_1`).\n *\n * @param params A map of placeholder names to expressions.\n * @param useCamelCase whether to camelCase the placeholder name when formatting.\n * @returns A new map of formatted placeholder names to expressions.\n */\nfunction formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {\n const _params = {};\n if (params && Object.keys(params).length) {\n Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);\n }\n return _params;\n}\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\nfunction formatI18nPlaceholderName(name, useCamelCase = true) {\n const publicName = toPublicName(name);\n if (!useCamelCase) {\n return publicName;\n }\n const chunks = publicName.split('_');\n if (chunks.length === 1) {\n // if no \"_\" found - just lowercase the value\n return name.toLowerCase();\n }\n let postfix;\n // eject last element if it's a number\n if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n postfix = chunks.pop();\n }\n let raw = chunks.shift().toLowerCase();\n if (chunks.length) {\n raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join('');\n }\n return postfix ? `${raw}_${postfix}` : raw;\n}\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\nfunction getTranslationConstPrefix(extra) {\n return `${CLOSURE_TRANSLATION_VAR_PREFIX}${extra}`.toUpperCase();\n}\n/**\n * Generate AST to declare a variable. E.g. `var I18N_1;`.\n * @param variable the name of the variable to declare.\n */\nfunction declareI18nVariable(variable) {\n return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);\n}\n\n/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\nconst UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n/** Name of the temporary to use during data binding */\nconst TEMPORARY_NAME = '_t';\n/** Name of the context parameter passed into a template function */\nconst CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\nconst RENDER_FLAGS = 'rf';\n/** The prefix reference variables */\nconst REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\nconst IMPLICIT_REFERENCE = '$implicit';\n/** Non bindable attribute name **/\nconst NON_BINDABLE_ATTR = 'ngNonBindable';\n/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */\nconst RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';\n/**\n * Maximum length of a single instruction chain. Because our output AST uses recursion, we're\n * limited in how many expressions we can nest before we reach the call stack limit. This\n * length is set very conservatively in order to reduce the chance of problems.\n */\nconst MAX_CHAIN_LENGTH = 500;\n/** Instructions that support chaining. */\nconst CHAINABLE_INSTRUCTIONS = new Set([\n Identifiers.element,\n Identifiers.elementStart,\n Identifiers.elementEnd,\n Identifiers.elementContainer,\n Identifiers.elementContainerStart,\n Identifiers.elementContainerEnd,\n Identifiers.i18nExp,\n Identifiers.listener,\n Identifiers.classProp,\n Identifiers.syntheticHostListener,\n Identifiers.hostProperty,\n Identifiers.syntheticHostProperty,\n Identifiers.property,\n Identifiers.propertyInterpolate1,\n Identifiers.propertyInterpolate2,\n Identifiers.propertyInterpolate3,\n Identifiers.propertyInterpolate4,\n Identifiers.propertyInterpolate5,\n Identifiers.propertyInterpolate6,\n Identifiers.propertyInterpolate7,\n Identifiers.propertyInterpolate8,\n Identifiers.propertyInterpolateV,\n Identifiers.attribute,\n Identifiers.attributeInterpolate1,\n Identifiers.attributeInterpolate2,\n Identifiers.attributeInterpolate3,\n Identifiers.attributeInterpolate4,\n Identifiers.attributeInterpolate5,\n Identifiers.attributeInterpolate6,\n Identifiers.attributeInterpolate7,\n Identifiers.attributeInterpolate8,\n Identifiers.attributeInterpolateV,\n Identifiers.styleProp,\n Identifiers.stylePropInterpolate1,\n Identifiers.stylePropInterpolate2,\n Identifiers.stylePropInterpolate3,\n Identifiers.stylePropInterpolate4,\n Identifiers.stylePropInterpolate5,\n Identifiers.stylePropInterpolate6,\n Identifiers.stylePropInterpolate7,\n Identifiers.stylePropInterpolate8,\n Identifiers.stylePropInterpolateV,\n Identifiers.textInterpolate,\n Identifiers.textInterpolate1,\n Identifiers.textInterpolate2,\n Identifiers.textInterpolate3,\n Identifiers.textInterpolate4,\n Identifiers.textInterpolate5,\n Identifiers.textInterpolate6,\n Identifiers.textInterpolate7,\n Identifiers.textInterpolate8,\n Identifiers.textInterpolateV,\n]);\n/** Generates a call to a single instruction. */\nfunction invokeInstruction(span, reference, params) {\n return importExpr(reference, null, span).callFn(params, span);\n}\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nfunction temporaryAllocator(statements, name) {\n let temp = null;\n return () => {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n return temp;\n };\n}\nfunction invalid(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {\n const keys = Object.getOwnPropertyNames(map);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map(key => {\n const value = map[key];\n let declaredName;\n let publicName;\n let minifiedName;\n let expressionValue;\n if (typeof value === 'string') {\n // canonical syntax: `dirProp: publicProp`\n declaredName = key;\n minifiedName = key;\n publicName = value;\n expressionValue = asLiteral(publicName);\n }\n else {\n minifiedName = key;\n declaredName = value.classPropertyName;\n publicName = value.bindingPropertyName;\n if (keepDeclared && (publicName !== declaredName || value.transformFunction != null)) {\n const expressionKeys = [asLiteral(publicName), asLiteral(declaredName)];\n if (value.transformFunction != null) {\n expressionKeys.push(value.transformFunction);\n }\n expressionValue = literalArr(expressionKeys);\n }\n else {\n expressionValue = asLiteral(publicName);\n }\n }\n return {\n key: minifiedName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n value: expressionValue,\n };\n }));\n}\n/**\n * Remove trailing null nodes as they are implied.\n */\nfunction trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n return parameters;\n}\nfunction getQueryPredicate(query, constantPool) {\n if (Array.isArray(query.predicate)) {\n let predicate = [];\n query.predicate.forEach((selector) => {\n // Each item in predicates array may contain strings with comma-separated refs\n // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n // as separate array entities\n const selectors = selector.split(',').map(token => literal(token.trim()));\n predicate.push(...selectors);\n });\n return constantPool.getConstLiteral(literalArr(predicate), true);\n }\n else {\n // The original predicate may have been wrapped in a `forwardRef()` call.\n switch (query.predicate.forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 2 /* ForwardRefHandling.Unwrapped */:\n return query.predicate.expression;\n case 1 /* ForwardRefHandling.Wrapped */:\n return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);\n }\n }\n}\n/**\n * A representation for an object literal used during codegen of definition objects. The generic\n * type `T` allows to reference a documented type of the generated structure, such that the\n * property names that are set can be resolved to their documented declaration.\n */\nclass DefinitionMap {\n constructor() {\n this.values = [];\n }\n set(key, value) {\n if (value) {\n this.values.push({ key: key, value, quoted: false });\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\nfunction getAttrsForDirectiveMatching(elOrTpl) {\n const attributesMap = {};\n if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {\n elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = '');\n }\n else {\n elOrTpl.attributes.forEach(a => {\n if (!isI18nAttribute(a.name)) {\n attributesMap[a.name] = a.value;\n }\n });\n elOrTpl.inputs.forEach(i => {\n if (i.type === 0 /* BindingType.Property */) {\n attributesMap[i.name] = '';\n }\n });\n elOrTpl.outputs.forEach(o => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\n}\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\nfunction getInterpolationArgsLength(interpolation) {\n const { expressions, strings } = interpolation;\n if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n // `textInterpolate`.\n return 1;\n }\n else {\n return expressions.length + strings.length;\n }\n}\n/**\n * Generates the final instruction call statements based on the passed in configuration.\n * Will try to chain instructions as much as possible, if chaining is supported.\n */\nfunction getInstructionStatements(instructions) {\n const statements = [];\n let pendingExpression = null;\n let pendingExpressionType = null;\n let chainLength = 0;\n for (const current of instructions) {\n const resolvedParams = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn) ??\n [];\n const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];\n // If the current instruction is the same as the previous one\n // and it can be chained, add another call to the chain.\n if (chainLength < MAX_CHAIN_LENGTH && pendingExpressionType === current.reference &&\n CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {\n // We'll always have a pending expression when there's a pending expression type.\n pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);\n chainLength++;\n }\n else {\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n pendingExpression = invokeInstruction(current.span, current.reference, params);\n pendingExpressionType = current.reference;\n chainLength = 0;\n }\n }\n // Since the current instruction adds the previous one to the statements,\n // we may be left with the final one at the end that is still pending.\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n return statements;\n}\n\nfunction compileInjectable(meta, resolveForwardRefs) {\n let result = null;\n const factoryMeta = {\n name: meta.name,\n type: meta.type,\n typeArgumentCount: meta.typeArgumentCount,\n deps: [],\n target: FactoryTarget$1.Injectable,\n };\n if (meta.useClass !== undefined) {\n // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n // used to instantiate the class with dependencies injected, or deps are not specified and\n // the factory of the class is used to instantiate it.\n //\n // A special case exists for useClass: Type where Type is the injectable type itself and no\n // deps are specified, in which case 'useClass' is effectively ignored.\n const useClassOnSelf = meta.useClass.expression.isEquivalent(meta.type.value);\n let deps = undefined;\n if (meta.deps !== undefined) {\n deps = meta.deps;\n }\n if (deps !== undefined) {\n // factory: () => new meta.useClass(...deps)\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useClass.expression,\n delegateDeps: deps,\n delegateType: R3FactoryDelegateType.Class,\n });\n }\n else if (useClassOnSelf) {\n result = compileFactoryFunction(factoryMeta);\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs)\n };\n }\n }\n else if (meta.useFactory !== undefined) {\n if (meta.deps !== undefined) {\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useFactory,\n delegateDeps: meta.deps || [],\n delegateType: R3FactoryDelegateType.Function,\n });\n }\n else {\n result = {\n statements: [],\n expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])\n };\n }\n }\n else if (meta.useValue !== undefined) {\n // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n // client code because meta.useValue is an Expression which will be defined even if the actual\n // value is undefined.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: meta.useValue.expression,\n });\n }\n else if (meta.useExisting !== undefined) {\n // useExisting is an `inject` call on the existing token.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]),\n });\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.type.value, resolveForwardRefs)\n };\n }\n const token = meta.type.value;\n const injectableProps = new DefinitionMap();\n injectableProps.set('token', token);\n injectableProps.set('factory', result.expression);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn.expression.value !== null) {\n injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));\n }\n const expression = importExpr(Identifiers.ɵɵdefineInjectable)\n .callFn([injectableProps.toLiteralMap()], undefined, true);\n return {\n expression,\n type: createInjectableType(meta),\n statements: result.statements,\n };\n}\nfunction createInjectableType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));\n}\nfunction delegateToFactory(type, useType, unwrapForwardRefs) {\n if (type.node === useType.node) {\n // The types are the same, so we can simply delegate directly to the type's factory.\n // ```\n // factory: type.ɵfac\n // ```\n return useType.prop('ɵfac');\n }\n if (!unwrapForwardRefs) {\n // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that\n // accepts a sub-type as an argument.\n // ```\n // factory: function(t) { return useType.ɵfac(t); }\n // ```\n return createFactoryFunction(useType);\n }\n // The useType is actually wrapped in a `forwardRef()` so we need to resolve that before\n // calling its factory.\n // ```\n // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }\n // ```\n const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([useType]);\n return createFactoryFunction(unwrappedType);\n}\nfunction createFactoryFunction(type) {\n return fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(type.prop('ɵfac').callFn([variable('t')]))]);\n}\n\nconst UNUSABLE_INTERPOLATION_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//, // comment\n];\nfunction 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 const start = value[0];\n const end = value[1];\n // Check for unusable interpolation symbols\n UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {\n if (regexp.test(start) || regexp.test(end)) {\n throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);\n }\n });\n }\n}\n\nclass InterpolationConfig {\n static fromArray(markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n }\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nconst DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\n\nconst $EOF = 0;\nconst $BSPACE = 8;\nconst $TAB = 9;\nconst $LF = 10;\nconst $VTAB = 11;\nconst $FF = 12;\nconst $CR = 13;\nconst $SPACE = 32;\nconst $BANG = 33;\nconst $DQ = 34;\nconst $HASH = 35;\nconst $$ = 36;\nconst $PERCENT = 37;\nconst $AMPERSAND = 38;\nconst $SQ = 39;\nconst $LPAREN = 40;\nconst $RPAREN = 41;\nconst $STAR = 42;\nconst $PLUS = 43;\nconst $COMMA = 44;\nconst $MINUS = 45;\nconst $PERIOD = 46;\nconst $SLASH = 47;\nconst $COLON = 58;\nconst $SEMICOLON = 59;\nconst $LT = 60;\nconst $EQ = 61;\nconst $GT = 62;\nconst $QUESTION = 63;\nconst $0 = 48;\nconst $7 = 55;\nconst $9 = 57;\nconst $A = 65;\nconst $E = 69;\nconst $F = 70;\nconst $X = 88;\nconst $Z = 90;\nconst $LBRACKET = 91;\nconst $BACKSLASH = 92;\nconst $RBRACKET = 93;\nconst $CARET = 94;\nconst $_ = 95;\nconst $a = 97;\nconst $b = 98;\nconst $e = 101;\nconst $f = 102;\nconst $n = 110;\nconst $r = 114;\nconst $t = 116;\nconst $u = 117;\nconst $v = 118;\nconst $x = 120;\nconst $z = 122;\nconst $LBRACE = 123;\nconst $BAR = 124;\nconst $RBRACE = 125;\nconst $NBSP = 160;\nconst $PIPE = 124;\nconst $TILDA = 126;\nconst $AT = 64;\nconst $BT = 96;\nfunction isWhitespace(code) {\n return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\nfunction isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\nfunction isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\nfunction isNewLine(code) {\n return code === $LF || code === $CR;\n}\nfunction isOctalDigit(code) {\n return $0 <= code && code <= $7;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\n\nclass ParseLocation {\n constructor(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n toString() {\n return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;\n }\n moveBy(delta) {\n const source = this.file.content;\n const len = source.length;\n let offset = this.offset;\n let line = this.line;\n let col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n const ch = source.charCodeAt(offset);\n if (ch == $LF) {\n line--;\n const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n }\n else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n const ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == $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 getContext(maxChars, maxLines) {\n const content = this.file.content;\n let startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n let endOffset = startOffset;\n let ctxChars = 0;\n let 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}\nclass ParseSourceFile {\n constructor(content, url) {\n this.content = content;\n this.url = url;\n }\n}\nclass ParseSourceSpan {\n /**\n * Create an object that holds information about spans of tokens/nodes captured during\n * lexing/parsing of text.\n *\n * @param start\n * The location of the start of the span (having skipped leading trivia).\n * Skipping leading trivia makes source-spans more \"user friendly\", since things like HTML\n * elements will appear to begin at the start of the opening tag, rather than at the start of any\n * leading trivia, which could include newlines.\n *\n * @param end\n * The location of the end of the span.\n *\n * @param fullStart\n * The start of the token without skipping the leading trivia.\n * This is used by tooling that splits tokens further, such as extracting Angular interpolations\n * from text tokens. Such tooling creates new source-spans relative to the original token's\n * source-span. If leading trivia characters have been skipped then the new source-spans may be\n * incorrectly offset.\n *\n * @param details\n * Additional information (such as identifier names) that should be associated with the span.\n */\n constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }\n toString() {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n }\n}\nvar ParseErrorLevel;\n(function (ParseErrorLevel) {\n ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n})(ParseErrorLevel || (ParseErrorLevel = {}));\nclass ParseError {\n constructor(span, msg, level = ParseErrorLevel.ERROR) {\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n contextualMessage() {\n const ctx = this.span.start.getContext(100, 3);\n return ctx ? `${this.msg} (\"${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}\")` :\n this.msg;\n }\n toString() {\n const details = this.span.details ? `, ${this.span.details}` : '';\n return `${this.contextualMessage()}: ${this.span.start}${details}`;\n }\n}\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\nfunction r3JitTypeSourceSpan(kind, typeName, sourceUrl) {\n const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`;\n const sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\nlet _anonymousTypeIndex = 0;\nfunction identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n const ref = compileIdentifier.reference;\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n if (ref['__forward_ref__']) {\n // We do not want to try to stringify a `forwardRef()` function because that would cause the\n // inner function to be evaluated too early, defeating the whole point of the `forwardRef`.\n return '__forward_ref__';\n }\n let 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}\nfunction sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\n\n/**\n * In TypeScript, tagged template functions expect a \"template object\", which is an array of\n * \"cooked\" strings plus a `raw` property that contains an array of \"raw\" strings. This is\n * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not\n * be available in all environments.\n *\n * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise\n * creates an inline helper with the same functionality.\n *\n * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw`\n * array.\n */\nconst makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e})';\nclass AbstractJsEmitterVisitor extends AbstractEmitterVisitor {\n constructor() {\n super(false);\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n }\n visitDeclareVarStmt(stmt, ctx) {\n ctx.print(stmt, `var ${stmt.name}`);\n if (stmt.value) {\n ctx.print(stmt, ' = ');\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, `;`);\n return null;\n }\n visitTaggedTemplateExpr(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // tag`...`\n // ```\n // which is effectively like:\n // ```\n // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n const elements = ast.template.elements;\n ast.tag.visitExpression(this, ctx);\n ctx.print(ast, `(${makeTemplateObjectPolyfill}(`);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.text, false)).join(', ')}], `);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.rawText, false)).join(', ')}])`);\n ast.template.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n visitFunctionExpr(ast, ctx) {\n ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);\n this._visitParams(ast.params, ctx);\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 visitDeclareFunctionStmt(stmt, ctx) {\n ctx.print(stmt, `function ${stmt.name}(`);\n this._visitParams(stmt.params, ctx);\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 visitLocalizedString(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // $localize `...`\n // ```\n // which is effectively like:\n // ```\n // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n ctx.print(ast, `$localize(${makeTemplateObjectPolyfill}(`);\n const parts = [ast.serializeI18nHead()];\n for (let i = 1; i < ast.messageParts.length; i++) {\n parts.push(ast.serializeI18nTemplatePart(i));\n }\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.cooked, false)).join(', ')}], `);\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.raw, false)).join(', ')}])`);\n ast.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n _visitParams(params, ctx) {\n this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ',');\n }\n}\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy within the JIT\n * compiler. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy =\n _global.trustedTypes.createPolicy('angular#unsafe-jit', {\n createScript: (s) => s,\n });\n }\n catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from the JIT compiler, as use in other code can lead to XSS\n * vulnerabilities.\n */\nfunction newTrustedFunctionForJIT(...args) {\n if (!_global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = _global['eval'](trustedScriptFromString(body));\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(_global);\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * A helper class to manage the evaluation of JIT generated code.\n */\nclass JitEvaluator {\n /**\n *\n * @param sourceUrl The URL of the generated code.\n * @param statements An array of Angular statement AST nodes to be evaluated.\n * @param refResolver Resolves `o.ExternalReference`s into values.\n * @param createSourceMaps If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns A map of all the variables in the generated code.\n */\n evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {\n const converter = new JitEmitterVisitor(refResolver);\n const ctx = EmitterVisitorContext.createRoot();\n // Ensure generated code is in strict mode\n if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n statements = [\n literal('use strict').toStmt(),\n ...statements,\n ];\n }\n converter.visitAllStatements(statements, ctx);\n converter.createReturnStmt(ctx);\n return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n }\n /**\n * Evaluate a piece of JIT generated code.\n * @param sourceUrl The URL of this generated code.\n * @param ctx A context object that contains an AST of the code to be evaluated.\n * @param vars A map containing the names and values of variables that the evaluated code might\n * reference.\n * @param createSourceMap If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns The result of evaluating the code.\n */\n evaluateCode(sourceUrl, ctx, vars, createSourceMap) {\n let fnBody = `\"use strict\";${ctx.toSource()}\\n//# sourceURL=${sourceUrl}`;\n const fnArgNames = [];\n const fnArgValues = [];\n for (const argName in vars) {\n fnArgValues.push(vars[argName]);\n fnArgNames.push(argName);\n }\n if (createSourceMap) {\n // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n // E.g. ```\n // function anonymous(a,b,c\n // /**/) { ... }```\n // We don't want to hard code this fact, so we auto detect it via an empty function first.\n const emptyFn = newTrustedFunctionForJIT(...fnArgNames.concat('return null;')).toString();\n const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n fnBody += `\\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`;\n }\n const fn = newTrustedFunctionForJIT(...fnArgNames.concat(fnBody));\n return this.executeFunction(fn, fnArgValues);\n }\n /**\n * Execute a JIT generated function by calling it.\n *\n * This method can be overridden in tests to capture the functions that are generated\n * by this `JitEvaluator` class.\n *\n * @param fn A function to execute.\n * @param args The arguments to pass to the function being executed.\n * @returns The return value of the executed function.\n */\n executeFunction(fn, args) {\n return fn(...args);\n }\n}\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\nclass JitEmitterVisitor extends AbstractJsEmitterVisitor {\n constructor(refResolver) {\n super();\n this.refResolver = refResolver;\n this._evalArgNames = [];\n this._evalArgValues = [];\n this._evalExportedVars = [];\n }\n createReturnStmt(ctx) {\n const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false))));\n stmt.visitStatement(this, ctx);\n }\n getArgs() {\n const result = {};\n for (let i = 0; i < this._evalArgNames.length; i++) {\n result[this._evalArgNames[i]] = this._evalArgValues[i];\n }\n return result;\n }\n visitExternalExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, this.refResolver.resolveExternalReference(ast.value), ctx);\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, ast.node, ctx);\n return null;\n }\n visitDeclareVarStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareVarStmt(stmt, ctx);\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareFunctionStmt(stmt, ctx);\n }\n _emitReferenceToExternal(ast, value, ctx) {\n let id = this._evalArgValues.indexOf(value);\n if (id === -1) {\n id = this._evalArgValues.length;\n this._evalArgValues.push(value);\n const name = identifierName({ reference: value }) || 'val';\n this._evalArgNames.push(`jit_${name}_${id}`);\n }\n ctx.print(ast, this._evalArgNames[id]);\n }\n}\nfunction isUseStrictStatement(statement) {\n return statement.isEquivalent(literal('use strict').toStmt());\n}\n\nfunction compileInjector(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.providers !== null) {\n definitionMap.set('providers', meta.providers);\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createInjectorType(meta);\n return { expression, type, statements: [] };\n}\nfunction createInjectorType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));\n}\n\n/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nclass R3JitReflector {\n constructor(context) {\n this.context = context;\n }\n resolveExternalReference(ref) {\n // This reflector only handles @angular/core imports.\n if (ref.moduleName !== '@angular/core') {\n throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);\n }\n if (!this.context.hasOwnProperty(ref.name)) {\n throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`);\n }\n return this.context[ref.name];\n }\n}\n\n/**\n * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted\n * as a part of the NgModule definition.\n */\nvar R3SelectorScopeMode;\n(function (R3SelectorScopeMode) {\n /**\n * Emit the declarations inline into the module definition.\n *\n * This option is useful in certain contexts where it's known that JIT support is required. The\n * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if\n * they are unused, but the NgModule is used.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Inline\"] = 0] = \"Inline\";\n /**\n * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is\n * guarded with the `ngJitMode` flag.\n *\n * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to\n * false, which allows unused directives and pipes to be tree-shaken.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"SideEffect\"] = 1] = \"SideEffect\";\n /**\n * Don't generate selector scopes at all.\n *\n * This is useful for contexts where JIT support is known to be unnecessary.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Omit\"] = 2] = \"Omit\";\n})(R3SelectorScopeMode || (R3SelectorScopeMode = {}));\n/**\n * The type of the NgModule meta data.\n * - Global: Used for full and partial compilation modes which mainly includes R3References.\n * - Local: Used for the local compilation mode which mainly includes the raw expressions as appears\n * in the NgModule decorator.\n */\nvar R3NgModuleMetadataKind;\n(function (R3NgModuleMetadataKind) {\n R3NgModuleMetadataKind[R3NgModuleMetadataKind[\"Global\"] = 0] = \"Global\";\n R3NgModuleMetadataKind[R3NgModuleMetadataKind[\"Local\"] = 1] = \"Local\";\n})(R3NgModuleMetadataKind || (R3NgModuleMetadataKind = {}));\n/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nfunction compileNgModule(meta) {\n const statements = [];\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', meta.type.value);\n // Assign bootstrap definition\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n }\n }\n else {\n if (meta.bootstrapExpression) {\n definitionMap.set('bootstrap', meta.bootstrapExpression);\n }\n }\n if (meta.selectorScopeMode === R3SelectorScopeMode.Inline) {\n // If requested to emit scope information inline, pass the `declarations`, `imports` and\n // `exports` to the `ɵɵdefineNgModule()` call directly.\n if (meta.declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n if (meta.exports.length > 0) {\n definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n }\n else if (meta.selectorScopeMode === R3SelectorScopeMode.SideEffect) {\n // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it\n // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's\n // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the\n // `ngJitMode` flag.\n const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n if (setNgModuleScopeCall !== null) {\n statements.push(setNgModuleScopeCall);\n }\n }\n else {\n // Selector scope emit was not requested, so skip it.\n }\n if (meta.schemas !== null && meta.schemas.length > 0) {\n definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));\n }\n if (meta.id !== null) {\n definitionMap.set('id', meta.id);\n // Generate a side-effectful call to register this NgModule by its id, as per the semantics of\n // NgModule ids.\n statements.push(importExpr(Identifiers.registerNgModuleType).callFn([meta.type.value, meta.id]).toStmt());\n }\n const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createNgModuleType(meta);\n return { expression, type, statements };\n}\n/**\n * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to\n * `ɵɵngDeclareNgModule()`.\n */\nfunction compileNgModuleDeclarationExpression(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', new WrappedNodeExpr(meta.type));\n if (meta.bootstrap !== undefined) {\n definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap));\n }\n if (meta.declarations !== undefined) {\n definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations));\n }\n if (meta.imports !== undefined) {\n definitionMap.set('imports', new WrappedNodeExpr(meta.imports));\n }\n if (meta.exports !== undefined) {\n definitionMap.set('exports', new WrappedNodeExpr(meta.exports));\n }\n if (meta.schemas !== undefined) {\n definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas));\n }\n if (meta.id !== undefined) {\n definitionMap.set('id', new WrappedNodeExpr(meta.id));\n }\n return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);\n}\nfunction createNgModuleType(meta) {\n if (meta.kind === R3NgModuleMetadataKind.Local) {\n return new ExpressionType(meta.type.value);\n }\n const { type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes } = meta;\n return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [\n new ExpressionType(moduleType.type),\n publicDeclarationTypes === null ? tupleTypeOf(declarations) :\n tupleOfTypes(publicDeclarationTypes),\n includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,\n tupleTypeOf(exports),\n ]));\n}\n/**\n * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\nfunction generateSetNgModuleScopeCall(meta) {\n const scopeMap = new DefinitionMap();\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.declarations.length > 0) {\n scopeMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n }\n else {\n if (meta.declarationsExpression) {\n scopeMap.set('declarations', meta.declarationsExpression);\n }\n }\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.imports.length > 0) {\n scopeMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n }\n else {\n if (meta.importsExpression) {\n scopeMap.set('imports', meta.importsExpression);\n }\n }\n if (meta.kind === R3NgModuleMetadataKind.Global) {\n if (meta.exports.length > 0) {\n scopeMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n }\n else {\n if (meta.exportsExpression) {\n scopeMap.set('exports', meta.exportsExpression);\n }\n }\n if (Object.keys(scopeMap.values).length === 0) {\n return null;\n }\n // setNgModuleScope(...)\n const fnCall = new InvokeFunctionExpr(\n /* fn */ importExpr(Identifiers.setNgModuleScope), \n /* args */ [meta.type.value, scopeMap.toLiteralMap()]);\n // (ngJitMode guard) && setNgModuleScope(...)\n const guardedCall = jitOnlyGuardedExpression(fnCall);\n // function() { (ngJitMode guard) && setNgModuleScope(...); }\n const iife = new FunctionExpr(\n /* params */ [], \n /* statements */ [guardedCall.toStmt()]);\n // (function() { (ngJitMode guard) && setNgModuleScope(...); })()\n const iifeCall = new InvokeFunctionExpr(\n /* fn */ iife, \n /* args */ []);\n return iifeCall.toStmt();\n}\nfunction tupleTypeOf(exp) {\n const types = exp.map(ref => typeofExpr(ref.type));\n return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;\n}\nfunction tupleOfTypes(types) {\n const typeofTypes = types.map(type => typeofExpr(type));\n return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;\n}\n\nfunction compilePipeFromMetadata(metadata) {\n const definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({ key: 'name', value: literal(metadata.pipeName), quoted: false });\n // e.g. `type: MyPipe`\n definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });\n // e.g. `pure: true`\n definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });\n if (metadata.isStandalone) {\n definitionMapValues.push({ key: 'standalone', value: literal(true), quoted: false });\n }\n const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);\n const type = createPipeType(metadata);\n return { expression, type, statements: [] };\n}\nfunction createPipeType(metadata) {\n return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [\n typeWithParameters(metadata.type.type, metadata.typeArgumentCount),\n new ExpressionType(new LiteralExpr(metadata.pipeName)),\n new ExpressionType(new LiteralExpr(metadata.isStandalone)),\n ]));\n}\n\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\n\nclass ParserError {\n constructor(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}\nclass ParseSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n toAbsolute(absoluteOffset) {\n return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);\n }\n}\nclass AST {\n constructor(span, \n /**\n * Absolute location of the expression AST in a source code file.\n */\n sourceSpan) {\n this.span = span;\n this.sourceSpan = sourceSpan;\n }\n toString() {\n return 'AST';\n }\n}\nclass ASTWithName extends AST {\n constructor(span, sourceSpan, nameSpan) {\n super(span, sourceSpan);\n this.nameSpan = nameSpan;\n }\n}\nclass EmptyExpr$1 extends AST {\n visit(visitor, context = null) {\n // do nothing\n }\n}\nclass ImplicitReceiver extends AST {\n visit(visitor, context = null) {\n return visitor.visitImplicitReceiver(this, context);\n }\n}\n/**\n * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class\n * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the\n * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]=\"this.title\"`\n * is the same as `[attr.title]=\"title\"`.). Inheriting allows for the `this` accesses to be treated\n * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.\n * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.\n */\nclass ThisReceiver extends ImplicitReceiver {\n visit(visitor, context = null) {\n return visitor.visitThisReceiver?.(this, context);\n }\n}\n/**\n * Multiple expressions separated by a semicolon.\n */\nclass Chain extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitChain(this, context);\n }\n}\nclass Conditional extends AST {\n constructor(span, sourceSpan, condition, trueExp, falseExp) {\n super(span, sourceSpan);\n this.condition = condition;\n this.trueExp = trueExp;\n this.falseExp = falseExp;\n }\n visit(visitor, context = null) {\n return visitor.visitConditional(this, context);\n }\n}\nclass PropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyRead(this, context);\n }\n}\nclass PropertyWrite extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name, value) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyWrite(this, context);\n }\n}\nclass SafePropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitSafePropertyRead(this, context);\n }\n}\nclass KeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedRead(this, context);\n }\n}\nclass SafeKeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeKeyedRead(this, context);\n }\n}\nclass KeyedWrite extends AST {\n constructor(span, sourceSpan, receiver, key, value) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedWrite(this, context);\n }\n}\nclass BindingPipe extends ASTWithName {\n constructor(span, sourceSpan, exp, name, args, nameSpan) {\n super(span, sourceSpan, nameSpan);\n this.exp = exp;\n this.name = name;\n this.args = args;\n }\n visit(visitor, context = null) {\n return visitor.visitPipe(this, context);\n }\n}\nclass LiteralPrimitive extends AST {\n constructor(span, sourceSpan, value) {\n super(span, sourceSpan);\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralPrimitive(this, context);\n }\n}\nclass LiteralArray extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralArray(this, context);\n }\n}\nclass LiteralMap extends AST {\n constructor(span, sourceSpan, keys, values) {\n super(span, sourceSpan);\n this.keys = keys;\n this.values = values;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralMap(this, context);\n }\n}\nclass Interpolation$1 extends AST {\n constructor(span, sourceSpan, strings, expressions) {\n super(span, sourceSpan);\n this.strings = strings;\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitInterpolation(this, context);\n }\n}\nclass Binary extends AST {\n constructor(span, sourceSpan, operation, left, right) {\n super(span, sourceSpan);\n this.operation = operation;\n this.left = left;\n this.right = right;\n }\n visit(visitor, context = null) {\n return visitor.visitBinary(this, context);\n }\n}\n/**\n * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST\n * node that was originally used. This inheritance relation can be deleted in some future major,\n * after consumers have been given a chance to fully support Unary.\n */\nclass Unary extends Binary {\n /**\n * Creates a unary minus expression \"-x\", represented as `Binary` using \"0 - x\".\n */\n static createMinus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);\n }\n /**\n * Creates a unary plus expression \"+x\", represented as `Binary` using \"x - 0\".\n */\n static createPlus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));\n }\n /**\n * During the deprecation period this constructor is private, to avoid consumers from creating\n * a `Unary` with the fallback properties for `Binary`.\n */\n constructor(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {\n super(span, sourceSpan, binaryOp, binaryLeft, binaryRight);\n this.operator = operator;\n this.expr = expr;\n // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not\n // depend on these fields when operating on `Unary`.\n this.left = null;\n this.right = null;\n this.operation = null;\n }\n visit(visitor, context = null) {\n if (visitor.visitUnary !== undefined) {\n return visitor.visitUnary(this, context);\n }\n return visitor.visitBinary(this, context);\n }\n}\nclass PrefixNot extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitPrefixNot(this, context);\n }\n}\nclass NonNullAssert extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitNonNullAssert(this, context);\n }\n}\nclass Call extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitCall(this, context);\n }\n}\nclass SafeCall extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeCall(this, context);\n }\n}\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\nclass AbsoluteSourceSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nclass ASTWithSource extends AST {\n constructor(ast, source, location, absoluteOffset, errors) {\n super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));\n this.ast = ast;\n this.source = source;\n this.location = location;\n this.errors = errors;\n }\n visit(visitor, context = null) {\n if (visitor.visitASTWithSource) {\n return visitor.visitASTWithSource(this, context);\n }\n return this.ast.visit(visitor, context);\n }\n toString() {\n return `${this.source} in ${this.location}`;\n }\n}\nclass VariableBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key name of the LHS along with its span.\n * @param value optional value for the RHS along with its span.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass ExpressionBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its\n * span. Note that the length of the span may not be the same as\n * `key.source.length`. For example,\n * 1. key.source = ngFor, key.span is for \"ngFor\"\n * 2. key.source = ngForOf, key.span is for \"of\"\n * 3. key.source = ngForTrackBy, key.span is for \"trackBy\"\n * @param value optional expression for the RHS.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass RecursiveAstVisitor {\n visit(ast, context) {\n // The default implementation just visits every node.\n // Classes that extend RecursiveAstVisitor should override this function\n // to selectively visit the specified node.\n ast.visit(this, context);\n }\n visitUnary(ast, context) {\n this.visit(ast.expr, context);\n }\n visitBinary(ast, context) {\n this.visit(ast.left, context);\n this.visit(ast.right, context);\n }\n visitChain(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitConditional(ast, context) {\n this.visit(ast.condition, context);\n this.visit(ast.trueExp, context);\n this.visit(ast.falseExp, context);\n }\n visitPipe(ast, context) {\n this.visit(ast.exp, context);\n this.visitAll(ast.args, context);\n }\n visitImplicitReceiver(ast, context) { }\n visitThisReceiver(ast, context) { }\n visitInterpolation(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitKeyedWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n this.visit(ast.value, context);\n }\n visitLiteralArray(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitLiteralMap(ast, context) {\n this.visitAll(ast.values, context);\n }\n visitLiteralPrimitive(ast, context) { }\n visitPrefixNot(ast, context) {\n this.visit(ast.expression, context);\n }\n visitNonNullAssert(ast, context) {\n this.visit(ast.expression, context);\n }\n visitPropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitPropertyWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.value, context);\n }\n visitSafePropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitSafeKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n visitSafeCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n // This is not part of the AstVisitor interface, just a helper method\n visitAll(asts, context) {\n for (const ast of asts) {\n this.visit(ast, context);\n }\n }\n}\nclass AstTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));\n }\n visitLiteralPrimitive(ast, context) {\n return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);\n }\n visitPropertyRead(ast, context) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitPropertyWrite(ast, context) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n }\n visitSafePropertyRead(ast, context) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitLiteralArray(ast, context) {\n return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitLiteralMap(ast, context) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));\n }\n visitUnary(ast, context) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n visitBinary(ast, context) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));\n }\n visitPrefixNot(ast, context) {\n return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitNonNullAssert(ast, context) {\n return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitConditional(ast, context) {\n return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n }\n visitPipe(ast, context) {\n return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);\n }\n visitKeyedRead(ast, context) {\n return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n visitKeyedWrite(ast, context) {\n return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this));\n }\n visitCall(ast, context) {\n return new Call(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitSafeCall(ast, context) {\n return new SafeCall(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitAll(asts) {\n const res = [];\n for (let i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n }\n visitChain(ast, context) {\n return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitSafeKeyedRead(ast, context) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n}\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nclass AstMemoryEfficientTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions)\n return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, expressions);\n return ast;\n }\n visitLiteralPrimitive(ast, context) {\n return ast;\n }\n visitPropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitPropertyWrite(ast, context) {\n const receiver = ast.receiver.visit(this);\n const value = ast.value.visit(this);\n if (receiver !== ast.receiver || value !== ast.value) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);\n }\n return ast;\n }\n visitSafePropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitLiteralArray(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new LiteralArray(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitLiteralMap(ast, context) {\n const values = this.visitAll(ast.values);\n if (values !== ast.values) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);\n }\n return ast;\n }\n visitUnary(ast, context) {\n const expr = ast.expr.visit(this);\n if (expr !== ast.expr) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, expr);\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, expr);\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n return ast;\n }\n visitBinary(ast, context) {\n const left = ast.left.visit(this);\n const right = ast.right.visit(this);\n if (left !== ast.left || right !== ast.right) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);\n }\n return ast;\n }\n visitPrefixNot(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new PrefixNot(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitNonNullAssert(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new NonNullAssert(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitConditional(ast, context) {\n const condition = ast.condition.visit(this);\n const trueExp = ast.trueExp.visit(this);\n const falseExp = ast.falseExp.visit(this);\n if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);\n }\n return ast;\n }\n visitPipe(ast, context) {\n const exp = ast.exp.visit(this);\n const args = this.visitAll(ast.args);\n if (exp !== ast.exp || args !== ast.args) {\n return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);\n }\n return ast;\n }\n visitKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new KeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n visitKeyedWrite(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n const value = ast.value.visit(this);\n if (obj !== ast.receiver || key !== ast.key || value !== ast.value) {\n return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);\n }\n return ast;\n }\n visitAll(asts) {\n const res = [];\n let modified = false;\n for (let i = 0; i < asts.length; ++i) {\n const original = asts[i];\n const value = original.visit(this);\n res[i] = value;\n modified = modified || value !== original;\n }\n return modified ? res : asts;\n }\n visitChain(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new Chain(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new Call(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new SafeCall(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n}\n// Bindings\nclass ParsedProperty {\n constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n }\n}\nvar ParsedPropertyType;\n(function (ParsedPropertyType) {\n ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nclass ParsedEvent {\n // Regular events have a target\n // Animation events have a phase\n constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.targetOrPhase = targetOrPhase;\n this.type = type;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n}\n/**\n * ParsedVariable represents a variable declaration in a microsyntax expression.\n */\nclass ParsedVariable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\nclass BoundElementProperty {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {\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.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\n\nclass EventHandlerVars {\n static { this.event = variable('$event'); }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver(globals);\n }\n const actionWithoutBuiltins = convertPropertyBindingBuiltins({\n createLiteralArrayConverter: (argCount) => {\n // Note: no caching for literal arrays in actions.\n return (args) => literalArr(args);\n },\n createLiteralMapConverter: (keys) => {\n // Note: no caching for literal maps in actions.\n return (values) => {\n const entries = keys.map((k, i) => ({\n key: k.key,\n value: values[i],\n quoted: k.quoted,\n }));\n return literalMap(entries);\n };\n },\n createPipeConverter: (name) => {\n throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);\n }\n }, action);\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);\n const actionStmts = [];\n flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const lastIndex = actionStmts.length - 1;\n if (lastIndex >= 0) {\n const lastStatement = actionStmts[lastIndex];\n // Ensure that the value of the last expression statement is returned\n if (lastStatement instanceof ExpressionStatement) {\n actionStmts[lastIndex] = new ReturnStatement(lastStatement.expr);\n }\n }\n return actionStmts;\n}\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n return convertBuiltins(converterFactory, ast);\n}\nclass ConvertPropertyBindingResult {\n constructor(stmts, currValExpr) {\n this.stmts = stmts;\n this.currValExpr = currValExpr;\n }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nfunction convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);\n const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n return new ConvertPropertyBindingResult(stmts, outputExpr);\n}\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\nfunction convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {\n const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);\n const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n const args = outputExpr.args;\n return { stmts, args };\n}\nfunction getStatementsFromVisitor(visitor, bindingId) {\n const stmts = [];\n for (let i = 0; i < visitor.temporaryCount; i++) {\n stmts.push(temporaryDeclaration(bindingId, i));\n }\n return stmts;\n}\nfunction convertBuiltins(converterFactory, ast) {\n const visitor = new _BuiltinAstConverter(converterFactory);\n return ast.visit(visitor);\n}\nfunction temporaryName(bindingId, temporaryNumber) {\n return `tmp_${bindingId}_${temporaryNumber}`;\n}\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber));\n}\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n for (let i = temporaryCount - 1; i >= 0; i--) {\n statements.unshift(temporaryDeclaration(bindingId, i));\n }\n}\nvar _Mode;\n(function (_Mode) {\n _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n})(_Mode || (_Mode = {}));\nfunction ensureStatementMode(mode, ast) {\n if (mode !== _Mode.Statement) {\n throw new Error(`Expected a statement, but saw ${ast}`);\n }\n}\nfunction ensureExpressionMode(mode, ast) {\n if (mode !== _Mode.Expression) {\n throw new Error(`Expected an expression, but saw ${ast}`);\n }\n}\nfunction convertToStatementIfNeeded(mode, expr) {\n if (mode === _Mode.Statement) {\n return expr.toStmt();\n }\n else {\n return expr;\n }\n}\nclass _BuiltinAstConverter extends AstTransformer {\n constructor(_converterFactory) {\n super();\n this._converterFactory = _converterFactory;\n }\n visitPipe(ast, context) {\n const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n }\n visitLiteralArray(ast, context) {\n const args = ast.expressions.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n }\n visitLiteralMap(ast, context) {\n const args = ast.values.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n }\n}\nclass _AstToIrVisitor {\n constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {\n this._localResolver = _localResolver;\n this._implicitReceiver = _implicitReceiver;\n this.bindingId = bindingId;\n this.supportsInterpolation = supportsInterpolation;\n this.baseSourceSpan = baseSourceSpan;\n this.implicitReceiverAccesses = implicitReceiverAccesses;\n this._nodeMap = new Map();\n this._resultMap = new Map();\n this._currentTemporary = 0;\n this.temporaryCount = 0;\n this.usesImplicitReceiver = false;\n }\n visitUnary(ast, mode) {\n let op;\n switch (ast.operator) {\n case '+':\n op = UnaryOperator.Plus;\n break;\n case '-':\n op = UnaryOperator.Minus;\n break;\n default:\n throw new Error(`Unsupported operator ${ast.operator}`);\n }\n return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitBinary(ast, mode) {\n let op;\n switch (ast.operation) {\n case '+':\n op = BinaryOperator.Plus;\n break;\n case '-':\n op = BinaryOperator.Minus;\n break;\n case '*':\n op = BinaryOperator.Multiply;\n break;\n case '/':\n op = BinaryOperator.Divide;\n break;\n case '%':\n op = BinaryOperator.Modulo;\n break;\n case '&&':\n op = BinaryOperator.And;\n break;\n case '||':\n op = BinaryOperator.Or;\n break;\n case '==':\n op = BinaryOperator.Equals;\n break;\n case '!=':\n op = BinaryOperator.NotEquals;\n break;\n case '===':\n op = BinaryOperator.Identical;\n break;\n case '!==':\n op = BinaryOperator.NotIdentical;\n break;\n case '<':\n op = BinaryOperator.Lower;\n break;\n case '>':\n op = BinaryOperator.Bigger;\n break;\n case '<=':\n op = BinaryOperator.LowerEquals;\n break;\n case '>=':\n op = BinaryOperator.BiggerEquals;\n break;\n case '??':\n return this.convertNullishCoalesce(ast, mode);\n default:\n throw new Error(`Unsupported operation ${ast.operation}`);\n }\n return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitChain(ast, mode) {\n ensureStatementMode(mode, ast);\n return this.visitAll(ast.expressions, mode);\n }\n visitConditional(ast, mode) {\n const value = this._visit(ast.condition, _Mode.Expression);\n return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n }\n visitPipe(ast, mode) {\n throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${ast.name}`);\n }\n visitImplicitReceiver(ast, mode) {\n ensureExpressionMode(mode, ast);\n this.usesImplicitReceiver = true;\n return this._implicitReceiver;\n }\n visitThisReceiver(ast, mode) {\n return this.visitImplicitReceiver(ast, mode);\n }\n visitInterpolation(ast, mode) {\n if (!this.supportsInterpolation) {\n throw new Error('Unexpected interpolation');\n }\n ensureExpressionMode(mode, ast);\n let args = [];\n for (let i = 0; i < ast.strings.length - 1; i++) {\n args.push(literal(ast.strings[i]));\n args.push(this._visit(ast.expressions[i], _Mode.Expression));\n }\n args.push(literal(ast.strings[ast.strings.length - 1]));\n // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n // args returned to just the value, because we're going to pass it to a special instruction.\n const strings = ast.strings;\n if (strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // Single argument interpolate instructions.\n args = [args[1]];\n }\n else if (ast.expressions.length >= 9) {\n // 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n // an array of arguments\n args = [literalArr(args)];\n }\n return new InterpolationExpression(args);\n }\n visitKeyedRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n return convertToStatementIfNeeded(mode, this._visit(ast.receiver, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n }\n }\n visitKeyedWrite(ast, mode) {\n const obj = this._visit(ast.receiver, _Mode.Expression);\n const key = this._visit(ast.key, _Mode.Expression);\n const value = this._visit(ast.value, _Mode.Expression);\n if (obj === this._implicitReceiver) {\n this._localResolver.maybeRestoreView();\n }\n return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n }\n visitLiteralArray(ast, mode) {\n throw new Error(`Illegal State: literal arrays should have been converted into functions`);\n }\n visitLiteralMap(ast, mode) {\n throw new Error(`Illegal State: literal maps should have been converted into functions`);\n }\n visitLiteralPrimitive(ast, mode) {\n // For literal values of null, undefined, true, or false allow type interference\n // to infer the type.\n const type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?\n INFERRED_TYPE :\n undefined;\n return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));\n }\n _getLocal(name, receiver) {\n if (this._localResolver.globals?.has(name) && receiver instanceof ThisReceiver) {\n return null;\n }\n return this._localResolver.getLocal(name);\n }\n visitPrefixNot(ast, mode) {\n return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n }\n visitNonNullAssert(ast, mode) {\n return convertToStatementIfNeeded(mode, this._visit(ast.expression, _Mode.Expression));\n }\n visitPropertyRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n let result = null;\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n result = this._getLocal(ast.name, ast.receiver);\n if (result) {\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n }\n if (result == null) {\n result = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, result);\n }\n }\n visitPropertyWrite(ast, mode) {\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n let varExpr = null;\n if (receiver === this._implicitReceiver) {\n const localExpr = this._getLocal(ast.name, ast.receiver);\n if (localExpr) {\n if (localExpr instanceof ReadPropExpr) {\n // If the local variable is a property read expression, it's a reference\n // to a 'context.property' value and will be used as the target of the\n // write expression.\n varExpr = localExpr;\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n else {\n // Otherwise it's an error.\n const receiver = ast.name;\n const value = (ast.value instanceof PropertyRead) ? ast.value.name : undefined;\n throw new Error(`Cannot assign value \"${value}\" to template variable \"${receiver}\". Template variables are read-only.`);\n }\n }\n }\n // If no local expression could be produced, use the original receiver's\n // property as the target.\n if (varExpr === null) {\n varExpr = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n }\n visitSafePropertyRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitSafeKeyedRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitAll(asts, mode) {\n return asts.map(ast => this._visit(ast, mode));\n }\n visitCall(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n const convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n if (ast instanceof BuiltinFunctionCall) {\n return convertToStatementIfNeeded(mode, ast.converter(convertedArgs));\n }\n const receiver = ast.receiver;\n if (receiver instanceof PropertyRead &&\n receiver.receiver instanceof ImplicitReceiver &&\n !(receiver.receiver instanceof ThisReceiver) && receiver.name === '$any') {\n if (convertedArgs.length !== 1) {\n throw new Error(`Invalid call to $any, expected 1 argument but received ${convertedArgs.length || 'none'}`);\n }\n return convertToStatementIfNeeded(mode, convertedArgs[0]);\n }\n const call = this._visit(receiver, _Mode.Expression)\n .callFn(convertedArgs, this.convertSourceSpan(ast.span));\n return convertToStatementIfNeeded(mode, call);\n }\n visitSafeCall(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n _visit(ast, mode) {\n const result = this._resultMap.get(ast);\n if (result)\n return result;\n return (this._nodeMap.get(ast) || ast).visit(this, mode);\n }\n convertSafeAccess(ast, leftMostSafe, mode) {\n // If the expression contains a safe access node on the left it needs to be converted to\n // an expression that guards the access to the member by checking the receiver for blank. As\n // execution proceeds from left to right, the left most part of the expression must be guarded\n // first but, because member access is left associative, the right side of the expression is at\n // the top of the AST. The desired result requires lifting a copy of the left part of the\n // expression up to test it for blank before generating the unguarded version.\n // Consider, for example the following expression: a?.b.c?.d.e\n // This results in the ast:\n // .\n // / \\\n // ?. e\n // / \\\n // . d\n // / \\\n // ?. c\n // / \\\n // a b\n // The following tree should be generated:\n //\n // /---- ? ----\\\n // / | \\\n // a /--- ? ---\\ null\n // / | \\\n // . . null\n // / \\ / \\\n // . c . e\n // / \\ / \\\n // a b . d\n // / \\\n // . c\n // / \\\n // a b\n //\n // Notice that the first guard condition is the left hand of the left most safe access node\n // which comes in as leftMostSafe to this routine.\n let guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n let temporary = undefined;\n if (this.needsTemporaryInSafeAccess(leftMostSafe.receiver)) {\n // If the expression has method calls or pipes then we need to save the result into a\n // temporary variable to avoid calling stateful or impure code more than once.\n temporary = this.allocateTemporary();\n // Preserve the result in the temporary variable\n guardedExpression = temporary.set(guardedExpression);\n // Ensure all further references to the guarded expression refer to the temporary instead.\n this._resultMap.set(leftMostSafe.receiver, temporary);\n }\n const condition = guardedExpression.isBlank();\n // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n // leftMostNode with its unguarded version in the call to `this.visit()`.\n if (leftMostSafe instanceof SafeCall) {\n this._nodeMap.set(leftMostSafe, new Call(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.args, leftMostSafe.argumentSpan));\n }\n else if (leftMostSafe instanceof SafeKeyedRead) {\n this._nodeMap.set(leftMostSafe, new KeyedRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.key));\n }\n else {\n this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));\n }\n // Recursively convert the node now without the guarded member access.\n const access = this._visit(ast, _Mode.Expression);\n // Remove the mapping. This is not strictly required as the converter only traverses each node\n // once but is safer if the conversion is changed to traverse the nodes more than once.\n this._nodeMap.delete(leftMostSafe);\n // If we allocated a temporary, release it.\n if (temporary) {\n this.releaseTemporary(temporary);\n }\n // Produce the conditional\n return convertToStatementIfNeeded(mode, condition.conditional(NULL_EXPR, access));\n }\n convertNullishCoalesce(ast, mode) {\n const left = this._visit(ast.left, _Mode.Expression);\n const right = this._visit(ast.right, _Mode.Expression);\n const temporary = this.allocateTemporary();\n this.releaseTemporary(temporary);\n // Generate the following expression. It is identical to how TS\n // transpiles binary expressions with a nullish coalescing operator.\n // let temp;\n // (temp = a) !== null && temp !== undefined ? temp : b;\n return convertToStatementIfNeeded(mode, temporary.set(left)\n .notIdentical(NULL_EXPR)\n .and(temporary.notIdentical(literal(undefined)))\n .conditional(temporary, right));\n }\n // Given an expression of the form a?.b.c?.d.e then the left most safe node is\n // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n // safe method call as this needs to be transformed initially to:\n // a == null ? null : a.c.b.c?.d.e\n // then to:\n // a == null ? null : a.b.c == null ? null : a.b.c.d.e\n leftMostSafeNode(ast) {\n const visit = (visitor, ast) => {\n return (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n return ast.visit({\n visitUnary(ast) {\n return null;\n },\n visitBinary(ast) {\n return null;\n },\n visitChain(ast) {\n return null;\n },\n visitConditional(ast) {\n return null;\n },\n visitCall(ast) {\n return visit(this, ast.receiver);\n },\n visitSafeCall(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitImplicitReceiver(ast) {\n return null;\n },\n visitThisReceiver(ast) {\n return null;\n },\n visitInterpolation(ast) {\n return null;\n },\n visitKeyedRead(ast) {\n return visit(this, ast.receiver);\n },\n visitKeyedWrite(ast) {\n return null;\n },\n visitLiteralArray(ast) {\n return null;\n },\n visitLiteralMap(ast) {\n return null;\n },\n visitLiteralPrimitive(ast) {\n return null;\n },\n visitPipe(ast) {\n return null;\n },\n visitPrefixNot(ast) {\n return null;\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return visit(this, ast.receiver);\n },\n visitPropertyWrite(ast) {\n return null;\n },\n visitSafePropertyRead(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitSafeKeyedRead(ast) {\n return visit(this, ast.receiver) || ast;\n }\n });\n }\n // Returns true of the AST includes a method or a pipe indicating that, if the\n // expression is used as the target of a safe property or method access then\n // the expression should be stored into a temporary variable.\n needsTemporaryInSafeAccess(ast) {\n const visit = (visitor, ast) => {\n return ast && (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n const visitSome = (visitor, ast) => {\n return ast.some(ast => visit(visitor, ast));\n };\n return ast.visit({\n visitUnary(ast) {\n return visit(this, ast.expr);\n },\n visitBinary(ast) {\n return visit(this, ast.left) || visit(this, ast.right);\n },\n visitChain(ast) {\n return false;\n },\n visitConditional(ast) {\n return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);\n },\n visitCall(ast) {\n return true;\n },\n visitSafeCall(ast) {\n return true;\n },\n visitImplicitReceiver(ast) {\n return false;\n },\n visitThisReceiver(ast) {\n return false;\n },\n visitInterpolation(ast) {\n return visitSome(this, ast.expressions);\n },\n visitKeyedRead(ast) {\n return false;\n },\n visitKeyedWrite(ast) {\n return false;\n },\n visitLiteralArray(ast) {\n return true;\n },\n visitLiteralMap(ast) {\n return true;\n },\n visitLiteralPrimitive(ast) {\n return false;\n },\n visitPipe(ast) {\n return true;\n },\n visitPrefixNot(ast) {\n return visit(this, ast.expression);\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return false;\n },\n visitPropertyWrite(ast) {\n return false;\n },\n visitSafePropertyRead(ast) {\n return false;\n },\n visitSafeKeyedRead(ast) {\n return false;\n }\n });\n }\n allocateTemporary() {\n const tempNumber = this._currentTemporary++;\n this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n }\n releaseTemporary(temporary) {\n this._currentTemporary--;\n if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n throw new Error(`Temporary ${temporary.name} released out of order`);\n }\n }\n /**\n * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n *\n * `ParseSpan` objects are relative to the start of the expression.\n * This method converts these to full `ParseSourceSpan` objects that\n * show where the span is within the overall source file.\n *\n * @param span the relative span to convert.\n * @returns a `ParseSourceSpan` for the given span or null if no\n * `baseSourceSpan` was provided to this class.\n */\n convertSourceSpan(span) {\n if (this.baseSourceSpan) {\n const start = this.baseSourceSpan.start.moveBy(span.start);\n const end = this.baseSourceSpan.start.moveBy(span.end);\n const fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n }\n else {\n return null;\n }\n }\n /** Adds the name of an AST to the list of implicit receiver accesses. */\n addImplicitReceiverAccess(name) {\n if (this.implicitReceiverAccesses) {\n this.implicitReceiverAccesses.add(name);\n }\n }\n}\nfunction flattenStatements(arg, output) {\n if (Array.isArray(arg)) {\n arg.forEach((entry) => flattenStatements(entry, output));\n }\n else {\n output.push(arg);\n }\n}\nfunction unsupported() {\n throw new Error('Unsupported operation');\n}\nclass InterpolationExpression extends Expression {\n constructor(args) {\n super(null, null);\n this.args = args;\n this.isConstant = unsupported;\n this.isEquivalent = unsupported;\n this.visitExpression = unsupported;\n this.clone = unsupported;\n }\n}\nclass DefaultLocalResolver {\n constructor(globals) {\n this.globals = globals;\n }\n notifyImplicitReceiverUse() { }\n maybeRestoreView() { }\n getLocal(name) {\n if (name === EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n return null;\n }\n}\nclass BuiltinFunctionCall extends Call {\n constructor(span, sourceSpan, args, converter) {\n super(span, sourceSpan, new EmptyExpr$1(span, sourceSpan), args, null);\n this.converter = converter;\n }\n}\n\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */\nlet _SECURITY_SCHEMA;\nfunction SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n ]);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(SecurityContext.URL, [\n '*|formAction',\n 'area|href',\n 'area|ping',\n 'audio|src',\n 'a|href',\n 'a|ping',\n 'blockquote|cite',\n 'body|background',\n 'del|cite',\n 'form|action',\n 'img|src',\n 'input|src',\n 'ins|cite',\n 'q|cite',\n 'source|src',\n 'track|src',\n 'video|poster',\n 'video|src',\n ]);\n registerContext(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 }\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n for (const spec of specs)\n _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n}\n/**\n * The set of security-sensitive attributes of an `<iframe>` that *must* be\n * applied as a static attribute only. This ensures that all security-sensitive\n * attributes are taken into account while creating an instance of an `<iframe>`\n * at runtime.\n *\n * Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function\n * in the code instead.\n */\nconst IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);\n/**\n * Checks whether a given attribute name might represent a security-sensitive\n * attribute of an <iframe>.\n */\nfunction isIframeSecuritySensitiveAttr(attrName) {\n // The `setAttribute` DOM API is case-insensitive, so we lowercase the value\n // before checking it against a known security-sensitive attributes.\n return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());\n}\n\n/**\n * The following set contains all keywords that can be used in the animation css shorthand\n * property and is used during the scoping of keyframes to make sure such keywords\n * are not modified.\n */\nconst animationKeywords = new Set([\n // global values\n 'inherit', 'initial', 'revert', 'unset',\n // animation-direction\n 'alternate', 'alternate-reverse', 'normal', 'reverse',\n // animation-fill-mode\n 'backwards', 'both', 'forwards', 'none',\n // animation-play-state\n 'paused', 'running',\n // animation-timing-function\n 'ease', 'ease-in', 'ease-in-out', 'ease-out', 'linear', 'step-start', 'step-end',\n // `steps()` function\n 'end', 'jump-both', 'jump-end', 'jump-none', 'jump-start', 'start'\n]);\n/**\n * The following class has its origin from a port of shadowCSS from webcomponents.js to TypeScript.\n * It has since diverge in many ways to tailor Angular's needs.\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.\n The 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 <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n\n could become:\n\n <style>\n / *@polyfill .content-container div * /\n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\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*/\nclass ShadowCss {\n constructor() {\n /**\n * Regular expression used to extrapolate the possible keyframes from an\n * animation declaration (with possibly multiple animation definitions)\n *\n * The regular expression can be divided in three parts\n * - (^|\\s+)\n * simply captures how many (if any) leading whitespaces are present\n * - (?:(?:(['\"])((?:\\\\\\\\|\\\\\\2|(?!\\2).)+)\\2)|(-?[A-Za-z][\\w\\-]*))\n * captures two different possible keyframes, ones which are quoted or ones which are valid css\n * idents (custom properties excluded)\n * - (?=[,\\s;]|$)\n * simply matches the end of the possible keyframe, valid endings are: a comma, a space, a\n * semicolon or the end of the string\n */\n this._animationDeclarationKeyframesRe = /(^|\\s+)(?:(?:(['\"])((?:\\\\\\\\|\\\\\\2|(?!\\2).)+)\\2)|(-?[A-Za-z][\\w\\-]*))(?=[,\\s]|$)/g;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can be included in the document\n *\n * The selector is the attribute added to all elements inside the host,\n * The hostSelector is the attribute added to the host itself.\n */\n shimCssText(cssText, selector, hostSelector = '') {\n // **NOTE**: Do not strip comments as this will cause component sourcemaps to break\n // due to shift in lines.\n // Collect comments and replace them with a placeholder, this is done to avoid complicating\n // the rule parsing RegExp and keep it safer.\n const comments = [];\n cssText = cssText.replace(_commentRe, (m) => {\n if (m.match(_commentWithHashRe)) {\n comments.push(m);\n }\n else {\n // Replace non hash comments with empty lines.\n // This is done so that we do not leak any senstive data in comments.\n const newLinesMatches = m.match(_newLinesRe);\n comments.push((newLinesMatches?.join('') ?? '') + '\\n');\n }\n return COMMENT_PLACEHOLDER;\n });\n cssText = this._insertDirectives(cssText);\n const scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n // Add back comments at the original position.\n let commentIdx = 0;\n return scopedCssText.replace(_commentWithHashPlaceHolderRe, () => comments[commentIdx++]);\n }\n _insertDirectives(cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n }\n /**\n * Process styles to add scope to keyframes.\n *\n * Modify both the names of the keyframes defined in the component styles and also the css\n * animation rules using them.\n *\n * Animation rules using keyframes defined elsewhere are not modified to allow for globally\n * defined keyframes.\n *\n * For example, we convert this css:\n *\n * ```\n * .box {\n * animation: box-animation 1s forwards;\n * }\n *\n * @keyframes box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * to this:\n *\n * ```\n * .box {\n * animation: scopeName_box-animation 1s forwards;\n * }\n *\n * @keyframes scopeName_box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * @param cssText the component's css text that needs to be scoped.\n * @param scopeSelector the component's scope selector.\n *\n * @returns the scoped css text.\n */\n _scopeKeyframesRelatedCss(cssText, scopeSelector) {\n const unscopedKeyframesSet = new Set();\n const scopedKeyframesCssText = processRules(cssText, rule => this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet));\n return processRules(scopedKeyframesCssText, rule => this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet));\n }\n /**\n * Scopes local keyframes names, returning the updated css rule and it also\n * adds the original keyframe name to a provided set to collect all keyframes names\n * so that it can later be used to scope the animation rules.\n *\n * For example, it takes a rule such as:\n *\n * ```\n * @keyframes box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n *\n * and returns:\n *\n * ```\n * @keyframes scopeName_box-animation {\n * to {\n * background-color: green;\n * }\n * }\n * ```\n * and as a side effect it adds \"box-animation\" to the `unscopedKeyframesSet` set\n *\n * @param cssRule the css rule to process.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names (which can be\n * modified as a side effect)\n *\n * @returns the css rule modified with the scoped keyframes name.\n */\n _scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet) {\n return {\n ...rule,\n selector: rule.selector.replace(/(^@(?:-webkit-)?keyframes(?:\\s+))(['\"]?)(.+)\\2(\\s*)$/, (_, start, quote, keyframeName, endSpaces) => {\n unscopedKeyframesSet.add(unescapeQuotes(keyframeName, quote));\n return `${start}${quote}${scopeSelector}_${keyframeName}${quote}${endSpaces}`;\n }),\n };\n }\n /**\n * Function used to scope a keyframes name (obtained from an animation declaration)\n * using an existing set of unscopedKeyframes names to discern if the scoping needs to be\n * performed (keyframes names of keyframes not defined in the component's css need not to be\n * scoped).\n *\n * @param keyframe the keyframes name to check.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names.\n *\n * @returns the scoped name of the keyframe, or the original name is the name need not to be\n * scoped.\n */\n _scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet) {\n return keyframe.replace(/^(\\s*)(['\"]?)(.+?)\\2(\\s*)$/, (_, spaces1, quote, name, spaces2) => {\n name = `${unscopedKeyframesSet.has(unescapeQuotes(name, quote)) ? scopeSelector + '_' : ''}${name}`;\n return `${spaces1}${quote}${name}${quote}${spaces2}`;\n });\n }\n /**\n * Scope an animation rule so that the keyframes mentioned in such rule\n * are scoped if defined in the component's css and left untouched otherwise.\n *\n * It can scope values of both the 'animation' and 'animation-name' properties.\n *\n * @param rule css rule to scope.\n * @param scopeSelector the component's scope selector.\n * @param unscopedKeyframesSet the set of unscoped keyframes names.\n *\n * @returns the updated css rule.\n **/\n _scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {\n let content = rule.content.replace(/((?:^|\\s+|;)(?:-webkit-)?animation(?:\\s*):(?:\\s*))([^;]+)/g, (_, start, animationDeclarations) => start +\n animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = '', quotedName, nonQuotedName) => {\n if (quotedName) {\n return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;\n }\n else {\n return animationKeywords.has(nonQuotedName) ?\n original :\n `${leadingSpaces}${this._scopeAnimationKeyframe(nonQuotedName, scopeSelector, unscopedKeyframesSet)}`;\n }\n }));\n content = content.replace(/((?:^|\\s+|;)(?:-webkit-)?animation-name(?:\\s*):(?:\\s*))([^;]+)/g, (_match, start, commaSeparatedKeyframes) => `${start}${commaSeparatedKeyframes.split(',')\n .map((keyframe) => this._scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet))\n .join(',')}`);\n return { ...rule, content };\n }\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n *\n * For example, we convert this rule:\n *\n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n *\n * to this:\n *\n * scopeName menu-item {\n *\n **/\n _insertPolyfillDirectivesInCssText(cssText) {\n return cssText.replace(_cssContentNextSelectorRe, function (...m) {\n return m[2] + '{';\n });\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n *\n * For example, we convert this rule:\n *\n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n *\n * to this:\n *\n * scopeName menu-item {...}\n *\n **/\n _insertPolyfillRulesInCssText(cssText) {\n return cssText.replace(_cssContentRuleRe, (...m) => {\n const rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n }\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n *\n * .foo {... }\n *\n * and converts this to\n *\n * scopeName .foo { ... }\n */\n _scopeCssText(cssText, scopeSelector, hostSelector) {\n const 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._scopeKeyframesRelatedCss(cssText, scopeSelector);\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n }\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n *\n * @polyfill-unscoped-rule {\n * content: 'menu-item';\n * ... }\n *\n * to this:\n *\n * menu-item {...}\n *\n **/\n _extractUnscopedRulesFromCssText(cssText) {\n let r = '';\n let m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n const rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n }\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar\n */\n _convertColonHost(cssText) {\n return cssText.replace(_cssColonHostRe, (_, hostSelectors, otherSelectors) => {\n if (hostSelectors) {\n const convertedSelectors = [];\n const hostSelectorArray = hostSelectors.split(',').map((p) => p.trim());\n for (const hostSelector of hostSelectorArray) {\n if (!hostSelector)\n break;\n const convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, '') + otherSelectors;\n convertedSelectors.push(convertedSelector);\n }\n return convertedSelectors.join(',');\n }\n else {\n return _polyfillHostNoCombinator + otherSelectors;\n }\n });\n }\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar, .foo <scopeName> > .bar { }\n *\n * and\n *\n * :host-context(.foo:host) .bar { ... }\n *\n * to\n *\n * .foo<scopeName> .bar { ... }\n */\n _convertColonHostContext(cssText) {\n return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {\n // We have captured a selector that contains a `:host-context` rule.\n // For backward compatibility `:host-context` may contain a comma separated list of selectors.\n // Each context selector group will contain a list of host-context selectors that must match\n // an ancestor of the host.\n // (Normally `contextSelectorGroups` will only contain a single array of context selectors.)\n const contextSelectorGroups = [[]];\n // There may be more than `:host-context` in this selector so `selectorText` could look like:\n // `:host-context(.one):host-context(.two)`.\n // Execute `_cssColonHostContextRe` over and over until we have extracted all the\n // `:host-context` selectors from this selector.\n let match;\n while ((match = _cssColonHostContextRe.exec(selectorText))) {\n // `match` = [':host-context(<selectors>)<rest>', <selectors>, <rest>]\n // The `<selectors>` could actually be a comma separated list: `:host-context(.one, .two)`.\n const newContextSelectors = (match[1] ?? '').trim().split(',').map((m) => m.trim()).filter((m) => m !== '');\n // We must duplicate the current selector group for each of these new selectors.\n // For example if the current groups are:\n // ```\n // [\n // ['a', 'b', 'c'],\n // ['x', 'y', 'z'],\n // ]\n // ```\n // And we have a new set of comma separated selectors: `:host-context(m,n)` then the new\n // groups are:\n // ```\n // [\n // ['a', 'b', 'c', 'm'],\n // ['x', 'y', 'z', 'm'],\n // ['a', 'b', 'c', 'n'],\n // ['x', 'y', 'z', 'n'],\n // ]\n // ```\n const contextSelectorGroupsLength = contextSelectorGroups.length;\n repeatGroups(contextSelectorGroups, newContextSelectors.length);\n for (let i = 0; i < newContextSelectors.length; i++) {\n for (let j = 0; j < contextSelectorGroupsLength; j++) {\n contextSelectorGroups[j + i * contextSelectorGroupsLength].push(newContextSelectors[i]);\n }\n }\n // Update the `selectorText` and see repeat to see if there are more `:host-context`s.\n selectorText = match[2];\n }\n // The context selectors now must be combined with each other to capture all the possible\n // selectors that `:host-context` can match. See `combineHostContextSelectors()` for more\n // info about how this is done.\n return contextSelectorGroups\n .map((contextSelectors) => combineHostContextSelectors(contextSelectors, selectorText))\n .join(', ');\n });\n }\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n _convertShadowDOMSelectors(cssText) {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n }\n // change a selector like 'div' to 'name div'\n _scopeSelectors(cssText, scopeSelector, hostSelector) {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@document') || rule.selector.startsWith('@layer') ||\n rule.selector.startsWith('@container') || rule.selector.startsWith('@scope')) {\n content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n }\n else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) {\n content = this._stripScopingSelectors(rule.content);\n }\n return new CssRule(selector, content);\n });\n }\n /**\n * Handle a css text that is within a rule that should not contain scope selectors by simply\n * removing them! An example of such a rule is `@font-face`.\n *\n * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector.\n * Normally this would be a syntax error by the author of the styles. But in some rare cases, such\n * as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we\n * can end up with broken css if the imported styles happen to contain @font-face rules.\n *\n * For example:\n *\n * ```\n * :host ::ng-deep {\n * import 'some/lib/containing/font-face';\n * }\n *\n * Similar logic applies to `@page` rules which can contain a particular set of properties,\n * as well as some specific at-rules. Since they can't be encapsulated, we have to strip\n * any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3\n * ```\n */\n _stripScopingSelectors(cssText) {\n return processRules(cssText, (rule) => {\n const selector = rule.selector.replace(_shadowDeepSelectors, ' ')\n .replace(_polyfillHostNoCombinatorRe, ' ');\n return new CssRule(selector, rule.content);\n });\n }\n _scopeSelector(selector, scopeSelector, hostSelector) {\n return selector.split(',')\n .map((part) => part.trim().split(_shadowDeepSelectors))\n .map((deepParts) => {\n const [shallowPart, ...otherParts] = deepParts;\n const applyScope = (shallowPart) => {\n if (this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n }\n else {\n return shallowPart;\n }\n };\n return [applyScope(shallowPart), ...otherParts].join(' ');\n })\n .join(', ');\n }\n _selectorNeedsScoping(selector, scopeSelector) {\n const re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n }\n _makeScopeMatcher(scopeSelector) {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n }\n // scope via name and [is=name]\n _applySimpleSelectorScope(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 const replaceBy = `[${hostSelector}]`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (hnc, selector) => {\n return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {\n return before + replaceBy + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n }\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */\n _applySelectorScope(selector, scopeSelector, hostSelector) {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const attrName = '[' + scopeSelector + ']';\n const _scopeSelectorPart = (p) => {\n let 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 const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n const matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const 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 const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n // A space following an escaped hex value and followed by another hex character\n // (ie: \".\\fc ber\" for \".über\") is not a separator between 2 selectors\n // also keep in mind that backslashes are replaced by a placeholder by SafeSelector\n // These escaped selectors happen for example when esbuild runs with optimization.minify.\n if (part.match(_placeholderRe) && selector[res.index + 1]?.match(/[a-fA-F\\d]/)) {\n continue;\n }\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const 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 _insertPolyfillHostInCssText(selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost);\n }\n}\nclass SafeSelector {\n constructor(selector) {\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 = this._escapeRegexMatches(selector, /(\\[[^\\]]*\\])/g);\n // CSS allows for certain special characters to be used in selectors if they're escaped.\n // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a\n // pseudo-class, but writing `.foo\\:blue` will match, because the colon was escaped.\n // Replace all escape sequences (`\\` followed by a character) with a placeholder so\n // that our handling of pseudo-selectors doesn't mess with them.\n selector = this._escapeRegexMatches(selector, /(\\\\.)/g);\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, (_, pseudo, exp) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(exp);\n this.index++;\n return pseudo + replaceBy;\n });\n }\n restore(content) {\n return content.replace(_placeholderRe, (_ph, index) => this.placeholders[+index]);\n }\n content() {\n return this._content;\n }\n /**\n * Replaces all of the substrings that match a regex within a\n * special string (e.g. `__ph-0__`, `__ph-1__`, etc).\n */\n _escapeRegexMatches(content, pattern) {\n return content.replace(pattern, (_, keep) => {\n const replaceBy = `__ph-${this.index}__`;\n this.placeholders.push(keep);\n this.index++;\n return replaceBy;\n });\n }\n}\nconst _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nconst _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = '(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g,\n // Deprecated selectors\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\nconst _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _newLinesRe = /\\r?\\n/g;\nconst _commentRe = /\\/\\*[\\s\\S]*?\\*\\//g;\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=/g;\nconst COMMENT_PLACEHOLDER = '%COMMENT%';\nconst _commentWithHashPlaceHolderRe = new RegExp(COMMENT_PLACEHOLDER, 'g');\nconst _placeholderRe = /__ph-(\\d+)__/g;\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst _ruleRe = new RegExp(`(\\\\s*(?:${COMMENT_PLACEHOLDER}\\\\s*)*)([^;\\\\{\\\\}]+?)(\\\\s*)((?:{%BLOCK%}?\\\\s*;?)|(?:\\\\s*;))`, 'g');\nconst CONTENT_PAIRS = new Map([['{', '}']]);\nconst COMMA_IN_PLACEHOLDER = '%COMMA_IN_PLACEHOLDER%';\nconst SEMI_IN_PLACEHOLDER = '%SEMI_IN_PLACEHOLDER%';\nconst COLON_IN_PLACEHOLDER = '%COLON_IN_PLACEHOLDER%';\nconst _cssCommaInPlaceholderReGlobal = new RegExp(COMMA_IN_PLACEHOLDER, 'g');\nconst _cssSemiInPlaceholderReGlobal = new RegExp(SEMI_IN_PLACEHOLDER, 'g');\nconst _cssColonInPlaceholderReGlobal = new RegExp(COLON_IN_PLACEHOLDER, 'g');\nclass CssRule {\n constructor(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n}\nfunction processRules(input, ruleCallback) {\n const escaped = escapeInStrings(input);\n const inputWithEscapedBlocks = escapeBlocks(escaped, CONTENT_PAIRS, BLOCK_PLACEHOLDER);\n let nextBlockIndex = 0;\n const escapedResult = inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let 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 const rule = ruleCallback(new CssRule(selector, content));\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n return unescapeInStrings(escapedResult);\n}\nclass StringWithEscapedBlocks {\n constructor(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n}\nfunction escapeBlocks(input, charPairs, placeholder) {\n const resultParts = [];\n const escapedBlocks = [];\n let openCharCount = 0;\n let nonBlockStartIndex = 0;\n let blockStartIndex = -1;\n let openChar;\n let closeChar;\n for (let i = 0; i < input.length; i++) {\n const char = input[i];\n if (char === '\\\\') {\n i++;\n }\n else if (char === closeChar) {\n openCharCount--;\n if (openCharCount === 0) {\n escapedBlocks.push(input.substring(blockStartIndex, i));\n resultParts.push(placeholder);\n nonBlockStartIndex = i;\n blockStartIndex = -1;\n openChar = closeChar = undefined;\n }\n }\n else if (char === openChar) {\n openCharCount++;\n }\n else if (openCharCount === 0 && charPairs.has(char)) {\n openChar = char;\n closeChar = charPairs.get(char);\n openCharCount = 1;\n blockStartIndex = i + 1;\n resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));\n }\n }\n if (blockStartIndex !== -1) {\n escapedBlocks.push(input.substring(blockStartIndex));\n resultParts.push(placeholder);\n }\n else {\n resultParts.push(input.substring(nonBlockStartIndex));\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n/**\n * Object containing as keys characters that should be substituted by placeholders\n * when found in strings during the css text parsing, and as values the respective\n * placeholders\n */\nconst ESCAPE_IN_STRING_MAP = {\n ';': SEMI_IN_PLACEHOLDER,\n ',': COMMA_IN_PLACEHOLDER,\n ':': COLON_IN_PLACEHOLDER\n};\n/**\n * Parse the provided css text and inside strings (meaning, inside pairs of unescaped single or\n * double quotes) replace specific characters with their respective placeholders as indicated\n * by the `ESCAPE_IN_STRING_MAP` map.\n *\n * For example convert the text\n * `animation: \"my-anim:at\\\"ion\" 1s;`\n * to\n * `animation: \"my-anim%COLON_IN_PLACEHOLDER%at\\\"ion\" 1s;`\n *\n * This is necessary in order to remove the meaning of some characters when found inside strings\n * (for example `;` indicates the end of a css declaration, `,` the sequence of values and `:` the\n * division between property and value during a declaration, none of these meanings apply when such\n * characters are within strings and so in order to prevent parsing issues they need to be replaced\n * with placeholder text for the duration of the css manipulation process).\n *\n * @param input the original css text.\n *\n * @returns the css text with specific characters in strings replaced by placeholders.\n **/\nfunction escapeInStrings(input) {\n let result = input;\n let currentQuoteChar = null;\n for (let i = 0; i < result.length; i++) {\n const char = result[i];\n if (char === '\\\\') {\n i++;\n }\n else {\n if (currentQuoteChar !== null) {\n // index i is inside a quoted sub-string\n if (char === currentQuoteChar) {\n currentQuoteChar = null;\n }\n else {\n const placeholder = ESCAPE_IN_STRING_MAP[char];\n if (placeholder) {\n result = `${result.substr(0, i)}${placeholder}${result.substr(i + 1)}`;\n i += placeholder.length - 1;\n }\n }\n }\n else if (char === '\\'' || char === '\"') {\n currentQuoteChar = char;\n }\n }\n }\n return result;\n}\n/**\n * Replace in a string all occurrences of keys in the `ESCAPE_IN_STRING_MAP` map with their\n * original representation, this is simply used to revert the changes applied by the\n * escapeInStrings function.\n *\n * For example it reverts the text:\n * `animation: \"my-anim%COLON_IN_PLACEHOLDER%at\\\"ion\" 1s;`\n * to it's original form of:\n * `animation: \"my-anim:at\\\"ion\" 1s;`\n *\n * Note: For the sake of simplicity this function does not check that the placeholders are\n * actually inside strings as it would anyway be extremely unlikely to find them outside of strings.\n *\n * @param input the css text containing the placeholders.\n *\n * @returns the css text without the placeholders.\n */\nfunction unescapeInStrings(input) {\n let result = input.replace(_cssCommaInPlaceholderReGlobal, ',');\n result = result.replace(_cssSemiInPlaceholderReGlobal, ';');\n result = result.replace(_cssColonInPlaceholderReGlobal, ':');\n return result;\n}\n/**\n * Unescape all quotes present in a string, but only if the string was actually already\n * quoted.\n *\n * This generates a \"canonical\" representation of strings which can be used to match strings\n * which would otherwise only differ because of differently escaped quotes.\n *\n * For example it converts the string (assumed to be quoted):\n * `this \\\\\"is\\\\\" a \\\\'\\\\\\\\'test`\n * to:\n * `this \"is\" a '\\\\\\\\'test`\n * (note that the latter backslashes are not removed as they are not actually escaping the single\n * quote)\n *\n *\n * @param input the string possibly containing escaped quotes.\n * @param isQuoted boolean indicating whether the string was quoted inside a bigger string (if not\n * then it means that it doesn't represent an inner string and thus no unescaping is required)\n *\n * @returns the string in the \"canonical\" representation without escaped quotes.\n */\nfunction unescapeQuotes(str, isQuoted) {\n return !isQuoted ? str : str.replace(/((?:^|[^\\\\])(?:\\\\\\\\)*)\\\\(?=['\"])/g, '$1');\n}\n/**\n * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`\n * to create a selector that matches the same as `:host-context()`.\n *\n * Given a single context selector `A` we need to output selectors that match on the host and as an\n * ancestor of the host:\n *\n * ```\n * A <hostMarker>, A<hostMarker> {}\n * ```\n *\n * When there is more than one context selector we also have to create combinations of those\n * selectors with each other. For example if there are `A` and `B` selectors the output is:\n *\n * ```\n * AB<hostMarker>, AB <hostMarker>, A B<hostMarker>,\n * B A<hostMarker>, A B <hostMarker>, B A <hostMarker> {}\n * ```\n *\n * And so on...\n *\n * @param contextSelectors an array of context selectors that will be combined.\n * @param otherSelectors the rest of the selectors that are not context selectors.\n */\nfunction combineHostContextSelectors(contextSelectors, otherSelectors) {\n const hostMarker = _polyfillHostNoCombinator;\n _polyfillHostRe.lastIndex = 0; // reset the regex to ensure we get an accurate test\n const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);\n // If there are no context selectors then just output a host marker\n if (contextSelectors.length === 0) {\n return hostMarker + otherSelectors;\n }\n const combined = [contextSelectors.pop() || ''];\n while (contextSelectors.length > 0) {\n const length = combined.length;\n const contextSelector = contextSelectors.pop();\n for (let i = 0; i < length; i++) {\n const previousSelectors = combined[i];\n // Add the new selector as a descendant of the previous selectors\n combined[length * 2 + i] = previousSelectors + ' ' + contextSelector;\n // Add the new selector as an ancestor of the previous selectors\n combined[length + i] = contextSelector + ' ' + previousSelectors;\n // Add the new selector to act on the same element as the previous selectors\n combined[i] = contextSelector + previousSelectors;\n }\n }\n // Finally connect the selector to the `hostMarker`s: either acting directly on the host\n // (A<hostMarker>) or as an ancestor (A <hostMarker>).\n return combined\n .map(s => otherSelectorsHasHost ?\n `${s}${otherSelectors}` :\n `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`)\n .join(',');\n}\n/**\n * Mutate the given `groups` array so that there are `multiples` clones of the original array\n * stored.\n *\n * For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the\n * newly added groups will be clones of the original.\n *\n * @param groups An array of groups of strings that will be repeated. This array is mutated\n * in-place.\n * @param multiples The number of times the current groups should appear.\n */\nfunction repeatGroups(groups, multiples) {\n const length = groups.length;\n for (let i = 1; i < multiples; i++) {\n for (let j = 0; j < length; j++) {\n groups[j + (i * length)] = groups[j].slice(0);\n }\n }\n}\n\nvar TagContentType;\n(function (TagContentType) {\n TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n})(TagContentType || (TagContentType = {}));\nfunction splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const 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// `<ng-container>` tags work the same regardless the namespace\nfunction isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n// `<ng-content>` tags work the same regardless the namespace\nfunction isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n// `<ng-template>` tags work the same regardless the namespace\nfunction isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\nfunction getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\nfunction mergeNsAndName(prefix, localName) {\n return prefix ? `:${prefix}:${localName}` : localName;\n}\n\n/**\n * Enumeration of the types of attributes which can be applied to an element.\n */\nvar BindingKind;\n(function (BindingKind) {\n /**\n * Static attributes.\n */\n BindingKind[BindingKind[\"Attribute\"] = 0] = \"Attribute\";\n /**\n * Class bindings.\n */\n BindingKind[BindingKind[\"ClassName\"] = 1] = \"ClassName\";\n /**\n * Style bindings.\n */\n BindingKind[BindingKind[\"StyleProperty\"] = 2] = \"StyleProperty\";\n /**\n * Dynamic property bindings.\n */\n BindingKind[BindingKind[\"Property\"] = 3] = \"Property\";\n /**\n * Property or attribute bindings on a template.\n */\n BindingKind[BindingKind[\"Template\"] = 4] = \"Template\";\n /**\n * Internationalized attributes.\n */\n BindingKind[BindingKind[\"I18n\"] = 5] = \"I18n\";\n /**\n * TODO: Consider how Animations are handled, and if they should be a distinct BindingKind.\n */\n BindingKind[BindingKind[\"Animation\"] = 6] = \"Animation\";\n})(BindingKind || (BindingKind = {}));\nconst FLYWEIGHT_ARRAY = Object.freeze([]);\n/**\n * Container for all of the various kinds of attributes which are applied on an element.\n */\nclass ElementAttributes {\n constructor() {\n this.known = new Set();\n this.byKind = new Map;\n this.projectAs = null;\n }\n get attributes() {\n return this.byKind.get(BindingKind.Attribute) ?? FLYWEIGHT_ARRAY;\n }\n get classes() {\n return this.byKind.get(BindingKind.ClassName) ?? FLYWEIGHT_ARRAY;\n }\n get styles() {\n return this.byKind.get(BindingKind.StyleProperty) ?? FLYWEIGHT_ARRAY;\n }\n get bindings() {\n return this.byKind.get(BindingKind.Property) ?? FLYWEIGHT_ARRAY;\n }\n get template() {\n return this.byKind.get(BindingKind.Template) ?? FLYWEIGHT_ARRAY;\n }\n get i18n() {\n return this.byKind.get(BindingKind.I18n) ?? FLYWEIGHT_ARRAY;\n }\n add(kind, name, value) {\n if (this.known.has(name)) {\n return;\n }\n this.known.add(name);\n const array = this.arrayFor(kind);\n array.push(...getAttributeNameLiterals$1(name));\n if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {\n if (value === null) {\n throw Error('Attribute & style element attributes must have a value');\n }\n array.push(value);\n }\n }\n arrayFor(kind) {\n if (!this.byKind.has(kind)) {\n this.byKind.set(kind, []);\n }\n return this.byKind.get(kind);\n }\n}\nfunction getAttributeNameLiterals$1(name) {\n const [attributeNamespace, attributeName] = splitNsName(name);\n const nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [\n literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral\n ];\n }\n return [nameLiteral];\n}\nfunction assertIsElementAttributes(attrs) {\n if (!(attrs instanceof ElementAttributes)) {\n throw new Error(`AssertionError: ElementAttributes has already been coalesced into the view constants`);\n }\n}\n\n/**\n * Distinguishes different kinds of IR operations.\n *\n * Includes both creation and update operations.\n */\nvar OpKind;\n(function (OpKind) {\n /**\n * A special operation type which is used to represent the beginning and end nodes of a linked\n * list of operations.\n */\n OpKind[OpKind[\"ListEnd\"] = 0] = \"ListEnd\";\n /**\n * An operation which wraps an output AST statement.\n */\n OpKind[OpKind[\"Statement\"] = 1] = \"Statement\";\n /**\n * An operation which declares and initializes a `SemanticVariable`.\n */\n OpKind[OpKind[\"Variable\"] = 2] = \"Variable\";\n /**\n * An operation to begin rendering of an element.\n */\n OpKind[OpKind[\"ElementStart\"] = 3] = \"ElementStart\";\n /**\n * An operation to render an element with no children.\n */\n OpKind[OpKind[\"Element\"] = 4] = \"Element\";\n /**\n * An operation which declares an embedded view.\n */\n OpKind[OpKind[\"Template\"] = 5] = \"Template\";\n /**\n * An operation to end rendering of an element previously started with `ElementStart`.\n */\n OpKind[OpKind[\"ElementEnd\"] = 6] = \"ElementEnd\";\n /**\n * An operation to begin an `ng-container`.\n */\n OpKind[OpKind[\"ContainerStart\"] = 7] = \"ContainerStart\";\n /**\n * An operation for an `ng-container` with no children.\n */\n OpKind[OpKind[\"Container\"] = 8] = \"Container\";\n /**\n * An operation to end an `ng-container`.\n */\n OpKind[OpKind[\"ContainerEnd\"] = 9] = \"ContainerEnd\";\n /**\n * An operation disable binding for subsequent elements, which are descendants of a non-bindable\n * node.\n */\n OpKind[OpKind[\"DisableBindings\"] = 10] = \"DisableBindings\";\n /**\n * An operation to re-enable binding, after it was previously disabled.\n */\n OpKind[OpKind[\"EnableBindings\"] = 11] = \"EnableBindings\";\n /**\n * An operation to render a text node.\n */\n OpKind[OpKind[\"Text\"] = 12] = \"Text\";\n /**\n * An operation declaring an event listener for an element.\n */\n OpKind[OpKind[\"Listener\"] = 13] = \"Listener\";\n /**\n * An operation to interpolate text into a text node.\n */\n OpKind[OpKind[\"InterpolateText\"] = 14] = \"InterpolateText\";\n /**\n * An intermediate binding op, that has not yet been processed into an individual property,\n * attribute, style, etc.\n */\n OpKind[OpKind[\"Binding\"] = 15] = \"Binding\";\n /**\n * An operation to bind an expression to a property of an element.\n */\n OpKind[OpKind[\"Property\"] = 16] = \"Property\";\n /**\n * An operation to bind an expression to a style property of an element.\n */\n OpKind[OpKind[\"StyleProp\"] = 17] = \"StyleProp\";\n /**\n * An operation to bind an expression to a class property of an element.\n */\n OpKind[OpKind[\"ClassProp\"] = 18] = \"ClassProp\";\n /**\n * An operation to bind an expression to the styles of an element.\n */\n OpKind[OpKind[\"StyleMap\"] = 19] = \"StyleMap\";\n /**\n * An operation to bind an expression to the classes of an element.\n */\n OpKind[OpKind[\"ClassMap\"] = 20] = \"ClassMap\";\n /**\n * An operation to advance the runtime's implicit slot context during the update phase of a view.\n */\n OpKind[OpKind[\"Advance\"] = 21] = \"Advance\";\n /**\n * An operation to instantiate a pipe.\n */\n OpKind[OpKind[\"Pipe\"] = 22] = \"Pipe\";\n /**\n * An operation to associate an attribute with an element.\n */\n OpKind[OpKind[\"Attribute\"] = 23] = \"Attribute\";\n /**\n * A host binding property.\n */\n OpKind[OpKind[\"HostProperty\"] = 24] = \"HostProperty\";\n /**\n * A namespace change, which causes the subsequent elements to be processed as either HTML or SVG.\n */\n OpKind[OpKind[\"Namespace\"] = 25] = \"Namespace\";\n // TODO: Add Host Listeners, and possibly other host ops also.\n})(OpKind || (OpKind = {}));\n/**\n * Distinguishes different kinds of IR expressions.\n */\nvar ExpressionKind;\n(function (ExpressionKind) {\n /**\n * Read of a variable in a lexical scope.\n */\n ExpressionKind[ExpressionKind[\"LexicalRead\"] = 0] = \"LexicalRead\";\n /**\n * A reference to the current view context.\n */\n ExpressionKind[ExpressionKind[\"Context\"] = 1] = \"Context\";\n /**\n * Read of a variable declared in a `VariableOp`.\n */\n ExpressionKind[ExpressionKind[\"ReadVariable\"] = 2] = \"ReadVariable\";\n /**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\n ExpressionKind[ExpressionKind[\"NextContext\"] = 3] = \"NextContext\";\n /**\n * Runtime operation to retrieve the value of a local reference.\n */\n ExpressionKind[ExpressionKind[\"Reference\"] = 4] = \"Reference\";\n /**\n * Runtime operation to snapshot the current view context.\n */\n ExpressionKind[ExpressionKind[\"GetCurrentView\"] = 5] = \"GetCurrentView\";\n /**\n * Runtime operation to restore a snapshotted view.\n */\n ExpressionKind[ExpressionKind[\"RestoreView\"] = 6] = \"RestoreView\";\n /**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\n ExpressionKind[ExpressionKind[\"ResetView\"] = 7] = \"ResetView\";\n /**\n * Defines and calls a function with change-detected arguments.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionExpr\"] = 8] = \"PureFunctionExpr\";\n /**\n * Indicates a positional parameter to a pure function definition.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionParameterExpr\"] = 9] = \"PureFunctionParameterExpr\";\n /**\n * Binding to a pipe transformation.\n */\n ExpressionKind[ExpressionKind[\"PipeBinding\"] = 10] = \"PipeBinding\";\n /**\n * Binding to a pipe transformation with a variable number of arguments.\n */\n ExpressionKind[ExpressionKind[\"PipeBindingVariadic\"] = 11] = \"PipeBindingVariadic\";\n /*\n * A safe property read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafePropertyRead\"] = 12] = \"SafePropertyRead\";\n /**\n * A safe keyed read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeKeyedRead\"] = 13] = \"SafeKeyedRead\";\n /**\n * A safe function call requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeInvokeFunction\"] = 14] = \"SafeInvokeFunction\";\n /**\n * An intermediate expression that will be expanded from a safe read into an explicit ternary.\n */\n ExpressionKind[ExpressionKind[\"SafeTernaryExpr\"] = 15] = \"SafeTernaryExpr\";\n /**\n * An empty expression that will be stipped before generating the final output.\n */\n ExpressionKind[ExpressionKind[\"EmptyExpr\"] = 16] = \"EmptyExpr\";\n /*\n * An assignment to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"AssignTemporaryExpr\"] = 17] = \"AssignTemporaryExpr\";\n /**\n * A reference to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"ReadTemporaryExpr\"] = 18] = \"ReadTemporaryExpr\";\n /**\n * An expression representing a sanitizer function.\n */\n ExpressionKind[ExpressionKind[\"SanitizerExpr\"] = 19] = \"SanitizerExpr\";\n})(ExpressionKind || (ExpressionKind = {}));\n/**\n * Distinguishes between different kinds of `SemanticVariable`s.\n */\nvar SemanticVariableKind;\n(function (SemanticVariableKind) {\n /**\n * Represents the context of a particular view.\n */\n SemanticVariableKind[SemanticVariableKind[\"Context\"] = 0] = \"Context\";\n /**\n * Represents an identifier declared in the lexical scope of a view.\n */\n SemanticVariableKind[SemanticVariableKind[\"Identifier\"] = 1] = \"Identifier\";\n /**\n * Represents a saved state that can be used to restore a view in a listener handler function.\n */\n SemanticVariableKind[SemanticVariableKind[\"SavedView\"] = 2] = \"SavedView\";\n})(SemanticVariableKind || (SemanticVariableKind = {}));\n/**\n * Whether to compile in compatibilty mode. In compatibility mode, the template pipeline will\n * attempt to match the output of `TemplateDefinitionBuilder` as exactly as possible, at the cost of\n * producing quirky or larger code in some cases.\n */\nvar CompatibilityMode;\n(function (CompatibilityMode) {\n CompatibilityMode[CompatibilityMode[\"Normal\"] = 0] = \"Normal\";\n CompatibilityMode[CompatibilityMode[\"TemplateDefinitionBuilder\"] = 1] = \"TemplateDefinitionBuilder\";\n})(CompatibilityMode || (CompatibilityMode = {}));\n/**\n * Represents functions used to sanitize different pieces of a template.\n */\nvar SanitizerFn;\n(function (SanitizerFn) {\n SanitizerFn[SanitizerFn[\"Html\"] = 0] = \"Html\";\n SanitizerFn[SanitizerFn[\"Script\"] = 1] = \"Script\";\n SanitizerFn[SanitizerFn[\"Style\"] = 2] = \"Style\";\n SanitizerFn[SanitizerFn[\"Url\"] = 3] = \"Url\";\n SanitizerFn[SanitizerFn[\"ResourceUrl\"] = 4] = \"ResourceUrl\";\n SanitizerFn[SanitizerFn[\"IframeAttribute\"] = 5] = \"IframeAttribute\";\n})(SanitizerFn || (SanitizerFn = {}));\n\n/**\n * Marker symbol for `ConsumesSlotOpTrait`.\n */\nconst ConsumesSlot = Symbol('ConsumesSlot');\n/**\n * Marker symbol for `DependsOnSlotContextOpTrait`.\n */\nconst DependsOnSlotContext = Symbol('DependsOnSlotContext');\n/**\n * Marker symbol for `UsesSlotIndex` trait.\n */\nconst UsesSlotIndex = Symbol('UsesSlotIndex');\n/**\n * Marker symbol for `ConsumesVars` trait.\n */\nconst ConsumesVarsTrait = Symbol('ConsumesVars');\n/**\n * Marker symbol for `UsesVarOffset` trait.\n */\nconst UsesVarOffset = Symbol('UsesVarOffset');\n/**\n * Default values for most `ConsumesSlotOpTrait` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_CONSUMES_SLOT = {\n [ConsumesSlot]: true,\n slot: null,\n numSlotsUsed: 1,\n};\n/**\n * Default values for most `UsesSlotIndexTrait` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_USES_SLOT_INDEX = {\n [UsesSlotIndex]: true,\n slot: null,\n};\n/**\n * Default values for most `DependsOnSlotContextOpTrait` fields (used with the spread operator to\n * initialize implementors of the trait).\n */\nconst TRAIT_DEPENDS_ON_SLOT_CONTEXT = {\n [DependsOnSlotContext]: true,\n};\n/**\n * Default values for `UsesVars` fields (used with the spread operator to initialize\n * implementors of the trait).\n */\nconst TRAIT_CONSUMES_VARS = {\n [ConsumesVarsTrait]: true,\n};\n/**\n * Default values for `UsesVarOffset` fields (used with the spread operator to initialize\n * implementors of this trait).\n */\nconst TRAIT_USES_VAR_OFFSET = {\n [UsesVarOffset]: true,\n varOffset: null,\n};\n/**\n * Test whether an operation implements `ConsumesSlotOpTrait`.\n */\nfunction hasConsumesSlotTrait(op) {\n return op[ConsumesSlot] === true;\n}\n/**\n * Test whether an operation implements `DependsOnSlotContextOpTrait`.\n */\nfunction hasDependsOnSlotContextTrait(op) {\n return op[DependsOnSlotContext] === true;\n}\nfunction hasConsumesVarsTrait(value) {\n return value[ConsumesVarsTrait] === true;\n}\n/**\n * Test whether an expression implements `UsesVarOffsetTrait`.\n */\nfunction hasUsesVarOffsetTrait(expr) {\n return expr[UsesVarOffset] === true;\n}\nfunction hasUsesSlotIndexTrait(value) {\n return value[UsesSlotIndex] === true;\n}\n\n/**\n * Create a `StatementOp`.\n */\nfunction createStatementOp(statement) {\n return {\n kind: OpKind.Statement,\n statement,\n ...NEW_OP,\n };\n}\n/**\n * Create a `VariableOp`.\n */\nfunction createVariableOp(xref, variable, initializer) {\n return {\n kind: OpKind.Variable,\n xref,\n variable,\n initializer,\n ...NEW_OP,\n };\n}\n/**\n * Static structure shared by all operations.\n *\n * Used as a convenience via the spread operator (`...NEW_OP`) when creating new operations, and\n * ensures the fields are always in the same order.\n */\nconst NEW_OP = {\n debugListId: null,\n prev: null,\n next: null,\n};\n\n/**\n * Create an `InterpolationTextOp`.\n */\nfunction createInterpolateTextOp(xref, interpolation, sourceSpan) {\n return {\n kind: OpKind.InterpolateText,\n target: xref,\n interpolation,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\nclass Interpolation {\n constructor(strings, expressions) {\n this.strings = strings;\n this.expressions = expressions;\n }\n}\n/**\n * Create a `BindingOp`, not yet transformed into a particular type of binding.\n */\nfunction createBindingOp(target, kind, name, expression, unit, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Binding,\n bindingKind: kind,\n target,\n name,\n expression,\n unit,\n securityContext,\n isTemplate,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Create a `PropertyOp`.\n */\nfunction createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Property,\n target,\n name,\n expression,\n isAnimationTrigger,\n securityContext,\n sanitizer: null,\n isTemplate,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/** Create a `StylePropOp`. */\nfunction createStylePropOp(xref, name, expression, unit, sourceSpan) {\n return {\n kind: OpKind.StyleProp,\n target: xref,\n name,\n expression,\n unit,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/**\n * Create a `ClassPropOp`.\n */\nfunction createClassPropOp(xref, name, expression, sourceSpan) {\n return {\n kind: OpKind.ClassProp,\n target: xref,\n name,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/** Create a `StyleMapOp`. */\nfunction createStyleMapOp(xref, expression, sourceSpan) {\n return {\n kind: OpKind.StyleMap,\n target: xref,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/**\n * Create a `ClassMapOp`.\n */\nfunction createClassMapOp(xref, expression, sourceSpan) {\n return {\n kind: OpKind.ClassMap,\n target: xref,\n expression,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/**\n * Create an `AttributeOp`.\n */\nfunction createAttributeOp(target, name, expression, securityContext, isTemplate, sourceSpan) {\n return {\n kind: OpKind.Attribute,\n target,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isTemplate,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/**\n * Create an `AdvanceOp`.\n */\nfunction createAdvanceOp(delta, sourceSpan) {\n return {\n kind: OpKind.Advance,\n delta,\n sourceSpan,\n ...NEW_OP,\n };\n}\n\nvar _a, _b, _c, _d, _e, _f, _g, _h, _j;\n/**\n * Check whether a given `o.Expression` is a logical IR expression type.\n */\nfunction isIrExpression(expr) {\n return expr instanceof ExpressionBase;\n}\n/**\n * Base type used for all logical IR expressions.\n */\nclass ExpressionBase extends Expression {\n constructor(sourceSpan = null) {\n super(null, sourceSpan);\n }\n}\n/**\n * Logical expression representing a lexical read of a variable name.\n */\nclass LexicalReadExpr extends ExpressionBase {\n constructor(name) {\n super();\n this.name = name;\n this.kind = ExpressionKind.LexicalRead;\n }\n visitExpression(visitor, context) { }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n return new LexicalReadExpr(this.name);\n }\n}\n/**\n * Runtime operation to retrieve the value of a local reference.\n */\nclass ReferenceExpr extends ExpressionBase {\n static { _a = UsesSlotIndex; }\n constructor(target, offset) {\n super();\n this.target = target;\n this.offset = offset;\n this.kind = ExpressionKind.Reference;\n this[_a] = true;\n this.slot = null;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof ReferenceExpr && e.target === this.target;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n const expr = new ReferenceExpr(this.target, this.offset);\n expr.slot = this.slot;\n return expr;\n }\n}\n/**\n * A reference to the current view context (usually the `ctx` variable in a template function).\n */\nclass ContextExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.Context;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof ContextExpr && e.view === this.view;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n return new ContextExpr(this.view);\n }\n}\n/**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\nclass NextContextExpr extends ExpressionBase {\n constructor() {\n super();\n this.kind = ExpressionKind.NextContext;\n this.steps = 1;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof NextContextExpr && e.steps === this.steps;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n const expr = new NextContextExpr();\n expr.steps = this.steps;\n return expr;\n }\n}\n/**\n * Runtime operation to snapshot the current view context.\n *\n * The result of this operation can be stored in a variable and later used with the `RestoreView`\n * operation.\n */\nclass GetCurrentViewExpr extends ExpressionBase {\n constructor() {\n super();\n this.kind = ExpressionKind.GetCurrentView;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof GetCurrentViewExpr;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n return new GetCurrentViewExpr();\n }\n}\n/**\n * Runtime operation to restore a snapshotted view.\n */\nclass RestoreViewExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.RestoreView;\n }\n visitExpression(visitor, context) {\n if (typeof this.view !== 'number') {\n this.view.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n if (!(e instanceof RestoreViewExpr) || typeof e.view !== typeof this.view) {\n return false;\n }\n if (typeof this.view === 'number') {\n return this.view === e.view;\n }\n else {\n return this.view.isEquivalent(e.view);\n }\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n if (typeof this.view !== 'number') {\n this.view = transformExpressionsInExpression(this.view, transform, flags);\n }\n }\n clone() {\n return new RestoreViewExpr(this.view instanceof Expression ? this.view.clone() : this.view);\n }\n}\n/**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\nclass ResetViewExpr extends ExpressionBase {\n constructor(expr) {\n super();\n this.expr = expr;\n this.kind = ExpressionKind.ResetView;\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent(e) {\n return e instanceof ResetViewExpr && this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n return new ResetViewExpr(this.expr.clone());\n }\n}\n/**\n * Read of a variable declared as an `ir.VariableOp` and referenced through its `ir.XrefId`.\n */\nclass ReadVariableExpr extends ExpressionBase {\n constructor(xref) {\n super();\n this.xref = xref;\n this.kind = ExpressionKind.ReadVariable;\n this.name = null;\n }\n visitExpression() { }\n isEquivalent(other) {\n return other instanceof ReadVariableExpr && other.xref === this.xref;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n const expr = new ReadVariableExpr(this.xref);\n expr.name = this.name;\n return expr;\n }\n}\nclass PureFunctionExpr extends ExpressionBase {\n static { _b = ConsumesVarsTrait, _c = UsesVarOffset; }\n constructor(expression, args) {\n super();\n this.kind = ExpressionKind.PureFunctionExpr;\n this[_b] = true;\n this[_c] = true;\n this.varOffset = null;\n /**\n * Once extracted to the `ConstantPool`, a reference to the function which defines the computation\n * of `body`.\n */\n this.fn = null;\n this.body = expression;\n this.args = args;\n }\n visitExpression(visitor, context) {\n this.body?.visitExpression(visitor, context);\n for (const arg of this.args) {\n arg.visitExpression(visitor, context);\n }\n }\n isEquivalent(other) {\n if (!(other instanceof PureFunctionExpr) || other.args.length !== this.args.length) {\n return false;\n }\n return other.body !== null && this.body !== null && other.body.isEquivalent(this.body) &&\n other.args.every((arg, idx) => arg.isEquivalent(this.args[idx]));\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n if (this.body !== null) {\n // TODO: figure out if this is the right flag to pass here.\n this.body = transformExpressionsInExpression(this.body, transform, flags | VisitorContextFlag.InChildOperation);\n }\n else if (this.fn !== null) {\n this.fn = transformExpressionsInExpression(this.fn, transform, flags);\n }\n for (let i = 0; i < this.args.length; i++) {\n this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags);\n }\n }\n clone() {\n const expr = new PureFunctionExpr(this.body?.clone() ?? null, this.args.map(arg => arg.clone()));\n expr.fn = this.fn?.clone() ?? null;\n expr.varOffset = this.varOffset;\n return expr;\n }\n}\nclass PureFunctionParameterExpr extends ExpressionBase {\n constructor(index) {\n super();\n this.index = index;\n this.kind = ExpressionKind.PureFunctionParameterExpr;\n }\n visitExpression() { }\n isEquivalent(other) {\n return other instanceof PureFunctionParameterExpr && other.index === this.index;\n }\n isConstant() {\n return true;\n }\n transformInternalExpressions() { }\n clone() {\n return new PureFunctionParameterExpr(this.index);\n }\n}\nclass PipeBindingExpr extends ExpressionBase {\n static { _d = UsesSlotIndex, _e = ConsumesVarsTrait, _f = UsesVarOffset; }\n constructor(target, name, args) {\n super();\n this.target = target;\n this.name = name;\n this.args = args;\n this.kind = ExpressionKind.PipeBinding;\n this[_d] = true;\n this[_e] = true;\n this[_f] = true;\n this.slot = null;\n this.varOffset = null;\n }\n visitExpression(visitor, context) {\n for (const arg of this.args) {\n arg.visitExpression(visitor, context);\n }\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n for (let idx = 0; idx < this.args.length; idx++) {\n this.args[idx] = transformExpressionsInExpression(this.args[idx], transform, flags);\n }\n }\n clone() {\n const r = new PipeBindingExpr(this.target, this.name, this.args.map(a => a.clone()));\n r.slot = this.slot;\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass PipeBindingVariadicExpr extends ExpressionBase {\n static { _g = UsesSlotIndex, _h = ConsumesVarsTrait, _j = UsesVarOffset; }\n constructor(target, name, args, numArgs) {\n super();\n this.target = target;\n this.name = name;\n this.args = args;\n this.numArgs = numArgs;\n this.kind = ExpressionKind.PipeBindingVariadic;\n this[_g] = true;\n this[_h] = true;\n this[_j] = true;\n this.slot = null;\n this.varOffset = null;\n }\n visitExpression(visitor, context) {\n this.args.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.args = transformExpressionsInExpression(this.args, transform, flags);\n }\n clone() {\n const r = new PipeBindingVariadicExpr(this.target, this.name, this.args.clone(), this.numArgs);\n r.slot = this.slot;\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass SafePropertyReadExpr extends ExpressionBase {\n constructor(receiver, name) {\n super();\n this.receiver = receiver;\n this.name = name;\n this.kind = ExpressionKind.SafePropertyRead;\n }\n // An alias for name, which allows other logic to handle property reads and keyed reads together.\n get index() {\n return this.name;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n }\n clone() {\n return new SafePropertyReadExpr(this.receiver.clone(), this.name);\n }\n}\nclass SafeKeyedReadExpr extends ExpressionBase {\n constructor(receiver, index) {\n super();\n this.receiver = receiver;\n this.index = index;\n this.kind = ExpressionKind.SafeKeyedRead;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n this.index.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n this.index = transformExpressionsInExpression(this.index, transform, flags);\n }\n clone() {\n return new SafeKeyedReadExpr(this.receiver.clone(), this.index.clone());\n }\n}\nclass SafeInvokeFunctionExpr extends ExpressionBase {\n constructor(receiver, args) {\n super();\n this.receiver = receiver;\n this.args = args;\n this.kind = ExpressionKind.SafeInvokeFunction;\n }\n visitExpression(visitor, context) {\n this.receiver.visitExpression(visitor, context);\n for (const a of this.args) {\n a.visitExpression(visitor, context);\n }\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.receiver = transformExpressionsInExpression(this.receiver, transform, flags);\n for (let i = 0; i < this.args.length; i++) {\n this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags);\n }\n }\n clone() {\n return new SafeInvokeFunctionExpr(this.receiver.clone(), this.args.map(a => a.clone()));\n }\n}\nclass SafeTernaryExpr extends ExpressionBase {\n constructor(guard, expr) {\n super();\n this.guard = guard;\n this.expr = expr;\n this.kind = ExpressionKind.SafeTernaryExpr;\n }\n visitExpression(visitor, context) {\n this.guard.visitExpression(visitor, context);\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.guard = transformExpressionsInExpression(this.guard, transform, flags);\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n return new SafeTernaryExpr(this.guard.clone(), this.expr.clone());\n }\n}\nclass EmptyExpr extends ExpressionBase {\n constructor() {\n super(...arguments);\n this.kind = ExpressionKind.EmptyExpr;\n }\n visitExpression(visitor, context) { }\n isEquivalent(e) {\n return e instanceof EmptyExpr;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new EmptyExpr();\n }\n transformInternalExpressions() { }\n}\nclass AssignTemporaryExpr extends ExpressionBase {\n constructor(expr, xref) {\n super();\n this.expr = expr;\n this.xref = xref;\n this.kind = ExpressionKind.AssignTemporaryExpr;\n this.name = null;\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent() {\n return false;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n clone() {\n const a = new AssignTemporaryExpr(this.expr.clone(), this.xref);\n a.name = this.name;\n return a;\n }\n}\nclass ReadTemporaryExpr extends ExpressionBase {\n constructor(xref) {\n super();\n this.xref = xref;\n this.kind = ExpressionKind.ReadTemporaryExpr;\n this.name = null;\n }\n visitExpression(visitor, context) { }\n isEquivalent() {\n return this.xref === this.xref;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) { }\n clone() {\n const r = new ReadTemporaryExpr(this.xref);\n r.name = this.name;\n return r;\n }\n}\nclass SanitizerExpr extends ExpressionBase {\n constructor(fn) {\n super();\n this.fn = fn;\n this.kind = ExpressionKind.SanitizerExpr;\n }\n visitExpression(visitor, context) { }\n isEquivalent(e) {\n return e instanceof SanitizerExpr && e.fn === this.fn;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new SanitizerExpr(this.fn);\n }\n transformInternalExpressions() { }\n}\n/**\n * Visits all `Expression`s in the AST of `op` with the `visitor` function.\n */\nfunction visitExpressionsInOp(op, visitor) {\n transformExpressionsInOp(op, (expr, flags) => {\n visitor(expr, flags);\n return expr;\n }, VisitorContextFlag.None);\n}\nvar VisitorContextFlag;\n(function (VisitorContextFlag) {\n VisitorContextFlag[VisitorContextFlag[\"None\"] = 0] = \"None\";\n VisitorContextFlag[VisitorContextFlag[\"InChildOperation\"] = 1] = \"InChildOperation\";\n})(VisitorContextFlag || (VisitorContextFlag = {}));\nfunction transformExpressionsInInterpolation(interpolation, transform, flags) {\n for (let i = 0; i < interpolation.expressions.length; i++) {\n interpolation.expressions[i] =\n transformExpressionsInExpression(interpolation.expressions[i], transform, flags);\n }\n}\n/**\n * Transform all `Expression`s in the AST of `op` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInOp(op, transform, flags) {\n switch (op.kind) {\n case OpKind.StyleProp:\n case OpKind.StyleMap:\n case OpKind.ClassProp:\n case OpKind.ClassMap:\n case OpKind.Binding:\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n transformExpressionsInInterpolation(op.expression, transform, flags);\n }\n else {\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n }\n break;\n case OpKind.Property:\n case OpKind.Attribute:\n if (op.expression instanceof Interpolation) {\n transformExpressionsInInterpolation(op.expression, transform, flags);\n }\n else {\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n }\n op.sanitizer =\n op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags);\n break;\n case OpKind.InterpolateText:\n transformExpressionsInInterpolation(op.interpolation, transform, flags);\n break;\n case OpKind.Statement:\n transformExpressionsInStatement(op.statement, transform, flags);\n break;\n case OpKind.Variable:\n op.initializer = transformExpressionsInExpression(op.initializer, transform, flags);\n break;\n case OpKind.Listener:\n for (const innerOp of op.handlerOps) {\n transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);\n }\n break;\n case OpKind.Element:\n case OpKind.ElementStart:\n case OpKind.ElementEnd:\n case OpKind.Container:\n case OpKind.ContainerStart:\n case OpKind.ContainerEnd:\n case OpKind.Template:\n case OpKind.DisableBindings:\n case OpKind.EnableBindings:\n case OpKind.Text:\n case OpKind.Pipe:\n case OpKind.Advance:\n case OpKind.Namespace:\n // These operations contain no expressions.\n break;\n default:\n throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);\n }\n}\n/**\n * Transform all `Expression`s in the AST of `expr` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInExpression(expr, transform, flags) {\n if (expr instanceof ExpressionBase) {\n expr.transformInternalExpressions(transform, flags);\n }\n else if (expr instanceof BinaryOperatorExpr) {\n expr.lhs = transformExpressionsInExpression(expr.lhs, transform, flags);\n expr.rhs = transformExpressionsInExpression(expr.rhs, transform, flags);\n }\n else if (expr instanceof ReadPropExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n }\n else if (expr instanceof ReadKeyExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.index = transformExpressionsInExpression(expr.index, transform, flags);\n }\n else if (expr instanceof WritePropExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n }\n else if (expr instanceof WriteKeyExpr) {\n expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);\n expr.index = transformExpressionsInExpression(expr.index, transform, flags);\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n }\n else if (expr instanceof InvokeFunctionExpr) {\n expr.fn = transformExpressionsInExpression(expr.fn, transform, flags);\n for (let i = 0; i < expr.args.length; i++) {\n expr.args[i] = transformExpressionsInExpression(expr.args[i], transform, flags);\n }\n }\n else if (expr instanceof LiteralArrayExpr) {\n for (let i = 0; i < expr.entries.length; i++) {\n expr.entries[i] = transformExpressionsInExpression(expr.entries[i], transform, flags);\n }\n }\n else if (expr instanceof LiteralMapExpr) {\n for (let i = 0; i < expr.entries.length; i++) {\n expr.entries[i].value =\n transformExpressionsInExpression(expr.entries[i].value, transform, flags);\n }\n }\n else if (expr instanceof ConditionalExpr) {\n expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);\n expr.trueCase = transformExpressionsInExpression(expr.trueCase, transform, flags);\n if (expr.falseCase !== null) {\n expr.falseCase = transformExpressionsInExpression(expr.falseCase, transform, flags);\n }\n }\n else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr ||\n expr instanceof LiteralExpr) {\n // No action for these types.\n }\n else {\n throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);\n }\n return transform(expr, flags);\n}\n/**\n * Transform all `Expression`s in the AST of `stmt` with the `transform` function.\n *\n * All such operations will be replaced with the result of applying `transform`, which may be an\n * identity transformation.\n */\nfunction transformExpressionsInStatement(stmt, transform, flags) {\n if (stmt instanceof ExpressionStatement) {\n stmt.expr = transformExpressionsInExpression(stmt.expr, transform, flags);\n }\n else if (stmt instanceof ReturnStatement) {\n stmt.value = transformExpressionsInExpression(stmt.value, transform, flags);\n }\n else if (stmt instanceof DeclareVarStmt) {\n if (stmt.value !== undefined) {\n stmt.value = transformExpressionsInExpression(stmt.value, transform, flags);\n }\n }\n else {\n throw new Error(`Unhandled statement kind: ${stmt.constructor.name}`);\n }\n}\n\n/**\n * A linked list of `Op` nodes of a given subtype.\n *\n * @param OpT specific subtype of `Op` nodes which this list contains.\n */\nclass OpList {\n static { this.nextListId = 0; }\n constructor() {\n /**\n * Debug ID of this `OpList` instance.\n */\n this.debugListId = OpList.nextListId++;\n // OpList uses static head/tail nodes of a special `ListEnd` type.\n // This avoids the need for special casing of the first and last list\n // elements in all list operations.\n this.head = {\n kind: OpKind.ListEnd,\n next: null,\n prev: null,\n debugListId: this.debugListId,\n };\n this.tail = {\n kind: OpKind.ListEnd,\n next: null,\n prev: null,\n debugListId: this.debugListId,\n };\n // Link `head` and `tail` together at the start (list is empty).\n this.head.next = this.tail;\n this.tail.prev = this.head;\n }\n /**\n * Push a new operation to the tail of the list.\n */\n push(op) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = this.debugListId;\n // The old \"previous\" node (which might be the head, if the list is empty).\n const oldLast = this.tail.prev;\n // Insert `op` following the old last node.\n op.prev = oldLast;\n oldLast.next = op;\n // Connect `op` with the list tail.\n op.next = this.tail;\n this.tail.prev = op;\n }\n /**\n * Prepend one or more nodes to the start of the list.\n */\n prepend(ops) {\n if (ops.length === 0) {\n return;\n }\n for (const op of ops) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = this.debugListId;\n }\n const first = this.head.next;\n let prev = this.head;\n for (const op of ops) {\n prev.next = op;\n op.prev = prev;\n prev = op;\n }\n prev.next = first;\n first.prev = prev;\n }\n /**\n * `OpList` is iterable via the iteration protocol.\n *\n * It's safe to mutate the part of the list that has already been returned by the iterator, up to\n * and including the last operation returned. Mutations beyond that point _may_ be safe, but may\n * also corrupt the iteration position and should be avoided.\n */\n *[Symbol.iterator]() {\n let current = this.head.next;\n while (current !== this.tail) {\n // Guards against corruption of the iterator state by mutations to the tail of the list during\n // iteration.\n OpList.assertIsOwned(current, this.debugListId);\n const next = current.next;\n yield current;\n current = next;\n }\n }\n *reversed() {\n let current = this.tail.prev;\n while (current !== this.head) {\n OpList.assertIsOwned(current, this.debugListId);\n const prev = current.prev;\n yield current;\n current = prev;\n }\n }\n /**\n * Replace `oldOp` with `newOp` in the list.\n */\n static replace(oldOp, newOp) {\n OpList.assertIsNotEnd(oldOp);\n OpList.assertIsNotEnd(newOp);\n OpList.assertIsOwned(oldOp);\n OpList.assertIsUnowned(newOp);\n newOp.debugListId = oldOp.debugListId;\n if (oldOp.prev !== null) {\n oldOp.prev.next = newOp;\n newOp.prev = oldOp.prev;\n }\n if (oldOp.next !== null) {\n oldOp.next.prev = newOp;\n newOp.next = oldOp.next;\n }\n oldOp.debugListId = null;\n oldOp.prev = null;\n oldOp.next = null;\n }\n /**\n * Replace `oldOp` with some number of new operations in the list (which may include `oldOp`).\n */\n static replaceWithMany(oldOp, newOps) {\n if (newOps.length === 0) {\n // Replacing with an empty list -> pure removal.\n OpList.remove(oldOp);\n return;\n }\n OpList.assertIsNotEnd(oldOp);\n OpList.assertIsOwned(oldOp);\n const listId = oldOp.debugListId;\n oldOp.debugListId = null;\n for (const newOp of newOps) {\n OpList.assertIsNotEnd(newOp);\n // `newOp` might be `oldOp`, but at this point it's been marked as unowned.\n OpList.assertIsUnowned(newOp);\n }\n // It should be safe to reuse `oldOp` in the `newOps` list - maybe you want to sandwich an\n // operation between two new ops.\n const { prev: oldPrev, next: oldNext } = oldOp;\n oldOp.prev = null;\n oldOp.next = null;\n let prev = oldPrev;\n for (const newOp of newOps) {\n this.assertIsUnowned(newOp);\n newOp.debugListId = listId;\n prev.next = newOp;\n newOp.prev = prev;\n // This _should_ be the case, but set it just in case.\n newOp.next = null;\n prev = newOp;\n }\n // At the end of iteration, `prev` holds the last node in the list.\n const first = newOps[0];\n const last = prev;\n // Replace `oldOp` with the chain `first` -> `last`.\n if (oldPrev !== null) {\n oldPrev.next = first;\n first.prev = oldOp.prev;\n }\n if (oldNext !== null) {\n oldNext.prev = last;\n last.next = oldNext;\n }\n }\n /**\n * Remove the given node from the list which contains it.\n */\n static remove(op) {\n OpList.assertIsNotEnd(op);\n OpList.assertIsOwned(op);\n op.prev.next = op.next;\n op.next.prev = op.prev;\n // Break any link between the node and this list to safeguard against its usage in future\n // operations.\n op.debugListId = null;\n op.prev = null;\n op.next = null;\n }\n /**\n * Insert `op` before `target`.\n */\n static insertBefore(op, target) {\n OpList.assertIsOwned(target);\n if (target.prev === null) {\n throw new Error(`AssertionError: illegal operation on list start`);\n }\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = target.debugListId;\n // Just in case.\n op.prev = null;\n target.prev.next = op;\n op.prev = target.prev;\n op.next = target;\n target.prev = op;\n }\n /**\n * Insert `op` after `target`.\n */\n static insertAfter(op, target) {\n OpList.assertIsOwned(target);\n if (target.next === null) {\n throw new Error(`AssertionError: illegal operation on list end`);\n }\n OpList.assertIsNotEnd(op);\n OpList.assertIsUnowned(op);\n op.debugListId = target.debugListId;\n target.next.prev = op;\n op.next = target.next;\n op.prev = target;\n target.next = op;\n }\n /**\n * Asserts that `op` does not currently belong to a list.\n */\n static assertIsUnowned(op) {\n if (op.debugListId !== null) {\n throw new Error(`AssertionError: illegal operation on owned node: ${OpKind[op.kind]}`);\n }\n }\n /**\n * Asserts that `op` currently belongs to a list. If `byList` is passed, `op` is asserted to\n * specifically belong to that list.\n */\n static assertIsOwned(op, byList) {\n if (op.debugListId === null) {\n throw new Error(`AssertionError: illegal operation on unowned node: ${OpKind[op.kind]}`);\n }\n else if (byList !== undefined && op.debugListId !== byList) {\n throw new Error(`AssertionError: node belongs to the wrong list (expected ${byList}, actual ${op.debugListId})`);\n }\n }\n /**\n * Asserts that `op` is not a special `ListEnd` node.\n */\n static assertIsNotEnd(op) {\n if (op.kind === OpKind.ListEnd) {\n throw new Error(`AssertionError: illegal operation on list head or tail`);\n }\n }\n}\n\n/**\n * The set of OpKinds that represent the creation of an element or container\n */\nconst elementContainerOpKinds = new Set([\n OpKind.Element, OpKind.ElementStart, OpKind.Container, OpKind.ContainerStart, OpKind.Template\n]);\n/**\n * Checks whether the given operation represents the creation of an element or container.\n */\nfunction isElementOrContainerOp(op) {\n return elementContainerOpKinds.has(op.kind);\n}\n/**\n * Create an `ElementStartOp`.\n */\nfunction createElementStartOp(tag, xref, namespace, sourceSpan) {\n return {\n kind: OpKind.ElementStart,\n xref,\n tag,\n attributes: new ElementAttributes(),\n localRefs: [],\n nonBindable: false,\n namespace,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create a `TemplateOp`.\n */\nfunction createTemplateOp(xref, tag, namespace, sourceSpan) {\n return {\n kind: OpKind.Template,\n xref,\n attributes: new ElementAttributes(),\n tag,\n decls: null,\n vars: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create an `ElementEndOp`.\n */\nfunction createElementEndOp(xref, sourceSpan) {\n return {\n kind: OpKind.ElementEnd,\n xref,\n sourceSpan,\n ...NEW_OP,\n };\n}\nfunction createDisableBindingsOp(xref) {\n return {\n kind: OpKind.DisableBindings,\n xref,\n ...NEW_OP,\n };\n}\nfunction createEnableBindingsOp(xref) {\n return {\n kind: OpKind.EnableBindings,\n xref,\n ...NEW_OP,\n };\n}\n/**\n * Create a `TextOp`.\n */\nfunction createTextOp(xref, initialValue, sourceSpan) {\n return {\n kind: OpKind.Text,\n xref,\n initialValue,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create a `ListenerOp`.\n */\nfunction createListenerOp(target, name, tag) {\n return {\n kind: OpKind.Listener,\n target,\n tag,\n name,\n handlerOps: new OpList(),\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: false,\n animationPhase: null,\n ...NEW_OP,\n ...TRAIT_USES_SLOT_INDEX,\n };\n}\n/**\n * Create a `ListenerOp` for an animation.\n */\nfunction createListenerOpForAnimation(target, name, animationPhase, tag) {\n return {\n kind: OpKind.Listener,\n target,\n tag,\n name,\n handlerOps: new OpList(),\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: true,\n animationPhase,\n ...NEW_OP,\n ...TRAIT_USES_SLOT_INDEX,\n };\n}\nfunction createPipeOp(xref, name) {\n return {\n kind: OpKind.Pipe,\n xref,\n name,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n };\n}\n/**\n * Whether the active namespace is HTML, MathML, or SVG mode.\n */\nvar Namespace;\n(function (Namespace) {\n Namespace[Namespace[\"HTML\"] = 0] = \"HTML\";\n Namespace[Namespace[\"SVG\"] = 1] = \"SVG\";\n Namespace[Namespace[\"Math\"] = 2] = \"Math\";\n})(Namespace || (Namespace = {}));\nfunction createNamespaceOp(namespace) {\n return {\n kind: OpKind.Namespace,\n active: namespace,\n ...NEW_OP,\n };\n}\n\nfunction createHostPropertyOp(name, expression, sourceSpan) {\n return {\n kind: OpKind.HostProperty,\n name,\n expression,\n sourceSpan,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n\n/**\n * A compilation unit is compiled into a template function.\n * Some example units are views and host bindings.\n */\nclass CompilationUnit {\n constructor(xref) {\n this.xref = xref;\n /**\n * List of creation operations for this view.\n *\n * Creation operations may internally contain other operations, including update operations.\n */\n this.create = new OpList();\n /**\n * List of update operations for this view.\n */\n this.update = new OpList();\n /**\n * Name of the function which will be generated for this unit.\n *\n * May be `null` if not yet determined.\n */\n this.fnName = null;\n /**\n * Number of variable slots used within this view, or `null` if variables have not yet been\n * counted.\n */\n this.vars = null;\n }\n /**\n * Iterate over all `ir.Op`s within this view.\n *\n * Some operations may have child operations, which this iterator will visit.\n */\n *ops() {\n for (const op of this.create) {\n yield op;\n if (op.kind === OpKind.Listener) {\n for (const listenerOp of op.handlerOps) {\n yield listenerOp;\n }\n }\n }\n for (const op of this.update) {\n yield op;\n }\n }\n}\nclass HostBindingCompilationJob extends CompilationUnit {\n // TODO: Perhaps we should accept a reference to the enclosing component, and get the name from\n // there?\n constructor(componentName, pool, compatibility) {\n super(0);\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.fnSuffix = 'HostBindings';\n this.units = [this];\n this.nextXrefId = 1;\n }\n get job() {\n return this;\n }\n get root() {\n return this;\n }\n allocateXrefId() {\n return this.nextXrefId++;\n }\n}\n/**\n * Compilation-in-progress of a whole component's template, including the main template and any\n * embedded views or host bindings.\n */\nclass ComponentCompilationJob {\n get units() {\n return this.views.values();\n }\n constructor(componentName, pool, compatibility) {\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.fnSuffix = 'Template';\n /**\n * Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.\n */\n this.nextXrefId = 0;\n /**\n * Map of view IDs to `ViewCompilation`s.\n */\n this.views = new Map();\n /**\n * Constant expressions used by operations within this component's compilation.\n *\n * This will eventually become the `consts` array in the component definition.\n */\n this.consts = [];\n // Allocate the root view.\n const root = new ViewCompilationUnit(this, this.allocateXrefId(), null);\n this.views.set(root.xref, root);\n this.root = root;\n }\n /**\n * Add a `ViewCompilation` for a new embedded view to this compilation.\n */\n allocateView(parent) {\n const view = new ViewCompilationUnit(this, this.allocateXrefId(), parent);\n this.views.set(view.xref, view);\n return view;\n }\n /**\n * Generate a new unique `ir.XrefId` in this job.\n */\n allocateXrefId() {\n return this.nextXrefId++;\n }\n /**\n * Add a constant `o.Expression` to the compilation and return its index in the `consts` array.\n */\n addConst(newConst) {\n for (let idx = 0; idx < this.consts.length; idx++) {\n if (this.consts[idx].isEquivalent(newConst)) {\n return idx;\n }\n }\n const idx = this.consts.length;\n this.consts.push(newConst);\n return idx;\n }\n}\n/**\n * Compilation-in-progress of an individual view within a template.\n */\nclass ViewCompilationUnit extends CompilationUnit {\n constructor(job, xref, parent) {\n super(xref);\n this.job = job;\n this.parent = parent;\n /**\n * Map of declared variables available within this view to the property on the context object\n * which they alias.\n */\n this.contextVariables = new Map();\n /**\n * Number of declaration slots used within this view, or `null` if slots have not yet been\n * allocated.\n */\n this.decls = null;\n }\n get compatibility() {\n return this.job.compatibility;\n }\n}\n\n/**\n * Counts the number of variable slots used within each view, and stores that on the view itself, as\n * well as propagates it to the `ir.TemplateOp` for embedded views.\n */\nfunction phaseVarCounting(job) {\n // First, count the vars used in each view, and update the view-level counter.\n for (const unit of job.units) {\n let varCount = 0;\n for (const op of unit.ops()) {\n if (hasConsumesVarsTrait(op)) {\n varCount += varsUsedByOp(op);\n }\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n // Some expressions require knowledge of the number of variable slots consumed.\n if (hasUsesVarOffsetTrait(expr)) {\n expr.varOffset = varCount;\n }\n if (hasConsumesVarsTrait(expr)) {\n varCount += varsUsedByIrExpression(expr);\n }\n });\n }\n unit.vars = varCount;\n }\n if (job instanceof ComponentCompilationJob) {\n // Add var counts for each view to the `ir.TemplateOp` which declares that view (if the view is\n // an embedded view).\n for (const view of job.views.values()) {\n for (const op of view.create) {\n if (op.kind !== OpKind.Template) {\n continue;\n }\n const childView = job.views.get(op.xref);\n op.vars = childView.vars;\n }\n }\n }\n}\n/**\n * Different operations that implement `ir.UsesVarsTrait` use different numbers of variables, so\n * count the variables used by any particular `op`.\n */\nfunction varsUsedByOp(op) {\n let slots;\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.HostProperty:\n case OpKind.Attribute:\n // All of these bindings use 1 variable slot, plus 1 slot for every interpolated expression,\n // if any.\n slots = 1;\n if (op.expression instanceof Interpolation) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n case OpKind.StyleMap:\n case OpKind.ClassMap:\n // Style & class bindings use 2 variable slots, plus 1 slot for every interpolated expression,\n // if any.\n slots = 2;\n if (op.expression instanceof Interpolation) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.InterpolateText:\n // `ir.InterpolateTextOp`s use a variable slot for each dynamic expression.\n return op.interpolation.expressions.length;\n default:\n throw new Error(`Unhandled op: ${OpKind[op.kind]}`);\n }\n}\nfunction varsUsedByIrExpression(expr) {\n switch (expr.kind) {\n case ExpressionKind.PureFunctionExpr:\n return 1 + expr.args.length;\n case ExpressionKind.PipeBinding:\n return 1 + expr.args.length;\n case ExpressionKind.PipeBindingVariadic:\n return 1 + expr.numArgs;\n default:\n throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${expr.constructor.name}`);\n }\n}\n\nfunction phaseAlignPipeVariadicVarOffset(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.update) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof PipeBindingVariadicExpr)) {\n return expr;\n }\n if (!(expr.args instanceof PureFunctionExpr)) {\n return expr;\n }\n if (expr.varOffset === null || expr.args.varOffset === null) {\n throw new Error(`Must run after variable counting`);\n }\n // The structure of this variadic pipe expression is:\n // PipeBindingVariadic(#, Y, PureFunction(X, ...ARGS))\n // Where X and Y are the slot offsets for the variables used by these operations, and Y > X.\n // In `TemplateDefinitionBuilder` the PipeBindingVariadic variable slots are allocated\n // before the PureFunction slots, which is unusually out-of-order.\n //\n // To maintain identical output for the tests in question, we adjust the variable offsets of\n // these two calls to emulate TDB's behavior. This is not perfect, because the ARGS of the\n // PureFunction call may also allocate slots which by TDB's ordering would come after X, and\n // we don't account for that. Still, this should be enough to pass the existing pipe tests.\n // Put the PipeBindingVariadic vars where the PureFunction vars were previously allocated.\n expr.varOffset = expr.args.varOffset;\n // Put the PureFunction vars following the PipeBindingVariadic vars.\n expr.args.varOffset = expr.varOffset + varsUsedByIrExpression(expr);\n });\n }\n }\n}\n\n/**\n * Find any function calls to `$any`, excluding `this.$any`, and delete them.\n */\nfunction phaseFindAnyCasts(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.ops()) {\n transformExpressionsInOp(op, removeAnys, VisitorContextFlag.None);\n }\n }\n}\nfunction removeAnys(e) {\n if (e instanceof InvokeFunctionExpr && e.fn instanceof LexicalReadExpr &&\n e.fn.name === '$any') {\n if (e.args.length !== 1) {\n throw new Error('The $any builtin function expects exactly one argument.');\n }\n return e.args[0];\n }\n return e;\n}\n\n/**\n * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n * Example: `color: red; height: auto`.\n * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',\n * 'auto']`\n */\nfunction parse(value) {\n // we use a string array here instead of a string map\n // because a string-map is not guaranteed to retain the\n // order of the entries whereas a string array can be\n // constructed in a [key, value, key, value] format.\n const styles = [];\n let i = 0;\n let parenDepth = 0;\n let quote = 0 /* Char.QuoteNone */;\n let valueStart = 0;\n let propStart = 0;\n let currentProp = null;\n while (i < value.length) {\n const token = value.charCodeAt(i++);\n switch (token) {\n case 40 /* Char.OpenParen */:\n parenDepth++;\n break;\n case 41 /* Char.CloseParen */:\n parenDepth--;\n break;\n case 39 /* Char.QuoteSingle */:\n // valueStart needs to be there since prop values don't\n // have quotes in CSS\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 39 /* Char.QuoteSingle */;\n }\n else if (quote === 39 /* Char.QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 34 /* Char.QuoteDouble */:\n // same logic as above\n if (quote === 0 /* Char.QuoteNone */) {\n quote = 34 /* Char.QuoteDouble */;\n }\n else if (quote === 34 /* Char.QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {\n quote = 0 /* Char.QuoteNone */;\n }\n break;\n case 58 /* Char.Colon */:\n if (!currentProp && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n currentProp = hyphenate$1(value.substring(propStart, i - 1).trim());\n valueStart = i;\n }\n break;\n case 59 /* Char.Semicolon */:\n if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {\n const styleVal = value.substring(valueStart, i - 1).trim();\n styles.push(currentProp, styleVal);\n propStart = i;\n valueStart = 0;\n currentProp = null;\n }\n break;\n }\n }\n if (currentProp && valueStart) {\n const styleVal = value.slice(valueStart).trim();\n styles.push(currentProp, styleVal);\n }\n return styles;\n}\nfunction hyphenate$1(value) {\n return value\n .replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n })\n .toLowerCase();\n}\n\n/**\n * Gets a map of all elements in the given view by their xref id.\n */\nfunction getElementsByXrefId(view) {\n const elements = new Map();\n for (const op of view.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n return elements;\n}\n\n/**\n * Find all attribute and binding ops, and collect them into the ElementAttribute structures.\n * In cases where no instruction needs to be generated for the attribute or binding, it is removed.\n */\nfunction phaseAttributeExtraction(cpl) {\n for (const [_, view] of cpl.views) {\n populateElementAttributes(view);\n }\n}\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement$2(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\n/**\n * Populates the ElementAttributes map for the given view, and removes ops for any bindings that do\n * not need further processing.\n */\nfunction populateElementAttributes(view) {\n const elements = getElementsByXrefId(view);\n for (const op of view.ops()) {\n let ownerOp;\n switch (op.kind) {\n case OpKind.Attribute:\n extractAttributeOp(view, op, elements);\n break;\n case OpKind.Property:\n if (op.isAnimationTrigger) {\n continue; // Don't extract animation properties.\n }\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n ownerOp.attributes.add(op.isTemplate ? BindingKind.Template : BindingKind.Property, op.name, null);\n break;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n // Empty StyleProperty and ClassName expressions are treated differently depending on\n // compatibility mode.\n if (view.compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n op.expression instanceof EmptyExpr) {\n // The old compiler treated empty style bindings as regular bindings for the purpose of\n // directive matching. That behavior is incorrect, but we emulate it in compatibility\n // mode.\n ownerOp.attributes.add(BindingKind.Property, op.name, null);\n }\n break;\n case OpKind.Listener:\n if (op.isAnimationListener) {\n continue; // Don't extract animation listeners.\n }\n ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n ownerOp.attributes.add(BindingKind.Property, op.name, null);\n break;\n }\n }\n}\nfunction isStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string';\n}\nfunction extractAttributeOp(view, op, elements) {\n if (op.expression instanceof Interpolation) {\n return;\n }\n const ownerOp = lookupElement$2(elements, op.target);\n assertIsElementAttributes(ownerOp.attributes);\n if (op.name === 'style' && isStringLiteral(op.expression)) {\n // TemplateDefinitionBuilder did not extract style attributes that had a security context.\n if (view.compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n op.securityContext !== SecurityContext.NONE) {\n return;\n }\n // Extract style attributes.\n const parsedStyles = parse(op.expression.value);\n for (let i = 0; i < parsedStyles.length - 1; i += 2) {\n ownerOp.attributes.add(BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]));\n }\n OpList.remove(op);\n }\n else {\n // The old compiler only extracted string constants, so we emulate that behavior in\n // compaitiblity mode, otherwise we optimize more aggressively.\n let extractable = view.compatibility === CompatibilityMode.TemplateDefinitionBuilder ?\n (op.expression instanceof LiteralExpr && typeof op.expression.value === 'string') :\n op.expression.isConstant();\n // We don't need to generate instructions for attributes that can be extracted as consts.\n if (extractable) {\n ownerOp.attributes.add(op.isTemplate ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression);\n OpList.remove(op);\n }\n }\n}\n\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement$1(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\nfunction phaseBindingSpecialization(job) {\n const elements = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n }\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n switch (op.bindingKind) {\n case BindingKind.Attribute:\n if (op.name === 'ngNonBindable') {\n OpList.remove(op);\n const target = lookupElement$1(elements, op.target);\n target.nonBindable = true;\n }\n else {\n OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTemplate, op.sourceSpan));\n }\n break;\n case BindingKind.Property:\n case BindingKind.Animation:\n if (job instanceof HostBindingCompilationJob) {\n // TODO: host property animations\n OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.sourceSpan));\n }\n else {\n OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isTemplate, op.sourceSpan));\n }\n break;\n case BindingKind.I18n:\n case BindingKind.ClassName:\n case BindingKind.StyleProperty:\n throw new Error(`Unhandled binding of kind ${BindingKind[op.bindingKind]}`);\n }\n }\n }\n}\n\nconst CHAINABLE = new Set([\n Identifiers.elementStart,\n Identifiers.elementEnd,\n Identifiers.element,\n Identifiers.property,\n Identifiers.hostProperty,\n Identifiers.styleProp,\n Identifiers.attribute,\n Identifiers.stylePropInterpolate1,\n Identifiers.stylePropInterpolate2,\n Identifiers.stylePropInterpolate3,\n Identifiers.stylePropInterpolate4,\n Identifiers.stylePropInterpolate5,\n Identifiers.stylePropInterpolate6,\n Identifiers.stylePropInterpolate7,\n Identifiers.stylePropInterpolate8,\n Identifiers.stylePropInterpolateV,\n Identifiers.classProp,\n Identifiers.listener,\n Identifiers.elementContainerStart,\n Identifiers.elementContainerEnd,\n Identifiers.elementContainer,\n Identifiers.listener,\n]);\n/**\n * Post-process a reified view compilation and convert sequential calls to chainable instructions\n * into chain calls.\n *\n * For example, two `elementStart` operations in sequence:\n *\n * ```typescript\n * elementStart(0, 'div');\n * elementStart(1, 'span');\n * ```\n *\n * Can be called as a chain instead:\n *\n * ```typescript\n * elementStart(0, 'div')(1, 'span');\n * ```\n */\nfunction phaseChaining(job) {\n for (const unit of job.units) {\n chainOperationsInList(unit.create);\n chainOperationsInList(unit.update);\n }\n}\nfunction chainOperationsInList(opList) {\n let chain = null;\n for (const op of opList) {\n if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement)) {\n // This type of statement isn't chainable.\n chain = null;\n continue;\n }\n if (!(op.statement.expr instanceof InvokeFunctionExpr) ||\n !(op.statement.expr.fn instanceof ExternalExpr)) {\n // This is a statement, but not an instruction-type call, so not chainable.\n chain = null;\n continue;\n }\n const instruction = op.statement.expr.fn.value;\n if (!CHAINABLE.has(instruction)) {\n // This instruction isn't chainable.\n chain = null;\n continue;\n }\n // This instruction can be chained. It can either be added on to the previous chain (if\n // compatible) or it can be the start of a new chain.\n if (chain !== null && chain.instruction === instruction) {\n // This instruction can be added onto the previous chain.\n const expression = chain.expression.callFn(op.statement.expr.args, op.statement.expr.sourceSpan, op.statement.expr.pure);\n chain.expression = expression;\n chain.op.statement = expression.toStmt();\n OpList.remove(op);\n }\n else {\n // Leave this instruction alone for now, but consider it the start of a new chain.\n chain = {\n op,\n instruction,\n expression: op.statement.expr,\n };\n }\n }\n}\n\n/**\n * Converts the semantic attributes of element-like operations (elements, templates) into constant\n * array expressions, and lifts them into the overall component `consts`.\n */\nfunction phaseConstCollection(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.create) {\n if (op.kind !== OpKind.ElementStart && op.kind !== OpKind.Element &&\n op.kind !== OpKind.Template) {\n continue;\n }\n else if (!(op.attributes instanceof ElementAttributes)) {\n continue;\n }\n const attrArray = serializeAttributes(op.attributes);\n if (attrArray.entries.length > 0) {\n op.attributes = cpl.addConst(attrArray);\n }\n else {\n op.attributes = null;\n }\n }\n }\n}\nfunction serializeAttributes({ attributes, bindings, classes, i18n, projectAs, styles, template }) {\n const attrArray = [...attributes];\n if (projectAs !== null) {\n attrArray.push(literal(5 /* core.AttributeMarker.ProjectAs */), literal(projectAs));\n }\n if (classes.length > 0) {\n attrArray.push(literal(1 /* core.AttributeMarker.Classes */), ...classes);\n }\n if (styles.length > 0) {\n attrArray.push(literal(2 /* core.AttributeMarker.Styles */), ...styles);\n }\n if (bindings.length > 0) {\n attrArray.push(literal(3 /* core.AttributeMarker.Bindings */), ...bindings);\n }\n if (template.length > 0) {\n attrArray.push(literal(4 /* core.AttributeMarker.Template */), ...template);\n }\n if (i18n.length > 0) {\n attrArray.push(literal(6 /* core.AttributeMarker.I18n */), ...i18n);\n }\n return literalArr(attrArray);\n}\n\nconst REPLACEMENTS = new Map([\n [OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],\n [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],\n]);\n/**\n * Replace sequences of mergable elements (e.g. `ElementStart` and `ElementEnd`) with a consolidated\n * element (e.g. `Element`).\n */\nfunction phaseEmptyElements(cpl) {\n for (const [_, view] of cpl.views) {\n for (const op of view.create) {\n const opReplacements = REPLACEMENTS.get(op.kind);\n if (opReplacements === undefined) {\n continue;\n }\n const [startKind, mergedKind] = opReplacements;\n if (op.prev !== null && op.prev.kind === startKind) {\n // Transmute the start instruction to the merged version. This is safe as they're designed\n // to be identical apart from the `kind`.\n op.prev.kind = mergedKind;\n // Remove the end instruction.\n OpList.remove(op);\n }\n }\n }\n}\n\n/**\n * Finds all unresolved safe read expressions, and converts them into the appropriate output AST\n * reads, guarded by null checks.\n */\nfunction phaseExpandSafeReads(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, e => safeTransform(e, { job }), VisitorContextFlag.None);\n transformExpressionsInOp(op, ternaryTransform, VisitorContextFlag.None);\n }\n }\n}\n// A lookup set of all the expression kinds that require a temporary variable to be generated.\nconst requiresTemporary = [\n InvokeFunctionExpr, LiteralArrayExpr, LiteralMapExpr, SafeInvokeFunctionExpr,\n PipeBindingExpr\n].map(e => e.constructor.name);\nfunction needsTemporaryInSafeAccess(e) {\n // TODO: We probably want to use an expression visitor to recursively visit all descendents.\n // However, that would potentially do a lot of extra work (because it cannot short circuit), so we\n // implement the logic ourselves for now.\n if (e instanceof UnaryOperatorExpr) {\n return needsTemporaryInSafeAccess(e.expr);\n }\n else if (e instanceof BinaryOperatorExpr) {\n return needsTemporaryInSafeAccess(e.lhs) || needsTemporaryInSafeAccess(e.rhs);\n }\n else if (e instanceof ConditionalExpr) {\n if (e.falseCase && needsTemporaryInSafeAccess(e.falseCase))\n return true;\n return needsTemporaryInSafeAccess(e.condition) || needsTemporaryInSafeAccess(e.trueCase);\n }\n else if (e instanceof NotExpr) {\n return needsTemporaryInSafeAccess(e.condition);\n }\n else if (e instanceof AssignTemporaryExpr) {\n return needsTemporaryInSafeAccess(e.expr);\n }\n else if (e instanceof ReadPropExpr) {\n return needsTemporaryInSafeAccess(e.receiver);\n }\n else if (e instanceof ReadKeyExpr) {\n return needsTemporaryInSafeAccess(e.receiver) || needsTemporaryInSafeAccess(e.index);\n }\n // TODO: Switch to a method which is exhaustive of newly added expression subtypes.\n return e instanceof InvokeFunctionExpr || e instanceof LiteralArrayExpr ||\n e instanceof LiteralMapExpr || e instanceof SafeInvokeFunctionExpr ||\n e instanceof PipeBindingExpr;\n}\nfunction temporariesIn(e) {\n const temporaries = new Set();\n // TODO: Although it's not currently supported by the transform helper, we should be able to\n // short-circuit exploring the tree to do less work. In particular, we don't have to penetrate\n // into the subexpressions of temporary assignments.\n transformExpressionsInExpression(e, e => {\n if (e instanceof AssignTemporaryExpr) {\n temporaries.add(e.xref);\n }\n return e;\n }, VisitorContextFlag.None);\n return temporaries;\n}\nfunction eliminateTemporaryAssignments(e, tmps, ctx) {\n // TODO: We can be more efficient than the transform helper here. We don't need to visit any\n // descendents of temporary assignments.\n transformExpressionsInExpression(e, e => {\n if (e instanceof AssignTemporaryExpr && tmps.has(e.xref)) {\n const read = new ReadTemporaryExpr(e.xref);\n // `TemplateDefinitionBuilder` has the (accidental?) behavior of generating assignments of\n // temporary variables to themselves. This happens because some subexpression that the\n // temporary refers to, possibly through nested temporaries, has a function call. We copy that\n // behavior here.\n return ctx.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder ?\n new AssignTemporaryExpr(read, read.xref) :\n read;\n }\n return e;\n }, VisitorContextFlag.None);\n return e;\n}\n/**\n * Creates a safe ternary guarded by the input expression, and with a body generated by the provided\n * callback on the input expression. Generates a temporary variable assignment if needed, and\n * deduplicates nested temporary assignments if needed.\n */\nfunction safeTernaryWithTemporary(guard, body, ctx) {\n let result;\n if (needsTemporaryInSafeAccess(guard)) {\n const xref = ctx.job.allocateXrefId();\n result = [new AssignTemporaryExpr(guard, xref), new ReadTemporaryExpr(xref)];\n }\n else {\n result = [guard, guard.clone()];\n // Consider an expression like `a?.[b?.c()]?.d`. The `b?.c()` will be transformed first,\n // introducing a temporary assignment into the key. Then, as part of expanding the `?.d`. That\n // assignment will be duplicated into both the guard and expression sides. We de-duplicate it,\n // by transforming it from an assignment into a read on the expression side.\n eliminateTemporaryAssignments(result[1], temporariesIn(result[0]), ctx);\n }\n return new SafeTernaryExpr(result[0], body(result[1]));\n}\nfunction isSafeAccessExpression(e) {\n return e instanceof SafePropertyReadExpr || e instanceof SafeKeyedReadExpr ||\n e instanceof SafeInvokeFunctionExpr;\n}\nfunction isUnsafeAccessExpression(e) {\n return e instanceof ReadPropExpr || e instanceof ReadKeyExpr ||\n e instanceof InvokeFunctionExpr;\n}\nfunction isAccessExpression(e) {\n return isSafeAccessExpression(e) || isUnsafeAccessExpression(e);\n}\nfunction deepestSafeTernary(e) {\n if (isAccessExpression(e) && e.receiver instanceof SafeTernaryExpr) {\n let st = e.receiver;\n while (st.expr instanceof SafeTernaryExpr) {\n st = st.expr;\n }\n return st;\n }\n return null;\n}\n// TODO: When strict compatibility with TemplateDefinitionBuilder is not required, we can use `&&`\n// instead to save some code size.\nfunction safeTransform(e, ctx) {\n if (!isAccessExpression(e)) {\n return e;\n }\n const dst = deepestSafeTernary(e);\n if (dst) {\n if (e instanceof InvokeFunctionExpr) {\n dst.expr = dst.expr.callFn(e.args);\n return e.receiver;\n }\n if (e instanceof ReadPropExpr) {\n dst.expr = dst.expr.prop(e.name);\n return e.receiver;\n }\n if (e instanceof ReadKeyExpr) {\n dst.expr = dst.expr.key(e.index);\n return e.receiver;\n }\n if (e instanceof SafeInvokeFunctionExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, (r) => r.callFn(e.args), ctx);\n return e.receiver;\n }\n if (e instanceof SafePropertyReadExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, (r) => r.prop(e.name), ctx);\n return e.receiver;\n }\n if (e instanceof SafeKeyedReadExpr) {\n dst.expr = safeTernaryWithTemporary(dst.expr, (r) => r.key(e.index), ctx);\n return e.receiver;\n }\n }\n else {\n if (e instanceof SafeInvokeFunctionExpr) {\n return safeTernaryWithTemporary(e.receiver, (r) => r.callFn(e.args), ctx);\n }\n if (e instanceof SafePropertyReadExpr) {\n return safeTernaryWithTemporary(e.receiver, (r) => r.prop(e.name), ctx);\n }\n if (e instanceof SafeKeyedReadExpr) {\n return safeTernaryWithTemporary(e.receiver, (r) => r.key(e.index), ctx);\n }\n }\n return e;\n}\nfunction ternaryTransform(e) {\n if (!(e instanceof SafeTernaryExpr)) {\n return e;\n }\n return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);\n}\n\n/**\n * Generate `ir.AdvanceOp`s in between `ir.UpdateOp`s that ensure the runtime's implicit slot\n * context will be advanced correctly.\n */\nfunction phaseGenerateAdvance(cpl) {\n for (const [_, view] of cpl.views) {\n // First build a map of all of the declarations in the view that have assigned slots.\n const slotMap = new Map();\n for (const op of view.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n else if (op.slot === null) {\n throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);\n }\n slotMap.set(op.xref, op.slot);\n }\n // Next, step through the update operations and generate `ir.AdvanceOp`s as required to ensure\n // the runtime's implicit slot counter will be set to the correct slot before executing each\n // update operation which depends on it.\n //\n // To do that, we track what the runtime's slot counter will be through the update operations.\n let slotContext = 0;\n for (const op of view.update) {\n if (!hasDependsOnSlotContextTrait(op)) {\n // `op` doesn't depend on the slot counter, so it can be skipped.\n continue;\n }\n else if (!slotMap.has(op.target)) {\n // We expect ops that _do_ depend on the slot counter to point at declarations that exist in\n // the `slotMap`.\n throw new Error(`AssertionError: reference to unknown slot for var ${op.target}`);\n }\n const slot = slotMap.get(op.target);\n // Does the slot counter need to be adjusted?\n if (slotContext !== slot) {\n // If so, generate an `ir.AdvanceOp` to advance the counter.\n const delta = slot - slotContext;\n if (delta < 0) {\n throw new Error(`AssertionError: slot counter should never need to move backwards`);\n }\n OpList.insertBefore(createAdvanceOp(delta, op.sourceSpan), op);\n slotContext = slot;\n }\n }\n }\n}\n\n/**\n * Generate a preamble sequence for each view creation block and listener function which declares\n * any variables that be referenced in other operations in the block.\n *\n * Variables generated include:\n * * a saved view context to be used to restore the current view in event listeners.\n * * the context of the restored view within event listener handlers.\n * * context variables from the current view as well as all parent views (including the root\n * context if needed).\n * * local references from elements within the current view and any lexical parents.\n *\n * Variables are generated here unconditionally, and may optimized away in future operations if it\n * turns out their values (and any side effects) are unused.\n */\nfunction phaseGenerateVariables(cpl) {\n recursivelyProcessView(cpl.root, /* there is no parent scope for the root view */ null);\n}\n/**\n * Process the given `ViewCompilation` and generate preambles for it and any listeners that it\n * declares.\n *\n * @param `parentScope` a scope extracted from the parent view which captures any variables which\n * should be inherited by this view. `null` if the current view is the root view.\n */\nfunction recursivelyProcessView(view, parentScope) {\n // Extract a `Scope` from this view.\n const scope = getScopeForView(view, parentScope);\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.Template:\n // Descend into child embedded views.\n recursivelyProcessView(view.job.views.get(op.xref), scope);\n break;\n case OpKind.Listener:\n // Prepend variables to listener handler functions.\n op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));\n break;\n }\n }\n // Prepend the declarations for all available variables in scope to the `update` block.\n const preambleOps = generateVariablesInScopeForView(view, scope);\n view.update.prepend(preambleOps);\n}\n/**\n * Process a view and generate a `Scope` representing the variables available for reference within\n * that view.\n */\nfunction getScopeForView(view, parent) {\n const scope = {\n view: view.xref,\n viewContextVariable: {\n kind: SemanticVariableKind.Context,\n name: null,\n view: view.xref,\n },\n contextVariables: new Map(),\n references: [],\n parent,\n };\n for (const identifier of view.contextVariables.keys()) {\n scope.contextVariables.set(identifier, {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier,\n });\n }\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.Element:\n case OpKind.ElementStart:\n case OpKind.Template:\n if (!Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: expected localRefs to be an array`);\n }\n // Record available local references from this element.\n for (let offset = 0; offset < op.localRefs.length; offset++) {\n scope.references.push({\n name: op.localRefs[offset].name,\n targetId: op.xref,\n offset,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.localRefs[offset].name,\n },\n });\n }\n break;\n }\n }\n return scope;\n}\n/**\n * Generate declarations for all variables that are in scope for a given view.\n *\n * This is a recursive process, as views inherit variables available from their parent view, which\n * itself may have inherited variables, etc.\n */\nfunction generateVariablesInScopeForView(view, scope) {\n const newOps = [];\n if (scope.view !== view.xref) {\n // Before generating variables for a parent view, we need to switch to the context of the parent\n // view with a `nextContext` expression. This context switching operation itself declares a\n // variable, because the context of the view may be referenced directly.\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr()));\n }\n // Add variables for all context variables available in this scope's view.\n for (const [name, value] of view.job.views.get(scope.view).contextVariables) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), new ReadPropExpr(new ContextExpr(scope.view), value)));\n }\n // Add variables for all local references declared for elements in this scope.\n for (const ref of scope.references) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.offset)));\n }\n if (scope.parent !== null) {\n // Recursively add variables from the parent scope.\n newOps.push(...generateVariablesInScopeForView(view, scope.parent));\n }\n return newOps;\n}\n\nconst STYLE_DOT = 'style.';\nconst CLASS_DOT = 'class.';\nfunction phaseHostStylePropertyParsing(job) {\n for (const op of job.update) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n if (op.name.startsWith(STYLE_DOT)) {\n op.bindingKind = BindingKind.StyleProperty;\n op.name = op.name.substring(STYLE_DOT.length);\n if (isCssCustomProperty$1(op.name)) {\n op.name = hyphenate(op.name);\n }\n const { property, suffix } = parseProperty$1(op.name);\n op.name = property;\n op.unit = suffix;\n }\n else if (op.name.startsWith('style!')) {\n // TODO: do we only transform !important?\n op.name = 'style';\n }\n else if (op.name.startsWith(CLASS_DOT)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty$1(op.name.substring(CLASS_DOT.length)).property;\n }\n }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\nfunction isCssCustomProperty$1(name) {\n return name.startsWith('--');\n}\nfunction hyphenate(value) {\n return value\n .replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n })\n .toLowerCase();\n}\nfunction parseProperty$1(name) {\n const overrideIndex = name.indexOf('!important');\n if (overrideIndex !== -1) {\n name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n }\n let suffix = null;\n let property = name;\n const unitIndex = name.lastIndexOf('.');\n if (unitIndex > 0) {\n suffix = name.slice(unitIndex + 1);\n property = name.substring(0, unitIndex);\n }\n return { property, suffix };\n}\n\n/**\n * Lifts local reference declarations on element-like structures within each view into an entry in\n * the `consts` array for the whole component.\n */\nfunction phaseLocalRefs(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.create) {\n switch (op.kind) {\n case OpKind.ElementStart:\n case OpKind.Element:\n case OpKind.Template:\n if (!Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: expected localRefs to be an array still`);\n }\n op.numSlotsUsed += op.localRefs.length;\n if (op.localRefs.length > 0) {\n const localRefs = serializeLocalRefs(op.localRefs);\n op.localRefs = cpl.addConst(localRefs);\n }\n else {\n op.localRefs = null;\n }\n break;\n }\n }\n }\n}\nfunction serializeLocalRefs(refs) {\n const constRefs = [];\n for (const ref of refs) {\n constRefs.push(literal(ref.name), literal(ref.target));\n }\n return literalArr(constRefs);\n}\n\n/**\n * Change namespaces between HTML, SVG and MathML, depending on the next element.\n */\nfunction phaseNamespace(job) {\n for (const [_, view] of job.views) {\n let activeNamespace = Namespace.HTML;\n for (const op of view.create) {\n if (op.kind !== OpKind.Element && op.kind !== OpKind.ElementStart) {\n continue;\n }\n if (op.namespace !== activeNamespace) {\n OpList.insertBefore(createNamespaceOp(op.namespace), op);\n activeNamespace = op.namespace;\n }\n }\n }\n}\n\nconst BINARY_OPERATORS = new Map([\n ['&&', BinaryOperator.And],\n ['>', BinaryOperator.Bigger],\n ['>=', BinaryOperator.BiggerEquals],\n ['&', BinaryOperator.BitwiseAnd],\n ['/', BinaryOperator.Divide],\n ['==', BinaryOperator.Equals],\n ['===', BinaryOperator.Identical],\n ['<', BinaryOperator.Lower],\n ['<=', BinaryOperator.LowerEquals],\n ['-', BinaryOperator.Minus],\n ['%', BinaryOperator.Modulo],\n ['*', BinaryOperator.Multiply],\n ['!=', BinaryOperator.NotEquals],\n ['!==', BinaryOperator.NotIdentical],\n ['??', BinaryOperator.NullishCoalesce],\n ['||', BinaryOperator.Or],\n ['+', BinaryOperator.Plus],\n]);\nconst NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]);\nfunction namespaceForKey(namespacePrefixKey) {\n if (namespacePrefixKey === null) {\n return Namespace.HTML;\n }\n return NAMESPACES.get(namespacePrefixKey) ?? Namespace.HTML;\n}\nfunction keyForNamespace(namespace) {\n for (const [k, n] of NAMESPACES.entries()) {\n if (n === namespace) {\n return k;\n }\n }\n return null; // No namespace prefix for HTML\n}\nfunction prefixWithNamespace(strippedTag, namespace) {\n if (namespace === Namespace.HTML) {\n return strippedTag;\n }\n return `:${keyForNamespace(namespace)}:${strippedTag}`;\n}\n\n/**\n * Generate names for functions and variables across all views.\n *\n * This includes propagating those names into any `ir.ReadVariableExpr`s of those variables, so that\n * the reads can be emitted correctly.\n */\nfunction phaseNaming(cpl) {\n addNamesToView(cpl.root, cpl.componentName, { index: 0 }, cpl.compatibility === CompatibilityMode.TemplateDefinitionBuilder);\n}\nfunction addNamesToView(unit, baseName, state, compatibility) {\n if (unit.fnName === null) {\n unit.fnName = sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`);\n }\n // Keep track of the names we assign to variables in the view. We'll need to propagate these\n // into reads of those variables afterwards.\n const varNames = new Map();\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Property:\n if (op.isAnimationTrigger) {\n op.name = '@' + op.name;\n }\n break;\n case OpKind.Listener:\n if (op.handlerFnName === null) {\n if (op.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n const safeTagName = op.tag.replace('-', '_');\n if (op.isAnimationListener) {\n op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${safeTagName}_animation_${op.name}_${op.animationPhase}_${op.slot}_listener`);\n op.name = `@${op.name}.${op.animationPhase}`;\n }\n else {\n op.handlerFnName =\n sanitizeIdentifier(`${unit.fnName}_${safeTagName}_${op.name}_${op.slot}_listener`);\n }\n }\n break;\n case OpKind.Variable:\n varNames.set(op.xref, getVariableName(op.variable, state));\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const childView = unit.job.views.get(op.xref);\n if (op.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n addNamesToView(childView, `${baseName}_${prefixWithNamespace(op.tag, op.namespace)}_${op.slot}`, state, compatibility);\n break;\n case OpKind.StyleProp:\n op.name = normalizeStylePropName(op.name);\n if (compatibility) {\n op.name = stripImportant(op.name);\n }\n break;\n case OpKind.ClassProp:\n if (compatibility) {\n op.name = stripImportant(op.name);\n }\n break;\n }\n }\n // Having named all variables declared in the view, now we can push those names into the\n // `ir.ReadVariableExpr` expressions which represent reads of those variables.\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof ReadVariableExpr) || expr.name !== null) {\n return;\n }\n if (!varNames.has(expr.xref)) {\n throw new Error(`Variable ${expr.xref} not yet named`);\n }\n expr.name = varNames.get(expr.xref);\n });\n }\n}\nfunction getVariableName(variable, state) {\n if (variable.name === null) {\n switch (variable.kind) {\n case SemanticVariableKind.Context:\n variable.name = `ctx_r${state.index++}`;\n break;\n case SemanticVariableKind.Identifier:\n variable.name = `${variable.identifier}_${state.index++}`;\n break;\n default:\n variable.name = `_r${state.index++}`;\n break;\n }\n }\n return variable.name;\n}\n/**\n * Normalizes a style prop name by hyphenating it (unless its a CSS variable).\n */\nfunction normalizeStylePropName(name) {\n return name.startsWith('--') ? name : hyphenate$1(name);\n}\n/**\n * Strips `!important` out of the given style or class name.\n */\nfunction stripImportant(name) {\n const importantIndex = name.indexOf('!important');\n if (importantIndex > -1) {\n return name.substring(0, importantIndex);\n }\n return name;\n}\n\n/**\n * Merges logically sequential `NextContextExpr` operations.\n *\n * `NextContextExpr` can be referenced repeatedly, \"popping\" the runtime's context stack each time.\n * When two such expressions appear back-to-back, it's possible to merge them together into a single\n * `NextContextExpr` that steps multiple contexts. This merging is possible if all conditions are\n * met:\n *\n * * The result of the `NextContextExpr` that's folded into the subsequent one is not stored (that\n * is, the call is purely side-effectful).\n * * No operations in between them uses the implicit context.\n */\nfunction phaseMergeNextContext(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.create) {\n if (op.kind === OpKind.Listener) {\n mergeNextContextsInOps(op.handlerOps);\n }\n }\n mergeNextContextsInOps(view.update);\n }\n}\nfunction mergeNextContextsInOps(ops) {\n for (const op of ops) {\n // Look for a candidate operation to maybe merge.\n if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement) ||\n !(op.statement.expr instanceof NextContextExpr)) {\n continue;\n }\n const mergeSteps = op.statement.expr.steps;\n // Try to merge this `ir.NextContextExpr`.\n let tryToMerge = true;\n for (let candidate = op.next; candidate.kind !== OpKind.ListEnd && tryToMerge; candidate = candidate.next) {\n visitExpressionsInOp(candidate, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return expr;\n }\n if (!tryToMerge) {\n // Either we've already merged, or failed to merge.\n return;\n }\n if (flags & VisitorContextFlag.InChildOperation) {\n // We cannot merge into child operations.\n return;\n }\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n // Merge the previous `ir.NextContextExpr` into this one.\n expr.steps += mergeSteps;\n OpList.remove(op);\n tryToMerge = false;\n break;\n case ExpressionKind.GetCurrentView:\n case ExpressionKind.Reference:\n // Can't merge past a dependency on the context.\n tryToMerge = false;\n break;\n }\n });\n }\n }\n}\n\nconst CONTAINER_TAG = 'ng-container';\n/**\n * Replace an `Element` or `ElementStart` whose tag is `ng-container` with a specific op.\n */\nfunction phaseNgContainer(cpl) {\n for (const [_, view] of cpl.views) {\n const updatedElementXrefs = new Set();\n for (const op of view.create) {\n if (op.kind === OpKind.ElementStart && op.tag === CONTAINER_TAG) {\n // Transmute the `ElementStart` instruction to `ContainerStart`.\n op.kind = OpKind.ContainerStart;\n updatedElementXrefs.add(op.xref);\n }\n if (op.kind === OpKind.ElementEnd && updatedElementXrefs.has(op.xref)) {\n // This `ElementEnd` is associated with an `ElementStart` we already transmuted.\n op.kind = OpKind.ContainerEnd;\n }\n }\n }\n}\n\n/**\n * Transforms special-case bindings with 'style' or 'class' in their names. Must run before the\n * main binding specialization pass.\n */\nfunction phaseNoListenersOnTemplates(job) {\n for (const unit of job.units) {\n let inTemplate = false;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.Template:\n inTemplate = true;\n break;\n case OpKind.ElementStart:\n case OpKind.Element:\n case OpKind.ContainerStart:\n case OpKind.Container:\n inTemplate = false;\n break;\n case OpKind.Listener:\n if (inTemplate) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\n\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupElement(elements, xref) {\n const el = elements.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an element-like target.');\n }\n return el;\n}\n/**\n * When a container is marked with `ngNonBindable`, the non-bindable characteristic also applies to\n * all descendants of that container. Therefore, we must emit `disableBindings` and `enableBindings`\n * instructions for every such container.\n */\nfunction phaseNonbindable(job) {\n const elements = new Map();\n for (const view of job.units) {\n for (const op of view.create) {\n if (!isElementOrContainerOp(op)) {\n continue;\n }\n elements.set(op.xref, op);\n }\n }\n for (const [_, view] of job.views) {\n for (const op of view.create) {\n if ((op.kind === OpKind.ElementStart || op.kind === OpKind.ContainerStart) &&\n op.nonBindable) {\n OpList.insertAfter(createDisableBindingsOp(op.xref), op);\n }\n if ((op.kind === OpKind.ElementEnd || op.kind === OpKind.ContainerEnd) &&\n lookupElement(elements, op.xref).nonBindable) {\n OpList.insertBefore(createEnableBindingsOp(op.xref), op);\n }\n }\n }\n}\n\nfunction phaseNullishCoalescing(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof BinaryOperatorExpr) ||\n expr.operator !== BinaryOperator.NullishCoalesce) {\n return expr;\n }\n const assignment = new AssignTemporaryExpr(expr.lhs.clone(), job.allocateXrefId());\n const read = new ReadTemporaryExpr(assignment.xref);\n // TODO: When not in compatibility mode for TemplateDefinitionBuilder, we can just emit\n // `t != null` instead of including an undefined check as well.\n return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.And, new BinaryOperatorExpr(BinaryOperator.NotIdentical, assignment, NULL_EXPR), new BinaryOperatorExpr(BinaryOperator.NotIdentical, read, new LiteralExpr(undefined))), read.clone(), expr.rhs);\n }, VisitorContextFlag.None);\n }\n }\n}\n\nfunction phasePipeCreation(cpl) {\n for (const view of cpl.views.values()) {\n processPipeBindingsInView(view);\n }\n}\nfunction processPipeBindingsInView(view) {\n for (const updateOp of view.update) {\n visitExpressionsInOp(updateOp, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.PipeBinding) {\n return;\n }\n if (flags & VisitorContextFlag.InChildOperation) {\n throw new Error(`AssertionError: pipe bindings should not appear in child expressions`);\n }\n if (!hasDependsOnSlotContextTrait(updateOp)) {\n throw new Error(`AssertionError: pipe binding associated with non-slot operation ${OpKind[updateOp.kind]}`);\n }\n addPipeToCreationBlock(view, updateOp.target, expr);\n });\n }\n}\nfunction addPipeToCreationBlock(view, afterTargetXref, binding) {\n // Find the appropriate point to insert the Pipe creation operation.\n // We're looking for `afterTargetXref` (and also want to insert after any other pipe operations\n // which might be beyond it).\n for (let op = view.create.head.next; op.kind !== OpKind.ListEnd; op = op.next) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n if (op.xref !== afterTargetXref) {\n continue;\n }\n // We've found a tentative insertion point; however, we also want to skip past any _other_ pipe\n // operations present.\n while (op.next.kind === OpKind.Pipe) {\n op = op.next;\n }\n const pipe = createPipeOp(binding.target, binding.name);\n OpList.insertBefore(pipe, op.next);\n // This completes adding the pipe to the creation block.\n return;\n }\n // At this point, we've failed to add the pipe to the creation block.\n throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);\n}\n\nfunction phasePipeVariadic(cpl) {\n for (const view of cpl.views.values()) {\n for (const op of view.update) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof PipeBindingExpr)) {\n return expr;\n }\n // Pipes are variadic if they have more than 4 arguments.\n if (expr.args.length <= 4) {\n return expr;\n }\n return new PipeBindingVariadicExpr(expr.target, expr.name, literalArr(expr.args), expr.args.length);\n }, VisitorContextFlag.None);\n }\n }\n}\n\nfunction kindTest(kind) {\n return (op) => op.kind === kind;\n}\n/**\n * Defines the groups based on `OpKind` that ops will be divided into. Ops will be collected into\n * groups, then optionally transformed, before recombining the groups in the order defined here.\n */\nconst ORDERING = [\n { test: kindTest(OpKind.StyleMap), transform: keepLast },\n { test: kindTest(OpKind.ClassMap), transform: keepLast },\n { test: kindTest(OpKind.StyleProp) },\n { test: kindTest(OpKind.ClassProp) },\n {\n test: (op) => (op.kind === OpKind.Property || op.kind === OpKind.HostProperty) &&\n op.expression instanceof Interpolation\n },\n {\n test: (op) => (op.kind === OpKind.Property || op.kind === OpKind.HostProperty) &&\n !(op.expression instanceof Interpolation)\n },\n { test: kindTest(OpKind.Attribute) },\n];\n/**\n * The set of all op kinds we handle in the reordering phase.\n */\nconst handledOpKinds = new Set([\n OpKind.StyleMap,\n OpKind.ClassMap,\n OpKind.StyleProp,\n OpKind.ClassProp,\n OpKind.Property,\n OpKind.HostProperty,\n OpKind.Attribute,\n]);\n/**\n * Reorders property and attribute ops according to the following ordering:\n * 1. styleMap & styleMapInterpolate (drops all but the last op in the group)\n * 2. classMap & classMapInterpolate (drops all but the last op in the group)\n * 3. styleProp & stylePropInterpolate (ordering preserved within group)\n * 4. classProp (ordering preserved within group)\n * 5. propertyInterpolate (ordering preserved within group)\n * 6. property (ordering preserved within group)\n * 7. attribute & attributeInterpolate (ordering preserve within group)\n */\nfunction phasePropertyOrdering(cpl) {\n for (const unit of cpl.units) {\n let opsToOrder = [];\n for (const op of unit.update) {\n if (handledOpKinds.has(op.kind)) {\n // Pull out ops that need o be ordered.\n opsToOrder.push(op);\n OpList.remove(op);\n }\n else {\n // When we encounter an op that shouldn't be reordered, put the ones we've pulled so far\n // back in the correct order.\n for (const orderedOp of reorder(opsToOrder)) {\n OpList.insertBefore(orderedOp, op);\n }\n opsToOrder = [];\n }\n }\n // If we still have ops pulled at the end, put them back in the correct order.\n for (const orderedOp of reorder(opsToOrder)) {\n unit.update.push(orderedOp);\n }\n }\n}\n/**\n * Reorders the given list of ops according to the ordering defined by `ORDERING`.\n */\nfunction reorder(ops) {\n // Break the ops list into groups based on OpKind.\n const groups = Array.from(ORDERING, () => new Array());\n for (const op of ops) {\n const groupIndex = ORDERING.findIndex(o => o.test(op));\n groups[groupIndex].push(op);\n }\n // Reassemble the groups into a single list, in the correct order.\n return groups.flatMap((group, i) => {\n const transform = ORDERING[i].transform;\n return transform ? transform(group) : group;\n });\n}\n/**\n * Keeps only the last op in a list of ops.\n */\nfunction keepLast(ops) {\n return ops.slice(ops.length - 1);\n}\n\nfunction phasePureFunctionExtraction(job) {\n for (const view of job.units) {\n for (const op of view.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!(expr instanceof PureFunctionExpr) || expr.body === null) {\n return;\n }\n const constantDef = new PureFunctionConstant(expr.args.length);\n expr.fn = job.pool.getSharedConstant(constantDef, expr.body);\n expr.body = null;\n });\n }\n }\n}\nclass PureFunctionConstant extends GenericKeyFn {\n constructor(numArgs) {\n super();\n this.numArgs = numArgs;\n }\n keyOf(expr) {\n if (expr instanceof PureFunctionParameterExpr) {\n return `param(${expr.index})`;\n }\n else {\n return super.keyOf(expr);\n }\n }\n toSharedConstantDeclaration(declName, keyExpr) {\n const fnParams = [];\n for (let idx = 0; idx < this.numArgs; idx++) {\n fnParams.push(new FnParam('_p' + idx));\n }\n // We will never visit `ir.PureFunctionParameterExpr`s that don't belong to us, because this\n // transform runs inside another visitor which will visit nested pure functions before this one.\n const returnExpr = transformExpressionsInExpression(keyExpr, expr => {\n if (!(expr instanceof PureFunctionParameterExpr)) {\n return expr;\n }\n return variable('_p' + expr.index);\n }, VisitorContextFlag.None);\n return new DeclareFunctionStmt(declName, fnParams, [new ReturnStatement(returnExpr)]);\n }\n}\n\nfunction phasePureLiteralStructures(job) {\n for (const view of job.units) {\n for (const op of view.update) {\n transformExpressionsInOp(op, (expr, flags) => {\n if (flags & VisitorContextFlag.InChildOperation) {\n return expr;\n }\n if (expr instanceof LiteralArrayExpr) {\n return transformLiteralArray(expr);\n }\n else if (expr instanceof LiteralMapExpr) {\n return transformLiteralMap(expr);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n }\n}\nfunction transformLiteralArray(expr) {\n const derivedEntries = [];\n const nonConstantArgs = [];\n for (const entry of expr.entries) {\n if (entry.isConstant()) {\n derivedEntries.push(entry);\n }\n else {\n const idx = nonConstantArgs.length;\n nonConstantArgs.push(entry);\n derivedEntries.push(new PureFunctionParameterExpr(idx));\n }\n }\n return new PureFunctionExpr(literalArr(derivedEntries), nonConstantArgs);\n}\nfunction transformLiteralMap(expr) {\n let derivedEntries = [];\n const nonConstantArgs = [];\n for (const entry of expr.entries) {\n if (entry.value.isConstant()) {\n derivedEntries.push(entry);\n }\n else {\n const idx = nonConstantArgs.length;\n nonConstantArgs.push(entry.value);\n derivedEntries.push(new LiteralMapEntry(entry.key, new PureFunctionParameterExpr(idx), entry.quoted));\n }\n }\n return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);\n}\n\n// This file contains helpers for generating calls to Ivy instructions. In particular, each\n// instruction type is represented as a function, which may select a specific instruction variant\n// depending on the exact arguments.\nfunction element(slot, tag, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementStart, slot, tag, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementOrContainerBase(instruction, slot, tag, constIndex, localRefIndex, sourceSpan) {\n const args = [literal(slot)];\n if (tag !== null) {\n args.push(literal(tag));\n }\n if (localRefIndex !== null) {\n args.push(literal(constIndex), // might be null, but that's okay.\n literal(localRefIndex));\n }\n else if (constIndex !== null) {\n args.push(literal(constIndex));\n }\n return call(instruction, args, sourceSpan);\n}\nfunction elementEnd(sourceSpan) {\n return call(Identifiers.elementEnd, [], sourceSpan);\n}\nfunction elementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementContainerStart, slot, /* tag */ null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainer(slot, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementContainer, slot, /* tag */ null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainerEnd() {\n return call(Identifiers.elementContainerEnd, [], null);\n}\nfunction template(slot, templateFnRef, decls, vars, tag, constIndex, sourceSpan) {\n return call(Identifiers.templateCreate, [\n literal(slot),\n templateFnRef,\n literal(decls),\n literal(vars),\n literal(tag),\n literal(constIndex),\n ], sourceSpan);\n}\nfunction disableBindings() {\n return call(Identifiers.disableBindings, [], null);\n}\nfunction enableBindings() {\n return call(Identifiers.enableBindings, [], null);\n}\nfunction listener(name, handlerFn) {\n return call(Identifiers.listener, [\n literal(name),\n handlerFn,\n ], null);\n}\nfunction pipe(slot, name) {\n return call(Identifiers.pipe, [\n literal(slot),\n literal(name),\n ], null);\n}\nfunction namespaceHTML() {\n return call(Identifiers.namespaceHTML, [], null);\n}\nfunction namespaceSVG() {\n return call(Identifiers.namespaceSVG, [], null);\n}\nfunction namespaceMath() {\n return call(Identifiers.namespaceMathML, [], null);\n}\nfunction advance(delta, sourceSpan) {\n return call(Identifiers.advance, [\n literal(delta),\n ], sourceSpan);\n}\nfunction reference(slot) {\n return importExpr(Identifiers.reference).callFn([\n literal(slot),\n ]);\n}\nfunction nextContext(steps) {\n return importExpr(Identifiers.nextContext).callFn(steps === 1 ? [] : [literal(steps)]);\n}\nfunction getCurrentView() {\n return importExpr(Identifiers.getCurrentView).callFn([]);\n}\nfunction restoreView(savedView) {\n return importExpr(Identifiers.restoreView).callFn([\n savedView,\n ]);\n}\nfunction resetView(returnValue) {\n return importExpr(Identifiers.resetView).callFn([\n returnValue,\n ]);\n}\nfunction text(slot, initialValue, sourceSpan) {\n const args = [literal(slot, null)];\n if (initialValue !== '') {\n args.push(literal(initialValue));\n }\n return call(Identifiers.text, args, sourceSpan);\n}\nfunction property(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.property, args, sourceSpan);\n}\nfunction attribute(name, expression, sanitizer) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.attribute, args, null);\n}\nfunction styleProp(name, expression, unit) {\n const args = [literal(name), expression];\n if (unit !== null) {\n args.push(literal(unit));\n }\n return call(Identifiers.styleProp, args, null);\n}\nfunction classProp(name, expression) {\n return call(Identifiers.classProp, [literal(name), expression], null);\n}\nfunction styleMap(expression) {\n return call(Identifiers.styleMap, [expression], null);\n}\nfunction classMap(expression) {\n return call(Identifiers.classMap, [expression], null);\n}\nconst PIPE_BINDINGS = [\n Identifiers.pipeBind1,\n Identifiers.pipeBind2,\n Identifiers.pipeBind3,\n Identifiers.pipeBind4,\n];\nfunction pipeBind(slot, varOffset, args) {\n if (args.length < 1 || args.length > PIPE_BINDINGS.length) {\n throw new Error(`pipeBind() argument count out of bounds`);\n }\n const instruction = PIPE_BINDINGS[args.length - 1];\n return importExpr(instruction).callFn([\n literal(slot),\n literal(varOffset),\n ...args,\n ]);\n}\nfunction pipeBindV(slot, varOffset, args) {\n return importExpr(Identifiers.pipeBindV).callFn([\n literal(slot),\n literal(varOffset),\n args,\n ]);\n}\nfunction textInterpolate(strings, expressions, sourceSpan) {\n if (strings.length < 1 || expressions.length !== strings.length - 1) {\n throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);\n }\n const interpolationArgs = [];\n if (expressions.length === 1 && strings[0] === '' && strings[1] === '') {\n interpolationArgs.push(expressions[0]);\n }\n else {\n let idx;\n for (idx = 0; idx < expressions.length; idx++) {\n interpolationArgs.push(literal(strings[idx]), expressions[idx]);\n }\n // idx points at the last string.\n interpolationArgs.push(literal(strings[idx]));\n }\n return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction propertyInterpolate(name, strings, expressions, sanitizer, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (sanitizer !== null) {\n extraArgs.push(sanitizer);\n }\n return callVariadicInstruction(PROPERTY_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, sourceSpan);\n}\nfunction attributeInterpolate(name, strings, expressions, sanitizer) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (sanitizer !== null) {\n extraArgs.push(sanitizer);\n }\n return callVariadicInstruction(ATTRIBUTE_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, null);\n}\nfunction stylePropInterpolate(name, strings, expressions, unit) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n const extraArgs = [];\n if (unit !== null) {\n extraArgs.push(literal(unit));\n }\n return callVariadicInstruction(STYLE_PROP_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs, extraArgs, null);\n}\nfunction styleMapInterpolate(strings, expressions) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(STYLE_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], null);\n}\nfunction classMapInterpolate(strings, expressions) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], null);\n}\nfunction hostProperty(name, expression) {\n return call(Identifiers.hostProperty, [literal(name), expression], null);\n}\nfunction pureFunction(varOffset, fn, args) {\n return callVariadicInstructionExpr(PURE_FUNCTION_CONFIG, [\n literal(varOffset),\n fn,\n ], args, [], null);\n}\n/**\n * Collates the string an expression arguments for an interpolation instruction.\n */\nfunction collateInterpolationArgs(strings, expressions) {\n if (strings.length < 1 || expressions.length !== strings.length - 1) {\n throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);\n }\n const interpolationArgs = [];\n if (expressions.length === 1 && strings[0] === '' && strings[1] === '') {\n interpolationArgs.push(expressions[0]);\n }\n else {\n let idx;\n for (idx = 0; idx < expressions.length; idx++) {\n interpolationArgs.push(literal(strings[idx]), expressions[idx]);\n }\n // idx points at the last string.\n interpolationArgs.push(literal(strings[idx]));\n }\n return interpolationArgs;\n}\nfunction call(instruction, args, sourceSpan) {\n const expr = importExpr(instruction).callFn(args, sourceSpan);\n return createStatementOp(new ExpressionStatement(expr, sourceSpan));\n}\n/**\n * `InterpolationConfig` for the `textInterpolate` instruction.\n */\nconst TEXT_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.textInterpolate,\n Identifiers.textInterpolate1,\n Identifiers.textInterpolate2,\n Identifiers.textInterpolate3,\n Identifiers.textInterpolate4,\n Identifiers.textInterpolate5,\n Identifiers.textInterpolate6,\n Identifiers.textInterpolate7,\n Identifiers.textInterpolate8,\n ],\n variable: Identifiers.textInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\n/**\n * `InterpolationConfig` for the `propertyInterpolate` instruction.\n */\nconst PROPERTY_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.propertyInterpolate,\n Identifiers.propertyInterpolate1,\n Identifiers.propertyInterpolate2,\n Identifiers.propertyInterpolate3,\n Identifiers.propertyInterpolate4,\n Identifiers.propertyInterpolate5,\n Identifiers.propertyInterpolate6,\n Identifiers.propertyInterpolate7,\n Identifiers.propertyInterpolate8,\n ],\n variable: Identifiers.propertyInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\n/**\n * `InterpolationConfig` for the `stylePropInterpolate` instruction.\n */\nconst STYLE_PROP_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.styleProp,\n Identifiers.stylePropInterpolate1,\n Identifiers.stylePropInterpolate2,\n Identifiers.stylePropInterpolate3,\n Identifiers.stylePropInterpolate4,\n Identifiers.stylePropInterpolate5,\n Identifiers.stylePropInterpolate6,\n Identifiers.stylePropInterpolate7,\n Identifiers.stylePropInterpolate8,\n ],\n variable: Identifiers.stylePropInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\n/**\n * `InterpolationConfig` for the `attributeInterpolate` instruction.\n */\nconst ATTRIBUTE_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.attribute,\n Identifiers.attributeInterpolate1,\n Identifiers.attributeInterpolate2,\n Identifiers.attributeInterpolate3,\n Identifiers.attributeInterpolate4,\n Identifiers.attributeInterpolate5,\n Identifiers.attributeInterpolate6,\n Identifiers.attributeInterpolate7,\n Identifiers.attributeInterpolate8,\n ],\n variable: Identifiers.attributeInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\n/**\n * `InterpolationConfig` for the `styleMapInterpolate` instruction.\n */\nconst STYLE_MAP_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.styleMap,\n Identifiers.styleMapInterpolate1,\n Identifiers.styleMapInterpolate2,\n Identifiers.styleMapInterpolate3,\n Identifiers.styleMapInterpolate4,\n Identifiers.styleMapInterpolate5,\n Identifiers.styleMapInterpolate6,\n Identifiers.styleMapInterpolate7,\n Identifiers.styleMapInterpolate8,\n ],\n variable: Identifiers.styleMapInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\n/**\n * `InterpolationConfig` for the `classMapInterpolate` instruction.\n */\nconst CLASS_MAP_INTERPOLATE_CONFIG = {\n constant: [\n Identifiers.classMap,\n Identifiers.classMapInterpolate1,\n Identifiers.classMapInterpolate2,\n Identifiers.classMapInterpolate3,\n Identifiers.classMapInterpolate4,\n Identifiers.classMapInterpolate5,\n Identifiers.classMapInterpolate6,\n Identifiers.classMapInterpolate7,\n Identifiers.classMapInterpolate8,\n ],\n variable: Identifiers.classMapInterpolateV,\n mapping: n => {\n if (n % 2 === 0) {\n throw new Error(`Expected odd number of arguments`);\n }\n return (n - 1) / 2;\n },\n};\nconst PURE_FUNCTION_CONFIG = {\n constant: [\n Identifiers.pureFunction0,\n Identifiers.pureFunction1,\n Identifiers.pureFunction2,\n Identifiers.pureFunction3,\n Identifiers.pureFunction4,\n Identifiers.pureFunction5,\n Identifiers.pureFunction6,\n Identifiers.pureFunction7,\n Identifiers.pureFunction8,\n ],\n variable: Identifiers.pureFunctionV,\n mapping: n => n,\n};\nfunction callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {\n const n = config.mapping(interpolationArgs.length);\n if (n < config.constant.length) {\n // Constant calling pattern.\n return importExpr(config.constant[n])\n .callFn([...baseArgs, ...interpolationArgs, ...extraArgs], sourceSpan);\n }\n else if (config.variable !== null) {\n // Variable calling pattern.\n return importExpr(config.variable)\n .callFn([...baseArgs, literalArr(interpolationArgs), ...extraArgs], sourceSpan);\n }\n else {\n throw new Error(`AssertionError: unable to call variadic function`);\n }\n}\nfunction callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {\n return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan)\n .toStmt());\n}\n\n/**\n * Map of sanitizers to their identifier.\n */\nconst sanitizerIdentifierMap = new Map([\n [SanitizerFn.Html, Identifiers.sanitizeHtml],\n [SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],\n [SanitizerFn.ResourceUrl, Identifiers.sanitizeResourceUrl],\n [SanitizerFn.Script, Identifiers.sanitizeScript],\n [SanitizerFn.Style, Identifiers.sanitizeStyle], [SanitizerFn.Url, Identifiers.sanitizeUrl]\n]);\n/**\n * Compiles semantic operations across all views and generates output `o.Statement`s with actual\n * runtime calls in their place.\n *\n * Reification replaces semantic operations with selected Ivy instructions and other generated code\n * structures. After reification, the create/update operation lists of all views should only contain\n * `ir.StatementOp`s (which wrap generated `o.Statement`s).\n */\nfunction phaseReify(cpl) {\n for (const unit of cpl.units) {\n reifyCreateOperations(unit, unit.create);\n reifyUpdateOperations(unit, unit.update);\n }\n}\nfunction reifyCreateOperations(unit, ops) {\n for (const op of ops) {\n transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);\n switch (op.kind) {\n case OpKind.Text:\n OpList.replace(op, text(op.slot, op.initialValue, op.sourceSpan));\n break;\n case OpKind.ElementStart:\n OpList.replace(op, elementStart(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.Element:\n OpList.replace(op, element(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.ElementEnd:\n OpList.replace(op, elementEnd(op.sourceSpan));\n break;\n case OpKind.ContainerStart:\n OpList.replace(op, elementContainerStart(op.slot, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.Container:\n OpList.replace(op, elementContainer(op.slot, op.attributes, op.localRefs, op.sourceSpan));\n break;\n case OpKind.ContainerEnd:\n OpList.replace(op, elementContainerEnd());\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const childView = unit.job.views.get(op.xref);\n OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.sourceSpan));\n break;\n case OpKind.DisableBindings:\n OpList.replace(op, disableBindings());\n break;\n case OpKind.EnableBindings:\n OpList.replace(op, enableBindings());\n break;\n case OpKind.Pipe:\n OpList.replace(op, pipe(op.slot, op.name));\n break;\n case OpKind.Listener:\n const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);\n OpList.replace(op, listener(op.name, listenerFn));\n break;\n case OpKind.Variable:\n if (op.variable.name === null) {\n throw new Error(`AssertionError: unnamed variable ${op.xref}`);\n }\n OpList.replace(op, createStatementOp(new DeclareVarStmt(op.variable.name, op.initializer, undefined, StmtModifier.Final)));\n break;\n case OpKind.Namespace:\n switch (op.active) {\n case Namespace.HTML:\n OpList.replace(op, namespaceHTML());\n break;\n case Namespace.SVG:\n OpList.replace(op, namespaceSVG());\n break;\n case Namespace.Math:\n OpList.replace(op, namespaceMath());\n break;\n }\n break;\n case OpKind.Statement:\n // Pass statement operations directly through.\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of create op ${OpKind[op.kind]}`);\n }\n }\n}\nfunction reifyUpdateOperations(_unit, ops) {\n for (const op of ops) {\n transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);\n switch (op.kind) {\n case OpKind.Advance:\n OpList.replace(op, advance(op.delta, op.sourceSpan));\n break;\n case OpKind.Property:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, propertyInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));\n }\n else {\n OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));\n }\n break;\n case OpKind.StyleProp:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, stylePropInterpolate(op.name, op.expression.strings, op.expression.expressions, op.unit));\n }\n else {\n OpList.replace(op, styleProp(op.name, op.expression, op.unit));\n }\n break;\n case OpKind.ClassProp:\n OpList.replace(op, classProp(op.name, op.expression));\n break;\n case OpKind.StyleMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, styleMapInterpolate(op.expression.strings, op.expression.expressions));\n }\n else {\n OpList.replace(op, styleMap(op.expression));\n }\n break;\n case OpKind.ClassMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, classMapInterpolate(op.expression.strings, op.expression.expressions));\n }\n else {\n OpList.replace(op, classMap(op.expression));\n }\n break;\n case OpKind.InterpolateText:\n OpList.replace(op, textInterpolate(op.interpolation.strings, op.interpolation.expressions, op.sourceSpan));\n break;\n case OpKind.Attribute:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer));\n }\n else {\n OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));\n }\n break;\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n throw new Error('not yet handled');\n }\n else {\n OpList.replace(op, hostProperty(op.name, op.expression));\n }\n break;\n case OpKind.Variable:\n if (op.variable.name === null) {\n throw new Error(`AssertionError: unnamed variable ${op.xref}`);\n }\n OpList.replace(op, createStatementOp(new DeclareVarStmt(op.variable.name, op.initializer, undefined, StmtModifier.Final)));\n break;\n case OpKind.Statement:\n // Pass statement operations directly through.\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of update op ${OpKind[op.kind]}`);\n }\n }\n}\nfunction reifyIrExpression(expr) {\n if (!isIrExpression(expr)) {\n return expr;\n }\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n return nextContext(expr.steps);\n case ExpressionKind.Reference:\n return reference(expr.slot + 1 + expr.offset);\n case ExpressionKind.LexicalRead:\n throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);\n case ExpressionKind.RestoreView:\n if (typeof expr.view === 'number') {\n throw new Error(`AssertionError: unresolved RestoreView`);\n }\n return restoreView(expr.view);\n case ExpressionKind.ResetView:\n return resetView(expr.expr);\n case ExpressionKind.GetCurrentView:\n return getCurrentView();\n case ExpressionKind.ReadVariable:\n if (expr.name === null) {\n throw new Error(`Read of unnamed variable ${expr.xref}`);\n }\n return variable(expr.name);\n case ExpressionKind.ReadTemporaryExpr:\n if (expr.name === null) {\n throw new Error(`Read of unnamed temporary ${expr.xref}`);\n }\n return variable(expr.name);\n case ExpressionKind.AssignTemporaryExpr:\n if (expr.name === null) {\n throw new Error(`Assign of unnamed temporary ${expr.xref}`);\n }\n return variable(expr.name).set(expr.expr);\n case ExpressionKind.PureFunctionExpr:\n if (expr.fn === null) {\n throw new Error(`AssertionError: expected PureFunctions to have been extracted`);\n }\n return pureFunction(expr.varOffset, expr.fn, expr.args);\n case ExpressionKind.PureFunctionParameterExpr:\n throw new Error(`AssertionError: expected PureFunctionParameterExpr to have been extracted`);\n case ExpressionKind.PipeBinding:\n return pipeBind(expr.slot, expr.varOffset, expr.args);\n case ExpressionKind.PipeBindingVariadic:\n return pipeBindV(expr.slot, expr.varOffset, expr.args);\n case ExpressionKind.SanitizerExpr:\n return importExpr(sanitizerIdentifierMap.get(expr.fn));\n default:\n throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);\n }\n}\n/**\n * Listeners get turned into a function expression, which may or may not have the `$event`\n * parameter defined.\n */\nfunction reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {\n // First, reify all instruction calls within `handlerOps`.\n reifyUpdateOperations(unit, handlerOps);\n // Next, extract all the `o.Statement`s from the reified operations. We can expect that at this\n // point, all operations have been converted to statements.\n const handlerStmts = [];\n for (const op of handlerOps) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected reified statements, but found op ${OpKind[op.kind]}`);\n }\n handlerStmts.push(op.statement);\n }\n // If `$event` is referenced, we need to generate it as a parameter.\n const params = [];\n if (consumesDollarEvent) {\n // We need the `$event` parameter.\n params.push(new FnParam('$event'));\n }\n return fn(params, handlerStmts, undefined, undefined, name);\n}\n\nfunction phaseRemoveEmptyBindings(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Attribute:\n case OpKind.Binding:\n case OpKind.ClassProp:\n case OpKind.ClassMap:\n case OpKind.Property:\n case OpKind.StyleProp:\n case OpKind.StyleMap:\n if (op.expression instanceof EmptyExpr) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\n\n/**\n * Resolves `ir.ContextExpr` expressions (which represent embedded view or component contexts) to\n * either the `ctx` parameter to component functions (for the current view context) or to variables\n * that store those contexts (for contexts accessed via the `nextContext()` instruction).\n */\nfunction phaseResolveContexts(cpl) {\n for (const unit of cpl.units) {\n processLexicalScope$1(unit, unit.create);\n processLexicalScope$1(unit, unit.update);\n }\n}\nfunction processLexicalScope$1(view, ops) {\n // Track the expressions used to access all available contexts within the current view, by the\n // view `ir.XrefId`.\n const scope = new Map();\n // The current view's context is accessible via the `ctx` parameter.\n scope.set(view.xref, variable('ctx'));\n for (const op of ops) {\n switch (op.kind) {\n case OpKind.Variable:\n switch (op.variable.kind) {\n case SemanticVariableKind.Context:\n scope.set(op.variable.view, new ReadVariableExpr(op.xref));\n break;\n }\n break;\n case OpKind.Listener:\n processLexicalScope$1(view, op.handlerOps);\n break;\n }\n }\n for (const op of ops) {\n transformExpressionsInOp(op, expr => {\n if (expr instanceof ContextExpr) {\n if (!scope.has(expr.view)) {\n throw new Error(`No context found for reference to view ${expr.view} from view ${view.xref}`);\n }\n return scope.get(expr.view);\n }\n else {\n return expr;\n }\n }, VisitorContextFlag.None);\n }\n}\n\n/**\n * Any variable inside a listener with the name `$event` will be transformed into a output lexical\n * read immediately, and does not participate in any of the normal logic for handling variables.\n */\nfunction phaseResolveDollarEvent(cpl) {\n for (const [_, view] of cpl.views) {\n resolveDollarEvent(view, view.create);\n resolveDollarEvent(view, view.update);\n }\n}\nfunction resolveDollarEvent(view, ops) {\n for (const op of ops) {\n if (op.kind === OpKind.Listener) {\n transformExpressionsInOp(op, (expr) => {\n if (expr instanceof LexicalReadExpr && expr.name === '$event') {\n op.consumesDollarEvent = true;\n return new ReadVarExpr(expr.name);\n }\n return expr;\n }, VisitorContextFlag.InChildOperation);\n }\n }\n}\n\n/**\n * Resolves lexical references in views (`ir.LexicalReadExpr`) to either a target variable or to\n * property reads on the top-level component context.\n *\n * Also matches `ir.RestoreViewExpr` expressions with the variables of their corresponding saved\n * views.\n */\nfunction phaseResolveNames(cpl) {\n for (const unit of cpl.units) {\n processLexicalScope(unit, unit.create, null);\n processLexicalScope(unit, unit.update, null);\n }\n}\nfunction processLexicalScope(unit, ops, savedView) {\n // Maps names defined in the lexical scope of this template to the `ir.XrefId`s of the variable\n // declarations which represent those values.\n //\n // Since variables are generated in each view for the entire lexical scope (including any\n // identifiers from parent templates) only local variables need be considered here.\n const scope = new Map();\n // First, step through the operations list and:\n // 1) build up the `scope` mapping\n // 2) recurse into any listener functions\n for (const op of ops) {\n switch (op.kind) {\n case OpKind.Variable:\n switch (op.variable.kind) {\n case SemanticVariableKind.Identifier:\n // This variable represents some kind of identifier which can be used in the template.\n if (scope.has(op.variable.identifier)) {\n continue;\n }\n scope.set(op.variable.identifier, op.xref);\n break;\n case SemanticVariableKind.SavedView:\n // This variable represents a snapshot of the current view context, and can be used to\n // restore that context within listener functions.\n savedView = {\n view: op.variable.view,\n variable: op.xref,\n };\n break;\n }\n break;\n case OpKind.Listener:\n // Listener functions have separate variable declarations, so process them as a separate\n // lexical scope.\n processLexicalScope(unit, op.handlerOps, savedView);\n break;\n }\n }\n // Next, use the `scope` mapping to match `ir.LexicalReadExpr` with defined names in the lexical\n // scope. Also, look for `ir.RestoreViewExpr`s and match them with the snapshotted view context\n // variable.\n for (const op of ops) {\n if (op.kind == OpKind.Listener) {\n // Listeners were already processed above with their own scopes.\n continue;\n }\n transformExpressionsInOp(op, (expr, flags) => {\n if (expr instanceof LexicalReadExpr) {\n // `expr` is a read of a name within the lexical scope of this view.\n // Either that name is defined within the current view, or it represents a property from the\n // main component context.\n if (scope.has(expr.name)) {\n // This was a defined variable in the current scope.\n return new ReadVariableExpr(scope.get(expr.name));\n }\n else {\n // Reading from the component context.\n return new ReadPropExpr(new ContextExpr(unit.job.root.xref), expr.name);\n }\n }\n else if (expr instanceof RestoreViewExpr && typeof expr.view === 'number') {\n // `ir.RestoreViewExpr` happens in listener functions and restores a saved view from the\n // parent creation list. We expect to find that we captured the `savedView` previously, and\n // that it matches the expected view to be restored.\n if (savedView === null || savedView.view !== expr.view) {\n throw new Error(`AssertionError: no saved view ${expr.view} from view ${unit.xref}`);\n }\n expr.view = new ReadVariableExpr(savedView.variable);\n return expr;\n }\n else {\n return expr;\n }\n }, VisitorContextFlag.None);\n }\n for (const op of ops) {\n visitExpressionsInOp(op, expr => {\n if (expr instanceof LexicalReadExpr) {\n throw new Error(`AssertionError: no lexical reads should remain, but found read of ${expr.name}`);\n }\n });\n }\n}\n\n/**\n * Mapping of security contexts to sanitizer function for that context.\n */\nconst sanitizers = new Map([\n [SecurityContext.HTML, SanitizerFn.Html], [SecurityContext.SCRIPT, SanitizerFn.Script],\n [SecurityContext.STYLE, SanitizerFn.Style], [SecurityContext.URL, SanitizerFn.Url],\n [SecurityContext.RESOURCE_URL, SanitizerFn.ResourceUrl]\n]);\n/**\n * Resolves sanitization functions for ops that need them.\n */\nfunction phaseResolveSanitizers(cpl) {\n for (const [_, view] of cpl.views) {\n const elements = getElementsByXrefId(view);\n let sanitizerFn;\n for (const op of view.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n sanitizerFn = sanitizers.get(op.securityContext) || null;\n op.sanitizer = sanitizerFn ? new SanitizerExpr(sanitizerFn) : null;\n // If there was no sanitization function found based on the security context of an\n // attribute/property, check whether this attribute/property is one of the\n // security-sensitive <iframe> attributes (and that the current element is actually an\n // <iframe>).\n if (op.sanitizer === null) {\n const ownerOp = elements.get(op.target);\n if (ownerOp === undefined) {\n throw Error('Property should have an element-like owner');\n }\n if (isIframeElement$1(ownerOp) && isIframeSecuritySensitiveAttr(op.name)) {\n op.sanitizer = new SanitizerExpr(SanitizerFn.IframeAttribute);\n }\n }\n break;\n }\n }\n }\n}\n/**\n * Checks whether the given op represents an iframe element.\n */\nfunction isIframeElement$1(op) {\n return (op.kind === OpKind.Element || op.kind === OpKind.ElementStart) &&\n op.tag.toLowerCase() === 'iframe';\n}\n\nfunction phaseSaveRestoreView(cpl) {\n for (const view of cpl.views.values()) {\n view.create.prepend([\n createVariableOp(view.job.allocateXrefId(), {\n kind: SemanticVariableKind.SavedView,\n name: null,\n view: view.xref,\n }, new GetCurrentViewExpr()),\n ]);\n for (const op of view.create) {\n if (op.kind !== OpKind.Listener) {\n continue;\n }\n // Embedded views always need the save/restore view operation.\n let needsRestoreView = view !== cpl.root;\n if (!needsRestoreView) {\n for (const handlerOp of op.handlerOps) {\n visitExpressionsInOp(handlerOp, expr => {\n if (expr instanceof ReferenceExpr) {\n // Listeners that reference() a local ref need the save/restore view operation.\n needsRestoreView = true;\n }\n });\n }\n }\n if (needsRestoreView) {\n addSaveRestoreViewOperationToListener(view, op);\n }\n }\n }\n}\nfunction addSaveRestoreViewOperationToListener(view, op) {\n op.handlerOps.prepend([\n createVariableOp(view.job.allocateXrefId(), {\n kind: SemanticVariableKind.Context,\n name: null,\n view: view.xref,\n }, new RestoreViewExpr(view.xref)),\n ]);\n // The \"restore view\" operation in listeners requires a call to `resetView` to reset the\n // context prior to returning from the listener operation. Find any `return` statements in\n // the listener body and wrap them in a call to reset the view.\n for (const handlerOp of op.handlerOps) {\n if (handlerOp.kind === OpKind.Statement &&\n handlerOp.statement instanceof ReturnStatement) {\n handlerOp.statement.value = new ResetViewExpr(handlerOp.statement.value);\n }\n }\n}\n\n/**\n * Assign data slots for all operations which implement `ConsumesSlotOpTrait`, and propagate the\n * assigned data slots of those operations to any expressions which reference them via\n * `UsesSlotIndexTrait`.\n *\n * This phase is also responsible for counting the number of slots used for each view (its `decls`)\n * and propagating that number into the `Template` operations which declare embedded views.\n */\nfunction phaseSlotAllocation(cpl) {\n // Map of all declarations in all views within the component which require an assigned slot index.\n // This map needs to be global (across all views within the component) since it's possible to\n // reference a slot from one view from an expression within another (e.g. local references work\n // this way).\n const slotMap = new Map();\n // Process all views in the component and assign slot indexes.\n for (const [_, view] of cpl.views) {\n // Slot indices start at 0 for each view (and are not unique between views).\n let slotCount = 0;\n for (const op of view.create) {\n // Only consider declarations which consume data slots.\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n // Assign slots to this declaration starting at the current `slotCount`.\n op.slot = slotCount;\n // And track its assigned slot in the `slotMap`.\n slotMap.set(op.xref, op.slot);\n // Each declaration may use more than 1 slot, so increment `slotCount` to reserve the number\n // of slots required.\n slotCount += op.numSlotsUsed;\n }\n // Record the total number of slots used on the view itself. This will later be propagated into\n // `ir.TemplateOp`s which declare those views (except for the root view).\n view.decls = slotCount;\n }\n // After slot assignment, `slotMap` now contains slot assignments for every declaration in the\n // whole template, across all views. Next, look for expressions which implement\n // `UsesSlotIndexExprTrait` and propagate the assigned slot indexes into them.\n // Additionally, this second scan allows us to find `ir.TemplateOp`s which declare views and\n // propagate the number of slots used for each view into the operation which declares it.\n for (const [_, view] of cpl.views) {\n for (const op of view.ops()) {\n if (op.kind === OpKind.Template) {\n // Record the number of slots used by the view this `ir.TemplateOp` declares in the\n // operation itself, so it can be emitted later.\n const childView = cpl.views.get(op.xref);\n op.decls = childView.decls;\n }\n if (hasUsesSlotIndexTrait(op) && op.slot === null) {\n if (!slotMap.has(op.target)) {\n // We do expect to find a slot allocated for everything which might be referenced.\n throw new Error(`AssertionError: no slot allocated for ${OpKind[op.kind]} target ${op.target}`);\n }\n op.slot = slotMap.get(op.target);\n }\n // Process all `ir.Expression`s within this view, and look for `usesSlotIndexExprTrait`.\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (!hasUsesSlotIndexTrait(expr) || expr.slot !== null) {\n return;\n }\n // The `UsesSlotIndexExprTrait` indicates that this expression references something declared\n // in this component template by its slot index. Use the `target` `ir.XrefId` to find the\n // allocated slot for that declaration in `slotMap`.\n if (!slotMap.has(expr.target)) {\n // We do expect to find a slot allocated for everything which might be referenced.\n throw new Error(`AssertionError: no slot allocated for ${expr.constructor.name} target ${expr.target}`);\n }\n // Record the allocated slot on the expression.\n expr.slot = slotMap.get(expr.target);\n });\n }\n }\n}\n\n/**\n * Transforms special-case bindings with 'style' or 'class' in their names. Must run before the\n * main binding specialization pass.\n */\nfunction phaseStyleBindingSpecialization(cpl) {\n for (const unit of cpl.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.Binding) {\n continue;\n }\n switch (op.bindingKind) {\n case BindingKind.ClassName:\n if (op.expression instanceof Interpolation) {\n throw new Error(`Unexpected interpolation in ClassName binding`);\n }\n OpList.replace(op, createClassPropOp(op.target, op.name, op.expression, op.sourceSpan));\n break;\n case BindingKind.StyleProperty:\n OpList.replace(op, createStylePropOp(op.target, op.name, op.expression, op.unit, op.sourceSpan));\n break;\n case BindingKind.Property:\n case BindingKind.Template:\n if (op.name === 'style') {\n OpList.replace(op, createStyleMapOp(op.target, op.expression, op.sourceSpan));\n }\n else if (op.name === 'class') {\n OpList.replace(op, createClassMapOp(op.target, op.expression, op.sourceSpan));\n }\n break;\n }\n }\n }\n}\n\n/**\n * Find all assignments and usages of temporary variables, which are linked to each other with cross\n * references. Generate names for each cross-reference, and add a `DeclareVarStmt` to initialize\n * them at the beginning of the update block.\n *\n * TODO: Sometimes, it will be possible to reuse names across different subexpressions. For example,\n * in the double keyed read `a?.[f()]?.[f()]`, the two function calls have non-overlapping scopes.\n * Implement an algorithm for reuse.\n */\nfunction phaseTemporaryVariables(cpl) {\n for (const unit of cpl.units) {\n let opCount = 0;\n let generatedStatements = [];\n for (const op of unit.ops()) {\n // Identify the final time each temp var is read.\n const finalReads = new Map();\n visitExpressionsInOp(op, expr => {\n if (expr instanceof ReadTemporaryExpr) {\n finalReads.set(expr.xref, expr);\n }\n });\n // Name the temp vars, accounting for the fact that a name can be reused after it has been\n // read for the final time.\n let count = 0;\n const assigned = new Set();\n const released = new Set();\n const defs = new Map();\n visitExpressionsInOp(op, expr => {\n if (expr instanceof AssignTemporaryExpr) {\n if (!assigned.has(expr.xref)) {\n assigned.add(expr.xref);\n // TODO: Exactly replicate the naming scheme used by `TemplateDefinitionBuilder`.\n // It seems to rely on an expression index instead of an op index.\n defs.set(expr.xref, `tmp_${opCount}_${count++}`);\n }\n assignName(defs, expr);\n }\n else if (expr instanceof ReadTemporaryExpr) {\n if (finalReads.get(expr.xref) === expr) {\n released.add(expr.xref);\n count--;\n }\n assignName(defs, expr);\n }\n });\n // Add declarations for the temp vars.\n generatedStatements.push(...Array.from(new Set(defs.values()))\n .map(name => createStatementOp(new DeclareVarStmt(name))));\n opCount++;\n }\n unit.update.prepend(generatedStatements);\n }\n}\n/**\n * Assigns a name to the temporary variable in the given temporary variable expression.\n */\nfunction assignName(names, expr) {\n const name = names.get(expr.xref);\n if (name === undefined) {\n throw new Error(`Found xref with unassigned name: ${expr.xref}`);\n }\n expr.name = name;\n}\n\n/**\n * Optimize variables declared and used in the IR.\n *\n * Variables are eagerly generated by pipeline stages for all possible values that could be\n * referenced. This stage processes the list of declared variables and all variable usages,\n * and optimizes where possible. It performs 3 main optimizations:\n *\n * * It transforms variable declarations to side effectful expressions when the\n * variable is not used, but its initializer has global effects which other\n * operations rely upon.\n * * It removes variable declarations if those variables are not referenced and\n * either they do not have global effects, or nothing relies on them.\n * * It inlines variable declarations when those variables are only used once\n * and the inlining is semantically safe.\n *\n * To guarantee correctness, analysis of \"fences\" in the instruction lists is used to determine\n * which optimizations are safe to perform.\n */\nfunction phaseVariableOptimization(job) {\n for (const unit of job.units) {\n optimizeVariablesInOpList(unit.create, job.compatibility);\n optimizeVariablesInOpList(unit.update, job.compatibility);\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener) {\n optimizeVariablesInOpList(op.handlerOps, job.compatibility);\n }\n }\n }\n}\n/**\n * A [fence](https://en.wikipedia.org/wiki/Memory_barrier) flag for an expression which indicates\n * how that expression can be optimized in relation to other expressions or instructions.\n *\n * `Fence`s are a bitfield, so multiple flags may be set on a single expression.\n */\nvar Fence;\n(function (Fence) {\n /**\n * Empty flag (no fence exists).\n */\n Fence[Fence[\"None\"] = 0] = \"None\";\n /**\n * A context read fence, meaning that the expression in question reads from the \"current view\"\n * context of the runtime.\n */\n Fence[Fence[\"ViewContextRead\"] = 1] = \"ViewContextRead\";\n /**\n * A context write fence, meaning that the expression in question writes to the \"current view\"\n * context of the runtime.\n *\n * Note that all `ContextWrite` fences are implicitly `ContextRead` fences as operations which\n * change the view context do so based on the current one.\n */\n Fence[Fence[\"ViewContextWrite\"] = 3] = \"ViewContextWrite\";\n /**\n * Indicates that a call is required for its side-effects, even if nothing reads its result.\n *\n * This is also true of `ViewContextWrite` operations **if** they are followed by a\n * `ViewContextRead`.\n */\n Fence[Fence[\"SideEffectful\"] = 4] = \"SideEffectful\";\n})(Fence || (Fence = {}));\n/**\n * Process a list of operations and optimize variables within that list.\n */\nfunction optimizeVariablesInOpList(ops, compatibility) {\n const varDecls = new Map();\n const varUsages = new Map();\n // Track variables that are used outside of the immediate operation list. For example, within\n // `ListenerOp` handler operations of listeners in the current operation list.\n const varRemoteUsages = new Set();\n const opMap = new Map();\n // First, extract information about variables declared or used within the whole list.\n for (const op of ops) {\n if (op.kind === OpKind.Variable) {\n if (varDecls.has(op.xref) || varUsages.has(op.xref)) {\n throw new Error(`Should not see two declarations of the same variable: ${op.xref}`);\n }\n varDecls.set(op.xref, op);\n varUsages.set(op.xref, 0);\n }\n opMap.set(op, collectOpInfo(op));\n countVariableUsages(op, varUsages, varRemoteUsages);\n }\n // The next step is to remove any variable declarations for variables that aren't used. The\n // variable initializer expressions may be side-effectful, so they may need to be retained as\n // expression statements.\n // Track whether we've seen an operation which reads from the view context yet. This is used to\n // determine whether a write to the view context in a variable initializer can be observed.\n let contextIsUsed = false;\n // Note that iteration through the list happens in reverse, which guarantees that we'll process\n // all reads of a variable prior to processing its declaration.\n for (const op of ops.reversed()) {\n const opInfo = opMap.get(op);\n if (op.kind === OpKind.Variable && varUsages.get(op.xref) === 0) {\n // This variable is unused and can be removed. We might need to keep the initializer around,\n // though, if something depends on it running.\n if ((contextIsUsed && opInfo.fences & Fence.ViewContextWrite) ||\n (opInfo.fences & Fence.SideEffectful)) {\n // This variable initializer has a side effect which must be retained. Either:\n // * it writes to the view context, and we know there is a future operation which depends\n // on that write, or\n // * it's an operation which is inherently side-effectful.\n // We can't remove the initializer, but we can remove the variable declaration itself and\n // replace it with a side-effectful statement.\n const stmtOp = createStatementOp(op.initializer.toStmt());\n opMap.set(stmtOp, opInfo);\n OpList.replace(op, stmtOp);\n }\n else {\n // It's safe to delete this entire variable declaration as nothing depends on it, even\n // side-effectfully. Note that doing this might make other variables unused. Since we're\n // iterating in reverse order, we should always be processing usages before declarations\n // and therefore by the time we get to a declaration, all removable usages will have been\n // removed.\n uncountVariableUsages(op, varUsages);\n OpList.remove(op);\n }\n opMap.delete(op);\n varDecls.delete(op.xref);\n varUsages.delete(op.xref);\n continue;\n }\n // Does this operation depend on the view context?\n if (opInfo.fences & Fence.ViewContextRead) {\n contextIsUsed = true;\n }\n }\n // Next, inline any remaining variables with exactly one usage.\n const toInline = [];\n for (const [id, count] of varUsages) {\n // We can inline variables that:\n // - are used once\n // - are not used remotely\n if (count !== 1) {\n // We can't inline this variable as it's used more than once.\n continue;\n }\n if (varRemoteUsages.has(id)) {\n // This variable is used once, but across an operation boundary, so it can't be inlined.\n continue;\n }\n toInline.push(id);\n }\n let candidate;\n while (candidate = toInline.pop()) {\n // We will attempt to inline this variable. If inlining fails (due to fences for example),\n // no future operation will make inlining legal.\n const decl = varDecls.get(candidate);\n const varInfo = opMap.get(decl);\n // Scan operations following the variable declaration and look for the point where that variable\n // is used. There should only be one usage given the precondition above.\n for (let targetOp = decl.next; targetOp.kind !== OpKind.ListEnd; targetOp = targetOp.next) {\n const opInfo = opMap.get(targetOp);\n // Is the variable used in this operation?\n if (opInfo.variablesUsed.has(candidate)) {\n if (compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n !allowConservativeInlining(decl, targetOp)) {\n // We're in conservative mode, and this variable is not eligible for inlining into the\n // target operation in this mode.\n break;\n }\n // Yes, try to inline it. Inlining may not be successful if fences in this operation before\n // the variable's usage cannot be safely crossed.\n if (tryInlineVariableInitializer(candidate, decl.initializer, targetOp, varInfo.fences)) {\n // Inlining was successful! Update the tracking structures to reflect the inlined\n // variable.\n opInfo.variablesUsed.delete(candidate);\n // Add all variables used in the variable's initializer to its new usage site.\n for (const id of varInfo.variablesUsed) {\n opInfo.variablesUsed.add(id);\n }\n // Merge fences in the variable's initializer into its new usage site.\n opInfo.fences |= varInfo.fences;\n // Delete tracking info related to the declaration.\n varDecls.delete(candidate);\n varUsages.delete(candidate);\n opMap.delete(decl);\n // And finally, delete the original declaration from the operation list.\n OpList.remove(decl);\n }\n // Whether inlining succeeded or failed, we're done processing this variable.\n break;\n }\n // If the variable is not used in this operation, then we'd need to inline across it. Check if\n // that's safe to do.\n if (!safeToInlinePastFences(opInfo.fences, varInfo.fences)) {\n // We can't safely inline this variable beyond this operation, so don't proceed with\n // inlining this variable.\n break;\n }\n }\n }\n}\n/**\n * Given an `ir.Expression`, returns the `Fence` flags for that expression type.\n */\nfunction fencesForIrExpression(expr) {\n switch (expr.kind) {\n case ExpressionKind.NextContext:\n return Fence.ViewContextWrite;\n case ExpressionKind.RestoreView:\n return Fence.ViewContextWrite | Fence.SideEffectful;\n case ExpressionKind.Reference:\n return Fence.ViewContextRead;\n default:\n return Fence.None;\n }\n}\n/**\n * Build the `OpInfo` structure for the given `op`. This performs two operations:\n *\n * * It tracks which variables are used in the operation's expressions.\n * * It rolls up fence flags for expressions within the operation.\n */\nfunction collectOpInfo(op) {\n let fences = Fence.None;\n const variablesUsed = new Set();\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n switch (expr.kind) {\n case ExpressionKind.ReadVariable:\n variablesUsed.add(expr.xref);\n break;\n default:\n fences |= fencesForIrExpression(expr);\n }\n });\n return { fences, variablesUsed };\n}\n/**\n * Count the number of usages of each variable, being careful to track whether those usages are\n * local or remote.\n */\nfunction countVariableUsages(op, varUsages, varRemoteUsage) {\n visitExpressionsInOp(op, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.ReadVariable) {\n return;\n }\n const count = varUsages.get(expr.xref);\n if (count === undefined) {\n // This variable is declared outside the current scope of optimization.\n return;\n }\n varUsages.set(expr.xref, count + 1);\n if (flags & VisitorContextFlag.InChildOperation) {\n varRemoteUsage.add(expr.xref);\n }\n });\n}\n/**\n * Remove usages of a variable in `op` from the `varUsages` tracking.\n */\nfunction uncountVariableUsages(op, varUsages) {\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n if (expr.kind !== ExpressionKind.ReadVariable) {\n return;\n }\n const count = varUsages.get(expr.xref);\n if (count === undefined) {\n // This variable is declared outside the current scope of optimization.\n return;\n }\n else if (count === 0) {\n throw new Error(`Inaccurate variable count: ${expr.xref} - found another read but count is already 0`);\n }\n varUsages.set(expr.xref, count - 1);\n });\n}\n/**\n * Checks whether it's safe to inline a variable across a particular operation.\n *\n * @param fences the fences of the operation which the inlining will cross\n * @param declFences the fences of the variable being inlined.\n */\nfunction safeToInlinePastFences(fences, declFences) {\n if (fences & Fence.ViewContextWrite) {\n // It's not safe to inline context reads across context writes.\n if (declFences & Fence.ViewContextRead) {\n return false;\n }\n }\n else if (fences & Fence.ViewContextRead) {\n // It's not safe to inline context writes across context reads.\n if (declFences & Fence.ViewContextWrite) {\n return false;\n }\n }\n return true;\n}\n/**\n * Attempt to inline the initializer of a variable into a target operation's expressions.\n *\n * This may or may not be safe to do. For example, the variable could be read following the\n * execution of an expression with fences that don't permit the variable to be inlined across them.\n */\nfunction tryInlineVariableInitializer(id, initializer, target, declFences) {\n // We use `ir.transformExpressionsInOp` to walk the expressions and inline the variable if\n // possible. Since this operation is callback-based, once inlining succeeds or fails we can't\n // \"stop\" the expression processing, and have to keep track of whether inlining has succeeded or\n // is no longer allowed.\n let inlined = false;\n let inliningAllowed = true;\n transformExpressionsInOp(target, (expr, flags) => {\n if (!isIrExpression(expr)) {\n return expr;\n }\n if (inlined || !inliningAllowed) {\n // Either the inlining has already succeeded, or we've passed a fence that disallows inlining\n // at this point, so don't try.\n return expr;\n }\n else if ((flags & VisitorContextFlag.InChildOperation) && (declFences & Fence.ViewContextRead)) {\n // We cannot inline variables that are sensitive to the current context across operation\n // boundaries.\n return expr;\n }\n switch (expr.kind) {\n case ExpressionKind.ReadVariable:\n if (expr.xref === id) {\n // This is the usage site of the variable. Since nothing has disallowed inlining, it's\n // safe to inline the initializer here.\n inlined = true;\n return initializer;\n }\n break;\n default:\n // For other types of `ir.Expression`s, whether inlining is allowed depends on their fences.\n const exprFences = fencesForIrExpression(expr);\n inliningAllowed = inliningAllowed && safeToInlinePastFences(exprFences, declFences);\n break;\n }\n return expr;\n }, VisitorContextFlag.None);\n return inlined;\n}\n/**\n * Determines whether inlining of `decl` should be allowed in \"conservative\" mode.\n *\n * In conservative mode, inlining behavior is limited to those operations which the\n * `TemplateDefinitionBuilder` supported, with the goal of producing equivalent output.\n */\nfunction allowConservativeInlining(decl, target) {\n // TODO(alxhub): understand exactly how TemplateDefinitionBuilder approaches inlining, and record\n // that behavior here.\n switch (decl.variable.kind) {\n case SemanticVariableKind.Identifier:\n return false;\n case SemanticVariableKind.Context:\n // Context can only be inlined into other variables.\n return target.kind === OpKind.Variable;\n default:\n return true;\n }\n}\n\n/**\n * Run all transformation phases in the correct order against a `ComponentCompilation`. After this\n * processing, the compilation should be in a state where it can be emitted.\n */\nfunction transformTemplate(job) {\n phaseNamespace(job);\n phaseStyleBindingSpecialization(job);\n phaseBindingSpecialization(job);\n phaseAttributeExtraction(job);\n phaseRemoveEmptyBindings(job);\n phaseNoListenersOnTemplates(job);\n phasePipeCreation(job);\n phasePipeVariadic(job);\n phasePureLiteralStructures(job);\n phaseGenerateVariables(job);\n phaseSaveRestoreView(job);\n phaseFindAnyCasts(job);\n phaseResolveDollarEvent(job);\n phaseResolveNames(job);\n phaseResolveContexts(job);\n phaseResolveSanitizers(job);\n phaseLocalRefs(job);\n phaseConstCollection(job);\n phaseNullishCoalescing(job);\n phaseExpandSafeReads(job);\n phaseTemporaryVariables(job);\n phaseSlotAllocation(job);\n phaseVarCounting(job);\n phaseGenerateAdvance(job);\n phaseVariableOptimization(job);\n phaseNaming(job);\n phaseMergeNextContext(job);\n phaseNgContainer(job);\n phaseEmptyElements(job);\n phaseNonbindable(job);\n phasePureFunctionExtraction(job);\n phaseAlignPipeVariadicVarOffset(job);\n phasePropertyOrdering(job);\n phaseReify(job);\n phaseChaining(job);\n}\n/**\n * Run all transformation phases in the correct order against a `HostBindingCompilationJob`. After\n * this processing, the compilation should be in a state where it can be emitted.\n */\nfunction transformHostBinding(job) {\n phaseHostStylePropertyParsing(job);\n phaseStyleBindingSpecialization(job);\n phaseBindingSpecialization(job);\n phasePureLiteralStructures(job);\n phaseNullishCoalescing(job);\n phaseExpandSafeReads(job);\n phaseTemporaryVariables(job);\n phaseVarCounting(job);\n phaseVariableOptimization(job);\n phaseResolveNames(job);\n phaseResolveContexts(job);\n // TODO: Figure out how to make this work for host bindings.\n // phaseResolveSanitizers(job);\n phaseNaming(job);\n phasePureFunctionExtraction(job);\n phasePropertyOrdering(job);\n phaseReify(job);\n phaseChaining(job);\n}\n/**\n * Compile all views in the given `ComponentCompilation` into the final template function, which may\n * reference constants defined in a `ConstantPool`.\n */\nfunction emitTemplateFn(tpl, pool) {\n const rootFn = emitView(tpl.root);\n emitChildViews(tpl.root, pool);\n return rootFn;\n}\nfunction emitChildViews(parent, pool) {\n for (const view of parent.job.views.values()) {\n if (view.parent !== parent.xref) {\n continue;\n }\n // Child views are emitted depth-first.\n emitChildViews(view, pool);\n const viewFn = emitView(view);\n pool.statements.push(viewFn.toDeclStmt(viewFn.name));\n }\n}\n/**\n * Emit a template function for an individual `ViewCompilation` (which may be either the root view\n * or an embedded view).\n */\nfunction emitView(view) {\n if (view.fnName === null) {\n throw new Error(`AssertionError: view ${view.xref} is unnamed`);\n }\n const createStatements = [];\n for (const op of view.create) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n createStatements.push(op.statement);\n }\n const updateStatements = [];\n for (const op of view.update) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n updateStatements.push(op.statement);\n }\n const createCond = maybeGenerateRfBlock(1, createStatements);\n const updateCond = maybeGenerateRfBlock(2, updateStatements);\n return fn([\n new FnParam('rf'),\n new FnParam('ctx'),\n ], [\n ...createCond,\n ...updateCond,\n ], \n /* type */ undefined, /* sourceSpan */ undefined, view.fnName);\n}\nfunction maybeGenerateRfBlock(flag, statements) {\n if (statements.length === 0) {\n return [];\n }\n return [\n ifStmt(new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, variable('rf'), literal(flag)), statements),\n ];\n}\nfunction emitHostBindingFunction(job) {\n if (job.fnName === null) {\n throw new Error(`AssertionError: host binding function is unnamed`);\n }\n const createStatements = [];\n for (const op of job.create) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n createStatements.push(op.statement);\n }\n const updateStatements = [];\n for (const op of job.update) {\n if (op.kind !== OpKind.Statement) {\n throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${OpKind[op.kind]}`);\n }\n updateStatements.push(op.statement);\n }\n if (createStatements.length === 0 && updateStatements.length === 0) {\n return null;\n }\n const createCond = maybeGenerateRfBlock(1, createStatements);\n const updateCond = maybeGenerateRfBlock(2, updateStatements);\n return fn([\n new FnParam('rf'),\n new FnParam('ctx'),\n ], [\n ...createCond,\n ...updateCond,\n ], \n /* type */ undefined, /* sourceSpan */ undefined, job.fnName);\n}\n\nconst compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;\n/**\n * Process a template AST and convert it into a `ComponentCompilation` in the intermediate\n * representation.\n */\nfunction ingestComponent(componentName, template, constantPool) {\n const cpl = new ComponentCompilationJob(componentName, constantPool, compatibilityMode);\n ingestNodes(cpl.root, template);\n return cpl;\n}\n/**\n * Process a host binding AST and convert it into a `HostBindingCompilationJob` in the intermediate\n * representation.\n */\nfunction ingestHostBinding(input, bindingParser, constantPool) {\n const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);\n for (const property of input.properties ?? []) {\n ingestHostProperty(job, property);\n }\n for (const event of input.events ?? []) {\n ingestHostEvent(job, event);\n }\n return job;\n}\n// TODO: We should refactor the parser to use the same types and structures for host bindings as\n// with ordinary components. This would allow us to share a lot more ingestion code.\nfunction ingestHostProperty(job, property) {\n let expression;\n const ast = property.expression.ast;\n if (ast instanceof Interpolation$1) {\n expression =\n new Interpolation(ast.strings, ast.expressions.map(expr => convertAst(expr, job)));\n }\n else {\n expression = convertAst(ast, job);\n }\n let bindingKind = BindingKind.Property;\n // TODO: this should really be handled in the parser.\n if (property.name.startsWith('attr.')) {\n property.name = property.name.substring('attr.'.length);\n bindingKind = BindingKind.Attribute;\n }\n job.update.push(createBindingOp(job.root.xref, bindingKind, property.name, expression, null, SecurityContext\n .NONE /* TODO: what should we pass as security context? Passing NONE for now. */, false, property.sourceSpan));\n}\nfunction ingestHostEvent(job, event) { }\n/**\n * Ingest the nodes of a template AST into the given `ViewCompilation`.\n */\nfunction ingestNodes(view, template) {\n for (const node of template) {\n if (node instanceof Element$1) {\n ingestElement(view, node);\n }\n else if (node instanceof Template) {\n ingestTemplate(view, node);\n }\n else if (node instanceof Text$3) {\n ingestText(view, node);\n }\n else if (node instanceof BoundText) {\n ingestBoundText(view, node);\n }\n else {\n throw new Error(`Unsupported template node: ${node.constructor.name}`);\n }\n }\n}\n/**\n * Ingest an element AST from the template into the given `ViewCompilation`.\n */\nfunction ingestElement(view, element) {\n const staticAttributes = {};\n for (const attr of element.attributes) {\n staticAttributes[attr.name] = attr.value;\n }\n const id = view.job.allocateXrefId();\n const [namespaceKey, elementName] = splitNsName(element.name);\n const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element.startSourceSpan);\n view.create.push(startOp);\n ingestBindings(view, startOp, element);\n ingestReferences(startOp, element);\n ingestNodes(view, element.children);\n view.create.push(createElementEndOp(id, element.endSourceSpan));\n}\n/**\n * Ingest an `ng-template` node from the AST into the given `ViewCompilation`.\n */\nfunction ingestTemplate(view, tmpl) {\n const childView = view.job.allocateView(view.xref);\n let tagNameWithoutNamespace = tmpl.tagName;\n let namespacePrefix = '';\n if (tmpl.tagName) {\n [namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);\n }\n // TODO: validate the fallback tag name here.\n const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace ?? 'ng-template', namespaceForKey(namespacePrefix), tmpl.startSourceSpan);\n view.create.push(tplOp);\n ingestBindings(view, tplOp, tmpl);\n ingestReferences(tplOp, tmpl);\n ingestNodes(childView, tmpl.children);\n for (const { name, value } of tmpl.variables) {\n childView.contextVariables.set(name, value);\n }\n}\n/**\n * Ingest a literal text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestText(view, text) {\n view.create.push(createTextOp(view.job.allocateXrefId(), text.value, text.sourceSpan));\n}\n/**\n * Ingest an interpolated text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestBoundText(view, text) {\n let value = text.value;\n if (value instanceof ASTWithSource) {\n value = value.ast;\n }\n if (!(value instanceof Interpolation$1)) {\n throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${value.constructor.name}`);\n }\n const textXref = view.job.allocateXrefId();\n view.create.push(createTextOp(textXref, '', text.sourceSpan));\n view.update.push(createInterpolateTextOp(textXref, new Interpolation(value.strings, value.expressions.map(expr => convertAst(expr, view.job))), text.sourceSpan));\n}\n/**\n * Convert a template AST expression into an output AST expression.\n */\nfunction convertAst(ast, cpl) {\n if (ast instanceof ASTWithSource) {\n return convertAst(ast.ast, cpl);\n }\n else if (ast instanceof PropertyRead) {\n if (ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver)) {\n return new LexicalReadExpr(ast.name);\n }\n else {\n return new ReadPropExpr(convertAst(ast.receiver, cpl), ast.name);\n }\n }\n else if (ast instanceof PropertyWrite) {\n return new WritePropExpr(convertAst(ast.receiver, cpl), ast.name, convertAst(ast.value, cpl));\n }\n else if (ast instanceof KeyedWrite) {\n return new WriteKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl), convertAst(ast.value, cpl));\n }\n else if (ast instanceof Call) {\n if (ast.receiver instanceof ImplicitReceiver) {\n throw new Error(`Unexpected ImplicitReceiver`);\n }\n else {\n return new InvokeFunctionExpr(convertAst(ast.receiver, cpl), ast.args.map(arg => convertAst(arg, cpl)));\n }\n }\n else if (ast instanceof LiteralPrimitive) {\n return literal(ast.value);\n }\n else if (ast instanceof Binary) {\n const operator = BINARY_OPERATORS.get(ast.operation);\n if (operator === undefined) {\n throw new Error(`AssertionError: unknown binary operator ${ast.operation}`);\n }\n return new BinaryOperatorExpr(operator, convertAst(ast.left, cpl), convertAst(ast.right, cpl));\n }\n else if (ast instanceof ThisReceiver) {\n return new ContextExpr(cpl.root.xref);\n }\n else if (ast instanceof KeyedRead) {\n return new ReadKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));\n }\n else if (ast instanceof Chain) {\n throw new Error(`AssertionError: Chain in unknown context`);\n }\n else if (ast instanceof LiteralMap) {\n const entries = ast.keys.map((key, idx) => {\n const value = ast.values[idx];\n return new LiteralMapEntry(key.key, convertAst(value, cpl), key.quoted);\n });\n return new LiteralMapExpr(entries);\n }\n else if (ast instanceof LiteralArray) {\n return new LiteralArrayExpr(ast.expressions.map(expr => convertAst(expr, cpl)));\n }\n else if (ast instanceof Conditional) {\n return new ConditionalExpr(convertAst(ast.condition, cpl), convertAst(ast.trueExp, cpl), convertAst(ast.falseExp, cpl));\n }\n else if (ast instanceof NonNullAssert) {\n // A non-null assertion shouldn't impact generated instructions, so we can just drop it.\n return convertAst(ast.expression, cpl);\n }\n else if (ast instanceof BindingPipe) {\n return new PipeBindingExpr(cpl.allocateXrefId(), ast.name, [\n convertAst(ast.exp, cpl),\n ...ast.args.map(arg => convertAst(arg, cpl)),\n ]);\n }\n else if (ast instanceof SafeKeyedRead) {\n return new SafeKeyedReadExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));\n }\n else if (ast instanceof SafePropertyRead) {\n return new SafePropertyReadExpr(convertAst(ast.receiver, cpl), ast.name);\n }\n else if (ast instanceof SafeCall) {\n return new SafeInvokeFunctionExpr(convertAst(ast.receiver, cpl), ast.args.map(a => convertAst(a, cpl)));\n }\n else if (ast instanceof EmptyExpr$1) {\n return new EmptyExpr();\n }\n else {\n throw new Error(`Unhandled expression type: ${ast.constructor.name}`);\n }\n}\n/**\n * Process all of the bindings on an element-like structure in the template AST and convert them\n * to their IR representation.\n */\nfunction ingestBindings(view, op, element) {\n if (element instanceof Template) {\n for (const attr of element.templateAttrs) {\n if (attr instanceof TextAttribute) {\n ingestBinding(view, op.xref, attr.name, literal(attr.value), 1 /* e.BindingType.Attribute */, null, SecurityContext.NONE, attr.sourceSpan, true);\n }\n else {\n ingestBinding(view, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, true);\n }\n }\n }\n for (const attr of element.attributes) {\n // This is only attribute TextLiteral bindings, such as `attr.foo=\"bar\"`. This can never be\n // `[attr.foo]=\"bar\"` or `attr.foo=\"{{bar}}\"`, both of which will be handled as inputs with\n // `BindingType.Attribute`.\n ingestBinding(view, op.xref, attr.name, literal(attr.value), 1 /* e.BindingType.Attribute */, null, SecurityContext.NONE, attr.sourceSpan, false);\n }\n for (const input of element.inputs) {\n ingestBinding(view, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, false);\n }\n for (const output of element.outputs) {\n let listenerOp;\n if (output.type === 1 /* e.ParsedEventType.Animation */) {\n if (output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n listenerOp = createListenerOpForAnimation(op.xref, output.name, output.phase, op.tag);\n }\n else {\n listenerOp = createListenerOp(op.xref, output.name, op.tag);\n }\n // if output.handler is a chain, then push each statement from the chain separately, and\n // return the last one?\n let inputExprs;\n let handler = output.handler;\n if (handler instanceof ASTWithSource) {\n handler = handler.ast;\n }\n if (handler instanceof Chain) {\n inputExprs = handler.expressions;\n }\n else {\n inputExprs = [handler];\n }\n if (inputExprs.length === 0) {\n throw new Error('Expected listener to have non-empty expression list.');\n }\n const expressions = inputExprs.map(expr => convertAst(expr, view.job));\n const returnExpr = expressions.pop();\n for (const expr of expressions) {\n const stmtOp = createStatementOp(new ExpressionStatement(expr));\n listenerOp.handlerOps.push(stmtOp);\n }\n listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr)));\n view.create.push(listenerOp);\n }\n}\nconst BINDING_KINDS = new Map([\n [0 /* e.BindingType.Property */, BindingKind.Property],\n [1 /* e.BindingType.Attribute */, BindingKind.Attribute],\n [2 /* e.BindingType.Class */, BindingKind.ClassName],\n [3 /* e.BindingType.Style */, BindingKind.StyleProperty],\n [4 /* e.BindingType.Animation */, BindingKind.Animation],\n]);\nfunction ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, isTemplateBinding) {\n if (value instanceof ASTWithSource) {\n value = value.ast;\n }\n let expression;\n if (value instanceof Interpolation$1) {\n expression = new Interpolation(value.strings, value.expressions.map(expr => convertAst(expr, view.job)));\n }\n else if (value instanceof AST) {\n expression = convertAst(value, view.job);\n }\n else {\n expression = value;\n }\n const kind = BINDING_KINDS.get(type);\n view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, isTemplateBinding, sourceSpan));\n}\n/**\n * Process all of the local references on an element-like structure in the template AST and\n * convert them to their IR representation.\n */\nfunction ingestReferences(op, element) {\n assertIsArray(op.localRefs);\n for (const { name, value } of element.references) {\n op.localRefs.push({\n name,\n target: value,\n });\n }\n}\n/**\n * Assert that the given value is an array.\n */\nfunction assertIsArray(value) {\n if (!Array.isArray(value)) {\n throw new Error(`AssertionError: expected an array`);\n }\n}\n\nconst USE_TEMPLATE_PIPELINE = false;\n\nconst IMPORTANT_FLAG = '!important';\n/**\n * Minimum amount of binding slots required in the runtime for style/class bindings.\n *\n * Styling in Angular uses up two slots in the runtime LView/TData data structures to\n * record binding data, property information and metadata.\n *\n * When a binding is registered it will place the following information in the `LView`:\n *\n * slot 1) binding value\n * slot 2) cached value (all other values collected before it in string form)\n *\n * When a binding is registered it will place the following information in the `TData`:\n *\n * slot 1) prop name\n * slot 2) binding index that points to the previous style/class binding (and some extra config\n * values)\n *\n * Let's imagine we have a binding that looks like so:\n *\n * ```\n * <div [style.width]=\"x\" [style.height]=\"y\">\n * ```\n *\n * Our `LView` and `TData` data-structures look like so:\n *\n * ```typescript\n * LView = [\n * // ...\n * x, // value of x\n * \"width: x\",\n *\n * y, // value of y\n * \"width: x; height: y\",\n * // ...\n * ];\n *\n * TData = [\n * // ...\n * \"width\", // binding slot 20\n * 0,\n *\n * \"height\",\n * 20,\n * // ...\n * ];\n * ```\n *\n * */\nconst MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * It also produces the creation instruction to register all initial styling values\n * (which are all the static class=\"...\" and style=\"...\" attribute values that exist\n * on an element within a template).\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n * styling(...)\n * }\n * if (updateMode) {\n * styleMap(...)\n * classMap(...)\n * styleProp(...)\n * classProp(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\nclass StylingBuilder {\n constructor(_directiveExpr) {\n this._directiveExpr = _directiveExpr;\n /** Whether or not there are any static styling values present */\n this._hasInitialValues = false;\n /**\n * Whether or not there are any styling bindings present\n * (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)\n */\n this.hasBindings = false;\n this.hasBindingsWithPipes = false;\n /** the input for [class] (if it exists) */\n this._classMapInput = null;\n /** the input for [style] (if it exists) */\n this._styleMapInput = null;\n /** an array of each [style.prop] input */\n this._singleStyleInputs = null;\n /** an array of each [class.name] input */\n this._singleClassInputs = null;\n this._lastStylingInput = null;\n this._firstStylingInput = null;\n // maps are used instead of hash maps because a Map will\n // retain the ordering of the keys\n /**\n * Represents the location of each style binding in the template\n * (e.g. `<div [style.width]=\"w\" [style.height]=\"h\">` implies\n * that `width=0` and `height=1`)\n */\n this._stylesIndex = new Map();\n /**\n * Represents the location of each class binding in the template\n * (e.g. `<div [class.big]=\"b\" [class.hidden]=\"h\">` implies\n * that `big=0` and `hidden=1`)\n */\n this._classesIndex = new Map();\n this._initialStyleValues = [];\n this._initialClassValues = [];\n }\n /**\n * Registers a given input to the styling builder to be later used when producing AOT code.\n *\n * The code below will only accept the input if it is somehow tied to styling (whether it be\n * style/class bindings or static style/class attributes).\n */\n registerBoundInput(input) {\n // [attr.style] or [attr.class] are skipped in the code below,\n // they should not be treated as styling-based bindings since\n // they are intended to be written directly to the attr and\n // will therefore skip all style/class resolution that is present\n // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n // [class.prop]=\"\". [class]=\"\" assignments\n let binding = null;\n let name = input.name;\n switch (input.type) {\n case 0 /* BindingType.Property */:\n binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);\n break;\n case 3 /* BindingType.Style */:\n binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);\n break;\n case 2 /* BindingType.Class */:\n binding = this.registerClassInput(name, false, input.value, input.sourceSpan);\n break;\n }\n return binding ? true : false;\n }\n registerInputBasedOnName(name, expression, sourceSpan) {\n let binding = null;\n const prefix = name.substring(0, 6);\n const isStyle = name === 'style' || prefix === 'style.' || prefix === 'style!';\n const isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');\n if (isStyle || isClass) {\n const isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no\n const property = name.slice(isMapBased ? 5 : 6); // the dot explains why there's a +1\n if (isStyle) {\n binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);\n }\n else {\n binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);\n }\n }\n return binding;\n }\n registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {\n if (isEmptyExpression(value)) {\n return null;\n }\n // CSS custom properties are case-sensitive so we shouldn't normalize them.\n // See: https://www.w3.org/TR/css-variables-1/#defining-variables\n if (!isCssCustomProperty(name)) {\n name = hyphenate$1(name);\n }\n const { property, hasOverrideFlag, suffix: bindingSuffix } = parseProperty(name);\n suffix = typeof suffix === 'string' && suffix.length !== 0 ? suffix : bindingSuffix;\n const entry = { name: property, suffix: suffix, value, sourceSpan, hasOverrideFlag };\n if (isMapBased) {\n this._styleMapInput = entry;\n }\n else {\n (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n registerIntoMap(this._stylesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n registerClassInput(name, isMapBased, value, sourceSpan) {\n if (isEmptyExpression(value)) {\n return null;\n }\n const { property, hasOverrideFlag } = parseProperty(name);\n const entry = { name: property, value, sourceSpan, hasOverrideFlag, suffix: null };\n if (isMapBased) {\n this._classMapInput = entry;\n }\n else {\n (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n registerIntoMap(this._classesIndex, property);\n }\n this._lastStylingInput = entry;\n this._firstStylingInput = this._firstStylingInput || entry;\n this._checkForPipes(value);\n this.hasBindings = true;\n return entry;\n }\n _checkForPipes(value) {\n if ((value instanceof ASTWithSource) && (value.ast instanceof BindingPipe)) {\n this.hasBindingsWithPipes = true;\n }\n }\n /**\n * Registers the element's static style string value to the builder.\n *\n * @param value the style string (e.g. `width:100px; height:200px;`)\n */\n registerStyleAttr(value) {\n this._initialStyleValues = parse(value);\n this._hasInitialValues = true;\n }\n /**\n * Registers the element's static class string value to the builder.\n *\n * @param value the className string (e.g. `disabled gold zoom`)\n */\n registerClassAttr(value) {\n this._initialClassValues = value.trim().split(/\\s+/g);\n this._hasInitialValues = true;\n }\n /**\n * Appends all styling-related expressions to the provided attrs array.\n *\n * @param attrs an existing array where each of the styling expressions\n * will be inserted into.\n */\n populateInitialStylingAttrs(attrs) {\n // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]\n if (this._initialClassValues.length) {\n attrs.push(literal(1 /* AttributeMarker.Classes */));\n for (let i = 0; i < this._initialClassValues.length; i++) {\n attrs.push(literal(this._initialClassValues[i]));\n }\n }\n // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]\n if (this._initialStyleValues.length) {\n attrs.push(literal(2 /* AttributeMarker.Styles */));\n for (let i = 0; i < this._initialStyleValues.length; i += 2) {\n attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));\n }\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.\n *\n * The instruction generation code below is used for producing the AOT statement code which is\n * responsible for registering initial styles (within a directive hostBindings' creation block),\n * as well as any of the provided attribute values, to the directive host element.\n */\n assignHostAttrs(attrs, definitionMap) {\n if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {\n this.populateInitialStylingAttrs(attrs);\n definitionMap.set('hostAttrs', literalArr(attrs));\n }\n }\n /**\n * Builds an instruction with all the expressions and parameters for `classMap`.\n *\n * The instruction data will contain all expressions for `classMap` to function\n * which includes the `[class]` expression params.\n */\n buildClassMapInstruction(valueConverter) {\n if (this._classMapInput) {\n return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);\n }\n return null;\n }\n /**\n * Builds an instruction with all the expressions and parameters for `styleMap`.\n *\n * The instruction data will contain all expressions for `styleMap` to function\n * which includes the `[style]` expression params.\n */\n buildStyleMapInstruction(valueConverter) {\n if (this._styleMapInput) {\n return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);\n }\n return null;\n }\n _buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {\n // each styling binding value is stored in the LView\n // map-based bindings allocate two slots: one for the\n // previous binding value and another for the previous\n // className or style attribute value.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n // these values must be outside of the update block so that they can\n // be evaluated (the AST visit call) during creation time so that any\n // pipes can be picked up in time before the template is built\n const mapValue = stylingInput.value.visit(valueConverter);\n let reference;\n if (mapValue instanceof Interpolation$1) {\n totalBindingSlotsRequired += mapValue.expressions.length;\n reference = isClassBased ? getClassMapInterpolationExpression(mapValue) :\n getStyleMapInterpolationExpression(mapValue);\n }\n else {\n reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;\n }\n return {\n reference,\n calls: [{\n supportsInterpolation: true,\n sourceSpan: stylingInput.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n params: (convertFn) => {\n const convertResult = convertFn(mapValue);\n const params = Array.isArray(convertResult) ? convertResult : [convertResult];\n return params;\n }\n }]\n };\n }\n _buildSingleInputs(reference, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {\n const instructions = [];\n inputs.forEach(input => {\n const previousInstruction = instructions[instructions.length - 1];\n const value = input.value.visit(valueConverter);\n let referenceForCall = reference;\n // each styling binding value is stored in the LView\n // but there are two values stored for each binding:\n // 1) the value itself\n // 2) an intermediate value (concatenation of style up to this point).\n // We need to store the intermediate value so that we don't allocate\n // the strings on each CD.\n let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n if (value instanceof Interpolation$1) {\n totalBindingSlotsRequired += value.expressions.length;\n if (getInterpolationExpressionFn) {\n referenceForCall = getInterpolationExpressionFn(value);\n }\n }\n const call = {\n sourceSpan: input.sourceSpan,\n allocateBindingSlots: totalBindingSlotsRequired,\n supportsInterpolation: !!getInterpolationExpressionFn,\n params: (convertFn) => {\n // params => stylingProp(propName, value, suffix)\n const params = [];\n params.push(literal(input.name));\n const convertResult = convertFn(value);\n if (Array.isArray(convertResult)) {\n params.push(...convertResult);\n }\n else {\n params.push(convertResult);\n }\n // [style.prop] bindings may use suffix values (e.g. px, em, etc...), therefore,\n // if that is detected then we need to pass that in as an optional param.\n if (!isClassBased && input.suffix !== null) {\n params.push(literal(input.suffix));\n }\n return params;\n }\n };\n // If we ended up generating a call to the same instruction as the previous styling property\n // we can chain the calls together safely to save some bytes, otherwise we have to generate\n // a separate instruction call. This is primarily a concern with interpolation instructions\n // where we may start off with one `reference`, but end up using another based on the\n // number of interpolations.\n if (previousInstruction && previousInstruction.reference === referenceForCall) {\n previousInstruction.calls.push(call);\n }\n else {\n instructions.push({ reference: referenceForCall, calls: [call] });\n }\n });\n return instructions;\n }\n _buildClassInputs(valueConverter) {\n if (this._singleClassInputs) {\n return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);\n }\n return [];\n }\n _buildStyleInputs(valueConverter) {\n if (this._singleStyleInputs) {\n return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);\n }\n return [];\n }\n /**\n * Constructs all instructions which contain the expressions that will be placed\n * into the update block of a template function or a directive hostBindings function.\n */\n buildUpdateLevelInstructions(valueConverter) {\n const instructions = [];\n if (this.hasBindings) {\n const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);\n if (styleMapInstruction) {\n instructions.push(styleMapInstruction);\n }\n const classMapInstruction = this.buildClassMapInstruction(valueConverter);\n if (classMapInstruction) {\n instructions.push(classMapInstruction);\n }\n instructions.push(...this._buildStyleInputs(valueConverter));\n instructions.push(...this._buildClassInputs(valueConverter));\n }\n return instructions;\n }\n}\nfunction registerIntoMap(map, key) {\n if (!map.has(key)) {\n map.set(key, map.size);\n }\n}\nfunction parseProperty(name) {\n let hasOverrideFlag = false;\n const overrideIndex = name.indexOf(IMPORTANT_FLAG);\n if (overrideIndex !== -1) {\n name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n hasOverrideFlag = true;\n }\n let suffix = null;\n let property = name;\n const unitIndex = name.lastIndexOf('.');\n if (unitIndex > 0) {\n suffix = name.slice(unitIndex + 1);\n property = name.substring(0, unitIndex);\n }\n return { property, suffix, hasOverrideFlag };\n}\n/**\n * Gets the instruction to generate for an interpolated class map.\n * @param interpolation An Interpolation AST\n */\nfunction getClassMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.classMap;\n case 3:\n return Identifiers.classMapInterpolate1;\n case 5:\n return Identifiers.classMapInterpolate2;\n case 7:\n return Identifiers.classMapInterpolate3;\n case 9:\n return Identifiers.classMapInterpolate4;\n case 11:\n return Identifiers.classMapInterpolate5;\n case 13:\n return Identifiers.classMapInterpolate6;\n case 15:\n return Identifiers.classMapInterpolate7;\n case 17:\n return Identifiers.classMapInterpolate8;\n default:\n return Identifiers.classMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style map.\n * @param interpolation An Interpolation AST\n */\nfunction getStyleMapInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleMap;\n case 3:\n return Identifiers.styleMapInterpolate1;\n case 5:\n return Identifiers.styleMapInterpolate2;\n case 7:\n return Identifiers.styleMapInterpolate3;\n case 9:\n return Identifiers.styleMapInterpolate4;\n case 11:\n return Identifiers.styleMapInterpolate5;\n case 13:\n return Identifiers.styleMapInterpolate6;\n case 15:\n return Identifiers.styleMapInterpolate7;\n case 17:\n return Identifiers.styleMapInterpolate8;\n default:\n return Identifiers.styleMapInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated style prop.\n * @param interpolation An Interpolation AST\n */\nfunction getStylePropInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.styleProp;\n case 3:\n return Identifiers.stylePropInterpolate1;\n case 5:\n return Identifiers.stylePropInterpolate2;\n case 7:\n return Identifiers.stylePropInterpolate3;\n case 9:\n return Identifiers.stylePropInterpolate4;\n case 11:\n return Identifiers.stylePropInterpolate5;\n case 13:\n return Identifiers.stylePropInterpolate6;\n case 15:\n return Identifiers.stylePropInterpolate7;\n case 17:\n return Identifiers.stylePropInterpolate8;\n default:\n return Identifiers.stylePropInterpolateV;\n }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\nfunction isCssCustomProperty(name) {\n return name.startsWith('--');\n}\nfunction isEmptyExpression(ast) {\n if (ast instanceof ASTWithSource) {\n ast = ast.ast;\n }\n return ast instanceof EmptyExpr$1;\n}\n\nvar TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n TokenType[TokenType[\"PrivateIdentifier\"] = 2] = \"PrivateIdentifier\";\n TokenType[TokenType[\"Keyword\"] = 3] = \"Keyword\";\n TokenType[TokenType[\"String\"] = 4] = \"String\";\n TokenType[TokenType[\"Operator\"] = 5] = \"Operator\";\n TokenType[TokenType[\"Number\"] = 6] = \"Number\";\n TokenType[TokenType[\"Error\"] = 7] = \"Error\";\n})(TokenType || (TokenType = {}));\nconst KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nclass Lexer {\n tokenize(text) {\n const scanner = new _Scanner(text);\n const tokens = [];\n let token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n }\n}\nclass Token {\n constructor(index, end, type, numValue, strValue) {\n this.index = index;\n this.end = end;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n isCharacter(code) {\n return this.type == TokenType.Character && this.numValue == code;\n }\n isNumber() {\n return this.type == TokenType.Number;\n }\n isString() {\n return this.type == TokenType.String;\n }\n isOperator(operator) {\n return this.type == TokenType.Operator && this.strValue == operator;\n }\n isIdentifier() {\n return this.type == TokenType.Identifier;\n }\n isPrivateIdentifier() {\n return this.type == TokenType.PrivateIdentifier;\n }\n isKeyword() {\n return this.type == TokenType.Keyword;\n }\n isKeywordLet() {\n return this.type == TokenType.Keyword && this.strValue == 'let';\n }\n isKeywordAs() {\n return this.type == TokenType.Keyword && this.strValue == 'as';\n }\n isKeywordNull() {\n return this.type == TokenType.Keyword && this.strValue == 'null';\n }\n isKeywordUndefined() {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n }\n isKeywordTrue() {\n return this.type == TokenType.Keyword && this.strValue == 'true';\n }\n isKeywordFalse() {\n return this.type == TokenType.Keyword && this.strValue == 'false';\n }\n isKeywordThis() {\n return this.type == TokenType.Keyword && this.strValue == 'this';\n }\n isError() {\n return this.type == TokenType.Error;\n }\n toNumber() {\n return this.type == TokenType.Number ? this.numValue : -1;\n }\n toString() {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.PrivateIdentifier:\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}\nfunction newCharacterToken(index, end, code) {\n return new Token(index, end, TokenType.Character, code, String.fromCharCode(code));\n}\nfunction newIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.Identifier, 0, text);\n}\nfunction newPrivateIdentifierToken(index, end, text) {\n return new Token(index, end, TokenType.PrivateIdentifier, 0, text);\n}\nfunction newKeywordToken(index, end, text) {\n return new Token(index, end, TokenType.Keyword, 0, text);\n}\nfunction newOperatorToken(index, end, text) {\n return new Token(index, end, TokenType.Operator, 0, text);\n}\nfunction newStringToken(index, end, text) {\n return new Token(index, end, TokenType.String, 0, text);\n}\nfunction newNumberToken(index, end, n) {\n return new Token(index, end, TokenType.Number, n, '');\n}\nfunction newErrorToken(index, end, message) {\n return new Token(index, end, TokenType.Error, 0, message);\n}\nconst EOF = new Token(-1, -1, TokenType.Character, 0, '');\nclass _Scanner {\n constructor(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n advance() {\n this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n }\n scanToken() {\n const input = this.input, length = this.length;\n let peek = this.peek, index = this.index;\n // Skip whitespace.\n while (peek <= $SPACE) {\n if (++index >= length) {\n peek = $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 (isDigit(peek))\n return this.scanNumber(index);\n const start = index;\n switch (peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) :\n newCharacterToken(start, this.index, $PERIOD);\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, peek);\n case $SQ:\n case $DQ:\n return this.scanString();\n case $HASH:\n return this.scanPrivateIdentifier();\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case $QUESTION:\n return this.scanQuestion(start);\n case $LT:\n case $GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n case $BAR:\n return this.scanComplexOperator(start, '|', $BAR, '|');\n case $NBSP:\n while (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 scanCharacter(start, code) {\n this.advance();\n return newCharacterToken(start, this.index, code);\n }\n scanOperator(start, str) {\n this.advance();\n return newOperatorToken(start, this.index, 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 scanComplexOperator(start, one, twoCode, two, threeCode, three) {\n this.advance();\n let 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, this.index, str);\n }\n scanIdentifier() {\n const start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek))\n this.advance();\n const str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) :\n newIdentifierToken(start, this.index, str);\n }\n /** Scans an ECMAScript private identifier. */\n scanPrivateIdentifier() {\n const start = this.index;\n this.advance();\n if (!isIdentifierStart(this.peek)) {\n return this.error('Invalid character [#]', -1);\n }\n while (isIdentifierPart(this.peek))\n this.advance();\n const identifierName = this.input.substring(start, this.index);\n return newPrivateIdentifierToken(start, this.index, identifierName);\n }\n scanNumber(start) {\n let simple = (this.index === start);\n let hasSeparators = false;\n this.advance(); // Skip initial digit.\n while (true) {\n if (isDigit(this.peek)) {\n // Do nothing.\n }\n else if (this.peek === $_) {\n // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is\n // valid while `_101` and `101_` are not. The separator can't be next to the decimal\n // point or another separator either. Note that it's unlikely that we'll hit a case where\n // the underscore is at the start, because that's a valid identifier and it will be picked\n // up earlier in the parsing. We validate for it anyway just in case.\n if (!isDigit(this.input.charCodeAt(this.index - 1)) ||\n !isDigit(this.input.charCodeAt(this.index + 1))) {\n return this.error('Invalid numeric separator', 0);\n }\n hasSeparators = true;\n }\n else if (this.peek === $PERIOD) {\n simple = false;\n }\n else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek))\n this.advance();\n if (!isDigit(this.peek))\n return this.error('Invalid exponent', -1);\n simple = false;\n }\n else {\n break;\n }\n this.advance();\n }\n let str = this.input.substring(start, this.index);\n if (hasSeparators) {\n str = str.replace(/_/g, '');\n }\n const value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, this.index, value);\n }\n scanString() {\n const start = this.index;\n const quote = this.peek;\n this.advance(); // Skip initial quote.\n let buffer = '';\n let marker = this.index;\n const input = this.input;\n while (this.peek != quote) {\n if (this.peek == $BACKSLASH) {\n buffer += input.substring(marker, this.index);\n let unescapedCode;\n this.advance(); // mutates this.peek\n // @ts-expect-error see microsoft/TypeScript#9998\n if (this.peek == $u) {\n // 4 character hex code for unicode character.\n const 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 (let 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 == $EOF) {\n return this.error('Unterminated quote', 0);\n }\n else {\n this.advance();\n }\n }\n const last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, this.index, buffer + last);\n }\n scanQuestion(start) {\n this.advance();\n let str = '?';\n // Either `a ?? b` or 'a?.b'.\n if (this.peek === $QUESTION || this.peek === $PERIOD) {\n str += this.peek === $PERIOD ? '.' : '?';\n this.advance();\n }\n return newOperatorToken(start, this.index, str);\n }\n error(message, offset) {\n const position = this.index + offset;\n return newErrorToken(position, this.index, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`);\n }\n}\nfunction isIdentifierStart(code) {\n return ($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n (code == $_) || (code == $$);\n}\nfunction isIdentifier(input) {\n if (input.length == 0)\n return false;\n const scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek))\n return false;\n scanner.advance();\n while (scanner.peek !== $EOF) {\n if (!isIdentifierPart(scanner.peek))\n return false;\n scanner.advance();\n }\n return true;\n}\nfunction isIdentifierPart(code) {\n return isAsciiLetter(code) || isDigit(code) || (code == $_) ||\n (code == $$);\n}\nfunction isExponentStart(code) {\n return code == $e || code == $E;\n}\nfunction isExponentSign(code) {\n return code == $MINUS || code == $PLUS;\n}\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\nfunction parseIntAutoRadix(text) {\n const result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\nclass SplitInterpolation {\n constructor(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n}\nclass TemplateBindingParseResult {\n constructor(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n}\nclass Parser$1 {\n constructor(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n parseAction(input, isAssignmentEvent, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n let flags = 1 /* ParseFlags.Action */;\n if (isAssignmentEvent) {\n flags |= 2 /* ParseFlags.AssignmentEvent */;\n }\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n }\n checkSimpleExpression(ast) {\n const checker = new SimpleExpressionChecker();\n ast.visit(checker);\n return checker.errors;\n }\n // Host bindings parsed here\n parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n const errors = this.checkSimpleExpression(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, absoluteOffset, this.errors);\n }\n _reportError(message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n }\n _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {\n this._checkNoInterpolation(input, location, interpolationConfig);\n const sourceToLex = this._stripComments(input);\n const tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)\n .parseChain();\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items\">\n * ^ ^ absoluteValueOffset for `templateValue`\n * absoluteKeyOffset for `templateKey`\n * ```\n * contains three bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n *\n * This is apparent from the de-sugared template:\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\">\n * ```\n *\n * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor\n * @param templateValue RHS of the microsyntax attribute\n * @param templateUrl template filename if it's external, component filename if it's inline\n * @param absoluteKeyOffset start of the `templateKey`\n * @param absoluteValueOffset start of the `templateValue`\n */\n parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {\n const tokens = this._lexer.tokenize(templateValue);\n const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */);\n return parser.parseTemplateBindings({\n source: templateKey,\n span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),\n });\n }\n parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);\n if (expressions.length === 0)\n return null;\n const expressionNodes = [];\n for (let i = 0; i < expressions.length; ++i) {\n const expressionText = expressions[i].text;\n const sourceToLex = this._stripComments(expressionText);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i])\n .parseChain();\n expressionNodes.push(ast);\n }\n return this.createInterpolationAst(strings.map(s => s.text), expressionNodes, input, location, absoluteOffset);\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, location, absoluteOffset) {\n const sourceToLex = this._stripComments(expression);\n const tokens = this._lexer.tokenize(sourceToLex);\n const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)\n .parseChain();\n const strings = ['', '']; // The prefix and suffix strings are both empty\n return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);\n }\n createInterpolationAst(strings, expressions, input, location, absoluteOffset) {\n const span = new ParseSpan(0, input.length);\n const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);\n return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);\n }\n /**\n * Splits a string of text into \"raw\" text segments and expressions present in interpolations in\n * the string.\n * Returns `null` if there are no interpolations, otherwise a\n * `SplitInterpolation` with splits that look like\n * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>\n */\n splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n const strings = [];\n const expressions = [];\n const offsets = [];\n const inputToTemplateIndexMap = interpolatedTokens ? getIndexMapForOriginalTemplate(interpolatedTokens) : null;\n let i = 0;\n let atInterpolation = false;\n let extendLastString = false;\n let { start: interpStart, end: interpEnd } = interpolationConfig;\n while (i < input.length) {\n if (!atInterpolation) {\n // parse until starting {{\n const start = i;\n i = input.indexOf(interpStart, i);\n if (i === -1) {\n i = input.length;\n }\n const text = input.substring(start, i);\n strings.push({ text, start, end: i });\n atInterpolation = true;\n }\n else {\n // parse from starting {{ to ending }} while ignoring content inside quotes.\n const fullStart = i;\n const exprStart = fullStart + interpStart.length;\n const exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);\n if (exprEnd === -1) {\n // Could not find the end of the interpolation; do not parse an expression.\n // Instead we should extend the content on the last raw string.\n atInterpolation = false;\n extendLastString = true;\n break;\n }\n const fullEnd = exprEnd + interpEnd.length;\n const text = input.substring(exprStart, exprEnd);\n if (text.trim().length === 0) {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);\n }\n expressions.push({ text, start: fullStart, end: fullEnd });\n const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;\n const offset = startInOriginalTemplate + interpStart.length;\n offsets.push(offset);\n i = fullEnd;\n atInterpolation = false;\n }\n }\n if (!atInterpolation) {\n // If we are now at a text section, add the remaining content as a raw string.\n if (extendLastString) {\n const piece = strings[strings.length - 1];\n piece.text += input.substring(i);\n piece.end = input.length;\n }\n else {\n strings.push({ text: input.substring(i), start: i, end: input.length });\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n }\n wrapLiteralPrimitive(input, location, absoluteOffset) {\n const span = new ParseSpan(0, input == null ? 0 : input.length);\n return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);\n }\n _stripComments(input) {\n const i = this._commentStart(input);\n return i != null ? input.substring(0, i) : input;\n }\n _commentStart(input) {\n let outerQuote = null;\n for (let i = 0; i < input.length - 1; i++) {\n const char = input.charCodeAt(i);\n const nextChar = input.charCodeAt(i + 1);\n if (char === $SLASH && nextChar == $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 _checkNoInterpolation(input, location, { start, end }) {\n let startIndex = -1;\n let endIndex = -1;\n for (const charIndex of this._forEachUnquotedChar(input, 0)) {\n if (startIndex === -1) {\n if (input.startsWith(start)) {\n startIndex = charIndex;\n }\n }\n else {\n endIndex = this._getInterpolationEndIndex(input, end, charIndex);\n if (endIndex > -1) {\n break;\n }\n }\n }\n if (startIndex > -1 && endIndex > -1) {\n this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);\n }\n }\n /**\n * Finds the index of the end of an interpolation expression\n * while ignoring comments and quoted content.\n */\n _getInterpolationEndIndex(input, expressionEnd, start) {\n for (const charIndex of this._forEachUnquotedChar(input, start)) {\n if (input.startsWith(expressionEnd, charIndex)) {\n return charIndex;\n }\n // Nothing else in the expression matters after we've\n // hit a comment so look directly for the end token.\n if (input.startsWith('//', charIndex)) {\n return input.indexOf(expressionEnd, charIndex);\n }\n }\n return -1;\n }\n /**\n * Generator used to iterate over the character indexes of a string that are outside of quotes.\n * @param input String to loop through.\n * @param start Index within the string at which to start.\n */\n *_forEachUnquotedChar(input, start) {\n let currentQuote = null;\n let escapeCount = 0;\n for (let i = start; i < input.length; i++) {\n const char = input[i];\n // Skip the characters inside quotes. Note that we only care about the outer-most\n // quotes matching up and we need to account for escape characters.\n if (isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) &&\n escapeCount % 2 === 0) {\n currentQuote = currentQuote === null ? char : null;\n }\n else if (currentQuote === null) {\n yield i;\n }\n escapeCount = char === '\\\\' ? escapeCount + 1 : 0;\n }\n }\n}\n/** Describes a stateful context an expression parser is in. */\nvar ParseContextFlags;\n(function (ParseContextFlags) {\n ParseContextFlags[ParseContextFlags[\"None\"] = 0] = \"None\";\n /**\n * A Writable context is one in which a value may be written to an lvalue.\n * For example, after we see a property access, we may expect a write to the\n * property via the \"=\" operator.\n * prop\n * ^ possible \"=\" after\n */\n ParseContextFlags[ParseContextFlags[\"Writable\"] = 1] = \"Writable\";\n})(ParseContextFlags || (ParseContextFlags = {}));\nclass _ParseAST {\n constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {\n this.input = input;\n this.location = location;\n this.absoluteOffset = absoluteOffset;\n this.tokens = tokens;\n this.parseFlags = parseFlags;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.context = ParseContextFlags.None;\n // Cache of expression start and input indeces to the absolute source span they map to, used to\n // prevent creating superfluous source spans in `sourceSpan`.\n // A serial of the expression start and input index is used for mapping because both are stateful\n // and may change for subsequent expressions visited by the parser.\n this.sourceSpanCache = new Map();\n this.index = 0;\n }\n peek(offset) {\n const i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n }\n get next() {\n return this.peek(0);\n }\n /** Whether all the parser input has been processed. */\n get atEOF() {\n return this.index >= this.tokens.length;\n }\n /**\n * Index of the next token to be processed, or the end of the last token if all have been\n * processed.\n */\n get inputIndex() {\n return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;\n }\n /**\n * End index of the last processed token, or the start of the first token if none have been\n * processed.\n */\n get currentEndIndex() {\n if (this.index > 0) {\n const curToken = this.peek(-1);\n return curToken.end + this.offset;\n }\n // No tokens have been processed yet; return the next token's start or the length of the input\n // if there is no token.\n if (this.tokens.length === 0) {\n return this.input.length + this.offset;\n }\n return this.next.index + this.offset;\n }\n /**\n * Returns the absolute offset of the start of the current token.\n */\n get currentAbsoluteOffset() {\n return this.absoluteOffset + this.inputIndex;\n }\n /**\n * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if\n * provided).\n *\n * @param start Position from which the `ParseSpan` will start.\n * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the\n * natural ending index)\n */\n span(start, artificialEndIndex) {\n let endIndex = this.currentEndIndex;\n if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) {\n endIndex = artificialEndIndex;\n }\n // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is\n // being created), the current token may already be advanced beyond the `currentEndIndex`. This\n // appears to be a deep-seated parser bug.\n //\n // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`.\n // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround.\n if (start > endIndex) {\n const tmp = endIndex;\n endIndex = start;\n start = tmp;\n }\n return new ParseSpan(start, endIndex);\n }\n sourceSpan(start, artificialEndIndex) {\n const serial = `${start}@${this.inputIndex}:${artificialEndIndex}`;\n if (!this.sourceSpanCache.has(serial)) {\n this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset));\n }\n return this.sourceSpanCache.get(serial);\n }\n advance() {\n this.index++;\n }\n /**\n * Executes a callback in the provided context.\n */\n withContext(context, cb) {\n this.context |= context;\n const ret = cb();\n this.context ^= context;\n return ret;\n }\n consumeOptionalCharacter(code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n }\n peekKeywordLet() {\n return this.next.isKeywordLet();\n }\n peekKeywordAs() {\n return this.next.isKeywordAs();\n }\n /**\n * Consumes an expected character, otherwise emits an error about the missing expected character\n * and skips over the token stream until reaching a recoverable point.\n *\n * See `this.error` and `this.skip` for more details.\n */\n expectCharacter(code) {\n if (this.consumeOptionalCharacter(code))\n return;\n this.error(`Missing expected ${String.fromCharCode(code)}`);\n }\n consumeOptionalOperator(op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n }\n expectOperator(operator) {\n if (this.consumeOptionalOperator(operator))\n return;\n this.error(`Missing expected operator ${operator}`);\n }\n prettyPrintToken(tok) {\n return tok === EOF ? 'end of input' : `token ${tok}`;\n }\n expectIdentifierOrKeyword() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword');\n }\n else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);\n }\n return null;\n }\n this.advance();\n return n.toString();\n }\n expectIdentifierOrKeywordOrString() {\n const n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n if (n.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string');\n }\n else {\n this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);\n }\n return '';\n }\n this.advance();\n return n.toString();\n }\n parseChain() {\n const exprs = [];\n const start = this.inputIndex;\n while (this.index < this.tokens.length) {\n const expr = this.parsePipe();\n exprs.push(expr);\n if (this.consumeOptionalCharacter($SEMICOLON)) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.consumeOptionalCharacter($SEMICOLON)) {\n } // read all semicolons\n }\n else if (this.index < this.tokens.length) {\n const errorIndex = this.index;\n this.error(`Unexpected token '${this.next}'`);\n // The `error` call above will skip ahead to the next recovery point in an attempt to\n // recover part of the expression, but that might be the token we started from which will\n // lead to an infinite loop. If that's the case, break the loop assuming that we can't\n // parse further.\n if (this.index === errorIndex) {\n break;\n }\n }\n }\n if (exprs.length === 0) {\n // We have no expressions so create an empty expression that spans the entire input length\n const artificialStart = this.offset;\n const artificialEnd = this.offset + this.input.length;\n return new EmptyExpr$1(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));\n }\n if (exprs.length == 1)\n return exprs[0];\n return new Chain(this.span(start), this.sourceSpan(start), exprs);\n }\n parsePipe() {\n const start = this.inputIndex;\n let result = this.parseExpression();\n if (this.consumeOptionalOperator('|')) {\n if (this.parseFlags & 1 /* ParseFlags.Action */) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n const nameStart = this.inputIndex;\n let nameId = this.expectIdentifierOrKeyword();\n let nameSpan;\n let fullSpanEnd = undefined;\n if (nameId !== null) {\n nameSpan = this.sourceSpan(nameStart);\n }\n else {\n // No valid identifier was found, so we'll assume an empty pipe name ('').\n nameId = '';\n // However, there may have been whitespace present between the pipe character and the next\n // token in the sequence (or the end of input). We want to track this whitespace so that\n // the `BindingPipe` we produce covers not just the pipe character, but any trailing\n // whitespace beyond it. Another way of thinking about this is that the zero-length name\n // is assumed to be at the end of any whitespace beyond the pipe character.\n //\n // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the\n // beginning of the next token, or until the end of input if the next token is EOF.\n fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset;\n // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace\n // beyond the pipe character.\n nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);\n }\n const args = [];\n while (this.consumeOptionalCharacter($COLON)) {\n args.push(this.parseExpression());\n // If there are additional expressions beyond the name, then the artificial end for the\n // name is no longer relevant.\n }\n result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);\n } while (this.consumeOptionalOperator('|'));\n }\n return result;\n }\n parseExpression() {\n return this.parseConditional();\n }\n parseConditional() {\n const start = this.inputIndex;\n const result = this.parseLogicalOr();\n if (this.consumeOptionalOperator('?')) {\n const yes = this.parsePipe();\n let no;\n if (!this.consumeOptionalCharacter($COLON)) {\n const end = this.inputIndex;\n const expression = this.input.substring(start, end);\n this.error(`Conditional expression ${expression} requires all 3 expressions`);\n no = new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);\n }\n else {\n return result;\n }\n }\n parseLogicalOr() {\n // '||'\n const start = this.inputIndex;\n let result = this.parseLogicalAnd();\n while (this.consumeOptionalOperator('||')) {\n const right = this.parseLogicalAnd();\n result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right);\n }\n return result;\n }\n parseLogicalAnd() {\n // '&&'\n const start = this.inputIndex;\n let result = this.parseNullishCoalescing();\n while (this.consumeOptionalOperator('&&')) {\n const right = this.parseNullishCoalescing();\n result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right);\n }\n return result;\n }\n parseNullishCoalescing() {\n // '??'\n const start = this.inputIndex;\n let result = this.parseEquality();\n while (this.consumeOptionalOperator('??')) {\n const right = this.parseEquality();\n result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right);\n }\n return result;\n }\n parseEquality() {\n // '==','!=','===','!=='\n const start = this.inputIndex;\n let result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n const right = this.parseRelational();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseRelational() {\n // '<', '>', '<=', '>='\n const start = this.inputIndex;\n let result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n const right = this.parseAdditive();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseAdditive() {\n // '+', '-'\n const start = this.inputIndex;\n let result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n let right = this.parseMultiplicative();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parseMultiplicative() {\n // '*', '%', '/'\n const start = this.inputIndex;\n let result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n const operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n let right = this.parsePrefix();\n result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n }\n parsePrefix() {\n if (this.next.type == TokenType.Operator) {\n const start = this.inputIndex;\n const operator = this.next.strValue;\n let result;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return Unary.createPlus(this.span(start), this.sourceSpan(start), result);\n case '-':\n this.advance();\n result = this.parsePrefix();\n return Unary.createMinus(this.span(start), this.sourceSpan(start), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), this.sourceSpan(start), result);\n }\n }\n return this.parseCallChain();\n }\n parseCallChain() {\n const start = this.inputIndex;\n let result = this.parsePrimary();\n while (true) {\n if (this.consumeOptionalCharacter($PERIOD)) {\n result = this.parseAccessMember(result, start, false);\n }\n else if (this.consumeOptionalOperator('?.')) {\n if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, true);\n }\n else {\n result = this.consumeOptionalCharacter($LBRACKET) ?\n this.parseKeyedReadOrWrite(result, start, true) :\n this.parseAccessMember(result, start, true);\n }\n }\n else if (this.consumeOptionalCharacter($LBRACKET)) {\n result = this.parseKeyedReadOrWrite(result, start, false);\n }\n else if (this.consumeOptionalCharacter($LPAREN)) {\n result = this.parseCall(result, start, false);\n }\n else if (this.consumeOptionalOperator('!')) {\n result = new NonNullAssert(this.span(start), this.sourceSpan(start), result);\n }\n else {\n return result;\n }\n }\n }\n parsePrimary() {\n const start = this.inputIndex;\n if (this.consumeOptionalCharacter($LPAREN)) {\n this.rparensExpected++;\n const result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n return result;\n }\n else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);\n }\n else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);\n }\n else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);\n }\n else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);\n }\n else if (this.next.isKeywordThis()) {\n this.advance();\n return new ThisReceiver(this.span(start), this.sourceSpan(start));\n }\n else if (this.consumeOptionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n const elements = this.parseExpressionList($RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n return new LiteralArray(this.span(start), this.sourceSpan(start), elements);\n }\n else if (this.next.isCharacter($LBRACE)) {\n return this.parseLiteralMap();\n }\n else if (this.next.isIdentifier()) {\n return this.parseAccessMember(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false);\n }\n else if (this.next.isNumber()) {\n const value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);\n }\n else if (this.next.isString()) {\n const literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);\n }\n else if (this.next.isPrivateIdentifier()) {\n this._reportErrorForPrivateIdentifier(this.next, null);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n else if (this.index >= this.tokens.length) {\n this.error(`Unexpected end of expression: ${this.input}`);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n else {\n this.error(`Unexpected token ${this.next}`);\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n }\n parseExpressionList(terminator) {\n const result = [];\n do {\n if (!this.next.isCharacter(terminator)) {\n result.push(this.parsePipe());\n }\n else {\n break;\n }\n } while (this.consumeOptionalCharacter($COMMA));\n return result;\n }\n parseLiteralMap() {\n const keys = [];\n const values = [];\n const start = this.inputIndex;\n this.expectCharacter($LBRACE);\n if (!this.consumeOptionalCharacter($RBRACE)) {\n this.rbracesExpected++;\n do {\n const keyStart = this.inputIndex;\n const quoted = this.next.isString();\n const key = this.expectIdentifierOrKeywordOrString();\n keys.push({ key, quoted });\n // Properties with quoted keys can't use the shorthand syntax.\n if (quoted) {\n this.expectCharacter($COLON);\n values.push(this.parsePipe());\n }\n else if (this.consumeOptionalCharacter($COLON)) {\n values.push(this.parsePipe());\n }\n else {\n const span = this.span(keyStart);\n const sourceSpan = this.sourceSpan(keyStart);\n values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));\n }\n } while (this.consumeOptionalCharacter($COMMA) &&\n !this.next.isCharacter($RBRACE));\n this.rbracesExpected--;\n this.expectCharacter($RBRACE);\n }\n return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);\n }\n parseAccessMember(readReceiver, start, isSafe) {\n const nameStart = this.inputIndex;\n const id = this.withContext(ParseContextFlags.Writable, () => {\n const id = this.expectIdentifierOrKeyword() ?? '';\n if (id.length === 0) {\n this.error(`Expected identifier for property access`, readReceiver.span.end);\n }\n return id;\n });\n const nameSpan = this.sourceSpan(nameStart);\n let receiver;\n if (isSafe) {\n if (this.consumeOptionalAssignment()) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n receiver = new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n else {\n receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n }\n else {\n if (this.consumeOptionalAssignment()) {\n if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n }\n const value = this.parseConditional();\n receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value);\n }\n else {\n receiver =\n new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);\n }\n }\n return receiver;\n }\n parseCall(receiver, start, isSafe) {\n const argumentStart = this.inputIndex;\n this.rparensExpected++;\n const args = this.parseCallArguments();\n const argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset);\n this.expectCharacter($RPAREN);\n this.rparensExpected--;\n const span = this.span(start);\n const sourceSpan = this.sourceSpan(start);\n return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) :\n new Call(span, sourceSpan, receiver, args, argumentSpan);\n }\n consumeOptionalAssignment() {\n // When parsing assignment events (originating from two-way-binding aka banana-in-a-box syntax),\n // it is valid for the primary expression to be terminated by the non-null operator. This\n // primary expression is substituted as LHS of the assignment operator to achieve\n // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't\n // naturally allow for this syntax, so assignment events are parsed specially.\n if ((this.parseFlags & 2 /* ParseFlags.AssignmentEvent */) && this.next.isOperator('!') &&\n this.peek(1).isOperator('=')) {\n // First skip over the ! operator.\n this.advance();\n // Then skip over the = operator, to fully consume the optional assignment operator.\n this.advance();\n return true;\n }\n return this.consumeOptionalOperator('=');\n }\n parseCallArguments() {\n if (this.next.isCharacter($RPAREN))\n return [];\n const positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.consumeOptionalCharacter($COMMA));\n return positionals;\n }\n /**\n * Parses an identifier, a keyword, a string with an optional `-` in between,\n * and returns the string along with its absolute source span.\n */\n expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n const start = this.currentAbsoluteOffset;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.consumeOptionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return {\n source: result,\n span: new AbsoluteSourceSpan(start, start + result.length),\n };\n }\n /**\n * Parse microsyntax template expression and return a list of bindings or\n * parsing errors in case the given expression is invalid.\n *\n * For example,\n * ```\n * <div *ngFor=\"let item of items; index as i; trackBy: func\">\n * ```\n * contains five bindings:\n * 1. ngFor -> null\n * 2. item -> NgForOfContext.$implicit\n * 3. ngForOf -> items\n * 4. i -> NgForOfContext.index\n * 5. ngForTrackBy -> func\n *\n * For a full description of the microsyntax grammar, see\n * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855\n *\n * @param templateKey name of the microsyntax directive, like ngIf, ngFor,\n * without the *, along with its absolute span.\n */\n parseTemplateBindings(templateKey) {\n const bindings = [];\n // The first binding is for the template key itself\n // In *ngFor=\"let item of items\", key = \"ngFor\", value = null\n // In *ngIf=\"cond | pipe\", key = \"ngIf\", value = \"cond | pipe\"\n bindings.push(...this.parseDirectiveKeywordBindings(templateKey));\n while (this.index < this.tokens.length) {\n // If it starts with 'let', then this must be variable declaration\n const letBinding = this.parseLetBinding();\n if (letBinding) {\n bindings.push(letBinding);\n }\n else {\n // Two possible cases here, either `value \"as\" key` or\n // \"directive-keyword expression\". We don't know which case, but both\n // \"value\" and \"directive-keyword\" are template binding key, so consume\n // the key first.\n const key = this.expectTemplateBindingKey();\n // Peek at the next token, if it is \"as\" then this must be variable\n // declaration.\n const binding = this.parseAsBinding(key);\n if (binding) {\n bindings.push(binding);\n }\n else {\n // Otherwise the key must be a directive keyword, like \"of\". Transform\n // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy\n key.source =\n templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);\n bindings.push(...this.parseDirectiveKeywordBindings(key));\n }\n }\n this.consumeStatementTerminator();\n }\n return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors);\n }\n parseKeyedReadOrWrite(receiver, start, isSafe) {\n return this.withContext(ParseContextFlags.Writable, () => {\n this.rbracketsExpected++;\n const key = this.parsePipe();\n if (key instanceof EmptyExpr$1) {\n this.error(`Key access cannot be empty`);\n }\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n if (this.consumeOptionalOperator('=')) {\n if (isSafe) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n }\n else {\n const value = this.parseConditional();\n return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);\n }\n }\n else {\n return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) :\n new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);\n }\n return new EmptyExpr$1(this.span(start), this.sourceSpan(start));\n });\n }\n /**\n * Parse a directive keyword, followed by a mandatory expression.\n * For example, \"of items\", \"trackBy: func\".\n * The bindings are: ngForOf -> items, ngForTrackBy -> func\n * There could be an optional \"as\" binding that follows the expression.\n * For example,\n * ```\n * *ngFor=\"let item of items | slice:0:1 as collection\".\n * ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^\n * keyword bound target optional 'as' binding\n * ```\n *\n * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its\n * absolute span.\n */\n parseDirectiveKeywordBindings(key) {\n const bindings = [];\n this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction\n const value = this.getDirectiveBoundTarget();\n let spanEnd = this.currentAbsoluteOffset;\n // The binding could optionally be followed by \"as\". For example,\n // *ngIf=\"cond | pipe as x\". In this case, the key in the \"as\" binding\n // is \"x\" and the value is the template key itself (\"ngIf\"). Note that the\n // 'key' in the current context now becomes the \"value\" in the next binding.\n const asBinding = this.parseAsBinding(key);\n if (!asBinding) {\n this.consumeStatementTerminator();\n spanEnd = this.currentAbsoluteOffset;\n }\n const sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);\n bindings.push(new ExpressionBinding(sourceSpan, key, value));\n if (asBinding) {\n bindings.push(asBinding);\n }\n return bindings;\n }\n /**\n * Return the expression AST for the bound target of a directive keyword\n * binding. For example,\n * ```\n * *ngIf=\"condition | pipe\"\n * ^^^^^^^^^^^^^^^^ bound target for \"ngIf\"\n * *ngFor=\"let item of items\"\n * ^^^^^ bound target for \"ngForOf\"\n * ```\n */\n getDirectiveBoundTarget() {\n if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {\n return null;\n }\n const ast = this.parsePipe(); // example: \"condition | async\"\n const { start, end } = ast.span;\n const value = this.input.substring(start, end);\n return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);\n }\n /**\n * Return the binding for a variable declared using `as`. Note that the order\n * of the key-value pair in this declaration is reversed. For example,\n * ```\n * *ngFor=\"let item of items; index as i\"\n * ^^^^^ ^\n * value key\n * ```\n *\n * @param value name of the value in the declaration, \"ngIf\" in the example\n * above, along with its absolute span.\n */\n parseAsBinding(value) {\n if (!this.peekKeywordAs()) {\n return null;\n }\n this.advance(); // consume the 'as' keyword\n const key = this.expectTemplateBindingKey();\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Return the binding for a variable declared using `let`. For example,\n * ```\n * *ngFor=\"let item of items; let i=index;\"\n * ^^^^^^^^ ^^^^^^^^^^^\n * ```\n * In the first binding, `item` is bound to `NgForOfContext.$implicit`.\n * In the second binding, `i` is bound to `NgForOfContext.index`.\n */\n parseLetBinding() {\n if (!this.peekKeywordLet()) {\n return null;\n }\n const spanStart = this.currentAbsoluteOffset;\n this.advance(); // consume the 'let' keyword\n const key = this.expectTemplateBindingKey();\n let value = null;\n if (this.consumeOptionalOperator('=')) {\n value = this.expectTemplateBindingKey();\n }\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }\n /**\n * Consume the optional statement terminator: semicolon or comma.\n */\n consumeStatementTerminator() {\n this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);\n }\n /**\n * Records an error and skips over the token stream until reaching a recoverable point. See\n * `this.skip` for more details on token skipping.\n */\n error(message, index = null) {\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n }\n locationText(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 * Records an error for an unexpected private identifier being discovered.\n * @param token Token representing a private identifier.\n * @param extraMessage Optional additional message being appended to the error.\n */\n _reportErrorForPrivateIdentifier(token, extraMessage) {\n let errorMessage = `Private identifiers are not supported. Unexpected private identifier: ${token}`;\n if (extraMessage !== null) {\n errorMessage += `, ${extraMessage}`;\n }\n this.error(errorMessage);\n }\n /**\n * Error recovery should skip tokens until it encounters a recovery point.\n *\n * The following are treated as unconditional recovery points:\n * - end of input\n * - ';' (parseChain() is always the root production, and it expects a ';')\n * - '|' (since pipes may be chained and each pipe expression may be treated independently)\n *\n * The following are conditional recovery points:\n * - ')', '}', ']' if one of calling productions is expecting one of these symbols\n * - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to\n * be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins\n * an '(' <expr> ')' production).\n * The recovery points of grouping symbols must be conditional as they must be skipped if\n * none of the calling productions are not expecting the closing token else we will never\n * make progress in the case of an extraneous group closing symbol (such as a stray ')').\n * That is, we skip a closing symbol if we are not in a grouping production.\n * - '=' in a `Writable` context\n * - In this context, we are able to recover after seeing the `=` operator, which\n * signals the presence of an independent rvalue expression following the `=` operator.\n *\n * If a production expects one of these token it increments the corresponding nesting count,\n * and then decrements it just prior to checking if the token is in the input.\n */\n skip() {\n let n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&\n !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&\n (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&\n (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) &&\n (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n }\n}\nclass SimpleExpressionChecker extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.errors = [];\n }\n visitPipe() {\n this.errors.push('pipes');\n }\n}\n/**\n * Computes the real offset in the original template for indexes in an interpolation.\n *\n * Because templates can have encoded HTML entities and the input passed to the parser at this stage\n * of the compiler is the _decoded_ value, we need to compute the real offset using the original\n * encoded values in the interpolated tokens. Note that this is only a special case handling for\n * `MlParserTokenType.ENCODED_ENTITY` token types. All other interpolated tokens are expected to\n * have parts which exactly match the input string for parsing the interpolation.\n *\n * @param interpolatedTokens The tokens for the interpolated value.\n *\n * @returns A map of index locations in the decoded template to indexes in the original template\n */\nfunction getIndexMapForOriginalTemplate(interpolatedTokens) {\n let offsetMap = new Map();\n let consumedInOriginalTemplate = 0;\n let consumedInInput = 0;\n let tokenIndex = 0;\n while (tokenIndex < interpolatedTokens.length) {\n const currentToken = interpolatedTokens[tokenIndex];\n if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) {\n const [decoded, encoded] = currentToken.parts;\n consumedInOriginalTemplate += encoded.length;\n consumedInInput += decoded.length;\n }\n else {\n const lengthOfParts = currentToken.parts.reduce((sum, current) => sum + current.length, 0);\n consumedInInput += lengthOfParts;\n consumedInOriginalTemplate += lengthOfParts;\n }\n offsetMap.set(consumedInInput, consumedInOriginalTemplate);\n tokenIndex++;\n }\n return offsetMap;\n}\n\nclass NodeWithI18n {\n constructor(sourceSpan, i18n) {\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n}\nclass Text extends NodeWithI18n {\n constructor(value, sourceSpan, tokens, i18n) {\n super(sourceSpan, i18n);\n this.value = value;\n this.tokens = tokens;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\nclass Expansion extends NodeWithI18n {\n constructor(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {\n super(sourceSpan, i18n);\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.switchValueSourceSpan = switchValueSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitExpansion(this, context);\n }\n}\nclass ExpansionCase {\n constructor(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 visit(visitor, context) {\n return visitor.visitExpansionCase(this, context);\n }\n}\nclass Attribute extends NodeWithI18n {\n constructor(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.value = value;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.valueTokens = valueTokens;\n }\n visit(visitor, context) {\n return visitor.visitAttribute(this, context);\n }\n}\nclass Element extends NodeWithI18n {\n constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitElement(this, context);\n }\n}\nclass Comment {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitComment(this, context);\n }\n}\nclass BlockGroup {\n constructor(blocks, sourceSpan, startSourceSpan, endSourceSpan = null) {\n this.blocks = blocks;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockGroup(this, context);\n }\n}\nclass Block {\n constructor(name, parameters, children, sourceSpan, startSourceSpan, endSourceSpan = null) {\n this.name = name;\n this.parameters = parameters;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlock(this, context);\n }\n}\nclass BlockParameter {\n constructor(expression, sourceSpan) {\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockParameter(this, context);\n }\n}\nfunction visitAll(visitor, nodes, context = null) {\n const result = [];\n const visit = visitor.visit ?\n (ast) => visitor.visit(ast, context) || ast.visit(visitor, context) :\n (ast) => ast.visit(visitor, context);\n nodes.forEach(ast => {\n const astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nclass RecursiveVisitor {\n constructor() { }\n visitElement(ast, context) {\n this.visitChildren(context, visit => {\n visit(ast.attrs);\n visit(ast.children);\n });\n }\n visitAttribute(ast, context) { }\n visitText(ast, context) { }\n visitComment(ast, context) { }\n visitExpansion(ast, context) {\n return this.visitChildren(context, visit => {\n visit(ast.cases);\n });\n }\n visitExpansionCase(ast, context) { }\n visitBlockGroup(ast, context) {\n this.visitChildren(context, visit => {\n visit(ast.blocks);\n });\n }\n visitBlock(block, context) {\n this.visitChildren(context, visit => {\n visit(block.parameters);\n visit(block.children);\n });\n }\n visitBlockParameter(ast, context) { }\n visitChildren(context, cb) {\n let results = [];\n let t = this;\n function visit(children) {\n if (children)\n results.push(visitAll(t, children, context));\n }\n cb(visit);\n return Array.prototype.concat.apply([], results);\n }\n}\n\nclass ElementSchemaRegistry {\n}\n\nconst BOOLEAN = 'boolean';\nconst NUMBER = 'number';\nconst STRING = 'string';\nconst 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 */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\nconst SCHEMA = [\n '[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +\n /* added manually to avoid breaking changes */\n ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n '[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',\n 'abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',\n 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume',\n ':svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%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,%relList,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,%relList,search,shape,target,username',\n 'audio^media|',\n 'br^[HTMLElement]|clear',\n 'base^[HTMLElement]|href,target',\n 'body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n 'button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n 'canvas^[HTMLElement]|#height,#width',\n 'content^[HTMLElement]|select',\n 'dl^[HTMLElement]|!compact',\n 'data^[HTMLElement]|value',\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,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*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,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n 'img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n 'input^[HTMLElement]|accept,align,alt,autocomplete,!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,imageSizes,imageSrcset,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,media,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,!noModule,%referrerPolicy,src,text,type',\n 'select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n 'slot^[HTMLElement]|name',\n 'source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width',\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]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n 'time^[HTMLElement]|dateTime',\n 'title^[HTMLElement]|text',\n 'track^[HTMLElement]|!default,kind,label,src,srclang',\n 'ul^[HTMLElement]|!compact,type',\n 'unknown^[HTMLElement]|',\n 'video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,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|decoding',\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];\nconst _ATTR_TO_PROP = new Map(Object.entries({\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n}));\n// Invert _ATTR_TO_PROP.\nconst _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {\n inverted.set(propertyName, attributeName);\n return inverted;\n}, new Map());\nclass DomElementSchemaRegistry extends ElementSchemaRegistry {\n constructor() {\n super();\n this._schema = new Map();\n // We don't allow binding to events for security reasons. Allowing event bindings would almost\n // certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.\n this._eventSchema = new Map;\n SCHEMA.forEach(encodedType => {\n const type = new Map();\n const events = new Set();\n const [strType, strProperties] = encodedType.split('|');\n const properties = strProperties.split(',');\n const [typeNames, superName] = strType.split('^');\n typeNames.split(',').forEach(tag => {\n this._schema.set(tag.toLowerCase(), type);\n this._eventSchema.set(tag.toLowerCase(), events);\n });\n const superType = superName && this._schema.get(superName.toLowerCase());\n if (superType) {\n for (const [prop, value] of superType) {\n type.set(prop, value);\n }\n for (const superEvent of this._eventSchema.get(superName.toLowerCase())) {\n events.add(superEvent);\n }\n }\n properties.forEach((property) => {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n events.add(property.substring(1));\n break;\n case '!':\n type.set(property.substring(1), BOOLEAN);\n break;\n case '#':\n type.set(property.substring(1), NUMBER);\n break;\n case '%':\n type.set(property.substring(1), OBJECT);\n break;\n default:\n type.set(property, STRING);\n }\n }\n });\n });\n }\n hasProperty(tagName, propName, schemaMetas) {\n if (schemaMetas.some((schema) => 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((schema) => 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 const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');\n return elementProperties.has(propName);\n }\n hasElement(tagName, schemaMetas) {\n if (schemaMetas.some((schema) => 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((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n // Allow any custom elements\n return true;\n }\n }\n return this._schema.has(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 based on a list of allowed tags|attributes. All attributes in the schema\n * above are assumed to have the 'NONE' security context, i.e. that they are safe inert\n * string values. Only specific well known attack vectors are assigned their appropriate context.\n */\n securityContext(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 let 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 getMappedPropName(propName) {\n return _ATTR_TO_PROP.get(propName) ?? propName;\n }\n getDefaultComponentElementName() {\n return 'ng-component';\n }\n validateProperty(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n }\n validateAttribute(name) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n }\n allKnownElementNames() {\n return Array.from(this._schema.keys());\n }\n allKnownAttributesOfElement(tagName) {\n const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');\n // Convert properties to attributes.\n return Array.from(elementProperties.keys()).map(prop => _PROP_TO_ATTR.get(prop) ?? prop);\n }\n allKnownEventsOfElement(tagName) {\n return Array.from(this._eventSchema.get(tagName.toLowerCase()) ?? []);\n }\n normalizeAnimationStyleProperty(propName) {\n return dashCaseToCamelCase(propName);\n }\n normalizeAnimationStyleValue(camelCaseProp, userProvidedProp, val) {\n let unit = '';\n const strVal = val.toString().trim();\n let errorMsg = null;\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n }\n else {\n const 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}\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\nclass HtmlTagDefinition {\n constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false, } = {}) {\n this.closedByChildren = {};\n this.closedByParent = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(tagName => this.closedByChildren[tagName] = true);\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n this.preventNamespaceInheritance = preventNamespaceInheritance;\n this.canSelfClose = canSelfClose ?? isVoid;\n }\n isClosedByChild(name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n }\n getContentType(prefix) {\n if (typeof this.contentType === 'object') {\n const overrideType = prefix === undefined ? undefined : this.contentType[prefix];\n return overrideType ?? this.contentType.default;\n }\n return this.contentType;\n }\n}\nlet DEFAULT_TAG_DEFINITION;\n// see https://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nlet TAG_DEFINITIONS;\nfunction getHtmlTagDefinition(tagName) {\n if (!TAG_DEFINITIONS) {\n DEFAULT_TAG_DEFINITION = new HtmlTagDefinition({ canSelfClose: true });\n 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',\n 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5',\n 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol',\n '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({ closedByChildren: ['tr'], closedByParent: true }),\n 'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'col': new HtmlTagDefinition({ isVoid: true }),\n 'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),\n 'foreignObject': new HtmlTagDefinition({\n // Usually the implicit namespace here would be redundant since it will be inherited from\n // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser\n // works is that the parent node of an end tag is its own start tag which means that\n // the `preventNamespaceInheritance` on `foreignObject` would have it default to the\n // implicit namespace which is `html`, unless specified otherwise.\n implicitNamespacePrefix: 'svg',\n // We want to prevent children of foreignObject from inheriting its namespace, because\n // the point of the element is to allow nodes from other namespaces to be inserted.\n preventNamespaceInheritance: true,\n }),\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({\n // The browser supports two separate `title` tags which have to use\n // a different content type: `HTMLTitleElement` and `SVGTitleElement`\n contentType: { default: TagContentType.ESCAPABLE_RAW_TEXT, svg: TagContentType.PARSABLE_DATA }\n }),\n 'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),\n };\n new DomElementSchemaRegistry().allKnownElementNames().forEach(knownTagName => {\n if (!TAG_DEFINITIONS.hasOwnProperty(knownTagName) && getNsPrefix(knownTagName) === null) {\n TAG_DEFINITIONS[knownTagName] = new HtmlTagDefinition({ canSelfClose: false });\n }\n });\n }\n // We have to make both a case-sensitive and a case-insensitive lookup, because\n // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.\n return TAG_DEFINITIONS[tagName] ?? TAG_DEFINITIONS[tagName.toLowerCase()] ??\n DEFAULT_TAG_DEFINITION;\n}\n\n// Mapping between all HTML entity names and their unicode representation.\n// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping\n// the `&` and `;` from the keys and removing the duplicates.\n// see https://www.w3.org/TR/html51/syntax.html#named-character-references\nconst NAMED_ENTITIES = {\n 'AElig': '\\u00C6',\n 'AMP': '\\u0026',\n 'amp': '\\u0026',\n 'Aacute': '\\u00C1',\n 'Abreve': '\\u0102',\n 'Acirc': '\\u00C2',\n 'Acy': '\\u0410',\n 'Afr': '\\uD835\\uDD04',\n 'Agrave': '\\u00C0',\n 'Alpha': '\\u0391',\n 'Amacr': '\\u0100',\n 'And': '\\u2A53',\n 'Aogon': '\\u0104',\n 'Aopf': '\\uD835\\uDD38',\n 'ApplyFunction': '\\u2061',\n 'af': '\\u2061',\n 'Aring': '\\u00C5',\n 'angst': '\\u00C5',\n 'Ascr': '\\uD835\\uDC9C',\n 'Assign': '\\u2254',\n 'colone': '\\u2254',\n 'coloneq': '\\u2254',\n 'Atilde': '\\u00C3',\n 'Auml': '\\u00C4',\n 'Backslash': '\\u2216',\n 'setminus': '\\u2216',\n 'setmn': '\\u2216',\n 'smallsetminus': '\\u2216',\n 'ssetmn': '\\u2216',\n 'Barv': '\\u2AE7',\n 'Barwed': '\\u2306',\n 'doublebarwedge': '\\u2306',\n 'Bcy': '\\u0411',\n 'Because': '\\u2235',\n 'becaus': '\\u2235',\n 'because': '\\u2235',\n 'Bernoullis': '\\u212C',\n 'Bscr': '\\u212C',\n 'bernou': '\\u212C',\n 'Beta': '\\u0392',\n 'Bfr': '\\uD835\\uDD05',\n 'Bopf': '\\uD835\\uDD39',\n 'Breve': '\\u02D8',\n 'breve': '\\u02D8',\n 'Bumpeq': '\\u224E',\n 'HumpDownHump': '\\u224E',\n 'bump': '\\u224E',\n 'CHcy': '\\u0427',\n 'COPY': '\\u00A9',\n 'copy': '\\u00A9',\n 'Cacute': '\\u0106',\n 'Cap': '\\u22D2',\n 'CapitalDifferentialD': '\\u2145',\n 'DD': '\\u2145',\n 'Cayleys': '\\u212D',\n 'Cfr': '\\u212D',\n 'Ccaron': '\\u010C',\n 'Ccedil': '\\u00C7',\n 'Ccirc': '\\u0108',\n 'Cconint': '\\u2230',\n 'Cdot': '\\u010A',\n 'Cedilla': '\\u00B8',\n 'cedil': '\\u00B8',\n 'CenterDot': '\\u00B7',\n 'centerdot': '\\u00B7',\n 'middot': '\\u00B7',\n 'Chi': '\\u03A7',\n 'CircleDot': '\\u2299',\n 'odot': '\\u2299',\n 'CircleMinus': '\\u2296',\n 'ominus': '\\u2296',\n 'CirclePlus': '\\u2295',\n 'oplus': '\\u2295',\n 'CircleTimes': '\\u2297',\n 'otimes': '\\u2297',\n 'ClockwiseContourIntegral': '\\u2232',\n 'cwconint': '\\u2232',\n 'CloseCurlyDoubleQuote': '\\u201D',\n 'rdquo': '\\u201D',\n 'rdquor': '\\u201D',\n 'CloseCurlyQuote': '\\u2019',\n 'rsquo': '\\u2019',\n 'rsquor': '\\u2019',\n 'Colon': '\\u2237',\n 'Proportion': '\\u2237',\n 'Colone': '\\u2A74',\n 'Congruent': '\\u2261',\n 'equiv': '\\u2261',\n 'Conint': '\\u222F',\n 'DoubleContourIntegral': '\\u222F',\n 'ContourIntegral': '\\u222E',\n 'conint': '\\u222E',\n 'oint': '\\u222E',\n 'Copf': '\\u2102',\n 'complexes': '\\u2102',\n 'Coproduct': '\\u2210',\n 'coprod': '\\u2210',\n 'CounterClockwiseContourIntegral': '\\u2233',\n 'awconint': '\\u2233',\n 'Cross': '\\u2A2F',\n 'Cscr': '\\uD835\\uDC9E',\n 'Cup': '\\u22D3',\n 'CupCap': '\\u224D',\n 'asympeq': '\\u224D',\n 'DDotrahd': '\\u2911',\n 'DJcy': '\\u0402',\n 'DScy': '\\u0405',\n 'DZcy': '\\u040F',\n 'Dagger': '\\u2021',\n 'ddagger': '\\u2021',\n 'Darr': '\\u21A1',\n 'Dashv': '\\u2AE4',\n 'DoubleLeftTee': '\\u2AE4',\n 'Dcaron': '\\u010E',\n 'Dcy': '\\u0414',\n 'Del': '\\u2207',\n 'nabla': '\\u2207',\n 'Delta': '\\u0394',\n 'Dfr': '\\uD835\\uDD07',\n 'DiacriticalAcute': '\\u00B4',\n 'acute': '\\u00B4',\n 'DiacriticalDot': '\\u02D9',\n 'dot': '\\u02D9',\n 'DiacriticalDoubleAcute': '\\u02DD',\n 'dblac': '\\u02DD',\n 'DiacriticalGrave': '\\u0060',\n 'grave': '\\u0060',\n 'DiacriticalTilde': '\\u02DC',\n 'tilde': '\\u02DC',\n 'Diamond': '\\u22C4',\n 'diam': '\\u22C4',\n 'diamond': '\\u22C4',\n 'DifferentialD': '\\u2146',\n 'dd': '\\u2146',\n 'Dopf': '\\uD835\\uDD3B',\n 'Dot': '\\u00A8',\n 'DoubleDot': '\\u00A8',\n 'die': '\\u00A8',\n 'uml': '\\u00A8',\n 'DotDot': '\\u20DC',\n 'DotEqual': '\\u2250',\n 'doteq': '\\u2250',\n 'esdot': '\\u2250',\n 'DoubleDownArrow': '\\u21D3',\n 'Downarrow': '\\u21D3',\n 'dArr': '\\u21D3',\n 'DoubleLeftArrow': '\\u21D0',\n 'Leftarrow': '\\u21D0',\n 'lArr': '\\u21D0',\n 'DoubleLeftRightArrow': '\\u21D4',\n 'Leftrightarrow': '\\u21D4',\n 'hArr': '\\u21D4',\n 'iff': '\\u21D4',\n 'DoubleLongLeftArrow': '\\u27F8',\n 'Longleftarrow': '\\u27F8',\n 'xlArr': '\\u27F8',\n 'DoubleLongLeftRightArrow': '\\u27FA',\n 'Longleftrightarrow': '\\u27FA',\n 'xhArr': '\\u27FA',\n 'DoubleLongRightArrow': '\\u27F9',\n 'Longrightarrow': '\\u27F9',\n 'xrArr': '\\u27F9',\n 'DoubleRightArrow': '\\u21D2',\n 'Implies': '\\u21D2',\n 'Rightarrow': '\\u21D2',\n 'rArr': '\\u21D2',\n 'DoubleRightTee': '\\u22A8',\n 'vDash': '\\u22A8',\n 'DoubleUpArrow': '\\u21D1',\n 'Uparrow': '\\u21D1',\n 'uArr': '\\u21D1',\n 'DoubleUpDownArrow': '\\u21D5',\n 'Updownarrow': '\\u21D5',\n 'vArr': '\\u21D5',\n 'DoubleVerticalBar': '\\u2225',\n 'par': '\\u2225',\n 'parallel': '\\u2225',\n 'shortparallel': '\\u2225',\n 'spar': '\\u2225',\n 'DownArrow': '\\u2193',\n 'ShortDownArrow': '\\u2193',\n 'darr': '\\u2193',\n 'downarrow': '\\u2193',\n 'DownArrowBar': '\\u2913',\n 'DownArrowUpArrow': '\\u21F5',\n 'duarr': '\\u21F5',\n 'DownBreve': '\\u0311',\n 'DownLeftRightVector': '\\u2950',\n 'DownLeftTeeVector': '\\u295E',\n 'DownLeftVector': '\\u21BD',\n 'leftharpoondown': '\\u21BD',\n 'lhard': '\\u21BD',\n 'DownLeftVectorBar': '\\u2956',\n 'DownRightTeeVector': '\\u295F',\n 'DownRightVector': '\\u21C1',\n 'rhard': '\\u21C1',\n 'rightharpoondown': '\\u21C1',\n 'DownRightVectorBar': '\\u2957',\n 'DownTee': '\\u22A4',\n 'top': '\\u22A4',\n 'DownTeeArrow': '\\u21A7',\n 'mapstodown': '\\u21A7',\n 'Dscr': '\\uD835\\uDC9F',\n 'Dstrok': '\\u0110',\n 'ENG': '\\u014A',\n 'ETH': '\\u00D0',\n 'Eacute': '\\u00C9',\n 'Ecaron': '\\u011A',\n 'Ecirc': '\\u00CA',\n 'Ecy': '\\u042D',\n 'Edot': '\\u0116',\n 'Efr': '\\uD835\\uDD08',\n 'Egrave': '\\u00C8',\n 'Element': '\\u2208',\n 'in': '\\u2208',\n 'isin': '\\u2208',\n 'isinv': '\\u2208',\n 'Emacr': '\\u0112',\n 'EmptySmallSquare': '\\u25FB',\n 'EmptyVerySmallSquare': '\\u25AB',\n 'Eogon': '\\u0118',\n 'Eopf': '\\uD835\\uDD3C',\n 'Epsilon': '\\u0395',\n 'Equal': '\\u2A75',\n 'EqualTilde': '\\u2242',\n 'eqsim': '\\u2242',\n 'esim': '\\u2242',\n 'Equilibrium': '\\u21CC',\n 'rightleftharpoons': '\\u21CC',\n 'rlhar': '\\u21CC',\n 'Escr': '\\u2130',\n 'expectation': '\\u2130',\n 'Esim': '\\u2A73',\n 'Eta': '\\u0397',\n 'Euml': '\\u00CB',\n 'Exists': '\\u2203',\n 'exist': '\\u2203',\n 'ExponentialE': '\\u2147',\n 'ee': '\\u2147',\n 'exponentiale': '\\u2147',\n 'Fcy': '\\u0424',\n 'Ffr': '\\uD835\\uDD09',\n 'FilledSmallSquare': '\\u25FC',\n 'FilledVerySmallSquare': '\\u25AA',\n 'blacksquare': '\\u25AA',\n 'squarf': '\\u25AA',\n 'squf': '\\u25AA',\n 'Fopf': '\\uD835\\uDD3D',\n 'ForAll': '\\u2200',\n 'forall': '\\u2200',\n 'Fouriertrf': '\\u2131',\n 'Fscr': '\\u2131',\n 'GJcy': '\\u0403',\n 'GT': '\\u003E',\n 'gt': '\\u003E',\n 'Gamma': '\\u0393',\n 'Gammad': '\\u03DC',\n 'Gbreve': '\\u011E',\n 'Gcedil': '\\u0122',\n 'Gcirc': '\\u011C',\n 'Gcy': '\\u0413',\n 'Gdot': '\\u0120',\n 'Gfr': '\\uD835\\uDD0A',\n 'Gg': '\\u22D9',\n 'ggg': '\\u22D9',\n 'Gopf': '\\uD835\\uDD3E',\n 'GreaterEqual': '\\u2265',\n 'ge': '\\u2265',\n 'geq': '\\u2265',\n 'GreaterEqualLess': '\\u22DB',\n 'gel': '\\u22DB',\n 'gtreqless': '\\u22DB',\n 'GreaterFullEqual': '\\u2267',\n 'gE': '\\u2267',\n 'geqq': '\\u2267',\n 'GreaterGreater': '\\u2AA2',\n 'GreaterLess': '\\u2277',\n 'gl': '\\u2277',\n 'gtrless': '\\u2277',\n 'GreaterSlantEqual': '\\u2A7E',\n 'geqslant': '\\u2A7E',\n 'ges': '\\u2A7E',\n 'GreaterTilde': '\\u2273',\n 'gsim': '\\u2273',\n 'gtrsim': '\\u2273',\n 'Gscr': '\\uD835\\uDCA2',\n 'Gt': '\\u226B',\n 'NestedGreaterGreater': '\\u226B',\n 'gg': '\\u226B',\n 'HARDcy': '\\u042A',\n 'Hacek': '\\u02C7',\n 'caron': '\\u02C7',\n 'Hat': '\\u005E',\n 'Hcirc': '\\u0124',\n 'Hfr': '\\u210C',\n 'Poincareplane': '\\u210C',\n 'HilbertSpace': '\\u210B',\n 'Hscr': '\\u210B',\n 'hamilt': '\\u210B',\n 'Hopf': '\\u210D',\n 'quaternions': '\\u210D',\n 'HorizontalLine': '\\u2500',\n 'boxh': '\\u2500',\n 'Hstrok': '\\u0126',\n 'HumpEqual': '\\u224F',\n 'bumpe': '\\u224F',\n 'bumpeq': '\\u224F',\n 'IEcy': '\\u0415',\n 'IJlig': '\\u0132',\n 'IOcy': '\\u0401',\n 'Iacute': '\\u00CD',\n 'Icirc': '\\u00CE',\n 'Icy': '\\u0418',\n 'Idot': '\\u0130',\n 'Ifr': '\\u2111',\n 'Im': '\\u2111',\n 'image': '\\u2111',\n 'imagpart': '\\u2111',\n 'Igrave': '\\u00CC',\n 'Imacr': '\\u012A',\n 'ImaginaryI': '\\u2148',\n 'ii': '\\u2148',\n 'Int': '\\u222C',\n 'Integral': '\\u222B',\n 'int': '\\u222B',\n 'Intersection': '\\u22C2',\n 'bigcap': '\\u22C2',\n 'xcap': '\\u22C2',\n 'InvisibleComma': '\\u2063',\n 'ic': '\\u2063',\n 'InvisibleTimes': '\\u2062',\n 'it': '\\u2062',\n 'Iogon': '\\u012E',\n 'Iopf': '\\uD835\\uDD40',\n 'Iota': '\\u0399',\n 'Iscr': '\\u2110',\n 'imagline': '\\u2110',\n 'Itilde': '\\u0128',\n 'Iukcy': '\\u0406',\n 'Iuml': '\\u00CF',\n 'Jcirc': '\\u0134',\n 'Jcy': '\\u0419',\n 'Jfr': '\\uD835\\uDD0D',\n 'Jopf': '\\uD835\\uDD41',\n 'Jscr': '\\uD835\\uDCA5',\n 'Jsercy': '\\u0408',\n 'Jukcy': '\\u0404',\n 'KHcy': '\\u0425',\n 'KJcy': '\\u040C',\n 'Kappa': '\\u039A',\n 'Kcedil': '\\u0136',\n 'Kcy': '\\u041A',\n 'Kfr': '\\uD835\\uDD0E',\n 'Kopf': '\\uD835\\uDD42',\n 'Kscr': '\\uD835\\uDCA6',\n 'LJcy': '\\u0409',\n 'LT': '\\u003C',\n 'lt': '\\u003C',\n 'Lacute': '\\u0139',\n 'Lambda': '\\u039B',\n 'Lang': '\\u27EA',\n 'Laplacetrf': '\\u2112',\n 'Lscr': '\\u2112',\n 'lagran': '\\u2112',\n 'Larr': '\\u219E',\n 'twoheadleftarrow': '\\u219E',\n 'Lcaron': '\\u013D',\n 'Lcedil': '\\u013B',\n 'Lcy': '\\u041B',\n 'LeftAngleBracket': '\\u27E8',\n 'lang': '\\u27E8',\n 'langle': '\\u27E8',\n 'LeftArrow': '\\u2190',\n 'ShortLeftArrow': '\\u2190',\n 'larr': '\\u2190',\n 'leftarrow': '\\u2190',\n 'slarr': '\\u2190',\n 'LeftArrowBar': '\\u21E4',\n 'larrb': '\\u21E4',\n 'LeftArrowRightArrow': '\\u21C6',\n 'leftrightarrows': '\\u21C6',\n 'lrarr': '\\u21C6',\n 'LeftCeiling': '\\u2308',\n 'lceil': '\\u2308',\n 'LeftDoubleBracket': '\\u27E6',\n 'lobrk': '\\u27E6',\n 'LeftDownTeeVector': '\\u2961',\n 'LeftDownVector': '\\u21C3',\n 'dharl': '\\u21C3',\n 'downharpoonleft': '\\u21C3',\n 'LeftDownVectorBar': '\\u2959',\n 'LeftFloor': '\\u230A',\n 'lfloor': '\\u230A',\n 'LeftRightArrow': '\\u2194',\n 'harr': '\\u2194',\n 'leftrightarrow': '\\u2194',\n 'LeftRightVector': '\\u294E',\n 'LeftTee': '\\u22A3',\n 'dashv': '\\u22A3',\n 'LeftTeeArrow': '\\u21A4',\n 'mapstoleft': '\\u21A4',\n 'LeftTeeVector': '\\u295A',\n 'LeftTriangle': '\\u22B2',\n 'vartriangleleft': '\\u22B2',\n 'vltri': '\\u22B2',\n 'LeftTriangleBar': '\\u29CF',\n 'LeftTriangleEqual': '\\u22B4',\n 'ltrie': '\\u22B4',\n 'trianglelefteq': '\\u22B4',\n 'LeftUpDownVector': '\\u2951',\n 'LeftUpTeeVector': '\\u2960',\n 'LeftUpVector': '\\u21BF',\n 'uharl': '\\u21BF',\n 'upharpoonleft': '\\u21BF',\n 'LeftUpVectorBar': '\\u2958',\n 'LeftVector': '\\u21BC',\n 'leftharpoonup': '\\u21BC',\n 'lharu': '\\u21BC',\n 'LeftVectorBar': '\\u2952',\n 'LessEqualGreater': '\\u22DA',\n 'leg': '\\u22DA',\n 'lesseqgtr': '\\u22DA',\n 'LessFullEqual': '\\u2266',\n 'lE': '\\u2266',\n 'leqq': '\\u2266',\n 'LessGreater': '\\u2276',\n 'lessgtr': '\\u2276',\n 'lg': '\\u2276',\n 'LessLess': '\\u2AA1',\n 'LessSlantEqual': '\\u2A7D',\n 'leqslant': '\\u2A7D',\n 'les': '\\u2A7D',\n 'LessTilde': '\\u2272',\n 'lesssim': '\\u2272',\n 'lsim': '\\u2272',\n 'Lfr': '\\uD835\\uDD0F',\n 'Ll': '\\u22D8',\n 'Lleftarrow': '\\u21DA',\n 'lAarr': '\\u21DA',\n 'Lmidot': '\\u013F',\n 'LongLeftArrow': '\\u27F5',\n 'longleftarrow': '\\u27F5',\n 'xlarr': '\\u27F5',\n 'LongLeftRightArrow': '\\u27F7',\n 'longleftrightarrow': '\\u27F7',\n 'xharr': '\\u27F7',\n 'LongRightArrow': '\\u27F6',\n 'longrightarrow': '\\u27F6',\n 'xrarr': '\\u27F6',\n 'Lopf': '\\uD835\\uDD43',\n 'LowerLeftArrow': '\\u2199',\n 'swarr': '\\u2199',\n 'swarrow': '\\u2199',\n 'LowerRightArrow': '\\u2198',\n 'searr': '\\u2198',\n 'searrow': '\\u2198',\n 'Lsh': '\\u21B0',\n 'lsh': '\\u21B0',\n 'Lstrok': '\\u0141',\n 'Lt': '\\u226A',\n 'NestedLessLess': '\\u226A',\n 'll': '\\u226A',\n 'Map': '\\u2905',\n 'Mcy': '\\u041C',\n 'MediumSpace': '\\u205F',\n 'Mellintrf': '\\u2133',\n 'Mscr': '\\u2133',\n 'phmmat': '\\u2133',\n 'Mfr': '\\uD835\\uDD10',\n 'MinusPlus': '\\u2213',\n 'mnplus': '\\u2213',\n 'mp': '\\u2213',\n 'Mopf': '\\uD835\\uDD44',\n 'Mu': '\\u039C',\n 'NJcy': '\\u040A',\n 'Nacute': '\\u0143',\n 'Ncaron': '\\u0147',\n 'Ncedil': '\\u0145',\n 'Ncy': '\\u041D',\n 'NegativeMediumSpace': '\\u200B',\n 'NegativeThickSpace': '\\u200B',\n 'NegativeThinSpace': '\\u200B',\n 'NegativeVeryThinSpace': '\\u200B',\n 'ZeroWidthSpace': '\\u200B',\n 'NewLine': '\\u000A',\n 'Nfr': '\\uD835\\uDD11',\n 'NoBreak': '\\u2060',\n 'NonBreakingSpace': '\\u00A0',\n 'nbsp': '\\u00A0',\n 'Nopf': '\\u2115',\n 'naturals': '\\u2115',\n 'Not': '\\u2AEC',\n 'NotCongruent': '\\u2262',\n 'nequiv': '\\u2262',\n 'NotCupCap': '\\u226D',\n 'NotDoubleVerticalBar': '\\u2226',\n 'npar': '\\u2226',\n 'nparallel': '\\u2226',\n 'nshortparallel': '\\u2226',\n 'nspar': '\\u2226',\n 'NotElement': '\\u2209',\n 'notin': '\\u2209',\n 'notinva': '\\u2209',\n 'NotEqual': '\\u2260',\n 'ne': '\\u2260',\n 'NotEqualTilde': '\\u2242\\u0338',\n 'nesim': '\\u2242\\u0338',\n 'NotExists': '\\u2204',\n 'nexist': '\\u2204',\n 'nexists': '\\u2204',\n 'NotGreater': '\\u226F',\n 'ngt': '\\u226F',\n 'ngtr': '\\u226F',\n 'NotGreaterEqual': '\\u2271',\n 'nge': '\\u2271',\n 'ngeq': '\\u2271',\n 'NotGreaterFullEqual': '\\u2267\\u0338',\n 'ngE': '\\u2267\\u0338',\n 'ngeqq': '\\u2267\\u0338',\n 'NotGreaterGreater': '\\u226B\\u0338',\n 'nGtv': '\\u226B\\u0338',\n 'NotGreaterLess': '\\u2279',\n 'ntgl': '\\u2279',\n 'NotGreaterSlantEqual': '\\u2A7E\\u0338',\n 'ngeqslant': '\\u2A7E\\u0338',\n 'nges': '\\u2A7E\\u0338',\n 'NotGreaterTilde': '\\u2275',\n 'ngsim': '\\u2275',\n 'NotHumpDownHump': '\\u224E\\u0338',\n 'nbump': '\\u224E\\u0338',\n 'NotHumpEqual': '\\u224F\\u0338',\n 'nbumpe': '\\u224F\\u0338',\n 'NotLeftTriangle': '\\u22EA',\n 'nltri': '\\u22EA',\n 'ntriangleleft': '\\u22EA',\n 'NotLeftTriangleBar': '\\u29CF\\u0338',\n 'NotLeftTriangleEqual': '\\u22EC',\n 'nltrie': '\\u22EC',\n 'ntrianglelefteq': '\\u22EC',\n 'NotLess': '\\u226E',\n 'nless': '\\u226E',\n 'nlt': '\\u226E',\n 'NotLessEqual': '\\u2270',\n 'nle': '\\u2270',\n 'nleq': '\\u2270',\n 'NotLessGreater': '\\u2278',\n 'ntlg': '\\u2278',\n 'NotLessLess': '\\u226A\\u0338',\n 'nLtv': '\\u226A\\u0338',\n 'NotLessSlantEqual': '\\u2A7D\\u0338',\n 'nleqslant': '\\u2A7D\\u0338',\n 'nles': '\\u2A7D\\u0338',\n 'NotLessTilde': '\\u2274',\n 'nlsim': '\\u2274',\n 'NotNestedGreaterGreater': '\\u2AA2\\u0338',\n 'NotNestedLessLess': '\\u2AA1\\u0338',\n 'NotPrecedes': '\\u2280',\n 'npr': '\\u2280',\n 'nprec': '\\u2280',\n 'NotPrecedesEqual': '\\u2AAF\\u0338',\n 'npre': '\\u2AAF\\u0338',\n 'npreceq': '\\u2AAF\\u0338',\n 'NotPrecedesSlantEqual': '\\u22E0',\n 'nprcue': '\\u22E0',\n 'NotReverseElement': '\\u220C',\n 'notni': '\\u220C',\n 'notniva': '\\u220C',\n 'NotRightTriangle': '\\u22EB',\n 'nrtri': '\\u22EB',\n 'ntriangleright': '\\u22EB',\n 'NotRightTriangleBar': '\\u29D0\\u0338',\n 'NotRightTriangleEqual': '\\u22ED',\n 'nrtrie': '\\u22ED',\n 'ntrianglerighteq': '\\u22ED',\n 'NotSquareSubset': '\\u228F\\u0338',\n 'NotSquareSubsetEqual': '\\u22E2',\n 'nsqsube': '\\u22E2',\n 'NotSquareSuperset': '\\u2290\\u0338',\n 'NotSquareSupersetEqual': '\\u22E3',\n 'nsqsupe': '\\u22E3',\n 'NotSubset': '\\u2282\\u20D2',\n 'nsubset': '\\u2282\\u20D2',\n 'vnsub': '\\u2282\\u20D2',\n 'NotSubsetEqual': '\\u2288',\n 'nsube': '\\u2288',\n 'nsubseteq': '\\u2288',\n 'NotSucceeds': '\\u2281',\n 'nsc': '\\u2281',\n 'nsucc': '\\u2281',\n 'NotSucceedsEqual': '\\u2AB0\\u0338',\n 'nsce': '\\u2AB0\\u0338',\n 'nsucceq': '\\u2AB0\\u0338',\n 'NotSucceedsSlantEqual': '\\u22E1',\n 'nsccue': '\\u22E1',\n 'NotSucceedsTilde': '\\u227F\\u0338',\n 'NotSuperset': '\\u2283\\u20D2',\n 'nsupset': '\\u2283\\u20D2',\n 'vnsup': '\\u2283\\u20D2',\n 'NotSupersetEqual': '\\u2289',\n 'nsupe': '\\u2289',\n 'nsupseteq': '\\u2289',\n 'NotTilde': '\\u2241',\n 'nsim': '\\u2241',\n 'NotTildeEqual': '\\u2244',\n 'nsime': '\\u2244',\n 'nsimeq': '\\u2244',\n 'NotTildeFullEqual': '\\u2247',\n 'ncong': '\\u2247',\n 'NotTildeTilde': '\\u2249',\n 'nap': '\\u2249',\n 'napprox': '\\u2249',\n 'NotVerticalBar': '\\u2224',\n 'nmid': '\\u2224',\n 'nshortmid': '\\u2224',\n 'nsmid': '\\u2224',\n 'Nscr': '\\uD835\\uDCA9',\n 'Ntilde': '\\u00D1',\n 'Nu': '\\u039D',\n 'OElig': '\\u0152',\n 'Oacute': '\\u00D3',\n 'Ocirc': '\\u00D4',\n 'Ocy': '\\u041E',\n 'Odblac': '\\u0150',\n 'Ofr': '\\uD835\\uDD12',\n 'Ograve': '\\u00D2',\n 'Omacr': '\\u014C',\n 'Omega': '\\u03A9',\n 'ohm': '\\u03A9',\n 'Omicron': '\\u039F',\n 'Oopf': '\\uD835\\uDD46',\n 'OpenCurlyDoubleQuote': '\\u201C',\n 'ldquo': '\\u201C',\n 'OpenCurlyQuote': '\\u2018',\n 'lsquo': '\\u2018',\n 'Or': '\\u2A54',\n 'Oscr': '\\uD835\\uDCAA',\n 'Oslash': '\\u00D8',\n 'Otilde': '\\u00D5',\n 'Otimes': '\\u2A37',\n 'Ouml': '\\u00D6',\n 'OverBar': '\\u203E',\n 'oline': '\\u203E',\n 'OverBrace': '\\u23DE',\n 'OverBracket': '\\u23B4',\n 'tbrk': '\\u23B4',\n 'OverParenthesis': '\\u23DC',\n 'PartialD': '\\u2202',\n 'part': '\\u2202',\n 'Pcy': '\\u041F',\n 'Pfr': '\\uD835\\uDD13',\n 'Phi': '\\u03A6',\n 'Pi': '\\u03A0',\n 'PlusMinus': '\\u00B1',\n 'plusmn': '\\u00B1',\n 'pm': '\\u00B1',\n 'Popf': '\\u2119',\n 'primes': '\\u2119',\n 'Pr': '\\u2ABB',\n 'Precedes': '\\u227A',\n 'pr': '\\u227A',\n 'prec': '\\u227A',\n 'PrecedesEqual': '\\u2AAF',\n 'pre': '\\u2AAF',\n 'preceq': '\\u2AAF',\n 'PrecedesSlantEqual': '\\u227C',\n 'prcue': '\\u227C',\n 'preccurlyeq': '\\u227C',\n 'PrecedesTilde': '\\u227E',\n 'precsim': '\\u227E',\n 'prsim': '\\u227E',\n 'Prime': '\\u2033',\n 'Product': '\\u220F',\n 'prod': '\\u220F',\n 'Proportional': '\\u221D',\n 'prop': '\\u221D',\n 'propto': '\\u221D',\n 'varpropto': '\\u221D',\n 'vprop': '\\u221D',\n 'Pscr': '\\uD835\\uDCAB',\n 'Psi': '\\u03A8',\n 'QUOT': '\\u0022',\n 'quot': '\\u0022',\n 'Qfr': '\\uD835\\uDD14',\n 'Qopf': '\\u211A',\n 'rationals': '\\u211A',\n 'Qscr': '\\uD835\\uDCAC',\n 'RBarr': '\\u2910',\n 'drbkarow': '\\u2910',\n 'REG': '\\u00AE',\n 'circledR': '\\u00AE',\n 'reg': '\\u00AE',\n 'Racute': '\\u0154',\n 'Rang': '\\u27EB',\n 'Rarr': '\\u21A0',\n 'twoheadrightarrow': '\\u21A0',\n 'Rarrtl': '\\u2916',\n 'Rcaron': '\\u0158',\n 'Rcedil': '\\u0156',\n 'Rcy': '\\u0420',\n 'Re': '\\u211C',\n 'Rfr': '\\u211C',\n 'real': '\\u211C',\n 'realpart': '\\u211C',\n 'ReverseElement': '\\u220B',\n 'SuchThat': '\\u220B',\n 'ni': '\\u220B',\n 'niv': '\\u220B',\n 'ReverseEquilibrium': '\\u21CB',\n 'leftrightharpoons': '\\u21CB',\n 'lrhar': '\\u21CB',\n 'ReverseUpEquilibrium': '\\u296F',\n 'duhar': '\\u296F',\n 'Rho': '\\u03A1',\n 'RightAngleBracket': '\\u27E9',\n 'rang': '\\u27E9',\n 'rangle': '\\u27E9',\n 'RightArrow': '\\u2192',\n 'ShortRightArrow': '\\u2192',\n 'rarr': '\\u2192',\n 'rightarrow': '\\u2192',\n 'srarr': '\\u2192',\n 'RightArrowBar': '\\u21E5',\n 'rarrb': '\\u21E5',\n 'RightArrowLeftArrow': '\\u21C4',\n 'rightleftarrows': '\\u21C4',\n 'rlarr': '\\u21C4',\n 'RightCeiling': '\\u2309',\n 'rceil': '\\u2309',\n 'RightDoubleBracket': '\\u27E7',\n 'robrk': '\\u27E7',\n 'RightDownTeeVector': '\\u295D',\n 'RightDownVector': '\\u21C2',\n 'dharr': '\\u21C2',\n 'downharpoonright': '\\u21C2',\n 'RightDownVectorBar': '\\u2955',\n 'RightFloor': '\\u230B',\n 'rfloor': '\\u230B',\n 'RightTee': '\\u22A2',\n 'vdash': '\\u22A2',\n 'RightTeeArrow': '\\u21A6',\n 'map': '\\u21A6',\n 'mapsto': '\\u21A6',\n 'RightTeeVector': '\\u295B',\n 'RightTriangle': '\\u22B3',\n 'vartriangleright': '\\u22B3',\n 'vrtri': '\\u22B3',\n 'RightTriangleBar': '\\u29D0',\n 'RightTriangleEqual': '\\u22B5',\n 'rtrie': '\\u22B5',\n 'trianglerighteq': '\\u22B5',\n 'RightUpDownVector': '\\u294F',\n 'RightUpTeeVector': '\\u295C',\n 'RightUpVector': '\\u21BE',\n 'uharr': '\\u21BE',\n 'upharpoonright': '\\u21BE',\n 'RightUpVectorBar': '\\u2954',\n 'RightVector': '\\u21C0',\n 'rharu': '\\u21C0',\n 'rightharpoonup': '\\u21C0',\n 'RightVectorBar': '\\u2953',\n 'Ropf': '\\u211D',\n 'reals': '\\u211D',\n 'RoundImplies': '\\u2970',\n 'Rrightarrow': '\\u21DB',\n 'rAarr': '\\u21DB',\n 'Rscr': '\\u211B',\n 'realine': '\\u211B',\n 'Rsh': '\\u21B1',\n 'rsh': '\\u21B1',\n 'RuleDelayed': '\\u29F4',\n 'SHCHcy': '\\u0429',\n 'SHcy': '\\u0428',\n 'SOFTcy': '\\u042C',\n 'Sacute': '\\u015A',\n 'Sc': '\\u2ABC',\n 'Scaron': '\\u0160',\n 'Scedil': '\\u015E',\n 'Scirc': '\\u015C',\n 'Scy': '\\u0421',\n 'Sfr': '\\uD835\\uDD16',\n 'ShortUpArrow': '\\u2191',\n 'UpArrow': '\\u2191',\n 'uarr': '\\u2191',\n 'uparrow': '\\u2191',\n 'Sigma': '\\u03A3',\n 'SmallCircle': '\\u2218',\n 'compfn': '\\u2218',\n 'Sopf': '\\uD835\\uDD4A',\n 'Sqrt': '\\u221A',\n 'radic': '\\u221A',\n 'Square': '\\u25A1',\n 'squ': '\\u25A1',\n 'square': '\\u25A1',\n 'SquareIntersection': '\\u2293',\n 'sqcap': '\\u2293',\n 'SquareSubset': '\\u228F',\n 'sqsub': '\\u228F',\n 'sqsubset': '\\u228F',\n 'SquareSubsetEqual': '\\u2291',\n 'sqsube': '\\u2291',\n 'sqsubseteq': '\\u2291',\n 'SquareSuperset': '\\u2290',\n 'sqsup': '\\u2290',\n 'sqsupset': '\\u2290',\n 'SquareSupersetEqual': '\\u2292',\n 'sqsupe': '\\u2292',\n 'sqsupseteq': '\\u2292',\n 'SquareUnion': '\\u2294',\n 'sqcup': '\\u2294',\n 'Sscr': '\\uD835\\uDCAE',\n 'Star': '\\u22C6',\n 'sstarf': '\\u22C6',\n 'Sub': '\\u22D0',\n 'Subset': '\\u22D0',\n 'SubsetEqual': '\\u2286',\n 'sube': '\\u2286',\n 'subseteq': '\\u2286',\n 'Succeeds': '\\u227B',\n 'sc': '\\u227B',\n 'succ': '\\u227B',\n 'SucceedsEqual': '\\u2AB0',\n 'sce': '\\u2AB0',\n 'succeq': '\\u2AB0',\n 'SucceedsSlantEqual': '\\u227D',\n 'sccue': '\\u227D',\n 'succcurlyeq': '\\u227D',\n 'SucceedsTilde': '\\u227F',\n 'scsim': '\\u227F',\n 'succsim': '\\u227F',\n 'Sum': '\\u2211',\n 'sum': '\\u2211',\n 'Sup': '\\u22D1',\n 'Supset': '\\u22D1',\n 'Superset': '\\u2283',\n 'sup': '\\u2283',\n 'supset': '\\u2283',\n 'SupersetEqual': '\\u2287',\n 'supe': '\\u2287',\n 'supseteq': '\\u2287',\n 'THORN': '\\u00DE',\n 'TRADE': '\\u2122',\n 'trade': '\\u2122',\n 'TSHcy': '\\u040B',\n 'TScy': '\\u0426',\n 'Tab': '\\u0009',\n 'Tau': '\\u03A4',\n 'Tcaron': '\\u0164',\n 'Tcedil': '\\u0162',\n 'Tcy': '\\u0422',\n 'Tfr': '\\uD835\\uDD17',\n 'Therefore': '\\u2234',\n 'there4': '\\u2234',\n 'therefore': '\\u2234',\n 'Theta': '\\u0398',\n 'ThickSpace': '\\u205F\\u200A',\n 'ThinSpace': '\\u2009',\n 'thinsp': '\\u2009',\n 'Tilde': '\\u223C',\n 'sim': '\\u223C',\n 'thicksim': '\\u223C',\n 'thksim': '\\u223C',\n 'TildeEqual': '\\u2243',\n 'sime': '\\u2243',\n 'simeq': '\\u2243',\n 'TildeFullEqual': '\\u2245',\n 'cong': '\\u2245',\n 'TildeTilde': '\\u2248',\n 'ap': '\\u2248',\n 'approx': '\\u2248',\n 'asymp': '\\u2248',\n 'thickapprox': '\\u2248',\n 'thkap': '\\u2248',\n 'Topf': '\\uD835\\uDD4B',\n 'TripleDot': '\\u20DB',\n 'tdot': '\\u20DB',\n 'Tscr': '\\uD835\\uDCAF',\n 'Tstrok': '\\u0166',\n 'Uacute': '\\u00DA',\n 'Uarr': '\\u219F',\n 'Uarrocir': '\\u2949',\n 'Ubrcy': '\\u040E',\n 'Ubreve': '\\u016C',\n 'Ucirc': '\\u00DB',\n 'Ucy': '\\u0423',\n 'Udblac': '\\u0170',\n 'Ufr': '\\uD835\\uDD18',\n 'Ugrave': '\\u00D9',\n 'Umacr': '\\u016A',\n 'UnderBar': '\\u005F',\n 'lowbar': '\\u005F',\n 'UnderBrace': '\\u23DF',\n 'UnderBracket': '\\u23B5',\n 'bbrk': '\\u23B5',\n 'UnderParenthesis': '\\u23DD',\n 'Union': '\\u22C3',\n 'bigcup': '\\u22C3',\n 'xcup': '\\u22C3',\n 'UnionPlus': '\\u228E',\n 'uplus': '\\u228E',\n 'Uogon': '\\u0172',\n 'Uopf': '\\uD835\\uDD4C',\n 'UpArrowBar': '\\u2912',\n 'UpArrowDownArrow': '\\u21C5',\n 'udarr': '\\u21C5',\n 'UpDownArrow': '\\u2195',\n 'updownarrow': '\\u2195',\n 'varr': '\\u2195',\n 'UpEquilibrium': '\\u296E',\n 'udhar': '\\u296E',\n 'UpTee': '\\u22A5',\n 'bot': '\\u22A5',\n 'bottom': '\\u22A5',\n 'perp': '\\u22A5',\n 'UpTeeArrow': '\\u21A5',\n 'mapstoup': '\\u21A5',\n 'UpperLeftArrow': '\\u2196',\n 'nwarr': '\\u2196',\n 'nwarrow': '\\u2196',\n 'UpperRightArrow': '\\u2197',\n 'nearr': '\\u2197',\n 'nearrow': '\\u2197',\n 'Upsi': '\\u03D2',\n 'upsih': '\\u03D2',\n 'Upsilon': '\\u03A5',\n 'Uring': '\\u016E',\n 'Uscr': '\\uD835\\uDCB0',\n 'Utilde': '\\u0168',\n 'Uuml': '\\u00DC',\n 'VDash': '\\u22AB',\n 'Vbar': '\\u2AEB',\n 'Vcy': '\\u0412',\n 'Vdash': '\\u22A9',\n 'Vdashl': '\\u2AE6',\n 'Vee': '\\u22C1',\n 'bigvee': '\\u22C1',\n 'xvee': '\\u22C1',\n 'Verbar': '\\u2016',\n 'Vert': '\\u2016',\n 'VerticalBar': '\\u2223',\n 'mid': '\\u2223',\n 'shortmid': '\\u2223',\n 'smid': '\\u2223',\n 'VerticalLine': '\\u007C',\n 'verbar': '\\u007C',\n 'vert': '\\u007C',\n 'VerticalSeparator': '\\u2758',\n 'VerticalTilde': '\\u2240',\n 'wr': '\\u2240',\n 'wreath': '\\u2240',\n 'VeryThinSpace': '\\u200A',\n 'hairsp': '\\u200A',\n 'Vfr': '\\uD835\\uDD19',\n 'Vopf': '\\uD835\\uDD4D',\n 'Vscr': '\\uD835\\uDCB1',\n 'Vvdash': '\\u22AA',\n 'Wcirc': '\\u0174',\n 'Wedge': '\\u22C0',\n 'bigwedge': '\\u22C0',\n 'xwedge': '\\u22C0',\n 'Wfr': '\\uD835\\uDD1A',\n 'Wopf': '\\uD835\\uDD4E',\n 'Wscr': '\\uD835\\uDCB2',\n 'Xfr': '\\uD835\\uDD1B',\n 'Xi': '\\u039E',\n 'Xopf': '\\uD835\\uDD4F',\n 'Xscr': '\\uD835\\uDCB3',\n 'YAcy': '\\u042F',\n 'YIcy': '\\u0407',\n 'YUcy': '\\u042E',\n 'Yacute': '\\u00DD',\n 'Ycirc': '\\u0176',\n 'Ycy': '\\u042B',\n 'Yfr': '\\uD835\\uDD1C',\n 'Yopf': '\\uD835\\uDD50',\n 'Yscr': '\\uD835\\uDCB4',\n 'Yuml': '\\u0178',\n 'ZHcy': '\\u0416',\n 'Zacute': '\\u0179',\n 'Zcaron': '\\u017D',\n 'Zcy': '\\u0417',\n 'Zdot': '\\u017B',\n 'Zeta': '\\u0396',\n 'Zfr': '\\u2128',\n 'zeetrf': '\\u2128',\n 'Zopf': '\\u2124',\n 'integers': '\\u2124',\n 'Zscr': '\\uD835\\uDCB5',\n 'aacute': '\\u00E1',\n 'abreve': '\\u0103',\n 'ac': '\\u223E',\n 'mstpos': '\\u223E',\n 'acE': '\\u223E\\u0333',\n 'acd': '\\u223F',\n 'acirc': '\\u00E2',\n 'acy': '\\u0430',\n 'aelig': '\\u00E6',\n 'afr': '\\uD835\\uDD1E',\n 'agrave': '\\u00E0',\n 'alefsym': '\\u2135',\n 'aleph': '\\u2135',\n 'alpha': '\\u03B1',\n 'amacr': '\\u0101',\n 'amalg': '\\u2A3F',\n 'and': '\\u2227',\n 'wedge': '\\u2227',\n 'andand': '\\u2A55',\n 'andd': '\\u2A5C',\n 'andslope': '\\u2A58',\n 'andv': '\\u2A5A',\n 'ang': '\\u2220',\n 'angle': '\\u2220',\n 'ange': '\\u29A4',\n 'angmsd': '\\u2221',\n 'measuredangle': '\\u2221',\n 'angmsdaa': '\\u29A8',\n 'angmsdab': '\\u29A9',\n 'angmsdac': '\\u29AA',\n 'angmsdad': '\\u29AB',\n 'angmsdae': '\\u29AC',\n 'angmsdaf': '\\u29AD',\n 'angmsdag': '\\u29AE',\n 'angmsdah': '\\u29AF',\n 'angrt': '\\u221F',\n 'angrtvb': '\\u22BE',\n 'angrtvbd': '\\u299D',\n 'angsph': '\\u2222',\n 'angzarr': '\\u237C',\n 'aogon': '\\u0105',\n 'aopf': '\\uD835\\uDD52',\n 'apE': '\\u2A70',\n 'apacir': '\\u2A6F',\n 'ape': '\\u224A',\n 'approxeq': '\\u224A',\n 'apid': '\\u224B',\n 'apos': '\\u0027',\n 'aring': '\\u00E5',\n 'ascr': '\\uD835\\uDCB6',\n 'ast': '\\u002A',\n 'midast': '\\u002A',\n 'atilde': '\\u00E3',\n 'auml': '\\u00E4',\n 'awint': '\\u2A11',\n 'bNot': '\\u2AED',\n 'backcong': '\\u224C',\n 'bcong': '\\u224C',\n 'backepsilon': '\\u03F6',\n 'bepsi': '\\u03F6',\n 'backprime': '\\u2035',\n 'bprime': '\\u2035',\n 'backsim': '\\u223D',\n 'bsim': '\\u223D',\n 'backsimeq': '\\u22CD',\n 'bsime': '\\u22CD',\n 'barvee': '\\u22BD',\n 'barwed': '\\u2305',\n 'barwedge': '\\u2305',\n 'bbrktbrk': '\\u23B6',\n 'bcy': '\\u0431',\n 'bdquo': '\\u201E',\n 'ldquor': '\\u201E',\n 'bemptyv': '\\u29B0',\n 'beta': '\\u03B2',\n 'beth': '\\u2136',\n 'between': '\\u226C',\n 'twixt': '\\u226C',\n 'bfr': '\\uD835\\uDD1F',\n 'bigcirc': '\\u25EF',\n 'xcirc': '\\u25EF',\n 'bigodot': '\\u2A00',\n 'xodot': '\\u2A00',\n 'bigoplus': '\\u2A01',\n 'xoplus': '\\u2A01',\n 'bigotimes': '\\u2A02',\n 'xotime': '\\u2A02',\n 'bigsqcup': '\\u2A06',\n 'xsqcup': '\\u2A06',\n 'bigstar': '\\u2605',\n 'starf': '\\u2605',\n 'bigtriangledown': '\\u25BD',\n 'xdtri': '\\u25BD',\n 'bigtriangleup': '\\u25B3',\n 'xutri': '\\u25B3',\n 'biguplus': '\\u2A04',\n 'xuplus': '\\u2A04',\n 'bkarow': '\\u290D',\n 'rbarr': '\\u290D',\n 'blacklozenge': '\\u29EB',\n 'lozf': '\\u29EB',\n 'blacktriangle': '\\u25B4',\n 'utrif': '\\u25B4',\n 'blacktriangledown': '\\u25BE',\n 'dtrif': '\\u25BE',\n 'blacktriangleleft': '\\u25C2',\n 'ltrif': '\\u25C2',\n 'blacktriangleright': '\\u25B8',\n 'rtrif': '\\u25B8',\n 'blank': '\\u2423',\n 'blk12': '\\u2592',\n 'blk14': '\\u2591',\n 'blk34': '\\u2593',\n 'block': '\\u2588',\n 'bne': '\\u003D\\u20E5',\n 'bnequiv': '\\u2261\\u20E5',\n 'bnot': '\\u2310',\n 'bopf': '\\uD835\\uDD53',\n 'bowtie': '\\u22C8',\n 'boxDL': '\\u2557',\n 'boxDR': '\\u2554',\n 'boxDl': '\\u2556',\n 'boxDr': '\\u2553',\n 'boxH': '\\u2550',\n 'boxHD': '\\u2566',\n 'boxHU': '\\u2569',\n 'boxHd': '\\u2564',\n 'boxHu': '\\u2567',\n 'boxUL': '\\u255D',\n 'boxUR': '\\u255A',\n 'boxUl': '\\u255C',\n 'boxUr': '\\u2559',\n 'boxV': '\\u2551',\n 'boxVH': '\\u256C',\n 'boxVL': '\\u2563',\n 'boxVR': '\\u2560',\n 'boxVh': '\\u256B',\n 'boxVl': '\\u2562',\n 'boxVr': '\\u255F',\n 'boxbox': '\\u29C9',\n 'boxdL': '\\u2555',\n 'boxdR': '\\u2552',\n 'boxdl': '\\u2510',\n 'boxdr': '\\u250C',\n 'boxhD': '\\u2565',\n 'boxhU': '\\u2568',\n 'boxhd': '\\u252C',\n 'boxhu': '\\u2534',\n 'boxminus': '\\u229F',\n 'minusb': '\\u229F',\n 'boxplus': '\\u229E',\n 'plusb': '\\u229E',\n 'boxtimes': '\\u22A0',\n 'timesb': '\\u22A0',\n 'boxuL': '\\u255B',\n 'boxuR': '\\u2558',\n 'boxul': '\\u2518',\n 'boxur': '\\u2514',\n 'boxv': '\\u2502',\n 'boxvH': '\\u256A',\n 'boxvL': '\\u2561',\n 'boxvR': '\\u255E',\n 'boxvh': '\\u253C',\n 'boxvl': '\\u2524',\n 'boxvr': '\\u251C',\n 'brvbar': '\\u00A6',\n 'bscr': '\\uD835\\uDCB7',\n 'bsemi': '\\u204F',\n 'bsol': '\\u005C',\n 'bsolb': '\\u29C5',\n 'bsolhsub': '\\u27C8',\n 'bull': '\\u2022',\n 'bullet': '\\u2022',\n 'bumpE': '\\u2AAE',\n 'cacute': '\\u0107',\n 'cap': '\\u2229',\n 'capand': '\\u2A44',\n 'capbrcup': '\\u2A49',\n 'capcap': '\\u2A4B',\n 'capcup': '\\u2A47',\n 'capdot': '\\u2A40',\n 'caps': '\\u2229\\uFE00',\n 'caret': '\\u2041',\n 'ccaps': '\\u2A4D',\n 'ccaron': '\\u010D',\n 'ccedil': '\\u00E7',\n 'ccirc': '\\u0109',\n 'ccups': '\\u2A4C',\n 'ccupssm': '\\u2A50',\n 'cdot': '\\u010B',\n 'cemptyv': '\\u29B2',\n 'cent': '\\u00A2',\n 'cfr': '\\uD835\\uDD20',\n 'chcy': '\\u0447',\n 'check': '\\u2713',\n 'checkmark': '\\u2713',\n 'chi': '\\u03C7',\n 'cir': '\\u25CB',\n 'cirE': '\\u29C3',\n 'circ': '\\u02C6',\n 'circeq': '\\u2257',\n 'cire': '\\u2257',\n 'circlearrowleft': '\\u21BA',\n 'olarr': '\\u21BA',\n 'circlearrowright': '\\u21BB',\n 'orarr': '\\u21BB',\n 'circledS': '\\u24C8',\n 'oS': '\\u24C8',\n 'circledast': '\\u229B',\n 'oast': '\\u229B',\n 'circledcirc': '\\u229A',\n 'ocir': '\\u229A',\n 'circleddash': '\\u229D',\n 'odash': '\\u229D',\n 'cirfnint': '\\u2A10',\n 'cirmid': '\\u2AEF',\n 'cirscir': '\\u29C2',\n 'clubs': '\\u2663',\n 'clubsuit': '\\u2663',\n 'colon': '\\u003A',\n 'comma': '\\u002C',\n 'commat': '\\u0040',\n 'comp': '\\u2201',\n 'complement': '\\u2201',\n 'congdot': '\\u2A6D',\n 'copf': '\\uD835\\uDD54',\n 'copysr': '\\u2117',\n 'crarr': '\\u21B5',\n 'cross': '\\u2717',\n 'cscr': '\\uD835\\uDCB8',\n 'csub': '\\u2ACF',\n 'csube': '\\u2AD1',\n 'csup': '\\u2AD0',\n 'csupe': '\\u2AD2',\n 'ctdot': '\\u22EF',\n 'cudarrl': '\\u2938',\n 'cudarrr': '\\u2935',\n 'cuepr': '\\u22DE',\n 'curlyeqprec': '\\u22DE',\n 'cuesc': '\\u22DF',\n 'curlyeqsucc': '\\u22DF',\n 'cularr': '\\u21B6',\n 'curvearrowleft': '\\u21B6',\n 'cularrp': '\\u293D',\n 'cup': '\\u222A',\n 'cupbrcap': '\\u2A48',\n 'cupcap': '\\u2A46',\n 'cupcup': '\\u2A4A',\n 'cupdot': '\\u228D',\n 'cupor': '\\u2A45',\n 'cups': '\\u222A\\uFE00',\n 'curarr': '\\u21B7',\n 'curvearrowright': '\\u21B7',\n 'curarrm': '\\u293C',\n 'curlyvee': '\\u22CE',\n 'cuvee': '\\u22CE',\n 'curlywedge': '\\u22CF',\n 'cuwed': '\\u22CF',\n 'curren': '\\u00A4',\n 'cwint': '\\u2231',\n 'cylcty': '\\u232D',\n 'dHar': '\\u2965',\n 'dagger': '\\u2020',\n 'daleth': '\\u2138',\n 'dash': '\\u2010',\n 'hyphen': '\\u2010',\n 'dbkarow': '\\u290F',\n 'rBarr': '\\u290F',\n 'dcaron': '\\u010F',\n 'dcy': '\\u0434',\n 'ddarr': '\\u21CA',\n 'downdownarrows': '\\u21CA',\n 'ddotseq': '\\u2A77',\n 'eDDot': '\\u2A77',\n 'deg': '\\u00B0',\n 'delta': '\\u03B4',\n 'demptyv': '\\u29B1',\n 'dfisht': '\\u297F',\n 'dfr': '\\uD835\\uDD21',\n 'diamondsuit': '\\u2666',\n 'diams': '\\u2666',\n 'digamma': '\\u03DD',\n 'gammad': '\\u03DD',\n 'disin': '\\u22F2',\n 'div': '\\u00F7',\n 'divide': '\\u00F7',\n 'divideontimes': '\\u22C7',\n 'divonx': '\\u22C7',\n 'djcy': '\\u0452',\n 'dlcorn': '\\u231E',\n 'llcorner': '\\u231E',\n 'dlcrop': '\\u230D',\n 'dollar': '\\u0024',\n 'dopf': '\\uD835\\uDD55',\n 'doteqdot': '\\u2251',\n 'eDot': '\\u2251',\n 'dotminus': '\\u2238',\n 'minusd': '\\u2238',\n 'dotplus': '\\u2214',\n 'plusdo': '\\u2214',\n 'dotsquare': '\\u22A1',\n 'sdotb': '\\u22A1',\n 'drcorn': '\\u231F',\n 'lrcorner': '\\u231F',\n 'drcrop': '\\u230C',\n 'dscr': '\\uD835\\uDCB9',\n 'dscy': '\\u0455',\n 'dsol': '\\u29F6',\n 'dstrok': '\\u0111',\n 'dtdot': '\\u22F1',\n 'dtri': '\\u25BF',\n 'triangledown': '\\u25BF',\n 'dwangle': '\\u29A6',\n 'dzcy': '\\u045F',\n 'dzigrarr': '\\u27FF',\n 'eacute': '\\u00E9',\n 'easter': '\\u2A6E',\n 'ecaron': '\\u011B',\n 'ecir': '\\u2256',\n 'eqcirc': '\\u2256',\n 'ecirc': '\\u00EA',\n 'ecolon': '\\u2255',\n 'eqcolon': '\\u2255',\n 'ecy': '\\u044D',\n 'edot': '\\u0117',\n 'efDot': '\\u2252',\n 'fallingdotseq': '\\u2252',\n 'efr': '\\uD835\\uDD22',\n 'eg': '\\u2A9A',\n 'egrave': '\\u00E8',\n 'egs': '\\u2A96',\n 'eqslantgtr': '\\u2A96',\n 'egsdot': '\\u2A98',\n 'el': '\\u2A99',\n 'elinters': '\\u23E7',\n 'ell': '\\u2113',\n 'els': '\\u2A95',\n 'eqslantless': '\\u2A95',\n 'elsdot': '\\u2A97',\n 'emacr': '\\u0113',\n 'empty': '\\u2205',\n 'emptyset': '\\u2205',\n 'emptyv': '\\u2205',\n 'varnothing': '\\u2205',\n 'emsp13': '\\u2004',\n 'emsp14': '\\u2005',\n 'emsp': '\\u2003',\n 'eng': '\\u014B',\n 'ensp': '\\u2002',\n 'eogon': '\\u0119',\n 'eopf': '\\uD835\\uDD56',\n 'epar': '\\u22D5',\n 'eparsl': '\\u29E3',\n 'eplus': '\\u2A71',\n 'epsi': '\\u03B5',\n 'epsilon': '\\u03B5',\n 'epsiv': '\\u03F5',\n 'straightepsilon': '\\u03F5',\n 'varepsilon': '\\u03F5',\n 'equals': '\\u003D',\n 'equest': '\\u225F',\n 'questeq': '\\u225F',\n 'equivDD': '\\u2A78',\n 'eqvparsl': '\\u29E5',\n 'erDot': '\\u2253',\n 'risingdotseq': '\\u2253',\n 'erarr': '\\u2971',\n 'escr': '\\u212F',\n 'eta': '\\u03B7',\n 'eth': '\\u00F0',\n 'euml': '\\u00EB',\n 'euro': '\\u20AC',\n 'excl': '\\u0021',\n 'fcy': '\\u0444',\n 'female': '\\u2640',\n 'ffilig': '\\uFB03',\n 'fflig': '\\uFB00',\n 'ffllig': '\\uFB04',\n 'ffr': '\\uD835\\uDD23',\n 'filig': '\\uFB01',\n 'fjlig': '\\u0066\\u006A',\n 'flat': '\\u266D',\n 'fllig': '\\uFB02',\n 'fltns': '\\u25B1',\n 'fnof': '\\u0192',\n 'fopf': '\\uD835\\uDD57',\n 'fork': '\\u22D4',\n 'pitchfork': '\\u22D4',\n 'forkv': '\\u2AD9',\n 'fpartint': '\\u2A0D',\n 'frac12': '\\u00BD',\n 'half': '\\u00BD',\n 'frac13': '\\u2153',\n 'frac14': '\\u00BC',\n 'frac15': '\\u2155',\n 'frac16': '\\u2159',\n 'frac18': '\\u215B',\n 'frac23': '\\u2154',\n 'frac25': '\\u2156',\n 'frac34': '\\u00BE',\n 'frac35': '\\u2157',\n 'frac38': '\\u215C',\n 'frac45': '\\u2158',\n 'frac56': '\\u215A',\n 'frac58': '\\u215D',\n 'frac78': '\\u215E',\n 'frasl': '\\u2044',\n 'frown': '\\u2322',\n 'sfrown': '\\u2322',\n 'fscr': '\\uD835\\uDCBB',\n 'gEl': '\\u2A8C',\n 'gtreqqless': '\\u2A8C',\n 'gacute': '\\u01F5',\n 'gamma': '\\u03B3',\n 'gap': '\\u2A86',\n 'gtrapprox': '\\u2A86',\n 'gbreve': '\\u011F',\n 'gcirc': '\\u011D',\n 'gcy': '\\u0433',\n 'gdot': '\\u0121',\n 'gescc': '\\u2AA9',\n 'gesdot': '\\u2A80',\n 'gesdoto': '\\u2A82',\n 'gesdotol': '\\u2A84',\n 'gesl': '\\u22DB\\uFE00',\n 'gesles': '\\u2A94',\n 'gfr': '\\uD835\\uDD24',\n 'gimel': '\\u2137',\n 'gjcy': '\\u0453',\n 'glE': '\\u2A92',\n 'gla': '\\u2AA5',\n 'glj': '\\u2AA4',\n 'gnE': '\\u2269',\n 'gneqq': '\\u2269',\n 'gnap': '\\u2A8A',\n 'gnapprox': '\\u2A8A',\n 'gne': '\\u2A88',\n 'gneq': '\\u2A88',\n 'gnsim': '\\u22E7',\n 'gopf': '\\uD835\\uDD58',\n 'gscr': '\\u210A',\n 'gsime': '\\u2A8E',\n 'gsiml': '\\u2A90',\n 'gtcc': '\\u2AA7',\n 'gtcir': '\\u2A7A',\n 'gtdot': '\\u22D7',\n 'gtrdot': '\\u22D7',\n 'gtlPar': '\\u2995',\n 'gtquest': '\\u2A7C',\n 'gtrarr': '\\u2978',\n 'gvertneqq': '\\u2269\\uFE00',\n 'gvnE': '\\u2269\\uFE00',\n 'hardcy': '\\u044A',\n 'harrcir': '\\u2948',\n 'harrw': '\\u21AD',\n 'leftrightsquigarrow': '\\u21AD',\n 'hbar': '\\u210F',\n 'hslash': '\\u210F',\n 'planck': '\\u210F',\n 'plankv': '\\u210F',\n 'hcirc': '\\u0125',\n 'hearts': '\\u2665',\n 'heartsuit': '\\u2665',\n 'hellip': '\\u2026',\n 'mldr': '\\u2026',\n 'hercon': '\\u22B9',\n 'hfr': '\\uD835\\uDD25',\n 'hksearow': '\\u2925',\n 'searhk': '\\u2925',\n 'hkswarow': '\\u2926',\n 'swarhk': '\\u2926',\n 'hoarr': '\\u21FF',\n 'homtht': '\\u223B',\n 'hookleftarrow': '\\u21A9',\n 'larrhk': '\\u21A9',\n 'hookrightarrow': '\\u21AA',\n 'rarrhk': '\\u21AA',\n 'hopf': '\\uD835\\uDD59',\n 'horbar': '\\u2015',\n 'hscr': '\\uD835\\uDCBD',\n 'hstrok': '\\u0127',\n 'hybull': '\\u2043',\n 'iacute': '\\u00ED',\n 'icirc': '\\u00EE',\n 'icy': '\\u0438',\n 'iecy': '\\u0435',\n 'iexcl': '\\u00A1',\n 'ifr': '\\uD835\\uDD26',\n 'igrave': '\\u00EC',\n 'iiiint': '\\u2A0C',\n 'qint': '\\u2A0C',\n 'iiint': '\\u222D',\n 'tint': '\\u222D',\n 'iinfin': '\\u29DC',\n 'iiota': '\\u2129',\n 'ijlig': '\\u0133',\n 'imacr': '\\u012B',\n 'imath': '\\u0131',\n 'inodot': '\\u0131',\n 'imof': '\\u22B7',\n 'imped': '\\u01B5',\n 'incare': '\\u2105',\n 'infin': '\\u221E',\n 'infintie': '\\u29DD',\n 'intcal': '\\u22BA',\n 'intercal': '\\u22BA',\n 'intlarhk': '\\u2A17',\n 'intprod': '\\u2A3C',\n 'iprod': '\\u2A3C',\n 'iocy': '\\u0451',\n 'iogon': '\\u012F',\n 'iopf': '\\uD835\\uDD5A',\n 'iota': '\\u03B9',\n 'iquest': '\\u00BF',\n 'iscr': '\\uD835\\uDCBE',\n 'isinE': '\\u22F9',\n 'isindot': '\\u22F5',\n 'isins': '\\u22F4',\n 'isinsv': '\\u22F3',\n 'itilde': '\\u0129',\n 'iukcy': '\\u0456',\n 'iuml': '\\u00EF',\n 'jcirc': '\\u0135',\n 'jcy': '\\u0439',\n 'jfr': '\\uD835\\uDD27',\n 'jmath': '\\u0237',\n 'jopf': '\\uD835\\uDD5B',\n 'jscr': '\\uD835\\uDCBF',\n 'jsercy': '\\u0458',\n 'jukcy': '\\u0454',\n 'kappa': '\\u03BA',\n 'kappav': '\\u03F0',\n 'varkappa': '\\u03F0',\n 'kcedil': '\\u0137',\n 'kcy': '\\u043A',\n 'kfr': '\\uD835\\uDD28',\n 'kgreen': '\\u0138',\n 'khcy': '\\u0445',\n 'kjcy': '\\u045C',\n 'kopf': '\\uD835\\uDD5C',\n 'kscr': '\\uD835\\uDCC0',\n 'lAtail': '\\u291B',\n 'lBarr': '\\u290E',\n 'lEg': '\\u2A8B',\n 'lesseqqgtr': '\\u2A8B',\n 'lHar': '\\u2962',\n 'lacute': '\\u013A',\n 'laemptyv': '\\u29B4',\n 'lambda': '\\u03BB',\n 'langd': '\\u2991',\n 'lap': '\\u2A85',\n 'lessapprox': '\\u2A85',\n 'laquo': '\\u00AB',\n 'larrbfs': '\\u291F',\n 'larrfs': '\\u291D',\n 'larrlp': '\\u21AB',\n 'looparrowleft': '\\u21AB',\n 'larrpl': '\\u2939',\n 'larrsim': '\\u2973',\n 'larrtl': '\\u21A2',\n 'leftarrowtail': '\\u21A2',\n 'lat': '\\u2AAB',\n 'latail': '\\u2919',\n 'late': '\\u2AAD',\n 'lates': '\\u2AAD\\uFE00',\n 'lbarr': '\\u290C',\n 'lbbrk': '\\u2772',\n 'lbrace': '\\u007B',\n 'lcub': '\\u007B',\n 'lbrack': '\\u005B',\n 'lsqb': '\\u005B',\n 'lbrke': '\\u298B',\n 'lbrksld': '\\u298F',\n 'lbrkslu': '\\u298D',\n 'lcaron': '\\u013E',\n 'lcedil': '\\u013C',\n 'lcy': '\\u043B',\n 'ldca': '\\u2936',\n 'ldrdhar': '\\u2967',\n 'ldrushar': '\\u294B',\n 'ldsh': '\\u21B2',\n 'le': '\\u2264',\n 'leq': '\\u2264',\n 'leftleftarrows': '\\u21C7',\n 'llarr': '\\u21C7',\n 'leftthreetimes': '\\u22CB',\n 'lthree': '\\u22CB',\n 'lescc': '\\u2AA8',\n 'lesdot': '\\u2A7F',\n 'lesdoto': '\\u2A81',\n 'lesdotor': '\\u2A83',\n 'lesg': '\\u22DA\\uFE00',\n 'lesges': '\\u2A93',\n 'lessdot': '\\u22D6',\n 'ltdot': '\\u22D6',\n 'lfisht': '\\u297C',\n 'lfr': '\\uD835\\uDD29',\n 'lgE': '\\u2A91',\n 'lharul': '\\u296A',\n 'lhblk': '\\u2584',\n 'ljcy': '\\u0459',\n 'llhard': '\\u296B',\n 'lltri': '\\u25FA',\n 'lmidot': '\\u0140',\n 'lmoust': '\\u23B0',\n 'lmoustache': '\\u23B0',\n 'lnE': '\\u2268',\n 'lneqq': '\\u2268',\n 'lnap': '\\u2A89',\n 'lnapprox': '\\u2A89',\n 'lne': '\\u2A87',\n 'lneq': '\\u2A87',\n 'lnsim': '\\u22E6',\n 'loang': '\\u27EC',\n 'loarr': '\\u21FD',\n 'longmapsto': '\\u27FC',\n 'xmap': '\\u27FC',\n 'looparrowright': '\\u21AC',\n 'rarrlp': '\\u21AC',\n 'lopar': '\\u2985',\n 'lopf': '\\uD835\\uDD5D',\n 'loplus': '\\u2A2D',\n 'lotimes': '\\u2A34',\n 'lowast': '\\u2217',\n 'loz': '\\u25CA',\n 'lozenge': '\\u25CA',\n 'lpar': '\\u0028',\n 'lparlt': '\\u2993',\n 'lrhard': '\\u296D',\n 'lrm': '\\u200E',\n 'lrtri': '\\u22BF',\n 'lsaquo': '\\u2039',\n 'lscr': '\\uD835\\uDCC1',\n 'lsime': '\\u2A8D',\n 'lsimg': '\\u2A8F',\n 'lsquor': '\\u201A',\n 'sbquo': '\\u201A',\n 'lstrok': '\\u0142',\n 'ltcc': '\\u2AA6',\n 'ltcir': '\\u2A79',\n 'ltimes': '\\u22C9',\n 'ltlarr': '\\u2976',\n 'ltquest': '\\u2A7B',\n 'ltrPar': '\\u2996',\n 'ltri': '\\u25C3',\n 'triangleleft': '\\u25C3',\n 'lurdshar': '\\u294A',\n 'luruhar': '\\u2966',\n 'lvertneqq': '\\u2268\\uFE00',\n 'lvnE': '\\u2268\\uFE00',\n 'mDDot': '\\u223A',\n 'macr': '\\u00AF',\n 'strns': '\\u00AF',\n 'male': '\\u2642',\n 'malt': '\\u2720',\n 'maltese': '\\u2720',\n 'marker': '\\u25AE',\n 'mcomma': '\\u2A29',\n 'mcy': '\\u043C',\n 'mdash': '\\u2014',\n 'mfr': '\\uD835\\uDD2A',\n 'mho': '\\u2127',\n 'micro': '\\u00B5',\n 'midcir': '\\u2AF0',\n 'minus': '\\u2212',\n 'minusdu': '\\u2A2A',\n 'mlcp': '\\u2ADB',\n 'models': '\\u22A7',\n 'mopf': '\\uD835\\uDD5E',\n 'mscr': '\\uD835\\uDCC2',\n 'mu': '\\u03BC',\n 'multimap': '\\u22B8',\n 'mumap': '\\u22B8',\n 'nGg': '\\u22D9\\u0338',\n 'nGt': '\\u226B\\u20D2',\n 'nLeftarrow': '\\u21CD',\n 'nlArr': '\\u21CD',\n 'nLeftrightarrow': '\\u21CE',\n 'nhArr': '\\u21CE',\n 'nLl': '\\u22D8\\u0338',\n 'nLt': '\\u226A\\u20D2',\n 'nRightarrow': '\\u21CF',\n 'nrArr': '\\u21CF',\n 'nVDash': '\\u22AF',\n 'nVdash': '\\u22AE',\n 'nacute': '\\u0144',\n 'nang': '\\u2220\\u20D2',\n 'napE': '\\u2A70\\u0338',\n 'napid': '\\u224B\\u0338',\n 'napos': '\\u0149',\n 'natur': '\\u266E',\n 'natural': '\\u266E',\n 'ncap': '\\u2A43',\n 'ncaron': '\\u0148',\n 'ncedil': '\\u0146',\n 'ncongdot': '\\u2A6D\\u0338',\n 'ncup': '\\u2A42',\n 'ncy': '\\u043D',\n 'ndash': '\\u2013',\n 'neArr': '\\u21D7',\n 'nearhk': '\\u2924',\n 'nedot': '\\u2250\\u0338',\n 'nesear': '\\u2928',\n 'toea': '\\u2928',\n 'nfr': '\\uD835\\uDD2B',\n 'nharr': '\\u21AE',\n 'nleftrightarrow': '\\u21AE',\n 'nhpar': '\\u2AF2',\n 'nis': '\\u22FC',\n 'nisd': '\\u22FA',\n 'njcy': '\\u045A',\n 'nlE': '\\u2266\\u0338',\n 'nleqq': '\\u2266\\u0338',\n 'nlarr': '\\u219A',\n 'nleftarrow': '\\u219A',\n 'nldr': '\\u2025',\n 'nopf': '\\uD835\\uDD5F',\n 'not': '\\u00AC',\n 'notinE': '\\u22F9\\u0338',\n 'notindot': '\\u22F5\\u0338',\n 'notinvb': '\\u22F7',\n 'notinvc': '\\u22F6',\n 'notnivb': '\\u22FE',\n 'notnivc': '\\u22FD',\n 'nparsl': '\\u2AFD\\u20E5',\n 'npart': '\\u2202\\u0338',\n 'npolint': '\\u2A14',\n 'nrarr': '\\u219B',\n 'nrightarrow': '\\u219B',\n 'nrarrc': '\\u2933\\u0338',\n 'nrarrw': '\\u219D\\u0338',\n 'nscr': '\\uD835\\uDCC3',\n 'nsub': '\\u2284',\n 'nsubE': '\\u2AC5\\u0338',\n 'nsubseteqq': '\\u2AC5\\u0338',\n 'nsup': '\\u2285',\n 'nsupE': '\\u2AC6\\u0338',\n 'nsupseteqq': '\\u2AC6\\u0338',\n 'ntilde': '\\u00F1',\n 'nu': '\\u03BD',\n 'num': '\\u0023',\n 'numero': '\\u2116',\n 'numsp': '\\u2007',\n 'nvDash': '\\u22AD',\n 'nvHarr': '\\u2904',\n 'nvap': '\\u224D\\u20D2',\n 'nvdash': '\\u22AC',\n 'nvge': '\\u2265\\u20D2',\n 'nvgt': '\\u003E\\u20D2',\n 'nvinfin': '\\u29DE',\n 'nvlArr': '\\u2902',\n 'nvle': '\\u2264\\u20D2',\n 'nvlt': '\\u003C\\u20D2',\n 'nvltrie': '\\u22B4\\u20D2',\n 'nvrArr': '\\u2903',\n 'nvrtrie': '\\u22B5\\u20D2',\n 'nvsim': '\\u223C\\u20D2',\n 'nwArr': '\\u21D6',\n 'nwarhk': '\\u2923',\n 'nwnear': '\\u2927',\n 'oacute': '\\u00F3',\n 'ocirc': '\\u00F4',\n 'ocy': '\\u043E',\n 'odblac': '\\u0151',\n 'odiv': '\\u2A38',\n 'odsold': '\\u29BC',\n 'oelig': '\\u0153',\n 'ofcir': '\\u29BF',\n 'ofr': '\\uD835\\uDD2C',\n 'ogon': '\\u02DB',\n 'ograve': '\\u00F2',\n 'ogt': '\\u29C1',\n 'ohbar': '\\u29B5',\n 'olcir': '\\u29BE',\n 'olcross': '\\u29BB',\n 'olt': '\\u29C0',\n 'omacr': '\\u014D',\n 'omega': '\\u03C9',\n 'omicron': '\\u03BF',\n 'omid': '\\u29B6',\n 'oopf': '\\uD835\\uDD60',\n 'opar': '\\u29B7',\n 'operp': '\\u29B9',\n 'or': '\\u2228',\n 'vee': '\\u2228',\n 'ord': '\\u2A5D',\n 'order': '\\u2134',\n 'orderof': '\\u2134',\n 'oscr': '\\u2134',\n 'ordf': '\\u00AA',\n 'ordm': '\\u00BA',\n 'origof': '\\u22B6',\n 'oror': '\\u2A56',\n 'orslope': '\\u2A57',\n 'orv': '\\u2A5B',\n 'oslash': '\\u00F8',\n 'osol': '\\u2298',\n 'otilde': '\\u00F5',\n 'otimesas': '\\u2A36',\n 'ouml': '\\u00F6',\n 'ovbar': '\\u233D',\n 'para': '\\u00B6',\n 'parsim': '\\u2AF3',\n 'parsl': '\\u2AFD',\n 'pcy': '\\u043F',\n 'percnt': '\\u0025',\n 'period': '\\u002E',\n 'permil': '\\u2030',\n 'pertenk': '\\u2031',\n 'pfr': '\\uD835\\uDD2D',\n 'phi': '\\u03C6',\n 'phiv': '\\u03D5',\n 'straightphi': '\\u03D5',\n 'varphi': '\\u03D5',\n 'phone': '\\u260E',\n 'pi': '\\u03C0',\n 'piv': '\\u03D6',\n 'varpi': '\\u03D6',\n 'planckh': '\\u210E',\n 'plus': '\\u002B',\n 'plusacir': '\\u2A23',\n 'pluscir': '\\u2A22',\n 'plusdu': '\\u2A25',\n 'pluse': '\\u2A72',\n 'plussim': '\\u2A26',\n 'plustwo': '\\u2A27',\n 'pointint': '\\u2A15',\n 'popf': '\\uD835\\uDD61',\n 'pound': '\\u00A3',\n 'prE': '\\u2AB3',\n 'prap': '\\u2AB7',\n 'precapprox': '\\u2AB7',\n 'precnapprox': '\\u2AB9',\n 'prnap': '\\u2AB9',\n 'precneqq': '\\u2AB5',\n 'prnE': '\\u2AB5',\n 'precnsim': '\\u22E8',\n 'prnsim': '\\u22E8',\n 'prime': '\\u2032',\n 'profalar': '\\u232E',\n 'profline': '\\u2312',\n 'profsurf': '\\u2313',\n 'prurel': '\\u22B0',\n 'pscr': '\\uD835\\uDCC5',\n 'psi': '\\u03C8',\n 'puncsp': '\\u2008',\n 'qfr': '\\uD835\\uDD2E',\n 'qopf': '\\uD835\\uDD62',\n 'qprime': '\\u2057',\n 'qscr': '\\uD835\\uDCC6',\n 'quatint': '\\u2A16',\n 'quest': '\\u003F',\n 'rAtail': '\\u291C',\n 'rHar': '\\u2964',\n 'race': '\\u223D\\u0331',\n 'racute': '\\u0155',\n 'raemptyv': '\\u29B3',\n 'rangd': '\\u2992',\n 'range': '\\u29A5',\n 'raquo': '\\u00BB',\n 'rarrap': '\\u2975',\n 'rarrbfs': '\\u2920',\n 'rarrc': '\\u2933',\n 'rarrfs': '\\u291E',\n 'rarrpl': '\\u2945',\n 'rarrsim': '\\u2974',\n 'rarrtl': '\\u21A3',\n 'rightarrowtail': '\\u21A3',\n 'rarrw': '\\u219D',\n 'rightsquigarrow': '\\u219D',\n 'ratail': '\\u291A',\n 'ratio': '\\u2236',\n 'rbbrk': '\\u2773',\n 'rbrace': '\\u007D',\n 'rcub': '\\u007D',\n 'rbrack': '\\u005D',\n 'rsqb': '\\u005D',\n 'rbrke': '\\u298C',\n 'rbrksld': '\\u298E',\n 'rbrkslu': '\\u2990',\n 'rcaron': '\\u0159',\n 'rcedil': '\\u0157',\n 'rcy': '\\u0440',\n 'rdca': '\\u2937',\n 'rdldhar': '\\u2969',\n 'rdsh': '\\u21B3',\n 'rect': '\\u25AD',\n 'rfisht': '\\u297D',\n 'rfr': '\\uD835\\uDD2F',\n 'rharul': '\\u296C',\n 'rho': '\\u03C1',\n 'rhov': '\\u03F1',\n 'varrho': '\\u03F1',\n 'rightrightarrows': '\\u21C9',\n 'rrarr': '\\u21C9',\n 'rightthreetimes': '\\u22CC',\n 'rthree': '\\u22CC',\n 'ring': '\\u02DA',\n 'rlm': '\\u200F',\n 'rmoust': '\\u23B1',\n 'rmoustache': '\\u23B1',\n 'rnmid': '\\u2AEE',\n 'roang': '\\u27ED',\n 'roarr': '\\u21FE',\n 'ropar': '\\u2986',\n 'ropf': '\\uD835\\uDD63',\n 'roplus': '\\u2A2E',\n 'rotimes': '\\u2A35',\n 'rpar': '\\u0029',\n 'rpargt': '\\u2994',\n 'rppolint': '\\u2A12',\n 'rsaquo': '\\u203A',\n 'rscr': '\\uD835\\uDCC7',\n 'rtimes': '\\u22CA',\n 'rtri': '\\u25B9',\n 'triangleright': '\\u25B9',\n 'rtriltri': '\\u29CE',\n 'ruluhar': '\\u2968',\n 'rx': '\\u211E',\n 'sacute': '\\u015B',\n 'scE': '\\u2AB4',\n 'scap': '\\u2AB8',\n 'succapprox': '\\u2AB8',\n 'scaron': '\\u0161',\n 'scedil': '\\u015F',\n 'scirc': '\\u015D',\n 'scnE': '\\u2AB6',\n 'succneqq': '\\u2AB6',\n 'scnap': '\\u2ABA',\n 'succnapprox': '\\u2ABA',\n 'scnsim': '\\u22E9',\n 'succnsim': '\\u22E9',\n 'scpolint': '\\u2A13',\n 'scy': '\\u0441',\n 'sdot': '\\u22C5',\n 'sdote': '\\u2A66',\n 'seArr': '\\u21D8',\n 'sect': '\\u00A7',\n 'semi': '\\u003B',\n 'seswar': '\\u2929',\n 'tosa': '\\u2929',\n 'sext': '\\u2736',\n 'sfr': '\\uD835\\uDD30',\n 'sharp': '\\u266F',\n 'shchcy': '\\u0449',\n 'shcy': '\\u0448',\n 'shy': '\\u00AD',\n 'sigma': '\\u03C3',\n 'sigmaf': '\\u03C2',\n 'sigmav': '\\u03C2',\n 'varsigma': '\\u03C2',\n 'simdot': '\\u2A6A',\n 'simg': '\\u2A9E',\n 'simgE': '\\u2AA0',\n 'siml': '\\u2A9D',\n 'simlE': '\\u2A9F',\n 'simne': '\\u2246',\n 'simplus': '\\u2A24',\n 'simrarr': '\\u2972',\n 'smashp': '\\u2A33',\n 'smeparsl': '\\u29E4',\n 'smile': '\\u2323',\n 'ssmile': '\\u2323',\n 'smt': '\\u2AAA',\n 'smte': '\\u2AAC',\n 'smtes': '\\u2AAC\\uFE00',\n 'softcy': '\\u044C',\n 'sol': '\\u002F',\n 'solb': '\\u29C4',\n 'solbar': '\\u233F',\n 'sopf': '\\uD835\\uDD64',\n 'spades': '\\u2660',\n 'spadesuit': '\\u2660',\n 'sqcaps': '\\u2293\\uFE00',\n 'sqcups': '\\u2294\\uFE00',\n 'sscr': '\\uD835\\uDCC8',\n 'star': '\\u2606',\n 'sub': '\\u2282',\n 'subset': '\\u2282',\n 'subE': '\\u2AC5',\n 'subseteqq': '\\u2AC5',\n 'subdot': '\\u2ABD',\n 'subedot': '\\u2AC3',\n 'submult': '\\u2AC1',\n 'subnE': '\\u2ACB',\n 'subsetneqq': '\\u2ACB',\n 'subne': '\\u228A',\n 'subsetneq': '\\u228A',\n 'subplus': '\\u2ABF',\n 'subrarr': '\\u2979',\n 'subsim': '\\u2AC7',\n 'subsub': '\\u2AD5',\n 'subsup': '\\u2AD3',\n 'sung': '\\u266A',\n 'sup1': '\\u00B9',\n 'sup2': '\\u00B2',\n 'sup3': '\\u00B3',\n 'supE': '\\u2AC6',\n 'supseteqq': '\\u2AC6',\n 'supdot': '\\u2ABE',\n 'supdsub': '\\u2AD8',\n 'supedot': '\\u2AC4',\n 'suphsol': '\\u27C9',\n 'suphsub': '\\u2AD7',\n 'suplarr': '\\u297B',\n 'supmult': '\\u2AC2',\n 'supnE': '\\u2ACC',\n 'supsetneqq': '\\u2ACC',\n 'supne': '\\u228B',\n 'supsetneq': '\\u228B',\n 'supplus': '\\u2AC0',\n 'supsim': '\\u2AC8',\n 'supsub': '\\u2AD4',\n 'supsup': '\\u2AD6',\n 'swArr': '\\u21D9',\n 'swnwar': '\\u292A',\n 'szlig': '\\u00DF',\n 'target': '\\u2316',\n 'tau': '\\u03C4',\n 'tcaron': '\\u0165',\n 'tcedil': '\\u0163',\n 'tcy': '\\u0442',\n 'telrec': '\\u2315',\n 'tfr': '\\uD835\\uDD31',\n 'theta': '\\u03B8',\n 'thetasym': '\\u03D1',\n 'thetav': '\\u03D1',\n 'vartheta': '\\u03D1',\n 'thorn': '\\u00FE',\n 'times': '\\u00D7',\n 'timesbar': '\\u2A31',\n 'timesd': '\\u2A30',\n 'topbot': '\\u2336',\n 'topcir': '\\u2AF1',\n 'topf': '\\uD835\\uDD65',\n 'topfork': '\\u2ADA',\n 'tprime': '\\u2034',\n 'triangle': '\\u25B5',\n 'utri': '\\u25B5',\n 'triangleq': '\\u225C',\n 'trie': '\\u225C',\n 'tridot': '\\u25EC',\n 'triminus': '\\u2A3A',\n 'triplus': '\\u2A39',\n 'trisb': '\\u29CD',\n 'tritime': '\\u2A3B',\n 'trpezium': '\\u23E2',\n 'tscr': '\\uD835\\uDCC9',\n 'tscy': '\\u0446',\n 'tshcy': '\\u045B',\n 'tstrok': '\\u0167',\n 'uHar': '\\u2963',\n 'uacute': '\\u00FA',\n 'ubrcy': '\\u045E',\n 'ubreve': '\\u016D',\n 'ucirc': '\\u00FB',\n 'ucy': '\\u0443',\n 'udblac': '\\u0171',\n 'ufisht': '\\u297E',\n 'ufr': '\\uD835\\uDD32',\n 'ugrave': '\\u00F9',\n 'uhblk': '\\u2580',\n 'ulcorn': '\\u231C',\n 'ulcorner': '\\u231C',\n 'ulcrop': '\\u230F',\n 'ultri': '\\u25F8',\n 'umacr': '\\u016B',\n 'uogon': '\\u0173',\n 'uopf': '\\uD835\\uDD66',\n 'upsi': '\\u03C5',\n 'upsilon': '\\u03C5',\n 'upuparrows': '\\u21C8',\n 'uuarr': '\\u21C8',\n 'urcorn': '\\u231D',\n 'urcorner': '\\u231D',\n 'urcrop': '\\u230E',\n 'uring': '\\u016F',\n 'urtri': '\\u25F9',\n 'uscr': '\\uD835\\uDCCA',\n 'utdot': '\\u22F0',\n 'utilde': '\\u0169',\n 'uuml': '\\u00FC',\n 'uwangle': '\\u29A7',\n 'vBar': '\\u2AE8',\n 'vBarv': '\\u2AE9',\n 'vangrt': '\\u299C',\n 'varsubsetneq': '\\u228A\\uFE00',\n 'vsubne': '\\u228A\\uFE00',\n 'varsubsetneqq': '\\u2ACB\\uFE00',\n 'vsubnE': '\\u2ACB\\uFE00',\n 'varsupsetneq': '\\u228B\\uFE00',\n 'vsupne': '\\u228B\\uFE00',\n 'varsupsetneqq': '\\u2ACC\\uFE00',\n 'vsupnE': '\\u2ACC\\uFE00',\n 'vcy': '\\u0432',\n 'veebar': '\\u22BB',\n 'veeeq': '\\u225A',\n 'vellip': '\\u22EE',\n 'vfr': '\\uD835\\uDD33',\n 'vopf': '\\uD835\\uDD67',\n 'vscr': '\\uD835\\uDCCB',\n 'vzigzag': '\\u299A',\n 'wcirc': '\\u0175',\n 'wedbar': '\\u2A5F',\n 'wedgeq': '\\u2259',\n 'weierp': '\\u2118',\n 'wp': '\\u2118',\n 'wfr': '\\uD835\\uDD34',\n 'wopf': '\\uD835\\uDD68',\n 'wscr': '\\uD835\\uDCCC',\n 'xfr': '\\uD835\\uDD35',\n 'xi': '\\u03BE',\n 'xnis': '\\u22FB',\n 'xopf': '\\uD835\\uDD69',\n 'xscr': '\\uD835\\uDCCD',\n 'yacute': '\\u00FD',\n 'yacy': '\\u044F',\n 'ycirc': '\\u0177',\n 'ycy': '\\u044B',\n 'yen': '\\u00A5',\n 'yfr': '\\uD835\\uDD36',\n 'yicy': '\\u0457',\n 'yopf': '\\uD835\\uDD6A',\n 'yscr': '\\uD835\\uDCCE',\n 'yucy': '\\u044E',\n 'yuml': '\\u00FF',\n 'zacute': '\\u017A',\n 'zcaron': '\\u017E',\n 'zcy': '\\u0437',\n 'zdot': '\\u017C',\n 'zeta': '\\u03B6',\n 'zfr': '\\uD835\\uDD37',\n 'zhcy': '\\u0436',\n 'zigrarr': '\\u21DD',\n 'zopf': '\\uD835\\uDD6B',\n 'zscr': '\\uD835\\uDCCF',\n 'zwj': '\\u200D',\n 'zwnj': '\\u200C'\n};\n// The &ngsp; pseudo-entity is denoting a space.\n// 0xE500 is a PUA (Private Use Areas) unicode character\n// This is inspired by the Angular Dart implementation.\nconst NGSP_UNICODE = '\\uE500';\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n\nclass TokenError extends ParseError {\n constructor(errorMsg, tokenType, span) {\n super(span, errorMsg);\n this.tokenType = tokenType;\n }\n}\nclass TokenizeResult {\n constructor(tokens, errors, nonNormalizedIcuExpressions) {\n this.tokens = tokens;\n this.errors = errors;\n this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;\n }\n}\nfunction tokenize(source, url, getTagDefinition, options = {}) {\n const tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options);\n tokenizer.tokenize();\n return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);\n}\nconst _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\nfunction _unexpectedCharacterErrorMsg(charCode) {\n const char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n return `Unexpected character \"${char}\"`;\n}\nfunction _unknownEntityErrorMsg(entitySrc) {\n return `Unknown entity \"${entitySrc}\" - use the \"&#<decimal>;\" or \"&#x<hex>;\" syntax`;\n}\nfunction _unparsableEntityErrorMsg(type, entityStr) {\n return `Unable to parse entity \"${entityStr}\" - ${type} character reference entities must end with \";\"`;\n}\nvar CharacterReferenceType;\n(function (CharacterReferenceType) {\n CharacterReferenceType[\"HEX\"] = \"hexadecimal\";\n CharacterReferenceType[\"DEC\"] = \"decimal\";\n})(CharacterReferenceType || (CharacterReferenceType = {}));\nclass _ControlFlowError {\n constructor(error) {\n this.error = error;\n }\n}\n// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents\nclass _Tokenizer {\n /**\n * @param _file The html source file being tokenized.\n * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.\n * @param options Configuration of the tokenization.\n */\n constructor(_file, _getTagDefinition, options) {\n this._getTagDefinition = _getTagDefinition;\n this._currentTokenStart = null;\n this._currentTokenType = null;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this.nonNormalizedIcuExpressions = [];\n this._tokenizeIcu = options.tokenizeExpansionForms || false;\n this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n this._leadingTriviaCodePoints =\n options.leadingTriviaChars && options.leadingTriviaChars.map(c => c.codePointAt(0) || 0);\n const range = options.range || { endPos: _file.content.length, startPos: 0, startLine: 0, startCol: 0 };\n this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) :\n new PlainCharacterCursor(_file, range);\n this._preserveLineEndings = options.preserveLineEndings || false;\n this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;\n this._tokenizeBlocks = options.tokenizeBlocks || false;\n try {\n this._cursor.init();\n }\n catch (e) {\n this.handleError(e);\n }\n }\n _processCarriageReturns(content) {\n if (this._preserveLineEndings) {\n return content;\n }\n // https://www.w3.org/TR/html51/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 tokenize() {\n while (this._cursor.peek() !== $EOF) {\n const start = this._cursor.clone();\n try {\n if (this._attemptCharCode($LT)) {\n if (this._attemptCharCode($BANG)) {\n if (this._attemptCharCode($LBRACKET)) {\n this._consumeCdata(start);\n }\n else if (this._attemptCharCode($MINUS)) {\n this._consumeComment(start);\n }\n else {\n this._consumeDocType(start);\n }\n }\n else if (this._attemptCharCode($SLASH)) {\n this._consumeTagClose(start);\n }\n else {\n this._consumeTagOpen(start);\n }\n }\n else if (this._tokenizeBlocks && this._attemptStr('{#')) {\n this._consumeBlockGroupOpen(start);\n }\n else if (this._tokenizeBlocks && this._attemptStr('{/')) {\n this._consumeBlockGroupClose(start);\n }\n else if (this._tokenizeBlocks && this._attemptStr('{:')) {\n this._consumeBlock(start);\n }\n else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while\n // the premature end of an interpolation is given by the start of a new HTML element.\n this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());\n }\n }\n catch (e) {\n this.handleError(e);\n }\n }\n this._beginToken(24 /* TokenType.EOF */);\n this._endToken([]);\n }\n _consumeBlockGroupOpen(start) {\n this._beginToken(25 /* TokenType.BLOCK_GROUP_OPEN_START */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n this._endToken([this._cursor.getChars(nameCursor)]);\n this._consumeBlockParameters();\n this._beginToken(26 /* TokenType.BLOCK_GROUP_OPEN_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n }\n _consumeBlockGroupClose(start) {\n this._beginToken(27 /* TokenType.BLOCK_GROUP_CLOSE */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n const name = this._cursor.getChars(nameCursor);\n this._requireCharCode($RBRACE);\n this._endToken([name]);\n }\n _consumeBlock(start) {\n this._beginToken(29 /* TokenType.BLOCK_OPEN_START */, start);\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => !isBlockNameChar(code));\n this._endToken([this._cursor.getChars(nameCursor)]);\n this._consumeBlockParameters();\n this._beginToken(30 /* TokenType.BLOCK_OPEN_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n }\n _consumeBlockParameters() {\n // Trim the whitespace until the first parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n while (this._cursor.peek() !== $RBRACE && this._cursor.peek() !== $EOF) {\n this._beginToken(28 /* TokenType.BLOCK_PARAMETER */);\n const start = this._cursor.clone();\n let inQuote = null;\n let openBraces = 0;\n // Consume the parameter until the next semicolon or brace.\n // Note that we skip over semicolons/braces inside of strings.\n while ((this._cursor.peek() !== $SEMICOLON && this._cursor.peek() !== $EOF) ||\n inQuote !== null) {\n const char = this._cursor.peek();\n // Skip to the next character if it was escaped.\n if (char === $BACKSLASH) {\n this._cursor.advance();\n }\n else if (char === inQuote) {\n inQuote = null;\n }\n else if (inQuote === null && isQuote(char)) {\n inQuote = char;\n }\n else if (char === $LBRACE && inQuote === null) {\n openBraces++;\n }\n else if (char === $RBRACE && inQuote === null) {\n if (openBraces === 0) {\n break;\n }\n else if (openBraces > 0) {\n openBraces--;\n }\n }\n this._cursor.advance();\n }\n this._endToken([this._cursor.getChars(start)]);\n // Skip to the next parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n }\n }\n /**\n * @returns whether an ICU token has been created\n * @internal\n */\n _tokenizeExpansionForm() {\n if (this.isExpansionFormStart()) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._cursor.peek() === $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 _beginToken(type, start = this._cursor.clone()) {\n this._currentTokenStart = start;\n this._currentTokenType = type;\n }\n _endToken(parts, end) {\n if (this._currentTokenStart === null) {\n throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));\n }\n if (this._currentTokenType === null) {\n throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));\n }\n const token = {\n type: this._currentTokenType,\n parts,\n sourceSpan: (end ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints),\n };\n this.tokens.push(token);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return token;\n }\n _createError(msg, span) {\n if (this._isInExpansionForm()) {\n msg += ` (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)`;\n }\n const error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return new _ControlFlowError(error);\n }\n handleError(e) {\n if (e instanceof CursorError) {\n e = this._createError(e.msg, this._cursor.getSpan(e.cursor));\n }\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n }\n else {\n throw e;\n }\n }\n _attemptCharCode(charCode) {\n if (this._cursor.peek() === charCode) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _attemptCharCodeCaseInsensitive(charCode) {\n if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {\n this._cursor.advance();\n return true;\n }\n return false;\n }\n _requireCharCode(charCode) {\n const location = this._cursor.clone();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptStr(chars) {\n const len = chars.length;\n if (this._cursor.charsLeft() < len) {\n return false;\n }\n const initialPosition = this._cursor.clone();\n for (let 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._cursor = initialPosition;\n return false;\n }\n }\n return true;\n }\n _attemptStrCaseInsensitive(chars) {\n for (let i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n }\n _requireStr(chars) {\n const location = this._cursor.clone();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n }\n }\n _attemptCharCodeUntilFn(predicate) {\n while (!predicate(this._cursor.peek())) {\n this._cursor.advance();\n }\n }\n _requireCharCodeUntilFn(predicate, len) {\n const start = this._cursor.clone();\n this._attemptCharCodeUntilFn(predicate);\n if (this._cursor.diff(start) < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n }\n _attemptUntilChar(char) {\n while (this._cursor.peek() !== char) {\n this._cursor.advance();\n }\n }\n _readChar() {\n // Don't rely upon reading directly from `_input` as the actual char value\n // may have been generated from an escape sequence.\n const char = String.fromCodePoint(this._cursor.peek());\n this._cursor.advance();\n return char;\n }\n _consumeEntity(textTokenType) {\n this._beginToken(9 /* TokenType.ENCODED_ENTITY */);\n const start = this._cursor.clone();\n this._cursor.advance();\n if (this._attemptCharCode($HASH)) {\n const isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n const codeStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // Advance cursor to include the peeked character in the string provided to the error\n // message.\n this._cursor.advance();\n const entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;\n throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());\n }\n const strNum = this._cursor.getChars(codeStart);\n this._cursor.advance();\n try {\n const charCode = parseInt(strNum, isHex ? 16 : 10);\n this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]);\n }\n catch {\n throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());\n }\n }\n else {\n const nameStart = this._cursor.clone();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._cursor.peek() != $SEMICOLON) {\n // No semicolon was found so abort the encoded entity token that was in progress, and treat\n // this as a text token\n this._beginToken(textTokenType, start);\n this._cursor = nameStart;\n this._endToken(['&']);\n }\n else {\n const name = this._cursor.getChars(nameStart);\n this._cursor.advance();\n const char = NAMED_ENTITIES[name];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));\n }\n this._endToken([char, `&${name};`]);\n }\n }\n }\n _consumeRawText(consumeEntities, endMarkerPredicate) {\n this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */);\n const parts = [];\n while (true) {\n const tagCloseStart = this._cursor.clone();\n const foundEndMarker = endMarkerPredicate();\n this._cursor = tagCloseStart;\n if (foundEndMarker) {\n break;\n }\n if (consumeEntities && this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */);\n }\n else {\n parts.push(this._readChar());\n }\n }\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n _consumeComment(start) {\n this._beginToken(10 /* TokenType.COMMENT_START */, start);\n this._requireCharCode($MINUS);\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr('-->'));\n this._beginToken(11 /* TokenType.COMMENT_END */);\n this._requireStr('-->');\n this._endToken([]);\n }\n _consumeCdata(start) {\n this._beginToken(12 /* TokenType.CDATA_START */, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n this._consumeRawText(false, () => this._attemptStr(']]>'));\n this._beginToken(13 /* TokenType.CDATA_END */);\n this._requireStr(']]>');\n this._endToken([]);\n }\n _consumeDocType(start) {\n this._beginToken(18 /* TokenType.DOC_TYPE */, start);\n const contentStart = this._cursor.clone();\n this._attemptUntilChar($GT);\n const content = this._cursor.getChars(contentStart);\n this._cursor.advance();\n this._endToken([content]);\n }\n _consumePrefixAndName() {\n const nameOrPrefixStart = this._cursor.clone();\n let prefix = '';\n while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) {\n this._cursor.advance();\n }\n let nameStart;\n if (this._cursor.peek() === $COLON) {\n prefix = this._cursor.getChars(nameOrPrefixStart);\n this._cursor.advance();\n nameStart = this._cursor.clone();\n }\n else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);\n const name = this._cursor.getChars(nameStart);\n return [prefix, name];\n }\n _consumeTagOpen(start) {\n let tagName;\n let prefix;\n let openTagToken;\n try {\n if (!isAsciiLetter(this._cursor.peek())) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n }\n openTagToken = this._consumeTagOpenStart(start);\n prefix = openTagToken.parts[0];\n tagName = openTagToken.parts[1];\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT &&\n this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n if (openTagToken) {\n // We errored before we could close the opening tag, so it is incomplete.\n openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */;\n }\n else {\n // When the start tag is invalid, assume we want a \"<\" as text.\n // Back to back text tokens are merged at the end.\n this._beginToken(5 /* TokenType.TEXT */, start);\n this._endToken(['<']);\n }\n return;\n }\n throw e;\n }\n const contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, false);\n }\n else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(prefix, tagName, true);\n }\n }\n _consumeRawTextWithTagClose(prefix, tagName, consumeEntities) {\n this._consumeRawText(consumeEntities, () => {\n if (!this._attemptCharCode($LT))\n return false;\n if (!this._attemptCharCode($SLASH))\n return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!this._attemptStrCaseInsensitive(tagName))\n return false;\n this._attemptCharCodeUntilFn(isNotWhitespace);\n return this._attemptCharCode($GT);\n });\n this._beginToken(3 /* TokenType.TAG_CLOSE */);\n this._requireCharCodeUntilFn(code => code === $GT, 3);\n this._cursor.advance(); // Consume the `>`\n this._endToken([prefix, tagName]);\n }\n _consumeTagOpenStart(start) {\n this._beginToken(0 /* TokenType.TAG_OPEN_START */, start);\n const parts = this._consumePrefixAndName();\n return this._endToken(parts);\n }\n _consumeAttributeName() {\n const attrNameStart = this._cursor.peek();\n if (attrNameStart === $SQ || attrNameStart === $DQ) {\n throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());\n }\n this._beginToken(14 /* TokenType.ATTR_NAME */);\n const prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n }\n _consumeAttributeValue() {\n if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) {\n const quoteChar = this._cursor.peek();\n this._consumeQuote(quoteChar);\n // In an attribute then end of the attribute value and the premature end to an interpolation\n // are both triggered by the `quoteChar`.\n const endPredicate = () => this._cursor.peek() === quoteChar;\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n this._consumeQuote(quoteChar);\n }\n else {\n const endPredicate = () => isNameEnd(this._cursor.peek());\n this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);\n }\n }\n _consumeQuote(quoteChar) {\n this._beginToken(15 /* TokenType.ATTR_QUOTE */);\n this._requireCharCode(quoteChar);\n this._endToken([String.fromCodePoint(quoteChar)]);\n }\n _consumeTagOpenEnd() {\n const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */;\n this._beginToken(tokenType);\n this._requireCharCode($GT);\n this._endToken([]);\n }\n _consumeTagClose(start) {\n this._beginToken(3 /* TokenType.TAG_CLOSE */, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n const prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode($GT);\n this._endToken(prefixAndName);\n }\n _consumeExpansionFormStart() {\n this._beginToken(19 /* TokenType.EXPANSION_FORM_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const condition = this._readUntil($COMMA);\n const normalizedCondition = this._processCarriageReturns(condition);\n if (this._i18nNormalizeLineEndingsInICUs) {\n // We explicitly want to normalize line endings for this text.\n this._endToken([normalizedCondition]);\n }\n else {\n // We are not normalizing line endings.\n const conditionToken = this._endToken([condition]);\n if (normalizedCondition !== condition) {\n this.nonNormalizedIcuExpressions.push(conditionToken);\n }\n }\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(7 /* TokenType.RAW_TEXT */);\n const type = this._readUntil($COMMA);\n this._endToken([type]);\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n _consumeExpansionCaseStart() {\n this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */);\n const value = this._readUntil($LBRACE).trim();\n this._endToken([value]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */);\n }\n _consumeExpansionCaseEnd() {\n this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n }\n _consumeExpansionFormEnd() {\n this._beginToken(23 /* TokenType.EXPANSION_FORM_END */);\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n }\n /**\n * Consume a string that may contain interpolation expressions.\n *\n * The first token consumed will be of `tokenType` and then there will be alternating\n * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true.\n *\n * If an interpolation token ends prematurely it will have no end marker in its `parts` array.\n *\n * @param textTokenType the kind of tokens to interleave around interpolation tokens.\n * @param interpolationTokenType the kind of tokens that contain interpolation.\n * @param endPredicate a function that should return true when we should stop consuming.\n * @param endInterpolation a function that should return true if there is a premature end to an\n * interpolation expression - i.e. before we get to the normal interpolation closing marker.\n */\n _consumeWithInterpolation(textTokenType, interpolationTokenType, endPredicate, endInterpolation) {\n this._beginToken(textTokenType);\n const parts = [];\n while (!endPredicate()) {\n const current = this._cursor.clone();\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n this._endToken([this._processCarriageReturns(parts.join(''))], current);\n parts.length = 0;\n this._consumeInterpolation(interpolationTokenType, current, endInterpolation);\n this._beginToken(textTokenType);\n }\n else if (this._cursor.peek() === $AMPERSAND) {\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n parts.length = 0;\n this._consumeEntity(textTokenType);\n this._beginToken(textTokenType);\n }\n else {\n parts.push(this._readChar());\n }\n }\n // It is possible that an interpolation was started but not ended inside this text token.\n // Make sure that we reset the state of the lexer correctly.\n this._inInterpolation = false;\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n }\n /**\n * Consume a block of text that has been interpreted as an Angular interpolation.\n *\n * @param interpolationTokenType the type of the interpolation token to generate.\n * @param interpolationStart a cursor that points to the start of this interpolation.\n * @param prematureEndPredicate a function that should return true if the next characters indicate\n * an end to the interpolation before its normal closing marker.\n */\n _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) {\n const parts = [];\n this._beginToken(interpolationTokenType, interpolationStart);\n parts.push(this._interpolationConfig.start);\n // Find the end of the interpolation, ignoring content inside quotes.\n const expressionStart = this._cursor.clone();\n let inQuote = null;\n let inComment = false;\n while (this._cursor.peek() !== $EOF &&\n (prematureEndPredicate === null || !prematureEndPredicate())) {\n const current = this._cursor.clone();\n if (this._isTagStart()) {\n // We are starting what looks like an HTML element in the middle of this interpolation.\n // Reset the cursor to before the `<` character and end the interpolation token.\n // (This is actually wrong but here for backward compatibility).\n this._cursor = current;\n parts.push(this._getProcessedChars(expressionStart, current));\n this._endToken(parts);\n return;\n }\n if (inQuote === null) {\n if (this._attemptStr(this._interpolationConfig.end)) {\n // We are not in a string, and we hit the end interpolation marker\n parts.push(this._getProcessedChars(expressionStart, current));\n parts.push(this._interpolationConfig.end);\n this._endToken(parts);\n return;\n }\n else if (this._attemptStr('//')) {\n // Once we are in a comment we ignore any quotes\n inComment = true;\n }\n }\n const char = this._cursor.peek();\n this._cursor.advance();\n if (char === $BACKSLASH) {\n // Skip the next character because it was escaped.\n this._cursor.advance();\n }\n else if (char === inQuote) {\n // Exiting the current quoted string\n inQuote = null;\n }\n else if (!inComment && inQuote === null && isQuote(char)) {\n // Entering a new quoted string\n inQuote = char;\n }\n }\n // We hit EOF without finding a closing interpolation marker\n parts.push(this._getProcessedChars(expressionStart, this._cursor));\n this._endToken(parts);\n }\n _getProcessedChars(start, end) {\n return this._processCarriageReturns(end.getChars(start));\n }\n _isTextEnd() {\n if (this._isTagStart() || this._isBlockStart() || this._cursor.peek() === $EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (this.isExpansionFormStart()) {\n // start of an expansion form\n return true;\n }\n if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n }\n /**\n * Returns true if the current cursor is pointing to the start of a tag\n * (opening/closing/comments/cdata/etc).\n */\n _isTagStart() {\n if (this._cursor.peek() === $LT) {\n // We assume that `<` followed by whitespace is not the start of an HTML element.\n const tmp = this._cursor.clone();\n tmp.advance();\n // If the next character is alphabetic, ! nor / then it is a tag start\n const code = tmp.peek();\n if (($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n code === $SLASH || code === $BANG) {\n return true;\n }\n }\n return false;\n }\n _isBlockStart() {\n if (this._tokenizeBlocks && this._cursor.peek() === $LBRACE) {\n const tmp = this._cursor.clone();\n // Check that the cursor is on a `{#`, `{/` or `{:`.\n tmp.advance();\n const next = tmp.peek();\n if (next !== $BANG && next !== $SLASH && next !== $COLON) {\n return false;\n }\n // If it is, also verify that the next character is a valid block identifier.\n tmp.advance();\n if (isBlockNameChar(tmp.peek())) {\n return true;\n }\n }\n return false;\n }\n _readUntil(char) {\n const start = this._cursor.clone();\n this._attemptUntilChar(char);\n return this._cursor.getChars(start);\n }\n _isInExpansionCase() {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n 21 /* TokenType.EXPANSION_CASE_EXP_START */;\n }\n _isInExpansionForm() {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n 19 /* TokenType.EXPANSION_FORM_START */;\n }\n isExpansionFormStart() {\n if (this._cursor.peek() !== $LBRACE) {\n return false;\n }\n if (this._interpolationConfig) {\n const start = this._cursor.clone();\n const isInterpolation = this._attemptStr(this._interpolationConfig.start);\n this._cursor = start;\n return !isInterpolation;\n }\n return true;\n }\n}\nfunction isNotWhitespace(code) {\n return !isWhitespace(code) || code === $EOF;\n}\nfunction isNameEnd(code) {\n return isWhitespace(code) || code === $GT || code === $LT ||\n code === $SLASH || code === $SQ || code === $DQ || code === $EQ ||\n code === $EOF;\n}\nfunction isPrefixEnd(code) {\n return (code < $a || $z < code) && (code < $A || $Z < code) &&\n (code < $0 || code > $9);\n}\nfunction isDigitEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiHexDigit(code);\n}\nfunction isNamedEntityEnd(code) {\n return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code);\n}\nfunction isExpansionCaseStart(peek) {\n return peek !== $RBRACE;\n}\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2);\n}\nfunction toUpperCaseCharCode(code) {\n return code >= $a && code <= $z ? code - $a + $A : code;\n}\nfunction isBlockNameChar(code) {\n return isAsciiLetter(code) || isDigit(code) || code === $_;\n}\nfunction isBlockParameterChar(code) {\n return code !== $SEMICOLON && isNotWhitespace(code);\n}\nfunction mergeTextTokens(srcTokens) {\n const dstTokens = [];\n let lastDstToken = undefined;\n for (let i = 0; i < srcTokens.length; i++) {\n const token = srcTokens[i];\n if ((lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */) ||\n (lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ &&\n token.type === 16 /* TokenType.ATTR_VALUE_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}\nclass PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof PlainCharacterCursor) {\n this.file = fileOrCursor.file;\n this.input = fileOrCursor.input;\n this.end = fileOrCursor.end;\n const state = fileOrCursor.state;\n // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.\n // In ES5 bundles the object spread operator is translated into the `__assign` helper, which\n // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is\n // called in tight loops, this difference matters.\n this.state = {\n peek: state.peek,\n offset: state.offset,\n line: state.line,\n column: state.column,\n };\n }\n else {\n if (!range) {\n throw new Error('Programming error: the range argument must be provided with a file argument.');\n }\n this.file = fileOrCursor;\n this.input = fileOrCursor.content;\n this.end = range.endPos;\n this.state = {\n peek: -1,\n offset: range.startPos,\n line: range.startLine,\n column: range.startCol,\n };\n }\n }\n clone() {\n return new PlainCharacterCursor(this);\n }\n peek() {\n return this.state.peek;\n }\n charsLeft() {\n return this.end - this.state.offset;\n }\n diff(other) {\n return this.state.offset - other.state.offset;\n }\n advance() {\n this.advanceState(this.state);\n }\n init() {\n this.updatePeek(this.state);\n }\n getSpan(start, leadingTriviaCodePoints) {\n start = start || this;\n let fullStart = start;\n if (leadingTriviaCodePoints) {\n while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {\n if (fullStart === start) {\n start = start.clone();\n }\n start.advance();\n }\n }\n const startLocation = this.locationFromCursor(start);\n const endLocation = this.locationFromCursor(this);\n const fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;\n return new ParseSourceSpan(startLocation, endLocation, fullStartLocation);\n }\n getChars(start) {\n return this.input.substring(start.state.offset, this.state.offset);\n }\n charAt(pos) {\n return this.input.charCodeAt(pos);\n }\n advanceState(state) {\n if (state.offset >= this.end) {\n this.state = state;\n throw new CursorError('Unexpected character \"EOF\"', this);\n }\n const currentChar = this.charAt(state.offset);\n if (currentChar === $LF) {\n state.line++;\n state.column = 0;\n }\n else if (!isNewLine(currentChar)) {\n state.column++;\n }\n state.offset++;\n this.updatePeek(state);\n }\n updatePeek(state) {\n state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset);\n }\n locationFromCursor(cursor) {\n return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);\n }\n}\nclass EscapedCharacterCursor extends PlainCharacterCursor {\n constructor(fileOrCursor, range) {\n if (fileOrCursor instanceof EscapedCharacterCursor) {\n super(fileOrCursor);\n this.internalState = { ...fileOrCursor.internalState };\n }\n else {\n super(fileOrCursor, range);\n this.internalState = this.state;\n }\n }\n advance() {\n this.state = this.internalState;\n super.advance();\n this.processEscapeSequence();\n }\n init() {\n super.init();\n this.processEscapeSequence();\n }\n clone() {\n return new EscapedCharacterCursor(this);\n }\n getChars(start) {\n const cursor = start.clone();\n let chars = '';\n while (cursor.internalState.offset < this.internalState.offset) {\n chars += String.fromCodePoint(cursor.peek());\n cursor.advance();\n }\n return chars;\n }\n /**\n * Process the escape sequence that starts at the current position in the text.\n *\n * This method is called to ensure that `peek` has the unescaped value of escape sequences.\n */\n processEscapeSequence() {\n const peek = () => this.internalState.peek;\n if (peek() === $BACKSLASH) {\n // We have hit an escape sequence so we need the internal state to become independent\n // of the external state.\n this.internalState = { ...this.state };\n // Move past the backslash\n this.advanceState(this.internalState);\n // First check for standard control char sequences\n if (peek() === $n) {\n this.state.peek = $LF;\n }\n else if (peek() === $r) {\n this.state.peek = $CR;\n }\n else if (peek() === $v) {\n this.state.peek = $VTAB;\n }\n else if (peek() === $t) {\n this.state.peek = $TAB;\n }\n else if (peek() === $b) {\n this.state.peek = $BSPACE;\n }\n else if (peek() === $f) {\n this.state.peek = $FF;\n }\n // Now consider more complex sequences\n else if (peek() === $u) {\n // Unicode code-point sequence\n this.advanceState(this.internalState); // advance past the `u` char\n if (peek() === $LBRACE) {\n // Variable length Unicode, e.g. `\\x{123}`\n this.advanceState(this.internalState); // advance past the `{` char\n // Advance past the variable number of hex digits until we hit a `}` char\n const digitStart = this.clone();\n let length = 0;\n while (peek() !== $RBRACE) {\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = this.decodeHexDigits(digitStart, length);\n }\n else {\n // Fixed length Unicode, e.g. `\\u1234`\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 4);\n }\n }\n else if (peek() === $x) {\n // Hex char code, e.g. `\\x2F`\n this.advanceState(this.internalState); // advance past the `x` char\n const digitStart = this.clone();\n this.advanceState(this.internalState);\n this.state.peek = this.decodeHexDigits(digitStart, 2);\n }\n else if (isOctalDigit(peek())) {\n // Octal char code, e.g. `\\012`,\n let octal = '';\n let length = 0;\n let previous = this.clone();\n while (isOctalDigit(peek()) && length < 3) {\n previous = this.clone();\n octal += String.fromCodePoint(peek());\n this.advanceState(this.internalState);\n length++;\n }\n this.state.peek = parseInt(octal, 8);\n // Backup one char\n this.internalState = previous.internalState;\n }\n else if (isNewLine(this.internalState.peek)) {\n // Line continuation `\\` followed by a new line\n this.advanceState(this.internalState); // advance over the newline\n this.state = this.internalState;\n }\n else {\n // If none of the `if` blocks were executed then we just have an escaped normal character.\n // In that case we just, effectively, skip the backslash from the character.\n this.state.peek = this.internalState.peek;\n }\n }\n }\n decodeHexDigits(start, length) {\n const hex = this.input.slice(start.internalState.offset, start.internalState.offset + length);\n const charCode = parseInt(hex, 16);\n if (!isNaN(charCode)) {\n return charCode;\n }\n else {\n start.state = start.internalState;\n throw new CursorError('Invalid hexadecimal escape sequence', start);\n }\n }\n}\nclass CursorError {\n constructor(msg, cursor) {\n this.msg = msg;\n this.cursor = cursor;\n }\n}\n\nclass TreeError extends ParseError {\n static create(elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n }\n constructor(elementName, span, msg) {\n super(span, msg);\n this.elementName = elementName;\n }\n}\nclass ParseTreeResult {\n constructor(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n}\nclass Parser {\n constructor(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n parse(source, url, options) {\n const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);\n const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);\n parser.build();\n return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));\n }\n}\nclass _TreeBuilder {\n constructor(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._containerStack = [];\n this.rootNodes = [];\n this.errors = [];\n this._advance();\n }\n build() {\n while (this._peek.type !== 24 /* TokenType.EOF */) {\n if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ ||\n this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n this._consumeStartTag(this._advance());\n }\n else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) {\n this._consumeEndTag(this._advance());\n }\n else if (this._peek.type === 12 /* TokenType.CDATA_START */) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n }\n else if (this._peek.type === 10 /* TokenType.COMMENT_START */) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n }\n else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ ||\n this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n }\n else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) {\n this._consumeExpansion(this._advance());\n }\n else if (this._peek.type === 25 /* TokenType.BLOCK_GROUP_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlockGroupOpen(this._advance());\n }\n else if (this._peek.type === 29 /* TokenType.BLOCK_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlock(this._advance(), 30 /* TokenType.BLOCK_OPEN_END */);\n }\n else if (this._peek.type === 27 /* TokenType.BLOCK_GROUP_CLOSE */) {\n this._closeVoidElement();\n this._consumeBlockGroupClose(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n }\n _advance() {\n const 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 _advanceIf(type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n }\n _consumeCdata(_startToken) {\n this._consumeText(this._advance());\n this._advanceIf(13 /* TokenType.CDATA_END */);\n }\n _consumeComment(token) {\n const text = this._advanceIf(7 /* TokenType.RAW_TEXT */);\n const endToken = this._advanceIf(11 /* TokenType.COMMENT_END */);\n const value = text != null ? text.parts[0].trim() : null;\n const sourceSpan = endToken == null ?\n token.sourceSpan :\n new ParseSourceSpan(token.sourceSpan.start, endToken.sourceSpan.end, token.sourceSpan.fullStart);\n this._addToParent(new Comment(value, sourceSpan));\n }\n _consumeExpansion(token) {\n const switchValue = this._advance();\n const type = this._advance();\n const cases = [];\n // read =\n while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) {\n const expCase = this._parseExpansionCase();\n if (!expCase)\n return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) {\n this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));\n return;\n }\n const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);\n this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n }\n _parseExpansionCase() {\n const value = this._advance();\n // read {\n if (this._peek.type !== 21 /* 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 const start = this._advance();\n const exp = this._collectExpansionExpTokens(start);\n if (!exp)\n return null;\n const end = this._advance();\n exp.push({ type: 24 /* TokenType.EOF */, parts: [], sourceSpan: end.sourceSpan });\n // parse everything in between { and }\n const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);\n expansionCaseParser.build();\n if (expansionCaseParser.errors.length > 0) {\n this.errors = this.errors.concat(expansionCaseParser.errors);\n return null;\n }\n const sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart);\n const expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart);\n return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n }\n _collectExpansionExpTokens(start) {\n const exp = [];\n const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */];\n while (true) {\n if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ ||\n this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) {\n if (lastOnStack(expansionFormStack, 21 /* 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 === 23 /* TokenType.EXPANSION_FORM_END */) {\n if (lastOnStack(expansionFormStack, 19 /* 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 === 24 /* 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 _consumeText(token) {\n const tokens = [token];\n const startSpan = token.sourceSpan;\n let text = token.parts[0];\n if (text.length > 0 && text[0] === '\\n') {\n const parent = this._getContainer();\n // This is unlikely to happen, but we have an assertion just in case.\n if (parent instanceof BlockGroup) {\n this.errors.push(TreeError.create(null, startSpan, 'Text cannot be placed directly inside of a block group.'));\n return null;\n }\n if (parent != null && parent.children.length === 0 &&\n this.getTagDefinition(parent.name).ignoreFirstLf) {\n text = text.substring(1);\n tokens[0] = { type: token.type, sourceSpan: token.sourceSpan, parts: [text] };\n }\n }\n while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ ||\n this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n token = this._advance();\n tokens.push(token);\n if (token.type === 8 /* TokenType.INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n }\n else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) {\n text += token.parts[0];\n }\n else {\n text += token.parts.join('');\n }\n }\n if (text.length > 0) {\n const endSpan = token.sourceSpan;\n this._addToParent(new Text(text, new ParseSourceSpan(startSpan.start, endSpan.end, startSpan.fullStart, startSpan.details), tokens));\n }\n }\n _closeVoidElement() {\n const el = this._getContainer();\n if (el instanceof Element && this.getTagDefinition(el.name).isVoid) {\n this._containerStack.pop();\n }\n }\n _consumeStartTag(startTagToken) {\n const [prefix, name] = startTagToken.parts;\n const attrs = [];\n while (this._peek.type === 14 /* TokenType.ATTR_NAME */) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n const fullName = this._getElementFullName(prefix, name, this._getClosestParentElement());\n let 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 === 2 /* TokenType.TAG_OPEN_END_VOID */) {\n this._advance();\n selfClosing = true;\n const tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed \"${startTagToken.parts[1]}\"`));\n }\n }\n else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) {\n this._advance();\n selfClosing = false;\n }\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n const el = new Element(fullName, attrs, [], span, startSpan, undefined);\n const parentEl = this._getContainer();\n this._pushContainer(el, parentEl instanceof Element &&\n this.getTagDefinition(parentEl.name).isClosedByChild(el.name));\n if (selfClosing) {\n // Elements that are self-closed have their `endSourceSpan` set to the full span, as the\n // element start tag also represents the end tag.\n this._popContainer(fullName, Element, span);\n }\n else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {\n // We already know the opening tag is not complete, so it is unlikely it has a corresponding\n // close tag. Let's optimistically parse it as a full element and emit an error.\n this._popContainer(fullName, Element, null);\n this.errors.push(TreeError.create(fullName, span, `Opening tag \"${fullName}\" not terminated.`));\n }\n }\n _pushContainer(node, isClosedByChild) {\n if (isClosedByChild) {\n this._containerStack.pop();\n }\n this._addToParent(node);\n this._containerStack.push(node);\n }\n _consumeEndTag(endTagToken) {\n const fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getClosestParentElement());\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._popContainer(fullName, Element, endTagToken.sourceSpan)) {\n const 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 * Closes the nearest element with the tag name `fullName` in the parse tree.\n * `endSourceSpan` is the span of the closing tag, or null if the element does\n * not have a closing tag (for example, this happens when an incomplete\n * opening tag is recovered).\n */\n _popContainer(fullName, expectedType, endSourceSpan) {\n let unexpectedCloseTagDetected = false;\n for (let stackIndex = this._containerStack.length - 1; stackIndex >= 0; stackIndex--) {\n const node = this._containerStack[stackIndex];\n const name = node instanceof BlockGroup ? node.blocks[0]?.name : node.name;\n if (name === fullName && node instanceof expectedType) {\n // Record the parse span with the element that is being closed. Any elements that are\n // removed from the element stack at this point are closed implicitly, so they won't get\n // an end source span (as there is no explicit closing element).\n node.endSourceSpan = endSourceSpan;\n node.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : node.sourceSpan.end;\n this._containerStack.splice(stackIndex, this._containerStack.length - stackIndex);\n return !unexpectedCloseTagDetected;\n }\n // Blocks are self-closing while block groups and (most times) elements are not.\n if (node instanceof BlockGroup ||\n node instanceof Element && !this.getTagDefinition(node.name).closedByParent) {\n // Note that we encountered an unexpected close tag but continue processing the element\n // stack so we can assign an `endSourceSpan` if there is a corresponding start tag for this\n // end tag in the stack.\n unexpectedCloseTagDetected = true;\n }\n }\n return false;\n }\n _consumeAttr(attrName) {\n const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n let attrEnd = attrName.sourceSpan.end;\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n this._advance();\n }\n // Consume the attribute value\n let value = '';\n const valueTokens = [];\n let valueStartSpan = undefined;\n let valueEnd = undefined;\n // NOTE: We need to use a new variable `nextTokenType` here to hide the actual type of\n // `_peek.type` from TS. Otherwise TS will narrow the type of `_peek.type` preventing it from\n // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not\n // able to see that `_advance()` will actually mutate `_peek`.\n const nextTokenType = this._peek.type;\n if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) {\n valueStartSpan = this._peek.sourceSpan;\n valueEnd = this._peek.sourceSpan.end;\n while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ ||\n this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ ||\n this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {\n const valueToken = this._advance();\n valueTokens.push(valueToken);\n if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) {\n // For backward compatibility we decode HTML entities that appear in interpolation\n // expressions. This is arguably a bug, but it could be a considerable breaking change to\n // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n // chain after View Engine has been removed.\n value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n }\n else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) {\n value += valueToken.parts[0];\n }\n else {\n value += valueToken.parts.join('');\n }\n valueEnd = attrEnd = valueToken.sourceSpan.end;\n }\n }\n // Consume any quote\n if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {\n const quoteToken = this._advance();\n attrEnd = quoteToken.sourceSpan.end;\n }\n const valueSpan = valueStartSpan && valueEnd &&\n new ParseSourceSpan(valueStartSpan.start, valueEnd, valueStartSpan.fullStart);\n return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, attrEnd, attrName.sourceSpan.fullStart), attrName.sourceSpan, valueSpan, valueTokens.length > 0 ? valueTokens : undefined, undefined);\n }\n _consumeBlockGroupOpen(token) {\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n const blockGroup = new BlockGroup([], span, startSpan, null);\n this._pushContainer(blockGroup, false);\n const implicitBlock = this._consumeBlock(token, 26 /* TokenType.BLOCK_GROUP_OPEN_END */);\n // Block parameters are consumed as a part of the implicit block so we need to expand the\n // start source span once the block is parsed to include the full opening tag.\n startSpan.end = implicitBlock.startSourceSpan.end;\n }\n _consumeBlock(token, closeToken) {\n // The start of a block implicitly closes the previous block.\n this._conditionallyClosePreviousBlock();\n const parameters = [];\n while (this._peek.type === 28 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\n }\n if (this._peek.type === closeToken) {\n this._advance();\n }\n const end = this._peek.sourceSpan.fullStart;\n const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart);\n const block = new Block(token.parts[0], parameters, [], span, startSpan);\n const parent = this._getContainer();\n if (!(parent instanceof BlockGroup)) {\n this.errors.push(TreeError.create(block.name, block.sourceSpan, 'Blocks can only be placed inside of block groups.'));\n }\n else {\n parent.blocks.push(block);\n this._containerStack.push(block);\n }\n return block;\n }\n _consumeBlockGroupClose(token) {\n const name = token.parts[0];\n const previousContainer = this._getContainer();\n // Blocks are implcitly closed by the block group.\n this._conditionallyClosePreviousBlock();\n if (!this._popContainer(name, BlockGroup, token.sourceSpan)) {\n const context = previousContainer instanceof Element ?\n `There is an unclosed \"${previousContainer.name}\" HTML tag named that may have to be closed first.` :\n `The block may have been closed earlier.`;\n this.errors.push(TreeError.create(name, token.sourceSpan, `Unexpected closing block \"${name}\". ${context}`));\n }\n }\n _conditionallyClosePreviousBlock() {\n const container = this._getContainer();\n if (container instanceof Block) {\n // Blocks don't have an explicit closing tag, they're closed either by the next block or\n // the end of the block group. Infer the end span from the last child node.\n const lastChild = container.children.length ? container.children[container.children.length - 1] : null;\n const endSpan = lastChild === null ?\n null :\n new ParseSourceSpan(lastChild.sourceSpan.end, lastChild.sourceSpan.end);\n this._popContainer(container.name, Block, endSpan);\n }\n }\n _getContainer() {\n return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] :\n null;\n }\n _getClosestParentElement() {\n for (let i = this._containerStack.length - 1; i > -1; i--) {\n if (this._containerStack[i] instanceof Element) {\n return this._containerStack[i];\n }\n }\n return null;\n }\n _addToParent(node) {\n const parent = this._getContainer();\n if (parent === null) {\n this.rootNodes.push(node);\n }\n else if (parent instanceof BlockGroup) {\n // Due to how parsing is set up, we're unlikely to hit this code path, but we\n // have the assertion here just in case and to satisfy the type checker.\n this.errors.push(TreeError.create(null, node.sourceSpan, 'Block groups can only contain blocks.'));\n }\n else {\n parent.children.push(node);\n }\n }\n _getElementFullName(prefix, localName, parentElement) {\n if (prefix === '') {\n prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';\n if (prefix === '' && parentElement != null) {\n const parentTagName = splitNsName(parentElement.name)[1];\n const parentTagDefinition = this.getTagDefinition(parentTagName);\n if (!parentTagDefinition.preventNamespaceInheritance) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n }\n return mergeNsAndName(prefix, localName);\n }\n}\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\n}\n/**\n * Decode the `entity` string, which we believe is the contents of an HTML entity.\n *\n * If the string is not actually a valid/known entity then just return the original `match` string.\n */\nfunction decodeEntity(match, entity) {\n if (NAMED_ENTITIES[entity] !== undefined) {\n return NAMED_ENTITIES[entity] || match;\n }\n if (/^#x[a-f0-9]+$/i.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(2), 16));\n }\n if (/^#\\d+$/.test(entity)) {\n return String.fromCodePoint(parseInt(entity.slice(1), 10));\n }\n return match;\n}\n\nclass HtmlParser extends Parser {\n constructor() {\n super(getHtmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\n }\n}\n\nconst PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nconst 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\nconst WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nconst NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);\nconst WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, 'g');\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);\n}\n/**\n * &ngsp; is a placeholder for non-removable space\n * &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space.\n */\nfunction 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 */\nclass WhitespaceVisitor {\n visitElement(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 Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n return new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n visitAttribute(attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n }\n visitText(text, context) {\n const isNotBlank = text.value.match(NO_WS_REGEXP);\n const hasExpansionSibling = context &&\n (context.prev instanceof Expansion || context.next instanceof Expansion);\n if (isNotBlank || hasExpansionSibling) {\n // Process the whitespace in the tokens of this Text node\n const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token);\n // Process the whitespace of the value of this Text node\n const value = processWhitespace(text.value);\n return new Text(value, text.sourceSpan, tokens, text.i18n);\n }\n return null;\n }\n visitComment(comment, context) {\n return comment;\n }\n visitExpansion(expansion, context) {\n return expansion;\n }\n visitExpansionCase(expansionCase, context) {\n return expansionCase;\n }\n visitBlockGroup(group, context) {\n return new BlockGroup(visitAllWithSiblings(this, group.blocks), group.sourceSpan, group.startSourceSpan, group.endSourceSpan);\n }\n visitBlock(block, context) {\n return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.startSourceSpan);\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n}\nfunction createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {\n return { type, parts: [processWhitespace(parts[0])], sourceSpan };\n}\nfunction processWhitespace(text) {\n return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\nfunction removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\nfunction visitAllWithSiblings(visitor, nodes) {\n const result = [];\n nodes.forEach((ast, i) => {\n const context = { prev: nodes[i - 1], next: nodes[i + 1] };\n const astResult = ast.visit(visitor, context);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\n\nfunction mapEntry(key, value) {\n return { key, value, quoted: false };\n}\nfunction mapLiteral(obj, quoted = false) {\n return literalMap(Object.keys(obj).map(key => ({\n key,\n quoted,\n value: obj[key],\n })));\n}\n\n/**\n * Set of tagName|propertyName corresponding to Trusted Types sinks. Properties applying to all\n * tags use '*'.\n *\n * Extracted from, and should be kept in sync with\n * https://w3c.github.io/webappsec-trusted-types/dist/spec/#integrations\n */\nconst TRUSTED_TYPES_SINKS = new Set([\n // NOTE: All strings in this set *must* be lowercase!\n // TrustedHTML\n 'iframe|srcdoc',\n '*|innerhtml',\n '*|outerhtml',\n // NB: no TrustedScript here, as the corresponding tags are stripped by the compiler.\n // TrustedScriptURL\n 'embed|src',\n 'object|codebase',\n 'object|data',\n]);\n/**\n * isTrustedTypesSink returns true if the given property on the given DOM tag is a Trusted Types\n * sink. In that case, use `ElementSchemaRegistry.securityContext` to determine which particular\n * Trusted Type is required for values passed to the sink:\n * - SecurityContext.HTML corresponds to TrustedHTML\n * - SecurityContext.RESOURCE_URL corresponds to TrustedScriptURL\n */\nfunction isTrustedTypesSink(tagName, propName) {\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 return TRUSTED_TYPES_SINKS.has(tagName + '|' + propName) ||\n TRUSTED_TYPES_SINKS.has('*|' + propName);\n}\n\nconst PROPERTY_PARTS_SEPARATOR = '.';\nconst ATTRIBUTE_PREFIX = 'attr';\nconst CLASS_PREFIX = 'class';\nconst STYLE_PREFIX = 'style';\nconst TEMPLATE_ATTR_PREFIX$1 = '*';\nconst ANIMATE_PROP_PREFIX = 'animate-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\nclass BindingParser {\n constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n }\n get interpolationConfig() {\n return this._interpolationConfig;\n }\n createBoundHostProperties(properties, sourceSpan) {\n const boundProps = [];\n for (const propName of Object.keys(properties)) {\n const expression = properties[propName];\n if (typeof expression === 'string') {\n this.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [], \n // Use the `sourceSpan` for `keySpan`. This isn't really accurate, but neither is the\n // sourceSpan, as it represents the sourceSpan of the host itself rather than the\n // source of the host binding (which doesn't exist in the template). Regardless,\n // neither of these values are used in Ivy but are only here to satisfy the function\n // signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n boundProps, sourceSpan);\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;\n }\n createDirectiveHostEventAsts(hostListeners, sourceSpan) {\n const targetEvents = [];\n for (const propName of Object.keys(hostListeners)) {\n const expression = hostListeners[propName];\n if (typeof expression === 'string') {\n // Use the `sourceSpan` for `keySpan` and `handlerSpan`. This isn't really accurate, but\n // neither is the `sourceSpan`, as it represents the `sourceSpan` of the host itself\n // rather than the source of the host binding (which doesn't exist in the template).\n // Regardless, neither of these values are used in Ivy but are only here to satisfy the\n // function signature. This should likely be refactored in the future so that `sourceSpan`\n // isn't being used inaccurately.\n this.parseEvent(propName, expression, /* isAssignmentEvent */ false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);\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 targetEvents;\n }\n parseInterpolation(value, sourceSpan, interpolatedTokens) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.fullStart.offset;\n try {\n const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Similar to `parseInterpolation`, but treats the provided string as a single expression\n * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n * This is used for parsing the switch expression in ICUs.\n */\n parseInterpolationExpression(expression, sourceSpan) {\n const sourceInfo = sourceSpan.start.toString();\n const absoluteOffset = sourceSpan.start.offset;\n try {\n const ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, and converts them to\n * `ParsedProperty` or `ParsedVariable`.\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteValueOffset start of the tplValue relative to the entire template\n * @param targetMatchableAttrs potential attributes to match in the template\n * @param targetProps target property bindings in the template\n * @param targetVars target variables in the template\n */\n parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteValueOffset, targetMatchableAttrs, targetProps, targetVars, isIvyAst) {\n const absoluteKeyOffset = sourceSpan.start.offset + TEMPLATE_ATTR_PREFIX$1.length;\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);\n for (const binding of bindings) {\n // sourceSpan is for the entire HTML attribute. bindingSpan is for a particular\n // binding within the microsyntax expression so it's more narrow than sourceSpan.\n const bindingSpan = moveParseSourceSpan(sourceSpan, binding.sourceSpan);\n const key = binding.key.source;\n const keySpan = moveParseSourceSpan(sourceSpan, binding.key.span);\n if (binding instanceof VariableBinding) {\n const value = binding.value ? binding.value.source : '$implicit';\n const valueSpan = binding.value ? moveParseSourceSpan(sourceSpan, binding.value.span) : undefined;\n targetVars.push(new ParsedVariable(key, value, bindingSpan, keySpan, valueSpan));\n }\n else if (binding.value) {\n const srcSpan = isIvyAst ? bindingSpan : sourceSpan;\n const valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);\n this._parsePropertyAst(key, binding.value, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([key, '' /* value */]);\n // Since this is a literal attribute with no RHS, source span should be\n // just the key span.\n this.parseLiteralAttr(key, null /* value */, keySpan, absoluteValueOffset, undefined /* valueSpan */, targetMatchableAttrs, targetProps, keySpan);\n }\n }\n }\n /**\n * Parses the bindings in a microsyntax expression, e.g.\n * ```\n * <tag *tplKey=\"let value1 = prop; let value2 = localVar\">\n * ```\n *\n * @param tplKey template binding name\n * @param tplValue template binding value\n * @param sourceSpan span of template binding relative to entire the template\n * @param absoluteKeyOffset start of the `tplKey`\n * @param absoluteValueOffset start of the `tplValue`\n */\n _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {\n const sourceInfo = sourceSpan.start.toString();\n try {\n const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.warnings.forEach((warning) => {\n this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);\n });\n return bindingsResult.templateBindings;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return [];\n }\n }\n parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (isAnimationLabel(name)) {\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\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, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));\n }\n }\n parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {\n if (name.length === 0) {\n this._reportError(`Property name is missing in binding`, sourceSpan);\n }\n let isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));\n }\n }\n else if (isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n else {\n this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n }\n }\n parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {\n const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n }\n _parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));\n }\n _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n if (name.length === 0) {\n this._reportError('Animation trigger is missing', sourceSpan);\n }\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 const ast = this.parseBinding(expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));\n }\n parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n try {\n const ast = isHostBinding ?\n this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) :\n this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {\n if (boundProp.isAnimation) {\n return new BoundElementProperty(boundProp.name, 4 /* BindingType.Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n let unit = null;\n let bindingType = undefined;\n let boundPropertyName = null;\n const parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n let securityContexts = undefined;\n // Check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts.slice(1).join(PROPERTY_PARTS_SEPARATOR);\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n }\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n const nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n const ns = boundPropertyName.substring(0, nsSeparatorIdx);\n const name = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name);\n }\n bindingType = 1 /* BindingType.Attribute */;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 2 /* BindingType.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 = 3 /* BindingType.Style */;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);\n boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);\n bindingType = 0 /* BindingType.Property */;\n if (!skipValidation) {\n this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);\n }\n }\n return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n }\n // TODO: keySpan should be required but was made optional to avoid changing VE parser.\n parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n if (name.length === 0) {\n this._reportError(`Event name is missing in binding`, sourceSpan);\n }\n if (isAnimationLabel(name)) {\n name = name.slice(1);\n if (keySpan !== undefined) {\n keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n }\n this._parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan);\n }\n else {\n this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);\n }\n }\n calcPossibleSecurityContexts(selector, propName, isAttribute) {\n const prop = this._schemaRegistry.getMappedPropName(propName);\n return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);\n }\n _parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan) {\n const matches = splitAtPeriod(name, [name, '']);\n const eventName = matches[0];\n const phase = matches[1].toLowerCase();\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 1 /* ParsedEventType.Animation */, ast, sourceSpan, handlerSpan, keySpan));\n if (eventName.length === 0) {\n this._reportError(`Animation event name is missing in binding`, sourceSpan);\n }\n if (phase) {\n if (phase !== 'start' && phase !== 'done') {\n this._reportError(`The provided animation output phase value \"${phase}\" for \"@${eventName}\" is not supported (use start or done)`, sourceSpan);\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 _parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n // long format: 'target: eventName'\n const [target, eventName] = splitAtColon(name, [null, name]);\n const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetEvents.push(new ParsedEvent(eventName, target, 0 /* ParsedEventType.Regular */, ast, sourceSpan, handlerSpan, keySpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n }\n _parseAction(value, isAssignmentEvent, sourceSpan) {\n const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n const absoluteOffset = (sourceSpan && sourceSpan.start) ? sourceSpan.start.offset : 0;\n try {\n const ast = this._exprParser.parseAction(value, isAssignmentEvent, sourceInfo, absoluteOffset, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr$1) {\n this._reportError(`Empty expressions are not allowed`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n return ast;\n }\n catch (e) {\n this._reportError(`${e}`, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n }\n }\n _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n _reportExpressionParserErrors(errors, sourceSpan) {\n for (const error of errors) {\n this._reportError(error.message, sourceSpan);\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 */\n _validatePropertyOrAttributeName(propName, sourceSpan, isAttr) {\n const report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n }\n}\nclass PipeCollector extends RecursiveAstVisitor {\n constructor() {\n super(...arguments);\n this.pipes = new Map();\n }\n visitPipe(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}\nfunction isAnimationLabel(name) {\n return name[0] == '@';\n}\nfunction calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n const ctxs = [];\n CssSelector.parse(selector).forEach((selector) => {\n const elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n const notElementNames = new Set(selector.notSelectors.filter(selector => selector.isElementSelector())\n .map((selector) => selector.element));\n const possibleElementNames = elementNames.filter(elementName => !notElementNames.has(elementName));\n ctxs.push(...possibleElementNames.map(elementName => registry.securityContext(elementName, propName, isAttribute)));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n/**\n * Compute a new ParseSourceSpan based off an original `sourceSpan` by using\n * absolute offsets from the specified `absoluteSpan`.\n *\n * @param sourceSpan original source span\n * @param absoluteSpan absolute source span to move to\n */\nfunction moveParseSourceSpan(sourceSpan, absoluteSpan) {\n // The difference of two absolute offsets provide the relative offset\n const startDiff = absoluteSpan.start - sourceSpan.start.offset;\n const endDiff = absoluteSpan.end - sourceSpan.end.offset;\n return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);\n}\n\n// Some of the code comes from WebComponents.JS\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/HTMLImports/path.js\nfunction isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/')\n return false;\n const schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\nconst URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n\nconst NG_CONTENT_SELECT_ATTR$1 = 'select';\nconst LINK_ELEMENT = 'link';\nconst LINK_STYLE_REL_ATTR = 'rel';\nconst LINK_STYLE_HREF_ATTR = 'href';\nconst LINK_STYLE_REL_VALUE = 'stylesheet';\nconst STYLE_ELEMENT = 'style';\nconst SCRIPT_ELEMENT = 'script';\nconst NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nconst NG_PROJECT_AS = 'ngProjectAs';\nfunction preparseElement(ast) {\n let selectAttr = null;\n let hrefAttr = null;\n let relAttr = null;\n let nonBindable = false;\n let projectAs = '';\n ast.attrs.forEach(attr => {\n const lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR$1) {\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 const nodeName = ast.name.toLowerCase();\n let 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}\nvar PreparsedElementType;\n(function (PreparsedElementType) {\n PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n})(PreparsedElementType || (PreparsedElementType = {}));\nclass PreparsedElement {\n constructor(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}\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\n}\n\n/** Pattern for a timing value in a trigger. */\nconst TIME_PATTERN = /^\\d+(ms|s)?$/;\n/** Pattern for a separator between keywords in a trigger expression. */\nconst SEPARATOR_PATTERN = /^\\s$/;\n/** Pairs of characters that form syntax that is comma-delimited. */\nconst COMMA_DELIMITED_SYNTAX = new Map([\n [$LBRACE, $RBRACE],\n [$LBRACKET, $RBRACKET],\n [$LPAREN, $RPAREN], // Function calls\n]);\n/** Possible types of `on` triggers. */\nvar OnTriggerType;\n(function (OnTriggerType) {\n OnTriggerType[\"IDLE\"] = \"idle\";\n OnTriggerType[\"TIMER\"] = \"timer\";\n OnTriggerType[\"INTERACTION\"] = \"interaction\";\n OnTriggerType[\"IMMEDIATE\"] = \"immediate\";\n OnTriggerType[\"HOVER\"] = \"hover\";\n OnTriggerType[\"VIEWPORT\"] = \"viewport\";\n})(OnTriggerType || (OnTriggerType = {}));\n/** Parses a `when` deferred trigger. */\nfunction parseWhenTrigger({ expression, sourceSpan }, bindingParser, errors) {\n const whenIndex = expression.indexOf('when');\n // This is here just to be safe, we shouldn't enter this function\n // in the first place if a block doesn't have the \"when\" keyword.\n if (whenIndex === -1) {\n errors.push(new ParseError(sourceSpan, `Could not find \"when\" keyword in expression`));\n return null;\n }\n const start = getTriggerParametersStart(expression, whenIndex + 1);\n const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);\n return new BoundDeferredTrigger(parsed, sourceSpan);\n}\n/** Parses an `on` trigger */\nfunction parseOnTrigger({ expression, sourceSpan }, errors) {\n const onIndex = expression.indexOf('on');\n // This is here just to be safe, we shouldn't enter this function\n // in the first place if a block doesn't have the \"on\" keyword.\n if (onIndex === -1) {\n errors.push(new ParseError(sourceSpan, `Could not find \"on\" keyword in expression`));\n return [];\n }\n const start = getTriggerParametersStart(expression, onIndex + 1);\n return new OnTriggerParser(expression, start, sourceSpan, errors).parse();\n}\nclass OnTriggerParser {\n constructor(expression, start, span, errors) {\n this.expression = expression;\n this.start = start;\n this.span = span;\n this.errors = errors;\n this.index = 0;\n this.triggers = [];\n this.tokens = new Lexer().tokenize(expression.slice(start));\n }\n parse() {\n while (this.tokens.length > 0 && this.index < this.tokens.length) {\n const token = this.token();\n if (!token.isIdentifier()) {\n this.unexpectedToken(token);\n break;\n }\n // An identifier immediately followed by a comma or the end of\n // the expression cannot have parameters so we can exit early.\n if (this.isFollowedByOrLast($COMMA)) {\n this.consumeTrigger(token, []);\n this.advance();\n }\n else if (this.isFollowedByOrLast($LPAREN)) {\n this.advance(); // Advance to the opening paren.\n const prevErrors = this.errors.length;\n const parameters = this.consumeParameters();\n if (this.errors.length !== prevErrors) {\n break;\n }\n this.consumeTrigger(token, parameters);\n this.advance(); // Advance past the closing paren.\n }\n else if (this.index < this.tokens.length - 1) {\n this.unexpectedToken(this.tokens[this.index + 1]);\n }\n this.advance();\n }\n return this.triggers;\n }\n advance() {\n this.index++;\n }\n isFollowedByOrLast(char) {\n if (this.index === this.tokens.length - 1) {\n return true;\n }\n return this.tokens[this.index + 1].isCharacter(char);\n }\n token() {\n return this.tokens[Math.min(this.index, this.tokens.length - 1)];\n }\n consumeTrigger(identifier, parameters) {\n const startSpan = this.span.start.moveBy(this.start + identifier.index - this.tokens[0].index);\n const endSpan = startSpan.moveBy(this.token().end - identifier.index);\n const sourceSpan = new ParseSourceSpan(startSpan, endSpan);\n try {\n switch (identifier.toString()) {\n case OnTriggerType.IDLE:\n this.triggers.push(createIdleTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.TIMER:\n this.triggers.push(createTimerTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.INTERACTION:\n this.triggers.push(createInteractionTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.IMMEDIATE:\n this.triggers.push(createImmediateTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.HOVER:\n this.triggers.push(createHoverTrigger(parameters, sourceSpan));\n break;\n case OnTriggerType.VIEWPORT:\n this.triggers.push(createViewportTrigger(parameters, sourceSpan));\n break;\n default:\n throw new Error(`Unrecognized trigger type \"${identifier}\"`);\n }\n }\n catch (e) {\n this.error(identifier, e.message);\n }\n }\n consumeParameters() {\n const parameters = [];\n if (!this.token().isCharacter($LPAREN)) {\n this.unexpectedToken(this.token());\n return parameters;\n }\n this.advance();\n const commaDelimStack = [];\n let current = '';\n while (this.index < this.tokens.length) {\n const token = this.token();\n // Stop parsing if we've hit the end character and we're outside of a comma-delimited syntax.\n // Note that we don't need to account for strings here since the lexer already parsed them\n // into string tokens.\n if (token.isCharacter($RPAREN) && commaDelimStack.length === 0) {\n if (current.length) {\n parameters.push(current);\n }\n break;\n }\n // In the `on` microsyntax \"top-level\" commas (e.g. ones outside of an parameters) separate\n // the different triggers (e.g. `on idle,timer(500)`). This is problematic, because the\n // function-like syntax also implies that multiple parameters can be passed into the\n // individual trigger (e.g. `on foo(a, b)`). To avoid tripping up the parser with commas that\n // are part of other sorts of syntax (object literals, arrays), we treat anything inside\n // a comma-delimited syntax block as plain text.\n if (token.type === TokenType.Character && COMMA_DELIMITED_SYNTAX.has(token.numValue)) {\n commaDelimStack.push(COMMA_DELIMITED_SYNTAX.get(token.numValue));\n }\n if (commaDelimStack.length > 0 &&\n token.isCharacter(commaDelimStack[commaDelimStack.length - 1])) {\n commaDelimStack.pop();\n }\n // If we hit a comma outside of a comma-delimited syntax, it means\n // that we're at the top level and we're starting a new parameter.\n if (commaDelimStack.length === 0 && token.isCharacter($COMMA) && current.length > 0) {\n parameters.push(current);\n current = '';\n this.advance();\n continue;\n }\n // Otherwise treat the token as a plain text character in the current parameter.\n current += this.tokenText();\n this.advance();\n }\n if (!this.token().isCharacter($RPAREN) || commaDelimStack.length > 0) {\n this.error(this.token(), 'Unexpected end of expression');\n }\n if (this.index < this.tokens.length - 1 &&\n !this.tokens[this.index + 1].isCharacter($COMMA)) {\n this.unexpectedToken(this.tokens[this.index + 1]);\n }\n return parameters;\n }\n tokenText() {\n // Tokens have a toString already which we could use, but for string tokens it omits the quotes.\n // Eventually we could expose this information on the token directly.\n return this.expression.slice(this.start + this.token().index, this.start + this.token().end);\n }\n error(token, message) {\n const newStart = this.span.start.moveBy(this.start + token.index);\n const newEnd = newStart.moveBy(token.end - token.index);\n this.errors.push(new ParseError(new ParseSourceSpan(newStart, newEnd), message));\n }\n unexpectedToken(token) {\n this.error(token, `Unexpected token \"${token}\"`);\n }\n}\nfunction createIdleTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IDLE}\" trigger cannot have parameters`);\n }\n return new IdleDeferredTrigger(sourceSpan);\n}\nfunction createTimerTrigger(parameters, sourceSpan) {\n if (parameters.length !== 1) {\n throw new Error(`\"${OnTriggerType.TIMER}\" trigger must have exactly one parameter`);\n }\n const delay = parseDeferredTime(parameters[0]);\n if (delay === null) {\n throw new Error(`Could not parse time value of trigger \"${OnTriggerType.TIMER}\"`);\n }\n return new TimerDeferredTrigger(delay, sourceSpan);\n}\nfunction createInteractionTrigger(parameters, sourceSpan) {\n if (parameters.length > 1) {\n throw new Error(`\"${OnTriggerType.INTERACTION}\" trigger can only have zero or one parameters`);\n }\n return new InteractionDeferredTrigger(parameters[0] ?? null, sourceSpan);\n}\nfunction createImmediateTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IMMEDIATE}\" trigger cannot have parameters`);\n }\n return new ImmediateDeferredTrigger(sourceSpan);\n}\nfunction createHoverTrigger(parameters, sourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.HOVER}\" trigger cannot have parameters`);\n }\n return new HoverDeferredTrigger(sourceSpan);\n}\nfunction createViewportTrigger(parameters, sourceSpan) {\n // TODO: the RFC has some more potential parameters for `viewport`.\n if (parameters.length > 1) {\n throw new Error(`\"${OnTriggerType.VIEWPORT}\" trigger can only have zero or one parameters`);\n }\n return new ViewportDeferredTrigger(parameters[0] ?? null, sourceSpan);\n}\n/** Gets the index within an expression at which the trigger parameters start. */\nfunction getTriggerParametersStart(value, startPosition = 0) {\n let hasFoundSeparator = false;\n for (let i = startPosition; i < value.length; i++) {\n if (SEPARATOR_PATTERN.test(value[i])) {\n hasFoundSeparator = true;\n }\n else if (hasFoundSeparator) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Parses a time expression from a deferred trigger to\n * milliseconds. Returns null if it cannot be parsed.\n */\nfunction parseDeferredTime(value) {\n const match = value.match(TIME_PATTERN);\n if (!match) {\n return null;\n }\n const [time, units] = match;\n return parseInt(time) * (units === 's' ? 1000 : 1);\n}\n\n/** Pattern to identify a `prefetch when` trigger. */\nconst PREFETCH_WHEN_PATTERN = /^prefetch\\s+when\\s/;\n/** Pattern to identify a `prefetch on` trigger. */\nconst PREFETCH_ON_PATTERN = /^prefetch\\s+on\\s/;\n/** Pattern to identify a `minimum` parameter in a block. */\nconst MINIMUM_PARAMETER_PATTERN = /^minimum\\s/;\n/** Pattern to identify a `after` parameter in a block. */\nconst AFTER_PARAMETER_PATTERN = /^after\\s/;\n/** Pattern to identify a `when` parameter in a block. */\nconst WHEN_PARAMETER_PATTERN = /^when\\s/;\n/** Pattern to identify a `on` parameter in a block. */\nconst ON_PARAMETER_PATTERN = /^on\\s/;\n/** Possible types of secondary deferred blocks. */\nvar SecondaryDeferredBlockType;\n(function (SecondaryDeferredBlockType) {\n SecondaryDeferredBlockType[\"PLACEHOLDER\"] = \"placeholder\";\n SecondaryDeferredBlockType[\"LOADING\"] = \"loading\";\n SecondaryDeferredBlockType[\"ERROR\"] = \"error\";\n})(SecondaryDeferredBlockType || (SecondaryDeferredBlockType = {}));\n/** Creates a deferred block from an HTML AST node. */\nfunction createDeferredBlock(ast, visitor, bindingParser) {\n const errors = [];\n const [primaryBlock, ...secondaryBlocks] = ast.blocks;\n const { triggers, prefetchTriggers } = parsePrimaryTriggers(primaryBlock.parameters, bindingParser, errors);\n const { placeholder, loading, error } = parseSecondaryBlocks(secondaryBlocks, errors, visitor);\n return {\n node: new DeferredBlock(visitAll(visitor, primaryBlock.children), triggers, prefetchTriggers, placeholder, loading, error, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan),\n errors,\n };\n}\nfunction parseSecondaryBlocks(blocks, errors, visitor) {\n let placeholder = null;\n let loading = null;\n let error = null;\n for (const block of blocks) {\n try {\n switch (block.name) {\n case SecondaryDeferredBlockType.PLACEHOLDER:\n if (placeholder !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.PLACEHOLDER}\" block`));\n }\n else {\n placeholder = parsePlaceholderBlock(block, visitor);\n }\n break;\n case SecondaryDeferredBlockType.LOADING:\n if (loading !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.LOADING}\" block`));\n }\n else {\n loading = parseLoadingBlock(block, visitor);\n }\n break;\n case SecondaryDeferredBlockType.ERROR:\n if (error !== null) {\n errors.push(new ParseError(block.startSourceSpan, `\"defer\" block can only have one \"${SecondaryDeferredBlockType.ERROR}\" block`));\n }\n else {\n error = parseErrorBlock(block, visitor);\n }\n break;\n default:\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized block \"${block.name}\"`));\n break;\n }\n }\n catch (e) {\n errors.push(new ParseError(block.startSourceSpan, e.message));\n }\n }\n return { placeholder, loading, error };\n}\nfunction parsePlaceholderBlock(ast, visitor) {\n let minimumTime = null;\n for (const param of ast.parameters) {\n if (MINIMUM_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"minimum\"`);\n }\n minimumTime = parsedTime;\n }\n else {\n throw new Error(`Unrecognized parameter in \"${SecondaryDeferredBlockType.PLACEHOLDER}\" block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockPlaceholder(visitAll(visitor, ast.children), minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parseLoadingBlock(ast, visitor) {\n let afterTime = null;\n let minimumTime = null;\n for (const param of ast.parameters) {\n if (AFTER_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"after\"`);\n }\n afterTime = parsedTime;\n }\n else if (MINIMUM_PARAMETER_PATTERN.test(param.expression)) {\n const parsedTime = parseDeferredTime(param.expression.slice(getTriggerParametersStart(param.expression)));\n if (parsedTime === null) {\n throw new Error(`Could not parse time value of parameter \"minimum\"`);\n }\n minimumTime = parsedTime;\n }\n else {\n throw new Error(`Unrecognized parameter in \"${SecondaryDeferredBlockType.LOADING}\" block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockLoading(visitAll(visitor, ast.children), afterTime, minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parseErrorBlock(ast, visitor) {\n if (ast.parameters.length > 0) {\n throw new Error(`\"${SecondaryDeferredBlockType.ERROR}\" block cannot have parameters`);\n }\n return new DeferredBlockError(visitAll(visitor, ast.children), ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n}\nfunction parsePrimaryTriggers(params, bindingParser, errors) {\n const triggers = [];\n const prefetchTriggers = [];\n for (const param of params) {\n // The lexer ignores the leading spaces so we can assume\n // that the expression starts with a keyword.\n if (WHEN_PARAMETER_PATTERN.test(param.expression)) {\n const result = parseWhenTrigger(param, bindingParser, errors);\n result !== null && triggers.push(result);\n }\n else if (ON_PARAMETER_PATTERN.test(param.expression)) {\n triggers.push(...parseOnTrigger(param, errors));\n }\n else if (PREFETCH_WHEN_PATTERN.test(param.expression)) {\n const result = parseWhenTrigger(param, bindingParser, errors);\n result !== null && prefetchTriggers.push(result);\n }\n else if (PREFETCH_ON_PATTERN.test(param.expression)) {\n prefetchTriggers.push(...parseOnTrigger(param, errors));\n }\n else {\n errors.push(new ParseError(param.sourceSpan, 'Unrecognized trigger'));\n }\n }\n return { triggers, prefetchTriggers };\n}\n\nconst BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;\n// Group 1 = \"bind-\"\nconst KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nconst KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nconst KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nconst KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nconst KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nconst KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nconst IDENT_KW_IDX = 7;\nconst BINDING_DELIMS = {\n BANANA_BOX: { start: '[(', end: ')]' },\n PROPERTY: { start: '[', end: ']' },\n EVENT: { start: '(', end: ')' },\n};\nconst TEMPLATE_ATTR_PREFIX = '*';\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser, options) {\n const transformer = new HtmlAstToIvyAst(bindingParser, options);\n const ivyNodes = visitAll(transformer, htmlNodes);\n // Errors might originate in either the binding parser or the html to ivy transformer\n const allErrors = bindingParser.errors.concat(transformer.errors);\n const result = {\n nodes: ivyNodes,\n errors: allErrors,\n styleUrls: transformer.styleUrls,\n styles: transformer.styles,\n ngContentSelectors: transformer.ngContentSelectors\n };\n if (options.collectCommentNodes) {\n result.commentNodes = transformer.commentNodes;\n }\n return result;\n}\nclass HtmlAstToIvyAst {\n constructor(bindingParser, options) {\n this.bindingParser = bindingParser;\n this.options = options;\n this.errors = [];\n this.styles = [];\n this.styleUrls = [];\n this.ngContentSelectors = [];\n // This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true\n this.commentNodes = [];\n this.inI18nBlock = false;\n }\n // HTML visitor\n visitElement(element) {\n const isI18nRootElement = isI18nRootNode(element.i18n);\n if (isI18nRootElement) {\n if (this.inI18nBlock) {\n this.reportError('Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.', element.sourceSpan);\n }\n this.inI18nBlock = true;\n }\n const preparsedElement = preparseElement(element);\n if (preparsedElement.type === PreparsedElementType.SCRIPT) {\n return null;\n }\n else if (preparsedElement.type === PreparsedElementType.STYLE) {\n const contents = textContents(element);\n if (contents !== null) {\n this.styles.push(contents);\n }\n return null;\n }\n else if (preparsedElement.type === PreparsedElementType.STYLESHEET &&\n isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n this.styleUrls.push(preparsedElement.hrefAttr);\n return null;\n }\n // Whether the element is a `<ng-template>`\n const isTemplateElement = isNgTemplate(element.name);\n const parsedProperties = [];\n const boundEvents = [];\n const variables = [];\n const references = [];\n const attributes = [];\n const i18nAttrsMeta = {};\n const templateParsedProperties = [];\n const templateVariables = [];\n // Whether the element has any *-attribute\n let elementHasInlineTemplate = false;\n for (const attribute of element.attrs) {\n let hasBinding = false;\n const normalizedName = normalizeAttributeName(attribute.name);\n // `*attr` defines template bindings\n let isTemplateBinding = false;\n if (attribute.i18n) {\n i18nAttrsMeta[attribute.name] = attribute.i18n;\n }\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n // *-attributes\n if (elementHasInlineTemplate) {\n this.reportError(`Can't have multiple template bindings on one element. Use only one attribute prefixed with *`, attribute.sourceSpan);\n }\n isTemplateBinding = true;\n elementHasInlineTemplate = true;\n const templateValue = attribute.value;\n const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n const parsedVariables = [];\n const absoluteValueOffset = attribute.valueSpan ?\n attribute.valueSpan.start.offset :\n // If there is no value span the attribute does not have a value, like `attr` in\n //`<div attr></div>`. In this case, point to one character beyond the last character of\n // the attribute name.\n attribute.sourceSpan.start.offset + attribute.name.length;\n this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true /* isIvyAst */);\n templateVariables.push(...parsedVariables.map(v => new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan)));\n }\n else {\n // Check for variables, events, property bindings, interpolation\n hasBinding = this.parseAttribute(isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);\n }\n if (!hasBinding && !isTemplateBinding) {\n // don't include the bindings as attributes as well in the AST\n attributes.push(this.visitAttribute(attribute));\n }\n }\n let children;\n if (preparsedElement.nonBindable) {\n // The `NonBindableVisitor` may need to return an array of nodes for block groups so we need\n // to flatten the array here. Avoid doing this for the `HtmlAstToIvyAst` since `flat` creates\n // a new array.\n children = visitAll(NON_BINDABLE_VISITOR, element.children).flat(Infinity);\n }\n else {\n children = visitAll(this, element.children);\n }\n let parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n // `<ng-content>`\n if (element.children &&\n !element.children.every((node) => isEmptyTextNode(node) || isCommentNode(node))) {\n this.reportError(`<ng-content> element cannot have content.`, element.sourceSpan);\n }\n const selector = preparsedElement.selectAttr;\n const attrs = element.attrs.map(attr => this.visitAttribute(attr));\n parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);\n this.ngContentSelectors.push(selector);\n }\n else if (isTemplateElement) {\n // `<ng-template>`\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Template(element.name, attributes, attrs.bound, boundEvents, [ /* no template attributes */], children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n else {\n const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n if (elementHasInlineTemplate) {\n // If this node is an inline-template (e.g. has *ngFor) then we need to create a template\n // node that contains this node.\n // Moreover, if the node is an element, then we need to hoist its attributes to the template\n // node for matching against content projection selectors.\n const attrs = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);\n const templateAttrs = [];\n attrs.literal.forEach(attr => templateAttrs.push(attr));\n attrs.bound.forEach(attr => templateAttrs.push(attr));\n const hoistedAttrs = parsedElement instanceof Element$1 ?\n {\n attributes: parsedElement.attributes,\n inputs: parsedElement.inputs,\n outputs: parsedElement.outputs,\n } :\n { attributes: [], inputs: [], outputs: [] };\n // For <ng-template>s with structural directives on them, avoid passing i18n information to\n // the wrapping template to prevent unnecessary i18n instructions from being generated. The\n // necessary i18n meta information will be extracted from child elements.\n const i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n;\n const name = parsedElement instanceof Template ? null : parsedElement.name;\n parsedElement = new Template(name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [ /* no references */], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);\n }\n if (isI18nRootElement) {\n this.inI18nBlock = false;\n }\n return parsedElement;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.tokens, text.i18n);\n }\n visitExpansion(expansion) {\n if (!expansion.i18n) {\n // do not generate Icu in case it was created\n // outside of i18n block in a template\n return null;\n }\n if (!isI18nRootNode(expansion.i18n)) {\n throw new Error(`Invalid type \"${expansion.i18n.constructor}\" for \"i18n\" property of ${expansion.sourceSpan.toString()}. Expected a \"Message\"`);\n }\n const message = expansion.i18n;\n const vars = {};\n const placeholders = {};\n // extract VARs from ICUs - we process them separately while\n // assembling resulting message via goog.getMsg function, since\n // we need to pass them to top-level goog.getMsg call\n Object.keys(message.placeholders).forEach(key => {\n const value = message.placeholders[key];\n if (key.startsWith(I18N_ICU_VAR_PREFIX)) {\n // Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g.\n // `{count, select , ...}`), these spaces are also included into the key names in ICU vars\n // (e.g. \"VAR_SELECT \"). These trailing spaces are not desirable, since they will later be\n // converted into `_` symbols while normalizing placeholder names, which might lead to\n // mismatches at runtime (i.e. placeholder will not be replaced with the correct value).\n const formattedKey = key.trim();\n const ast = this.bindingParser.parseInterpolationExpression(value.text, value.sourceSpan);\n vars[formattedKey] = new BoundText(ast, value.sourceSpan);\n }\n else {\n placeholders[key] = this._visitTextWithInterpolation(value.text, value.sourceSpan, null);\n }\n });\n return new Icu$1(vars, placeholders, expansion.sourceSpan, message);\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n visitComment(comment) {\n if (this.options.collectCommentNodes) {\n this.commentNodes.push(new Comment$1(comment.value || '', comment.sourceSpan));\n }\n return null;\n }\n visitBlockGroup(group, context) {\n const primaryBlock = group.blocks[0];\n // The HTML parser ensures that we don't hit this case, but we have an assertion just in case.\n if (!primaryBlock) {\n this.reportError('Block group must have at least one block.', group.sourceSpan);\n return null;\n }\n if (primaryBlock.name === 'defer' && this.options.enabledBlockTypes.has(primaryBlock.name)) {\n const { node, errors } = createDeferredBlock(group, this, this.bindingParser);\n this.errors.push(...errors);\n return node;\n }\n this.reportError(`Unrecognized block \"${primaryBlock.name}\".`, primaryBlock.sourceSpan);\n return null;\n }\n visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n // convert view engine `ParsedProperty` to a format suitable for IVY\n extractAttributes(elementName, properties, i18nPropsMeta) {\n const bound = [];\n const literal = [];\n properties.forEach(prop => {\n const i18n = i18nPropsMeta[prop.name];\n if (prop.isLiteral) {\n literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n));\n }\n else {\n // Note that validation is skipped and property mapping is disabled\n // due to the fact that we need to make sure a given prop is not an\n // input of a directive and directive matching happens at runtime.\n const bep = this.bindingParser.createBoundElementProperty(elementName, prop, /* skipValidation */ true, /* mapPropertyName */ false);\n bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));\n }\n });\n return { bound, literal };\n }\n parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {\n const name = normalizeAttributeName(attribute.name);\n const value = attribute.value;\n const srcSpan = attribute.sourceSpan;\n const absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;\n function createKeySpan(srcSpan, prefix, identifier) {\n // We need to adjust the start location for the keySpan to account for the removed 'data-'\n // prefix from `normalizeAttributeName`.\n const normalizationAdjustment = attribute.name.length - name.length;\n const keySpanStart = srcSpan.start.moveBy(prefix.length + normalizationAdjustment);\n const keySpanEnd = keySpanStart.moveBy(identifier.length);\n return new ParseSourceSpan(keySpanStart, keySpanEnd, keySpanStart, identifier);\n }\n const bindParts = name.match(BIND_NAME_REGEXP);\n if (bindParts) {\n if (bindParts[KW_BIND_IDX] != null) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BIND_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n else if (bindParts[KW_LET_IDX]) {\n if (isTemplateElement) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_LET_IDX], identifier);\n this.parseVariable(identifier, value, srcSpan, keySpan, attribute.valueSpan, variables);\n }\n else {\n this.reportError(`\"let-\" is only supported on ng-template elements.`, srcSpan);\n }\n }\n else if (bindParts[KW_REF_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_REF_IDX], identifier);\n this.parseReference(identifier, value, srcSpan, keySpan, attribute.valueSpan, references);\n }\n else if (bindParts[KW_ON_IDX]) {\n const events = [];\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_ON_IDX], identifier);\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n }\n else if (bindParts[KW_BINDON_IDX]) {\n const identifier = bindParts[IDENT_KW_IDX];\n const keySpan = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n }\n else if (bindParts[KW_AT_IDX]) {\n const keySpan = createKeySpan(srcSpan, '', name);\n this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n return true;\n }\n // We didn't see a kw-prefixed property binding, but we have not yet checked\n // for the []/()/[()] syntax.\n let delims = null;\n if (name.startsWith(BINDING_DELIMS.BANANA_BOX.start)) {\n delims = BINDING_DELIMS.BANANA_BOX;\n }\n else if (name.startsWith(BINDING_DELIMS.PROPERTY.start)) {\n delims = BINDING_DELIMS.PROPERTY;\n }\n else if (name.startsWith(BINDING_DELIMS.EVENT.start)) {\n delims = BINDING_DELIMS.EVENT;\n }\n if (delims !== null &&\n // NOTE: older versions of the parser would match a start/end delimited\n // binding iff the property name was terminated by the ending delimiter\n // and the identifier in the binding was non-empty.\n // TODO(ayazhafiz): update this to handle malformed bindings.\n name.endsWith(delims.end) && name.length > delims.start.length + delims.end.length) {\n const identifier = name.substring(delims.start.length, name.length - delims.end.length);\n const keySpan = createKeySpan(srcSpan, delims.start, identifier);\n if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n this.parseAssignmentEvent(identifier, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, keySpan);\n }\n else if (delims.start === BINDING_DELIMS.PROPERTY.start) {\n this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n else {\n const events = [];\n this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);\n addEvents(events, boundEvents);\n }\n return true;\n }\n // No explicit binding found.\n const keySpan = createKeySpan(srcSpan, '' /* prefix */, name);\n const hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan, attribute.valueTokens ?? null);\n return hasBinding;\n }\n _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n) {\n const valueNoNgsp = replaceNgsp(value);\n const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan, interpolatedTokens);\n return expr ? new BoundText(expr, sourceSpan, i18n) : new Text$3(valueNoNgsp, sourceSpan);\n }\n parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in variable names`, sourceSpan);\n }\n else if (identifier.length === 0) {\n this.reportError(`Variable does not have a name`, sourceSpan);\n }\n variables.push(new Variable(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseReference(identifier, value, sourceSpan, keySpan, valueSpan, references) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(`\"-\" is not allowed in reference names`, sourceSpan);\n }\n else if (identifier.length === 0) {\n this.reportError(`Reference does not have a name`, sourceSpan);\n }\n else if (references.some(reference => reference.name === identifier)) {\n this.reportError(`Reference \"#${identifier}\" is defined more than once`, sourceSpan);\n }\n references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));\n }\n parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {\n const events = [];\n this.bindingParser.parseEvent(`${name}Change`, `${expression} =$event`, /* isAssignmentEvent */ true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);\n addEvents(events, boundEvents);\n }\n reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {\n this.errors.push(new ParseError(sourceSpan, message, level));\n }\n}\nclass NonBindableVisitor {\n visitElement(ast) {\n const preparsedElement = preparseElement(ast);\n if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n preparsedElement.type === PreparsedElementType.STYLE ||\n preparsedElement.type === PreparsedElementType.STYLESHEET) {\n // Skipping <script> for security reasons\n // Skipping <style> and stylesheets as we already processed them\n // in the StyleCompiler\n return null;\n }\n const children = visitAll(this, ast.children, null);\n return new Element$1(ast.name, visitAll(this, ast.attrs), \n /* inputs */ [], /* outputs */ [], children, /* references */ [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n }\n visitComment(comment) {\n return null;\n }\n visitAttribute(attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n }\n visitText(text) {\n return new Text$3(text.value, text.sourceSpan);\n }\n visitExpansion(expansion) {\n return null;\n }\n visitExpansionCase(expansionCase) {\n return null;\n }\n visitBlockGroup(group, context) {\n const nodes = visitAll(this, group.blocks);\n // We only need to do the end tag since the start will be added as a part of the primary block.\n if (group.endSourceSpan !== null) {\n nodes.push(new Text$3(group.endSourceSpan.toString(), group.endSourceSpan));\n }\n return nodes;\n }\n visitBlock(block, context) {\n return [\n // In an ngNonBindable context we treat the opening/closing tags of block as plain text.\n // This is the as if the `tokenizeBlocks` option was disabled.\n new Text$3(block.startSourceSpan.toString(), block.startSourceSpan),\n ...visitAll(this, block.children)\n ];\n }\n visitBlockParameter(parameter, context) {\n return null;\n }\n}\nconst NON_BINDABLE_VISITOR = new NonBindableVisitor();\nfunction normalizeAttributeName(attrName) {\n return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\nfunction addEvents(events, boundEvents) {\n boundEvents.push(...events.map(e => BoundEvent.fromParsedEvent(e)));\n}\nfunction isEmptyTextNode(node) {\n return node instanceof Text && node.value.trim().length == 0;\n}\nfunction isCommentNode(node) {\n return node instanceof Comment;\n}\nfunction textContents(node) {\n if (node.children.length !== 1 || !(node.children[0] instanceof Text)) {\n return null;\n }\n else {\n return node.children[0].value;\n }\n}\n\nvar TagType;\n(function (TagType) {\n TagType[TagType[\"ELEMENT\"] = 0] = \"ELEMENT\";\n TagType[TagType[\"TEMPLATE\"] = 1] = \"TEMPLATE\";\n})(TagType || (TagType = {}));\n/**\n * Generates an object that is used as a shared state between parent and all child contexts.\n */\nfunction setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}\n/**\n * I18nContext is a helper class which keeps track of all i18n-related aspects\n * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.\n *\n * When we enter a nested template, the top-level context is being passed down\n * to the nested component, which uses this context to generate a child instance\n * of I18nContext class (to handle nested template) and at the end, reconciles it back\n * with the parent context.\n *\n * @param index Instruction index of i18nStart, which initiates this context\n * @param ref Reference to a translation const that represents the content if thus context\n * @param level Nesting level defined for child contexts\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n */\nclass I18nContext {\n constructor(index, ref, level = 0, templateIndex = null, meta, registry) {\n this.index = index;\n this.ref = ref;\n this.level = level;\n this.templateIndex = templateIndex;\n this.meta = meta;\n this.registry = registry;\n this.bindings = new Set();\n this.placeholders = new Map();\n this.isEmitted = false;\n this._unresolvedCtxCount = 0;\n this._registry = registry || setupRegistry();\n this.id = this._registry.getUniqueId();\n }\n appendTag(type, node, index, closed) {\n if (node.isVoid && closed) {\n return; // ignore \"close\" for void tags\n }\n const ph = node.isVoid || !closed ? node.startName : node.closeName;\n const content = { type, index, ctx: this.id, isVoid: node.isVoid, closed };\n updatePlaceholderMap(this.placeholders, ph, content);\n }\n get icus() {\n return this._registry.icus;\n }\n get isRoot() {\n return this.level === 0;\n }\n get isResolved() {\n return this._unresolvedCtxCount === 0;\n }\n getSerializedPlaceholders() {\n const result = new Map();\n this.placeholders.forEach((values, key) => result.set(key, values.map(serializePlaceholderValue)));\n return result;\n }\n // public API to accumulate i18n-related content\n appendBinding(binding) {\n this.bindings.add(binding);\n }\n appendIcu(name, ref) {\n updatePlaceholderMap(this._registry.icus, name, ref);\n }\n appendBoundText(node) {\n const phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);\n phs.forEach((values, key) => updatePlaceholderMap(this.placeholders, key, ...values));\n }\n appendTemplate(node, index) {\n // add open and close tags at the same time,\n // since we process nested templates separately\n this.appendTag(TagType.TEMPLATE, node, index, false);\n this.appendTag(TagType.TEMPLATE, node, index, true);\n this._unresolvedCtxCount++;\n }\n appendElement(node, index, closed) {\n this.appendTag(TagType.ELEMENT, node, index, closed);\n }\n appendProjection(node, index) {\n // Add open and close tags at the same time, since `<ng-content>` has no content,\n // so when we come across `<ng-content>` we can register both open and close tags.\n // Note: runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and\n // regular element tag placeholders, so we generate element placeholders for both types.\n this.appendTag(TagType.ELEMENT, node, index, false);\n this.appendTag(TagType.ELEMENT, node, index, true);\n }\n /**\n * Generates an instance of a child context based on the root one,\n * when we enter a nested template within I18n section.\n *\n * @param index Instruction index of corresponding i18nStart, which initiates this context\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n *\n * @returns I18nContext instance\n */\n forkChildContext(index, templateIndex, meta) {\n return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);\n }\n /**\n * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).\n *\n * @param context Child I18nContext instance to be reconciled with parent context.\n */\n reconcileChildContext(context) {\n // set the right context id for open and close\n // template tags, so we can use it as sub-block ids\n ['start', 'close'].forEach((op) => {\n const key = context.meta[`${op}Name`];\n const phs = this.placeholders.get(key) || [];\n const tag = phs.find(findTemplateFn(this.id, context.templateIndex));\n if (tag) {\n tag.ctx = context.id;\n }\n });\n // reconcile placeholders\n const childPhs = context.placeholders;\n childPhs.forEach((values, key) => {\n const phs = this.placeholders.get(key);\n if (!phs) {\n this.placeholders.set(key, values);\n return;\n }\n // try to find matching template...\n const tmplIdx = phs.findIndex(findTemplateFn(context.id, context.templateIndex));\n if (tmplIdx >= 0) {\n // ... if found - replace it with nested template content\n const isCloseTag = key.startsWith('CLOSE');\n const isTemplateTag = key.endsWith('NG-TEMPLATE');\n if (isTemplateTag) {\n // current template's content is placed before or after\n // parent template tag, depending on the open/close attribute\n phs.splice(tmplIdx + (isCloseTag ? 0 : 1), 0, ...values);\n }\n else {\n const idx = isCloseTag ? values.length - 1 : 0;\n values[idx].tmpl = phs[tmplIdx];\n phs.splice(tmplIdx, 1, ...values);\n }\n }\n else {\n // ... otherwise just append content to placeholder value\n phs.push(...values);\n }\n this.placeholders.set(key, phs);\n });\n this._unresolvedCtxCount--;\n }\n}\n//\n// Helper methods\n//\nfunction wrap(symbol, index, contextId, closed) {\n const state = closed ? '/' : '';\n return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);\n}\nfunction wrapTag(symbol, { index, ctx, isVoid }, closed) {\n return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) :\n wrap(symbol, index, ctx, closed);\n}\nfunction findTemplateFn(ctx, templateIndex) {\n return (token) => typeof token === 'object' && token.type === TagType.TEMPLATE &&\n token.index === templateIndex && token.ctx === ctx;\n}\nfunction serializePlaceholderValue(value) {\n const element = (data, closed) => wrapTag('#', data, closed);\n const template = (data, closed) => wrapTag('*', data, closed);\n switch (value.type) {\n case TagType.ELEMENT:\n // close element tag\n if (value.closed) {\n return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');\n }\n // open element tag that also initiates a template\n if (value.tmpl) {\n return template(value.tmpl) + element(value) +\n (value.isVoid ? template(value.tmpl, true) : '');\n }\n return element(value);\n case TagType.TEMPLATE:\n return template(value, value.closed);\n default:\n return value;\n }\n}\n\nclass IcuSerializerVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n const result = `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n return result;\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ?\n this.formatPh(ph.startName) :\n `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n formatPh(value) {\n return `{${formatI18nPlaceholderName(value, /* useCamelCase */ false)}}`;\n }\n}\nconst serializer = new IcuSerializerVisitor();\nfunction serializeIcuNode(icu) {\n return icu.visit(serializer);\n}\n\nconst 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 */\nclass PlaceholderRegistry {\n constructor() {\n // Count the occurrence of the base name top generate a unique name\n this._placeHolderNameCounts = {};\n // Maps signature to placeholder names\n this._signatureToName = {};\n }\n getStartTagPlaceholderName(tag, attrs, isVoid) {\n const signature = this._hashTag(tag, attrs, isVoid);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(isVoid ? baseName : `START_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getCloseTagPlaceholderName(tag) {\n const signature = this._hashClosingTag(tag);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const upperTag = tag.toUpperCase();\n const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n const name = this._generateUniqueName(`CLOSE_${baseName}`);\n this._signatureToName[signature] = name;\n return name;\n }\n getPlaceholderName(name, content) {\n const upperName = name.toUpperCase();\n const signature = `PH: ${upperName}=${content}`;\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const uniqueName = this._generateUniqueName(upperName);\n this._signatureToName[signature] = uniqueName;\n return uniqueName;\n }\n getUniquePlaceholder(name) {\n return this._generateUniqueName(name.toUpperCase());\n }\n // Generate a hash for a tag - does not take attribute order into account\n _hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }\n _hashClosingTag(tag) {\n return this._hashTag(`/${tag}`, {}, false);\n }\n _generateUniqueName(base) {\n const seen = this._placeHolderNameCounts.hasOwnProperty(base);\n if (!seen) {\n this._placeHolderNameCounts[base] = 1;\n return base;\n }\n const id = this._placeHolderNameCounts[base];\n this._placeHolderNameCounts[base] = id + 1;\n return `${base}_${id}`;\n }\n}\n\nconst _expParser = new Parser$1(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig) {\n const visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n}\nfunction noopVisitNodeFn(_html, i18n) {\n return i18n;\n}\nclass _I18nVisitor {\n constructor(_expressionParser, _interpolationConfig) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n }\n toI18nMessage(nodes, meaning = '', description = '', customId = '', visitNodeFn) {\n const context = {\n isIcu: nodes.length == 1 && nodes[0] instanceof Expansion,\n icuDepth: 0,\n placeholderRegistry: new PlaceholderRegistry(),\n placeholderToContent: {},\n placeholderToMessage: {},\n visitNodeFn: visitNodeFn || noopVisitNodeFn,\n };\n const i18nodes = visitAll(this, nodes, context);\n return new Message(i18nodes, context.placeholderToContent, context.placeholderToMessage, meaning, description, customId);\n }\n visitElement(el, context) {\n const children = visitAll(this, el.children, context);\n const attrs = {};\n el.attrs.forEach(attr => {\n // Do not visit the attributes, translatable ones are top-level ASTs\n attrs[attr.name] = attr.value;\n });\n const isVoid = getHtmlTagDefinition(el.name).isVoid;\n const startPhName = context.placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n context.placeholderToContent[startPhName] = {\n text: el.startSourceSpan.toString(),\n sourceSpan: el.startSourceSpan,\n };\n let closePhName = '';\n if (!isVoid) {\n closePhName = context.placeholderRegistry.getCloseTagPlaceholderName(el.name);\n context.placeholderToContent[closePhName] = {\n text: `</${el.name}>`,\n sourceSpan: el.endSourceSpan ?? el.sourceSpan,\n };\n }\n const node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n return context.visitNodeFn(el, node);\n }\n visitAttribute(attribute, context) {\n const node = attribute.valueTokens === undefined || attribute.valueTokens.length === 1 ?\n new Text$2(attribute.value, attribute.valueSpan || attribute.sourceSpan) :\n this._visitTextWithInterpolation(attribute.valueTokens, attribute.valueSpan || attribute.sourceSpan, context, attribute.i18n);\n return context.visitNodeFn(attribute, node);\n }\n visitText(text, context) {\n const node = text.tokens.length === 1 ?\n new Text$2(text.value, text.sourceSpan) :\n this._visitTextWithInterpolation(text.tokens, text.sourceSpan, context, text.i18n);\n return context.visitNodeFn(text, node);\n }\n visitComment(comment, context) {\n return null;\n }\n visitExpansion(icu, context) {\n context.icuDepth++;\n const i18nIcuCases = {};\n const i18nIcu = new Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n icu.cases.forEach((caze) => {\n i18nIcuCases[caze.value] = new Container(caze.expression.map((node) => node.visit(this, context)), caze.expSourceSpan);\n });\n context.icuDepth--;\n if (context.isIcu || context.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 const expPh = context.placeholderRegistry.getUniquePlaceholder(`VAR_${icu.type}`);\n i18nIcu.expressionPlaceholder = expPh;\n context.placeholderToContent[expPh] = {\n text: icu.switchValue,\n sourceSpan: icu.switchValueSourceSpan,\n };\n return context.visitNodeFn(icu, i18nIcu);\n }\n // Else returns a placeholder\n // ICU placeholders should not be replaced with their original content but with the their\n // translations.\n // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n const phName = context.placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n context.placeholderToMessage[phName] = this.toI18nMessage([icu], '', '', '', undefined);\n const node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n return context.visitNodeFn(icu, node);\n }\n visitExpansionCase(_icuCase, _context) {\n throw new Error('Unreachable code');\n }\n visitBlockGroup(group, context) {\n const children = visitAll(this, group.blocks, context);\n const node = new Container(children, group.sourceSpan);\n return context.visitNodeFn(group, node);\n }\n visitBlock(block, context) {\n const children = visitAll(this, block.children, context);\n const node = new Container(children, block.sourceSpan);\n return context.visitNodeFn(block, node);\n }\n visitBlockParameter(_parameter, _context) { }\n /**\n * Convert, text and interpolated tokens up into text and placeholder pieces.\n *\n * @param tokens The text and interpolated tokens.\n * @param sourceSpan The span of the whole of the `text` string.\n * @param context The current context of the visitor, used to compute and store placeholders.\n * @param previousI18n Any i18n metadata associated with this `text` from a previous pass.\n */\n _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {\n // Return a sequence of `Text` and `Placeholder` nodes grouped in a `Container`.\n const nodes = [];\n // We will only create a container if there are actually interpolations,\n // so this flag tracks that.\n let hasInterpolation = false;\n for (const token of tokens) {\n switch (token.type) {\n case 8 /* TokenType.INTERPOLATION */:\n case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:\n hasInterpolation = true;\n const expression = token.parts[1];\n const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';\n const phName = context.placeholderRegistry.getPlaceholderName(baseName, expression);\n context.placeholderToContent[phName] = {\n text: token.parts.join(''),\n sourceSpan: token.sourceSpan\n };\n nodes.push(new Placeholder(expression, phName, token.sourceSpan));\n break;\n default:\n if (token.parts[0].length > 0) {\n // This token is text or an encoded entity.\n // If it is following on from a previous text node then merge it into that node\n // Otherwise, if it is following an interpolation, then add a new node.\n const previous = nodes[nodes.length - 1];\n if (previous instanceof Text$2) {\n previous.value += token.parts[0];\n previous.sourceSpan = new ParseSourceSpan(previous.sourceSpan.start, token.sourceSpan.end, previous.sourceSpan.fullStart, previous.sourceSpan.details);\n }\n else {\n nodes.push(new Text$2(token.parts[0], token.sourceSpan));\n }\n }\n break;\n }\n }\n if (hasInterpolation) {\n // Whitespace removal may have invalidated the interpolation source-spans.\n reusePreviousSourceSpans(nodes, previousI18n);\n return new Container(nodes, sourceSpan);\n }\n else {\n return nodes[0];\n }\n }\n}\n/**\n * Re-use the source-spans from `previousI18n` metadata for the `nodes`.\n *\n * Whitespace removal can invalidate the source-spans of interpolation nodes, so we\n * reuse the source-span stored from a previous pass before the whitespace was removed.\n *\n * @param nodes The `Text` and `Placeholder` nodes to be processed.\n * @param previousI18n Any i18n metadata for these `nodes` stored from a previous pass.\n */\nfunction reusePreviousSourceSpans(nodes, previousI18n) {\n if (previousI18n instanceof Message) {\n // The `previousI18n` is an i18n `Message`, so we are processing an `Attribute` with i18n\n // metadata. The `Message` should consist only of a single `Container` that contains the\n // parts (`Text` and `Placeholder`) to process.\n assertSingleContainerMessage(previousI18n);\n previousI18n = previousI18n.nodes[0];\n }\n if (previousI18n instanceof Container) {\n // The `previousI18n` is a `Container`, which means that this is a second i18n extraction pass\n // after whitespace has been removed from the AST nodes.\n assertEquivalentNodes(previousI18n.children, nodes);\n // Reuse the source-spans from the first pass.\n for (let i = 0; i < nodes.length; i++) {\n nodes[i].sourceSpan = previousI18n.children[i].sourceSpan;\n }\n }\n}\n/**\n * Asserts that the `message` contains exactly one `Container` node.\n */\nfunction assertSingleContainerMessage(message) {\n const nodes = message.nodes;\n if (nodes.length !== 1 || !(nodes[0] instanceof Container)) {\n throw new Error('Unexpected previous i18n message - expected it to consist of only a single `Container` node.');\n }\n}\n/**\n * Asserts that the `previousNodes` and `node` collections have the same number of elements and\n * corresponding elements have the same node type.\n */\nfunction assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n if (previousNodes.some((node, i) => nodes[i].constructor !== node.constructor)) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}\nconst _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\nfunction extractPlaceholderName(input) {\n return input.split(_CUSTOM_PH_EXP)[2];\n}\n\n/**\n * An i18n error.\n */\nclass I18nError extends ParseError {\n constructor(span, msg) {\n super(span, msg);\n }\n}\n\nconst setI18nRefs = (htmlNode, i18nNode) => {\n if (htmlNode instanceof NodeWithI18n) {\n if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {\n // This html node represents an ICU but this is a second processing pass, and the legacy id\n // was computed in the previous pass and stored in the `i18n` property as a message.\n // We are about to wipe out that property so capture the previous message to be reused when\n // generating the message for this ICU later. See `_generateI18nMessage()`.\n i18nNode.previousMessage = htmlNode.i18n;\n }\n htmlNode.i18n = i18nNode;\n }\n return i18nNode;\n};\n/**\n * This visitor walks over HTML parse tree and converts information stored in\n * i18n-related attributes (\"i18n\" and \"i18n-*\") into i18n meta object that is\n * stored with other element's and attribute's information.\n */\nclass I18nMetaVisitor {\n constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {\n this.interpolationConfig = interpolationConfig;\n this.keepI18nAttrs = keepI18nAttrs;\n this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;\n // whether visited nodes contain i18n information\n this.hasI18nMeta = false;\n this._errors = [];\n }\n _generateI18nMessage(nodes, meta = '', visitNodeFn) {\n const { meaning, description, customId } = this._parseMetadata(meta);\n const createI18nMessage = createI18nMessageFactory(this.interpolationConfig);\n const message = createI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n this._setMessageId(message, meta);\n this._setLegacyIds(message, meta);\n return message;\n }\n visitAllWithErrors(nodes) {\n const result = nodes.map(node => node.visit(this, null));\n return new ParseTreeResult(result, this._errors);\n }\n visitElement(element) {\n let message = undefined;\n if (hasI18nAttrs(element)) {\n this.hasI18nMeta = true;\n const attrs = [];\n const attrsMeta = {};\n for (const attr of element.attrs) {\n if (attr.name === I18N_ATTR) {\n // root 'i18n' node attribute\n const i18n = element.i18n || attr.value;\n message = this._generateI18nMessage(element.children, i18n, setI18nRefs);\n if (message.nodes.length === 0) {\n // Ignore the message if it is empty.\n message = undefined;\n }\n // Store the message on the element\n element.i18n = message;\n }\n else if (attr.name.startsWith(I18N_ATTR_PREFIX)) {\n // 'i18n-*' attributes\n const name = attr.name.slice(I18N_ATTR_PREFIX.length);\n if (isTrustedTypesSink(element.name, name)) {\n this._reportError(attr, `Translating attribute '${name}' is disallowed for security reasons.`);\n }\n else {\n attrsMeta[name] = attr.value;\n }\n }\n else {\n // non-i18n attributes\n attrs.push(attr);\n }\n }\n // set i18n meta for attributes\n if (Object.keys(attrsMeta).length) {\n for (const attr of attrs) {\n const meta = attrsMeta[attr.name];\n // do not create translation for empty attributes\n if (meta !== undefined && attr.value) {\n attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);\n }\n }\n }\n if (!this.keepI18nAttrs) {\n // update element's attributes,\n // keeping only non-i18n related ones\n element.attrs = attrs;\n }\n }\n visitAll(this, element.children, message);\n return element;\n }\n visitExpansion(expansion, currentMessage) {\n let message;\n const meta = expansion.i18n;\n this.hasI18nMeta = true;\n if (meta instanceof IcuPlaceholder) {\n // set ICU placeholder name (e.g. \"ICU_1\"),\n // generated while processing root element contents,\n // so we can reference it when we output translation\n const name = meta.name;\n message = this._generateI18nMessage([expansion], meta);\n const icu = icuFromI18nMessage(message);\n icu.name = name;\n if (currentMessage !== null) {\n // Also update the placeholderToMessage map with this new message\n currentMessage.placeholderToMessage[name] = message;\n }\n }\n else {\n // ICU is a top level message, try to use metadata from container element if provided via\n // `context` argument. Note: context may not be available for standalone ICUs (without\n // wrapping element), so fallback to ICU metadata in this case.\n message = this._generateI18nMessage([expansion], currentMessage || meta);\n }\n expansion.i18n = message;\n return expansion;\n }\n visitText(text) {\n return text;\n }\n visitAttribute(attribute) {\n return attribute;\n }\n visitComment(comment) {\n return comment;\n }\n visitExpansionCase(expansionCase) {\n return expansionCase;\n }\n visitBlockGroup(group, context) {\n visitAll(this, group.blocks, context);\n return group;\n }\n visitBlock(block, context) {\n visitAll(this, block.children, context);\n return block;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n /**\n * Parse the general form `meta` passed into extract the explicit metadata needed to create a\n * `Message`.\n *\n * There are three possibilities for the `meta` variable\n * 1) a string from an `i18n` template attribute: parse it to extract the metadata values.\n * 2) a `Message` from a previous processing pass: reuse the metadata values in the message.\n * 4) other: ignore this and just process the message metadata as normal\n *\n * @param meta the bucket that holds information about the message\n * @returns the parsed metadata.\n */\n _parseMetadata(meta) {\n return typeof meta === 'string' ? parseI18nMeta(meta) :\n meta instanceof Message ? meta :\n {};\n }\n /**\n * Generate (or restore) message id if not specified already.\n */\n _setMessageId(message, meta) {\n if (!message.id) {\n message.id = meta instanceof Message && meta.id || decimalDigest(message);\n }\n }\n /**\n * Update the `message` with a `legacyId` if necessary.\n *\n * @param message the message whose legacy id should be set\n * @param meta information about the message being processed\n */\n _setLegacyIds(message, meta) {\n if (this.enableI18nLegacyMessageIdFormat) {\n message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];\n }\n else if (typeof meta !== 'string') {\n // This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in\n // `packages/compiler/src/render3/view/template.ts`).\n // In that case we want to reuse the legacy message generated in the 1st pass (see\n // `setI18nRefs()`).\n const previousMessage = meta instanceof Message ? meta :\n meta instanceof IcuPlaceholder ? meta.previousMessage :\n undefined;\n message.legacyIds = previousMessage ? previousMessage.legacyIds : [];\n }\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\n/** I18n separators for metadata **/\nconst I18N_MEANING_SEPARATOR = '|';\nconst I18N_ID_SEPARATOR = '@@';\n/**\n * Parses i18n metas like:\n * - \"@@id\",\n * - \"description[@@id]\",\n * - \"meaning|description[@@id]\"\n * and returns an object with parsed output.\n *\n * @param meta String that represents i18n meta\n * @returns Object with id, meaning and description fields\n */\nfunction parseI18nMeta(meta = '') {\n let customId;\n let meaning;\n let description;\n meta = meta.trim();\n if (meta) {\n const idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n const descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);\n let meaningAndDesc;\n [meaningAndDesc, customId] =\n (idIndex > -1) ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];\n [meaning, description] = (descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc];\n }\n return { customId, meaning, description };\n}\n// Converts i18n meta information for a message (id, description, meaning)\n// to a JsDoc statement formatted as expected by the Closure compiler.\nfunction i18nMetaToJSDoc(meta) {\n const tags = [];\n if (meta.description) {\n tags.push({ tagName: \"desc\" /* o.JSDocTagName.Desc */, text: meta.description });\n }\n else {\n // Suppress the JSCompiler warning that a `@desc` was not given for this message.\n tags.push({ tagName: \"suppress\" /* o.JSDocTagName.Suppress */, text: '{msgDescriptions}' });\n }\n if (meta.meaning) {\n tags.push({ tagName: \"meaning\" /* o.JSDocTagName.Meaning */, text: meta.meaning });\n }\n return jsDocComment(tags);\n}\n\n/** Closure uses `goog.getMsg(message)` to lookup translations */\nconst GOOG_GET_MSG = 'goog.getMsg';\n/**\n * Generates a `goog.getMsg()` statement and reassignment. The template:\n *\n * ```html\n * <div i18n>Sent from {{ sender }} to <span class=\"receiver\">{{ receiver }}</span></div>\n * ```\n *\n * Generates:\n *\n * ```typescript\n * const MSG_FOO = goog.getMsg(\n * // Message template.\n * 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',\n * // Placeholder values, set to magic strings which get replaced by the Angular runtime.\n * {\n * 'interpolation': '\\uFFFD0\\uFFFD',\n * 'startTagSpan': '\\uFFFD1\\uFFFD',\n * 'interpolation_1': '\\uFFFD2\\uFFFD',\n * 'closeTagSpan': '\\uFFFD3\\uFFFD',\n * },\n * // Options bag.\n * {\n * // Maps each placeholder to the original Angular source code which generates it's value.\n * original_code: {\n * 'interpolation': '{{ sender }}',\n * 'startTagSpan': '<span class=\"receiver\">',\n * 'interpolation_1': '{{ receiver }}',\n * 'closeTagSpan': '</span>',\n * },\n * },\n * );\n * const I18N_0 = MSG_FOO;\n * ```\n */\nfunction createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {\n const messageString = serializeI18nMessageForGetMsg(message);\n const args = [literal(messageString)];\n if (Object.keys(placeholderValues).length) {\n // Message template parameters containing the magic strings replaced by the Angular runtime with\n // real data, e.g. `{'interpolation': '\\uFFFD0\\uFFFD'}`.\n args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));\n // Message options object, which contains original source code for placeholders (as they are\n // present in a template, e.g.\n // `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.\n args.push(mapLiteral({\n original_code: literalMap(Object.keys(placeholderValues)\n .map((param) => ({\n key: formatI18nPlaceholderName(param),\n quoted: true,\n value: message.placeholders[param] ?\n // Get source span for typical placeholder if it exists.\n literal(message.placeholders[param].sourceSpan.toString()) :\n // Otherwise must be an ICU expression, get it's source span.\n literal(message.placeholderToMessage[param]\n .nodes.map((node) => node.sourceSpan.toString())\n .join('')),\n }))),\n }));\n }\n // /**\n // * @desc description of message\n // * @meaning meaning of message\n // */\n // const MSG_... = goog.getMsg(..);\n // I18N_X = MSG_...;\n const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();\n googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));\n const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));\n return [googGetMsgStmt, i18nAssignmentStmt];\n}\n/**\n * This visitor walks over i18n tree and generates its string representation, including ICUs and\n * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.\n */\nclass GetMsgSerializerVisitor {\n formatPh(value) {\n return `{$${formatI18nPlaceholderName(value)}}`;\n }\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n return serializeIcuNode(icu);\n }\n visitTagPlaceholder(ph) {\n return ph.isVoid ?\n this.formatPh(ph.startName) :\n `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n }\n visitPlaceholder(ph) {\n return this.formatPh(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n return this.formatPh(ph.name);\n }\n}\nconst serializerVisitor = new GetMsgSerializerVisitor();\nfunction serializeI18nMessageForGetMsg(message) {\n return message.nodes.map(node => node.visit(serializerVisitor, null)).join('');\n}\n\nfunction createLocalizeStatements(variable, message, params) {\n const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);\n const sourceSpan = getSourceSpan(message);\n const expressions = placeHolders.map(ph => params[ph.text]);\n const localizedString$1 = localizedString(message, messageParts, placeHolders, expressions, sourceSpan);\n const variableInitialization = variable.set(localizedString$1);\n return [new ExpressionStatement(variableInitialization)];\n}\n/**\n * This visitor walks over an i18n tree, capturing literal strings and placeholders.\n *\n * The result can be used for generating the `$localize` tagged template literals.\n */\nclass LocalizeSerializerVisitor {\n constructor(placeholderToMessage, pieces) {\n this.placeholderToMessage = placeholderToMessage;\n this.pieces = pieces;\n }\n visitText(text) {\n if (this.pieces[this.pieces.length - 1] instanceof LiteralPiece) {\n // Two literal pieces in a row means that there was some comment node in-between.\n this.pieces[this.pieces.length - 1].text += text.value;\n }\n else {\n const sourceSpan = new ParseSourceSpan(text.sourceSpan.fullStart, text.sourceSpan.end, text.sourceSpan.fullStart, text.sourceSpan.details);\n this.pieces.push(new LiteralPiece(text.value, sourceSpan));\n }\n }\n visitContainer(container) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu) {\n this.pieces.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));\n }\n visitTagPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.startName, ph.startSourceSpan ?? ph.sourceSpan));\n if (!ph.isVoid) {\n ph.children.forEach(child => child.visit(this));\n this.pieces.push(this.createPlaceholderPiece(ph.closeName, ph.endSourceSpan ?? ph.sourceSpan));\n }\n }\n visitPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));\n }\n visitIcuPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));\n }\n createPlaceholderPiece(name, sourceSpan, associatedMessage) {\n return new PlaceholderPiece(formatI18nPlaceholderName(name, /* useCamelCase */ false), sourceSpan, associatedMessage);\n }\n}\n/**\n * Serialize an i18n message into two arrays: messageParts and placeholders.\n *\n * These arrays will be used to generate `$localize` tagged template literals.\n *\n * @param message The message to be serialized.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction serializeI18nMessageForLocalize(message) {\n const pieces = [];\n const serializerVisitor = new LocalizeSerializerVisitor(message.placeholderToMessage, pieces);\n message.nodes.forEach(node => node.visit(serializerVisitor));\n return processMessagePieces(pieces);\n}\nfunction getSourceSpan(message) {\n const startNode = message.nodes[0];\n const endNode = message.nodes[message.nodes.length - 1];\n return new ParseSourceSpan(startNode.sourceSpan.fullStart, endNode.sourceSpan.end, startNode.sourceSpan.fullStart, startNode.sourceSpan.details);\n}\n/**\n * Convert the list of serialized MessagePieces into two arrays.\n *\n * One contains the literal string pieces and the other the placeholders that will be replaced by\n * expressions when rendering `$localize` tagged template literals.\n *\n * @param pieces The pieces to process.\n * @returns an object containing the messageParts and placeholders.\n */\nfunction processMessagePieces(pieces) {\n const messageParts = [];\n const placeHolders = [];\n if (pieces[0] instanceof PlaceholderPiece) {\n // The first piece was a placeholder so we need to add an initial empty message part.\n messageParts.push(createEmptyMessagePart(pieces[0].sourceSpan.start));\n }\n for (let i = 0; i < pieces.length; i++) {\n const part = pieces[i];\n if (part instanceof LiteralPiece) {\n messageParts.push(part);\n }\n else {\n placeHolders.push(part);\n if (pieces[i - 1] instanceof PlaceholderPiece) {\n // There were two placeholders in a row, so we need to add an empty message part.\n messageParts.push(createEmptyMessagePart(pieces[i - 1].sourceSpan.end));\n }\n }\n }\n if (pieces[pieces.length - 1] instanceof PlaceholderPiece) {\n // The last piece was a placeholder so we need to add a final empty message part.\n messageParts.push(createEmptyMessagePart(pieces[pieces.length - 1].sourceSpan.end));\n }\n return { messageParts, placeHolders };\n}\nfunction createEmptyMessagePart(location) {\n return new LiteralPiece('', new ParseSourceSpan(location, location));\n}\n\n// Selector attribute name of `<ng-content>`\nconst NG_CONTENT_SELECT_ATTR = 'select';\n// Attribute name of `ngProjectAs`.\nconst NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Global symbols available only inside event bindings.\nconst EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);\n// List of supported global targets for event listeners\nconst GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\nfunction prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {\n const { type, name, target, phase, handler } = eventAst;\n if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {\n throw new Error(`Unexpected global target '${target}' defined for '${name}' event.\n Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS.keys())}.`);\n }\n const eventArgumentName = '$event';\n const implicitReceiverAccesses = new Set();\n const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?\n variable(CONTEXT_NAME) :\n scope.getOrCreateSharedContextVar(0);\n const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);\n const statements = [];\n const variableDeclarations = scope?.variableDeclarations();\n const restoreViewStatement = scope?.restoreViewStatement();\n if (variableDeclarations) {\n // `variableDeclarations` needs to run first, because\n // `restoreViewStatement` depends on the result.\n statements.push(...variableDeclarations);\n }\n statements.push(...bindingStatements);\n if (restoreViewStatement) {\n statements.unshift(restoreViewStatement);\n // If there's a `restoreView` call, we need to reset the view at the end of the listener\n // in order to avoid a leak. If there's a `return` statement already, we wrap it in the\n // call, e.g. `return resetView(ctx.foo())`. Otherwise we add the call as the last statement.\n const lastStatement = statements[statements.length - 1];\n if (lastStatement instanceof ReturnStatement) {\n statements[statements.length - 1] = new ReturnStatement(invokeInstruction(lastStatement.value.sourceSpan, Identifiers.resetView, [lastStatement.value]));\n }\n else {\n statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));\n }\n }\n const eventName = type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerName(name, phase) : name;\n const fnName = handlerName && sanitizeIdentifier(handlerName);\n const fnArgs = [];\n if (implicitReceiverAccesses.has(eventArgumentName)) {\n fnArgs.push(new FnParam(eventArgumentName, DYNAMIC_TYPE));\n }\n const handlerFn = fn(fnArgs, statements, INFERRED_TYPE, null, fnName);\n const params = [literal(eventName), handlerFn];\n if (target) {\n params.push(literal(false), // `useCapture` flag, defaults to `false`\n importExpr(GLOBAL_TARGET_RESOLVERS.get(target)));\n }\n return params;\n}\nfunction createComponentDefConsts() {\n return {\n prepareStatements: [],\n constExpressions: [],\n i18nVarRefsCache: new Map(),\n };\n}\nclass TemplateDefinitionBuilder {\n constructor(constantPool, parentBindingScope, level = 0, contextName, i18nContext, templateIndex, templateName, _namespace, relativeContextFilePath, i18nUseExternalIds, deferBlocks, _constants = createComponentDefConsts()) {\n this.constantPool = constantPool;\n this.level = level;\n this.contextName = contextName;\n this.i18nContext = i18nContext;\n this.templateIndex = templateIndex;\n this.templateName = templateName;\n this._namespace = _namespace;\n this.i18nUseExternalIds = i18nUseExternalIds;\n this.deferBlocks = deferBlocks;\n this._constants = _constants;\n this._dataIndex = 0;\n this._bindingContext = 0;\n this._prefixCode = [];\n /**\n * List of callbacks to generate creation mode instructions. We store them here as we process\n * the template so bindings in listeners are resolved only once all nodes have been visited.\n * This ensures all local refs and context variables are available for matching.\n */\n this._creationCodeFns = [];\n /**\n * List of callbacks to generate update mode instructions. We store them here as we process\n * the template so bindings are resolved only once all nodes have been visited. This ensures\n * all local refs and context variables are available for matching.\n */\n this._updateCodeFns = [];\n /** Index of the currently-selected node. */\n this._currentIndex = 0;\n /** Temporary variable declarations generated from visiting pipes, literals, etc. */\n this._tempVariables = [];\n /**\n * List of callbacks to build nested templates. Nested templates must not be visited until\n * after the parent template has finished visiting all of its nodes. This ensures that all\n * local ref bindings in nested templates are able to find local ref values if the refs\n * are defined after the template declaration.\n */\n this._nestedTemplateFns = [];\n // i18n context local to this template\n this.i18n = null;\n // Number of slots to reserve for pureFunctions\n this._pureFunctionSlots = 0;\n // Number of binding slots\n this._bindingSlots = 0;\n // Projection slots found in the template. Projection slots can distribute projected\n // nodes based on a selector, or can just use the wildcard selector to match\n // all nodes which aren't matching any selector.\n this._ngContentReservedSlots = [];\n // Number of non-default selectors found in all parent templates of this template. We need to\n // track it to properly adjust projection slot index in the `projection` instruction.\n this._ngContentSelectorsOffset = 0;\n // Expression that should be used as implicit receiver when converting template\n // expressions to output AST.\n this._implicitReceiverExpr = null;\n // These should be handled in the template or element directly.\n this.visitReference = invalid;\n this.visitVariable = invalid;\n this.visitTextAttribute = invalid;\n this.visitBoundAttribute = invalid;\n this.visitBoundEvent = invalid;\n this._bindingScope = parentBindingScope.nestedScope(level);\n // Turn the relative context file path into an identifier by replacing non-alphanumeric\n // characters with underscores.\n this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';\n this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), (numSlots) => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {\n this._bindingScope.set(this.level, localName, value);\n this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);\n });\n }\n buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {\n this._ngContentSelectorsOffset = ngContentSelectorsOffset;\n if (this._namespace !== Identifiers.namespaceHTML) {\n this.creationInstruction(null, this._namespace);\n }\n // Create variable bindings\n variables.forEach(v => this.registerContextVariables(v));\n // Initiate i18n context in case:\n // - this template has parent i18n context\n // - or the template has i18n meta associated with it,\n // but it's not initiated by the Element (e.g. <ng-template i18n>)\n const initI18nContext = this.i18nContext ||\n (isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) &&\n !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n));\n const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);\n if (initI18nContext) {\n this.i18nStart(null, i18n, selfClosingI18nInstruction);\n }\n // This is the initial pass through the nodes of this template. In this pass, we\n // queue all creation mode and update mode instructions for generation in the second\n // pass. It's necessary to separate the passes to ensure local refs are defined before\n // resolving bindings. We also count bindings in this pass as we walk bound expressions.\n visitAll$1(this, nodes);\n // Add total binding count to pure function count so pure function instructions are\n // generated with the correct slot offset when update instructions are processed.\n this._pureFunctionSlots += this._bindingSlots;\n // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and\n // `pipeBind` update instructions), so we have to update the slot offsets manually\n // to account for bindings.\n this._valueConverter.updatePipeSlotOffsets(this._bindingSlots);\n // Nested templates must be processed before creation instructions so template()\n // instructions can be generated with the correct internal const count.\n this._nestedTemplateFns.forEach(buildTemplateFn => buildTemplateFn());\n // Output the `projectionDef` instruction when some `<ng-content>` tags are present.\n // The `projectionDef` instruction is only emitted for the component template and\n // is skipped for nested templates (<ng-template> tags).\n if (this.level === 0 && this._ngContentReservedSlots.length) {\n const parameters = [];\n // By default the `projectionDef` instructions creates one slot for the wildcard\n // selector if no parameters are passed. Therefore we only want to allocate a new\n // array for the projection slots if the default projection slot is not sufficient.\n if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {\n const r3ReservedSlots = this._ngContentReservedSlots.map(s => s !== '*' ? parseSelectorToR3Selector(s) : s);\n parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));\n }\n // Since we accumulate ngContent selectors while processing template elements,\n // we *prepend* `projectionDef` to creation instructions block, to put it before\n // any `projection` instructions\n this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */ true);\n }\n if (initI18nContext) {\n this.i18nEnd(null, selfClosingI18nInstruction);\n }\n // Generate all the creation mode instructions (e.g. resolve bindings in listeners)\n const creationStatements = getInstructionStatements(this._creationCodeFns);\n // Generate all the update mode instructions (e.g. resolve property or text bindings)\n const updateStatements = getInstructionStatements(this._updateCodeFns);\n // Variable declaration must occur after binding resolution so we can generate context\n // instructions that build on each other.\n // e.g. const b = nextContext().$implicit(); const b = nextContext();\n const creationVariables = this._bindingScope.viewSnapshotStatements();\n const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);\n const creationBlock = creationStatements.length > 0 ?\n [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, creationVariables.concat(creationStatements))] :\n [];\n const updateBlock = updateStatements.length > 0 ?\n [renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(updateStatements))] :\n [];\n return fn(\n // i.e. (rf: RenderFlags, ctx: any)\n [new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n // Temporary variable declarations for query refresh (i.e. let _t: any;)\n ...this._prefixCode,\n // Creating mode (i.e. if (rf & RenderFlags.Create) { ... })\n ...creationBlock,\n // Binding and refresh mode (i.e. if (rf & RenderFlags.Update) {...})\n ...updateBlock,\n ], INFERRED_TYPE, null, this.templateName);\n }\n // LocalResolver\n getLocal(name) {\n return this._bindingScope.get(name);\n }\n // LocalResolver\n notifyImplicitReceiverUse() {\n this._bindingScope.notifyImplicitReceiverUse();\n }\n // LocalResolver\n maybeRestoreView() {\n this._bindingScope.maybeRestoreView();\n }\n i18nTranslate(message, params = {}, ref, transformFn) {\n const _ref = ref || this.i18nGenerateMainBlockVar();\n // Closure Compiler requires const names to start with `MSG_` but disallows any other const to\n // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call\n const closureVar = this.i18nGenerateClosureVar(message.id);\n const statements = getTranslationDeclStmts(message, _ref, closureVar, params, transformFn);\n this._constants.prepareStatements.push(...statements);\n return _ref;\n }\n registerContextVariables(variable$1) {\n const scopedName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variable$1.name + scopedName);\n this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* DeclarationPriority.CONTEXT */, (scope, relativeLevel) => {\n let rhs;\n if (scope.bindingLevel === retrievalLevel) {\n if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {\n // e.g. restoredCtx.\n // We have to get the context from a view reference, if one is available, because\n // the context that was passed in during creation may not be correct anymore.\n // For more information see: https://github.com/angular/angular/pull/40360.\n rhs = variable(RESTORED_VIEW_CONTEXT_NAME);\n scope.notifyRestoredViewContextUse();\n }\n else {\n // e.g. ctx\n rhs = variable(CONTEXT_NAME);\n }\n }\n else {\n const sharedCtxVar = scope.getSharedContextName(retrievalLevel);\n // e.g. ctx_r0 OR x(2);\n rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);\n }\n // e.g. const $item$ = x(2).$implicit;\n return [lhs.set(rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()];\n });\n }\n i18nAppendBindings(expressions) {\n if (expressions.length > 0) {\n expressions.forEach(expression => this.i18n.appendBinding(expression));\n }\n }\n i18nBindProps(props) {\n const bound = {};\n Object.keys(props).forEach(key => {\n const prop = props[key];\n if (prop instanceof Text$3) {\n bound[key] = literal(prop.value);\n }\n else {\n const value = prop.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n const { strings, expressions } = value;\n const { id, bindings } = this.i18n;\n const label = assembleI18nBoundString(strings, bindings.size, id);\n this.i18nAppendBindings(expressions);\n bound[key] = literal(label);\n }\n }\n });\n return bound;\n }\n // Generates top level vars for i18n blocks (i.e. `i18n_N`).\n i18nGenerateMainBlockVar() {\n return variable(this.constantPool.uniqueName(TRANSLATION_VAR_PREFIX));\n }\n // Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n i18nGenerateClosureVar(messageId) {\n let name;\n const suffix = this.fileBasedI18nSuffix.toUpperCase();\n if (this.i18nUseExternalIds) {\n const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n const uniqueSuffix = this.constantPool.uniqueName(suffix);\n name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n }\n else {\n const prefix = getTranslationConstPrefix(suffix);\n name = this.constantPool.uniqueName(prefix);\n }\n return variable(name);\n }\n i18nUpdateRef(context) {\n const { icus, meta, isRoot, isResolved, isEmitted } = context;\n if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {\n context.isEmitted = true;\n const placeholders = context.getSerializedPlaceholders();\n let icuMapping = {};\n let params = placeholders.size ? placeholdersToParams(placeholders) : {};\n if (icus.size) {\n icus.forEach((refs, key) => {\n if (refs.length === 1) {\n // if we have one ICU defined for a given\n // placeholder - just output its reference\n params[key] = refs[0];\n }\n else {\n // ... otherwise we need to activate post-processing\n // to replace ICU placeholders with proper values\n const placeholder = wrapI18nPlaceholder(`${I18N_ICU_MAPPING_PREFIX}${key}`);\n params[key] = literal(placeholder);\n icuMapping[key] = literalArr(refs);\n }\n });\n }\n // translation requires post processing in 2 cases:\n // - if we have placeholders with multiple values (ex. `START_DIV`: [<5B>#1<>, <20>#2<>, ...])\n // - if we have multiple ICUs that refer to the same placeholder name\n const needsPostprocessing = Array.from(placeholders.values()).some((value) => value.length > 1) ||\n Object.keys(icuMapping).length;\n let transformFn;\n if (needsPostprocessing) {\n transformFn = (raw) => {\n const args = [raw];\n if (Object.keys(icuMapping).length) {\n args.push(mapLiteral(icuMapping, true));\n }\n return invokeInstruction(null, Identifiers.i18nPostprocess, args);\n };\n }\n this.i18nTranslate(meta, params, context.ref, transformFn);\n }\n }\n i18nStart(span = null, meta, selfClosing) {\n const index = this.allocateDataSlot();\n this.i18n = this.i18nContext ?\n this.i18nContext.forkChildContext(index, this.templateIndex, meta) :\n new I18nContext(index, this.i18nGenerateMainBlockVar(), 0, this.templateIndex, meta);\n // generate i18nStart instruction\n const { id, ref } = this.i18n;\n const params = [literal(index), this.addToConsts(ref)];\n if (id > 0) {\n // do not push 3rd argument (sub-block id)\n // into i18nStart call for top level i18n context\n params.push(literal(id));\n }\n this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);\n }\n i18nEnd(span = null, selfClosing) {\n if (!this.i18n) {\n throw new Error('i18nEnd is executed with no i18n context present');\n }\n if (this.i18nContext) {\n this.i18nContext.reconcileChildContext(this.i18n);\n this.i18nUpdateRef(this.i18nContext);\n }\n else {\n this.i18nUpdateRef(this.i18n);\n }\n // setup accumulated bindings\n const { index, bindings } = this.i18n;\n if (bindings.size) {\n for (const binding of bindings) {\n // for i18n block, advance to the most recent element index (by taking the current number of\n // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the\n // necessary lifecycle hooks of components/directives are properly flushed.\n this.updateInstructionWithAdvance(this.getConstCount() - 1, span, Identifiers.i18nExp, () => this.convertPropertyBinding(binding));\n }\n this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);\n }\n if (!selfClosing) {\n this.creationInstruction(span, Identifiers.i18nEnd);\n }\n this.i18n = null; // reset local i18n context\n }\n i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {\n let hasBindings = false;\n const i18nAttrArgs = [];\n attrs.forEach(attr => {\n const message = attr.i18n;\n const converted = attr.value.visit(this._valueConverter);\n this.allocateBindingSlots(converted);\n if (converted instanceof Interpolation$1) {\n const placeholders = assembleBoundTextPlaceholders(message);\n const params = placeholdersToParams(placeholders);\n i18nAttrArgs.push(literal(attr.name), this.i18nTranslate(message, params));\n converted.expressions.forEach(expression => {\n hasBindings = true;\n this.updateInstructionWithAdvance(nodeIndex, sourceSpan, Identifiers.i18nExp, () => this.convertPropertyBinding(expression));\n });\n }\n });\n if (i18nAttrArgs.length > 0) {\n const index = literal(this.allocateDataSlot());\n const constIndex = this.addToConsts(literalArr(i18nAttrArgs));\n this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);\n if (hasBindings) {\n this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);\n }\n }\n }\n getNamespaceInstruction(namespaceKey) {\n switch (namespaceKey) {\n case 'math':\n return Identifiers.namespaceMathML;\n case 'svg':\n return Identifiers.namespaceSVG;\n default:\n return Identifiers.namespaceHTML;\n }\n }\n addNamespaceInstruction(nsInstruction, element) {\n this._namespace = nsInstruction;\n this.creationInstruction(element.startSourceSpan, nsInstruction);\n }\n /**\n * Adds an update instruction for an interpolated property or attribute, such as\n * `prop=\"{{value}}\"` or `attr.title=\"{{value}}\"`\n */\n interpolatedUpdateInstruction(instruction, elementIndex, attrName, input, value, params) {\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, instruction, () => [literal(attrName), ...this.getUpdateInstructionArguments(value), ...params]);\n }\n visitContent(ngContent) {\n const slot = this.allocateDataSlot();\n const projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;\n const parameters = [literal(slot)];\n this._ngContentReservedSlots.push(ngContent.selector);\n const nonContentSelectAttributes = ngContent.attributes.filter(attr => attr.name.toLowerCase() !== NG_CONTENT_SELECT_ATTR);\n const attributes = this.getAttributeExpressions(ngContent.name, nonContentSelectAttributes, [], []);\n if (attributes.length > 0) {\n parameters.push(literal(projectionSlotIdx), literalArr(attributes));\n }\n else if (projectionSlotIdx !== 0) {\n parameters.push(literal(projectionSlotIdx));\n }\n this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);\n if (this.i18n) {\n this.i18n.appendProjection(ngContent.i18n, slot);\n }\n }\n visitElement(element) {\n const elementIndex = this.allocateDataSlot();\n const stylingBuilder = new StylingBuilder(null);\n let isNonBindableMode = false;\n const isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);\n const outputAttrs = [];\n const [namespaceKey, elementName] = splitNsName(element.name);\n const isNgContainer$1 = isNgContainer(element.name);\n // Handle styling, i18n, ngNonBindable attributes\n for (const attr of element.attributes) {\n const { name, value } = attr;\n if (name === NON_BINDABLE_ATTR) {\n isNonBindableMode = true;\n }\n else if (name === 'style') {\n stylingBuilder.registerStyleAttr(value);\n }\n else if (name === 'class') {\n stylingBuilder.registerClassAttr(value);\n }\n else {\n outputAttrs.push(attr);\n }\n }\n // Regular element or ng-container creation mode\n const parameters = [literal(elementIndex)];\n if (!isNgContainer$1) {\n parameters.push(literal(elementName));\n }\n // Add the attributes\n const allOtherInputs = [];\n const boundI18nAttrs = [];\n element.inputs.forEach(input => {\n const stylingInputWasSet = stylingBuilder.registerBoundInput(input);\n if (!stylingInputWasSet) {\n if (input.type === 0 /* BindingType.Property */ && input.i18n) {\n boundI18nAttrs.push(input);\n }\n else {\n allOtherInputs.push(input);\n }\n }\n });\n // add attributes for directive and projection matching purposes\n const attributes = this.getAttributeExpressions(element.name, outputAttrs, allOtherInputs, element.outputs, stylingBuilder, [], boundI18nAttrs);\n parameters.push(this.addAttrsToConsts(attributes));\n // local refs (ex.: <div #foo #bar=\"baz\">)\n const refs = this.prepareRefsArray(element.references);\n parameters.push(this.addToConsts(refs));\n const wasInNamespace = this._namespace;\n const currentNamespace = this.getNamespaceInstruction(namespaceKey);\n // If the namespace is changing now, include an instruction to change it\n // during element creation.\n if (currentNamespace !== wasInNamespace) {\n this.addNamespaceInstruction(currentNamespace, element);\n }\n if (this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex);\n }\n // Note that we do not append text node instructions and ICUs inside i18n section,\n // so we exclude them while calculating whether current element has children\n const hasChildren = (!isI18nRootElement && this.i18n) ? !hasTextChildrenOnly(element.children) :\n element.children.length > 0;\n const createSelfClosingInstruction = !stylingBuilder.hasBindingsWithPipes &&\n element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;\n const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);\n if (createSelfClosingInstruction) {\n this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));\n }\n else {\n this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));\n if (isNonBindableMode) {\n this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);\n }\n if (boundI18nAttrs.length > 0) {\n this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, element.startSourceSpan ?? element.sourceSpan);\n }\n // Generate Listeners (outputs)\n if (element.outputs.length > 0) {\n for (const outputAst of element.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element.name, outputAst, elementIndex));\n }\n }\n // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and\n // listeners, to make sure i18nAttributes instruction targets current element at runtime.\n if (isI18nRootElement) {\n this.i18nStart(element.startSourceSpan, element.i18n, createSelfClosingI18nInstruction);\n }\n }\n // the code here will collect all update-level styling instructions and add them to the\n // update block of the template function AOT code. Instructions like `styleProp`,\n // `styleMap`, `classMap`, `classProp`\n // are all generated and assigned in the code below.\n const stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);\n const limit = stylingInstructions.length - 1;\n for (let i = 0; i <= limit; i++) {\n const instruction = stylingInstructions[i];\n this._bindingSlots += this.processStylingUpdateInstruction(elementIndex, instruction);\n }\n // the reason why `undefined` is used is because the renderer understands this as a\n // special value to symbolize that there is no RHS to this binding\n // TODO (matsko): revisit this once FW-959 is approached\n const emptyValueBindInstruction = literal(undefined);\n const propertyBindings = [];\n const attributeBindings = [];\n // Generate element input bindings\n allOtherInputs.forEach(input => {\n const inputType = input.type;\n if (inputType === 4 /* BindingType.Animation */) {\n const value = input.value.visit(this._valueConverter);\n // animation bindings can be presented in the following formats:\n // 1. [@binding]=\"fooExp\"\n // 2. [@binding]=\"{value:fooExp, params:{...}}\"\n // 3. [@binding]\n // 4. @binding\n // All formats will be valid for when a synthetic binding is created.\n // The reasoning for this is because the renderer should get each\n // synthetic binding value in the order of the array that they are\n // defined in...\n const hasValue = value instanceof LiteralPrimitive ? !!value.value : true;\n this.allocateBindingSlots(value);\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))\n });\n }\n else {\n // we must skip attributes with associated i18n context, since these attributes are handled\n // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated\n if (input.i18n)\n return;\n const value = input.value.visit(this._valueConverter);\n if (value !== undefined) {\n const params = [];\n const [attrNamespace, attrName] = splitNsName(input.name);\n const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;\n let sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);\n if (!sanitizationRef) {\n // If there was no sanitization function found based on the security context\n // of an attribute/property - check whether this attribute/property is\n // one of the security-sensitive <iframe> attributes (and that the current\n // element is actually an <iframe>).\n if (isIframeElement(element.name) && isIframeSecuritySensitiveAttr(input.name)) {\n sanitizationRef = importExpr(Identifiers.validateIframeAttribute);\n }\n }\n if (sanitizationRef) {\n params.push(sanitizationRef);\n }\n if (attrNamespace) {\n const namespaceLiteral = literal(attrNamespace);\n if (sanitizationRef) {\n params.push(namespaceLiteral);\n }\n else {\n // If there wasn't a sanitization ref, we need to add\n // an extra param so that we can pass in the namespace.\n params.push(literal(null), namespaceLiteral);\n }\n }\n this.allocateBindingSlots(value);\n if (inputType === 0 /* BindingType.Property */) {\n if (value instanceof Interpolation$1) {\n // prop=\"{{value}}\" and friends\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);\n }\n else {\n // [prop]=\"value\"\n // Collect all the properties so that we can chain into a single function at the end.\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)\n });\n }\n }\n else if (inputType === 1 /* BindingType.Attribute */) {\n if (value instanceof Interpolation$1 && getInterpolationArgsLength(value) > 1) {\n // attr.name=\"text{{value}}\" and friends\n this.interpolatedUpdateInstruction(getAttributeInterpolationExpression(value), elementIndex, attrName, input, value, params);\n }\n else {\n const boundValue = value instanceof Interpolation$1 ? value.expressions[0] : value;\n // [attr.name]=\"value\" or attr.name=\"{{value}}\"\n // Collect the attribute bindings so that they can be chained at the end.\n attributeBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(boundValue), attrName, params)\n });\n }\n }\n else {\n // class prop\n this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {\n return [\n literal(elementIndex), literal(attrName), this.convertPropertyBinding(value),\n ...params\n ];\n });\n }\n }\n }\n });\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n for (const attributeBinding of attributeBindings) {\n this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);\n }\n // Traverse element child nodes\n visitAll$1(this, element.children);\n if (!isI18nRootElement && this.i18n) {\n this.i18n.appendElement(element.i18n, elementIndex, true);\n }\n if (!createSelfClosingInstruction) {\n // Finish element construction mode.\n const span = element.endSourceSpan ?? element.sourceSpan;\n if (isI18nRootElement) {\n this.i18nEnd(span, createSelfClosingI18nInstruction);\n }\n if (isNonBindableMode) {\n this.creationInstruction(span, Identifiers.enableBindings);\n }\n this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);\n }\n }\n visitTemplate(template) {\n const NG_TEMPLATE_TAG_NAME = 'ng-template';\n const templateIndex = this.allocateDataSlot();\n if (this.i18n) {\n this.i18n.appendTemplate(template.i18n, templateIndex);\n }\n const tagNameWithoutNamespace = template.tagName ? splitNsName(template.tagName)[1] : template.tagName;\n const contextName = `${this.contextName}${template.tagName ? '_' + sanitizeIdentifier(template.tagName) : ''}_${templateIndex}`;\n const templateName = `${contextName}_Template`;\n const parameters = [\n literal(templateIndex),\n variable(templateName),\n // We don't care about the tag's namespace here, because we infer\n // it based on the parent nodes inside the template instruction.\n literal(tagNameWithoutNamespace),\n ];\n // prepare attributes parameter (including attributes used for directive matching)\n const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template.attributes, template.inputs, template.outputs, undefined /* styles */, template.templateAttrs);\n parameters.push(this.addAttrsToConsts(attrsExprs));\n // local refs (ex.: <ng-template #foo>)\n if (template.references && template.references.length) {\n const refs = this.prepareRefsArray(template.references);\n parameters.push(this.addToConsts(refs));\n parameters.push(importExpr(Identifiers.templateRefExtractor));\n }\n // Create the template function\n const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this._constants);\n // Nested templates must not be visited until after their parent templates have completed\n // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't\n // be able to support bindings in nested templates to local refs that occur after the\n // template definition. e.g. <div *ngIf=\"showing\">{{ foo }}</div> <div #foo></div>\n this._nestedTemplateFns.push(() => {\n const templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, template.i18n);\n this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName));\n if (templateVisitor._ngContentReservedSlots.length) {\n this._ngContentReservedSlots.push(...templateVisitor._ngContentReservedSlots);\n }\n });\n // e.g. template(1, MyComp_Template_1)\n this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {\n parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));\n return trimTrailingNulls(parameters);\n });\n // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al;\n this.templatePropertyBindings(templateIndex, template.templateAttrs);\n // Only add normal input/output binding instructions on explicit <ng-template> elements.\n if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME) {\n const [i18nInputs, inputs] = partitionArray(template.inputs, hasI18nMeta);\n // Add i18n attributes that may act as inputs to directives. If such attributes are present,\n // generate `i18nAttributes` instruction. Note: we generate it only for explicit <ng-template>\n // elements, in case of inline templates, corresponding instructions will be generated in the\n // nested template function.\n if (i18nInputs.length > 0) {\n this.i18nAttributesInstruction(templateIndex, i18nInputs, template.startSourceSpan ?? template.sourceSpan);\n }\n // Add the input bindings\n if (inputs.length > 0) {\n this.templatePropertyBindings(templateIndex, inputs);\n }\n // Generate listeners for directive output\n for (const outputAst of template.outputs) {\n this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter('ng_template', outputAst, templateIndex));\n }\n }\n }\n visitBoundText(text) {\n if (this.i18n) {\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n this.i18n.appendBoundText(text.i18n);\n this.i18nAppendBindings(value.expressions);\n }\n return;\n }\n const nodeIndex = this.allocateDataSlot();\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);\n const value = text.value.visit(this._valueConverter);\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n this.updateInstructionWithAdvance(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), () => this.getUpdateInstructionArguments(value));\n }\n else {\n error('Text nodes should be interpolated and never bound directly.');\n }\n }\n visitText(text) {\n // when a text element is located within a translatable\n // block, we exclude this text element from instructions set,\n // since it will be captured in i18n content and processed at runtime\n if (!this.i18n) {\n this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);\n }\n }\n visitIcu(icu) {\n let initWasInvoked = false;\n // if an ICU was created outside of i18n block, we still treat\n // it as a translatable entity and invoke i18nStart and i18nEnd\n // to generate i18n context and the necessary instructions\n if (!this.i18n) {\n initWasInvoked = true;\n this.i18nStart(null, icu.i18n, true);\n }\n const i18n = this.i18n;\n const vars = this.i18nBindProps(icu.vars);\n const placeholders = this.i18nBindProps(icu.placeholders);\n // output ICU directly and keep ICU reference in context\n const message = icu.i18n;\n // we always need post-processing function for ICUs, to make sure that:\n // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:\n // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders\n // inside ICUs)\n // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values\n const transformFn = (raw) => {\n const params = { ...vars, ...placeholders };\n const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false);\n return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);\n };\n // in case the whole i18n message is a single ICU - we do not need to\n // create a separate top-level translation, we can use the root ref instead\n // and make this ICU a top-level translation\n // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function\n // separately, so we do not pass placeholders into `i18nTranslate` function.\n if (isSingleI18nIcu(i18n.meta)) {\n this.i18nTranslate(message, /* placeholders */ {}, i18n.ref, transformFn);\n }\n else {\n // output ICU directly and keep ICU reference in context\n const ref = this.i18nTranslate(message, /* placeholders */ {}, /* ref */ undefined, transformFn);\n i18n.appendIcu(icuFromI18nMessage(message).name, ref);\n }\n if (initWasInvoked) {\n this.i18nEnd(null, true);\n }\n return null;\n }\n visitDeferredBlock(deferred) {\n const templateIndex = this.allocateDataSlot();\n const deferredDeps = this.deferBlocks.get(deferred);\n const contextName = `${this.contextName}_Defer_${templateIndex}`;\n const depsFnName = `${contextName}_DepsFn`;\n const parameters = [\n literal(templateIndex),\n deferredDeps ? variable(depsFnName) : TYPED_NULL_EXPR,\n ];\n if (deferredDeps) {\n // This defer block has deps for which we need to generate dynamic imports.\n const dependencyExp = [];\n for (const deferredDep of deferredDeps) {\n if (deferredDep.isDeferrable) {\n // Callback function, e.g. `function(m) { return m.MyCmp; }`.\n const innerFn = fn([new FnParam('m', DYNAMIC_TYPE)], [new ReturnStatement(variable('m').prop(deferredDep.symbolName))]);\n const fileName = deferredDep.importPath;\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = (new DynamicImportExpr(fileName)).prop('then').callFn([innerFn]);\n dependencyExp.push(importExpr);\n }\n else {\n // Non-deferrable symbol, just use a reference to the type.\n dependencyExp.push(deferredDep.type);\n }\n }\n const depsFnBody = [];\n depsFnBody.push(new ReturnStatement(literalArr(dependencyExp)));\n const depsFnExpr = fn([] /* args */, depsFnBody, INFERRED_TYPE, null, depsFnName);\n this.constantPool.statements.push(depsFnExpr.toDeclStmt(depsFnName));\n }\n // e.g. `defer(1, MyComp_Defer_1_DepsFn, ...)`\n this.creationInstruction(deferred.sourceSpan, Identifiers.defer, () => {\n return trimTrailingNulls(parameters);\n });\n }\n // TODO: implement nested deferred block instructions.\n visitDeferredTrigger(trigger) { }\n visitDeferredBlockPlaceholder(block) { }\n visitDeferredBlockError(block) { }\n visitDeferredBlockLoading(block) { }\n allocateDataSlot() {\n return this._dataIndex++;\n }\n getConstCount() {\n return this._dataIndex;\n }\n getVarCount() {\n return this._pureFunctionSlots;\n }\n getConsts() {\n return this._constants;\n }\n getNgContentSelectors() {\n return this._ngContentReservedSlots.length ?\n this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) :\n null;\n }\n bindingContext() {\n return `${this._bindingContext++}`;\n }\n templatePropertyBindings(templateIndex, attrs) {\n const propertyBindings = [];\n for (const input of attrs) {\n if (!(input instanceof BoundAttribute)) {\n continue;\n }\n const value = input.value.visit(this._valueConverter);\n if (value === undefined) {\n continue;\n }\n this.allocateBindingSlots(value);\n if (value instanceof Interpolation$1) {\n // Params typically contain attribute namespace and value sanitizer, which is applicable\n // for regular HTML elements, but not applicable for <ng-template> (since props act as\n // inputs to directives), so keep params array empty.\n const params = [];\n // prop=\"{{value}}\" case\n this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), templateIndex, input.name, input, value, params);\n }\n else {\n // [prop]=\"value\" case\n propertyBindings.push({\n span: input.sourceSpan,\n paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), input.name)\n });\n }\n }\n for (const propertyBinding of propertyBindings) {\n this.updateInstructionWithAdvance(templateIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);\n }\n }\n // Bindings must only be resolved after all local refs have been visited, so all\n // instructions are queued in callbacks that execute once the initial pass has completed.\n // Otherwise, we wouldn't be able to support local refs that are defined after their\n // bindings. e.g. {{ foo }} <div #foo></div>\n instructionFn(fns, span, reference, paramsOrFn, prepend = false) {\n fns[prepend ? 'unshift' : 'push']({ span, reference, paramsOrFn });\n }\n processStylingUpdateInstruction(elementIndex, instruction) {\n let allocateBindingSlots = 0;\n if (instruction) {\n for (const call of instruction.calls) {\n allocateBindingSlots += call.allocateBindingSlots;\n this.updateInstructionWithAdvance(elementIndex, call.sourceSpan, instruction.reference, () => call.params(value => (call.supportsInterpolation && value instanceof Interpolation$1) ?\n this.getUpdateInstructionArguments(value) :\n this.convertPropertyBinding(value)));\n }\n }\n return allocateBindingSlots;\n }\n creationInstruction(span, reference, paramsOrFn, prepend) {\n this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);\n }\n updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {\n this.addAdvanceInstructionIfNecessary(nodeIndex, span);\n this.updateInstruction(span, reference, paramsOrFn);\n }\n updateInstruction(span, reference, paramsOrFn) {\n this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);\n }\n addAdvanceInstructionIfNecessary(nodeIndex, span) {\n if (nodeIndex !== this._currentIndex) {\n const delta = nodeIndex - this._currentIndex;\n if (delta < 1) {\n throw new Error('advance instruction can only go forwards');\n }\n this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);\n this._currentIndex = nodeIndex;\n }\n }\n allocatePureFunctionSlots(numSlots) {\n const originalSlots = this._pureFunctionSlots;\n this._pureFunctionSlots += numSlots;\n return originalSlots;\n }\n allocateBindingSlots(value) {\n this._bindingSlots += value instanceof Interpolation$1 ? value.expressions.length : 1;\n }\n /**\n * Gets an expression that refers to the implicit receiver. The implicit\n * receiver is always the root level context.\n */\n getImplicitReceiverExpr() {\n if (this._implicitReceiverExpr) {\n return this._implicitReceiverExpr;\n }\n return this._implicitReceiverExpr = this.level === 0 ?\n variable(CONTEXT_NAME) :\n this._bindingScope.getOrCreateSharedContextVar(0);\n }\n convertPropertyBinding(value) {\n const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n const valExpr = convertedPropertyBinding.currValExpr;\n this._tempVariables.push(...convertedPropertyBinding.stmts);\n return valExpr;\n }\n /**\n * Gets a list of argument expressions to pass to an update instruction expression. Also updates\n * the temp variables state with temp variables that were identified as needing to be created\n * while visiting the arguments.\n * @param value The original expression we will be resolving an arguments list from.\n */\n getUpdateInstructionArguments(value) {\n const { args, stmts } = convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n this._tempVariables.push(...stmts);\n return args;\n }\n /**\n * Prepares all attribute expression values for the `TAttributes` array.\n *\n * The purpose of this function is to properly construct an attributes array that\n * is passed into the `elementStart` (or just `element`) functions. Because there\n * are many different types of attributes, the array needs to be constructed in a\n * special way so that `elementStart` can properly evaluate them.\n *\n * The format looks like this:\n *\n * ```\n * attrs = [prop, value, prop2, value2,\n * PROJECT_AS, selector,\n * CLASSES, class1, class2,\n * STYLES, style1, value1, style2, value2,\n * BINDINGS, name1, name2, name3,\n * TEMPLATE, name4, name5, name6,\n * I18N, name7, name8, ...]\n * ```\n *\n * Note that this function will fully ignore all synthetic (@foo) attribute values\n * because those values are intended to always be generated as property instructions.\n */\n getAttributeExpressions(elementName, renderAttributes, inputs, outputs, styles, templateAttrs = [], boundI18nAttrs = []) {\n const alreadySeen = new Set();\n const attrExprs = [];\n let ngProjectAsAttr;\n for (const attr of renderAttributes) {\n if (attr.name === NG_PROJECT_AS_ATTR_NAME) {\n ngProjectAsAttr = attr;\n }\n // Note that static i18n attributes aren't in the i18n array,\n // because they're treated in the same way as regular attributes.\n if (attr.i18n) {\n // When i18n attributes are present on elements with structural directives\n // (e.g. `<div *ngIf title=\"Hello\" i18n-title>`), we want to avoid generating\n // duplicate i18n translation blocks for `ɵɵtemplate` and `ɵɵelement` instruction\n // attributes. So we do a cache lookup to see if suitable i18n translation block\n // already exists.\n const { i18nVarRefsCache } = this._constants;\n let i18nVarRef;\n if (i18nVarRefsCache.has(attr.i18n)) {\n i18nVarRef = i18nVarRefsCache.get(attr.i18n);\n }\n else {\n i18nVarRef = this.i18nTranslate(attr.i18n);\n i18nVarRefsCache.set(attr.i18n, i18nVarRef);\n }\n attrExprs.push(literal(attr.name), i18nVarRef);\n }\n else {\n attrExprs.push(...getAttributeNameLiterals(attr.name), trustedConstAttribute(elementName, attr));\n }\n }\n // Keep ngProjectAs next to the other name, value pairs so we can verify that we match\n // ngProjectAs marker in the attribute name slot.\n if (ngProjectAsAttr) {\n attrExprs.push(...getNgProjectAsLiteral(ngProjectAsAttr));\n }\n function addAttrExpr(key, value) {\n if (typeof key === 'string') {\n if (!alreadySeen.has(key)) {\n attrExprs.push(...getAttributeNameLiterals(key));\n value !== undefined && attrExprs.push(value);\n alreadySeen.add(key);\n }\n }\n else {\n attrExprs.push(literal(key));\n }\n }\n // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`\n // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as\n // as single property value cell by cell.\n if (styles) {\n styles.populateInitialStylingAttrs(attrExprs);\n }\n if (inputs.length || outputs.length) {\n const attrsLengthBeforeInputs = attrExprs.length;\n for (let i = 0; i < inputs.length; i++) {\n const input = inputs[i];\n // We don't want the animation and attribute bindings in the\n // attributes array since they aren't used for directive matching.\n if (input.type !== 4 /* BindingType.Animation */ && input.type !== 1 /* BindingType.Attribute */) {\n addAttrExpr(input.name);\n }\n }\n for (let i = 0; i < outputs.length; i++) {\n const output = outputs[i];\n if (output.type !== 1 /* ParsedEventType.Animation */) {\n addAttrExpr(output.name);\n }\n }\n // this is a cheap way of adding the marker only after all the input/output\n // values have been filtered (by not including the animation ones) and added\n // to the expressions. The marker is important because it tells the runtime\n // code that this is where attributes without values start...\n if (attrExprs.length !== attrsLengthBeforeInputs) {\n attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* core.AttributeMarker.Bindings */));\n }\n }\n if (templateAttrs.length) {\n attrExprs.push(literal(4 /* core.AttributeMarker.Template */));\n templateAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n if (boundI18nAttrs.length) {\n attrExprs.push(literal(6 /* core.AttributeMarker.I18n */));\n boundI18nAttrs.forEach(attr => addAttrExpr(attr.name));\n }\n return attrExprs;\n }\n addToConsts(expression) {\n if (isNull(expression)) {\n return TYPED_NULL_EXPR;\n }\n const consts = this._constants.constExpressions;\n // Try to reuse a literal that's already in the array, if possible.\n for (let i = 0; i < consts.length; i++) {\n if (consts[i].isEquivalent(expression)) {\n return literal(i);\n }\n }\n return literal(consts.push(expression) - 1);\n }\n addAttrsToConsts(attrs) {\n return attrs.length > 0 ? this.addToConsts(literalArr(attrs)) : TYPED_NULL_EXPR;\n }\n prepareRefsArray(references) {\n if (!references || references.length === 0) {\n return TYPED_NULL_EXPR;\n }\n const refsParam = references.flatMap(reference => {\n const slot = this.allocateDataSlot();\n // Generate the update temporary.\n const variableName = this._bindingScope.freshReferenceName();\n const retrievalLevel = this.level;\n const lhs = variable(variableName);\n this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DeclarationPriority.DEFAULT */, (scope, relativeLevel) => {\n // e.g. nextContext(2);\n const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];\n // e.g. const $foo$ = reference(1);\n const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));\n return nextContextStmt.concat(refExpr.toConstDecl());\n }, true);\n return [reference.name, reference.value];\n });\n return asLiteral(refsParam);\n }\n prepareListenerParameter(tagName, outputAst, index) {\n return () => {\n const eventName = outputAst.name;\n const bindingFnName = outputAst.type === 1 /* ParsedEventType.Animation */ ?\n // synthetic @listener.foo values are treated the exact same as are standard listeners\n prepareSyntheticListenerFunctionName(eventName, outputAst.phase) :\n sanitizeIdentifier(eventName);\n const handlerName = `${this.templateName}_${tagName}_${bindingFnName}_${index}_listener`;\n const scope = this._bindingScope.nestedScope(this._bindingScope.bindingLevel, EVENT_BINDING_SCOPE_GLOBALS);\n return prepareEventListenerParameters(outputAst, handlerName, scope);\n };\n }\n}\nclass ValueConverter extends AstMemoryEfficientTransformer {\n constructor(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {\n super();\n this.constantPool = constantPool;\n this.allocateSlot = allocateSlot;\n this.allocatePureFunctionSlots = allocatePureFunctionSlots;\n this.definePipe = definePipe;\n this._pipeBindExprs = [];\n }\n // AstMemoryEfficientTransformer\n visitPipe(pipe, context) {\n // Allocate a slot to create the pipe\n const slot = this.allocateSlot();\n const slotPseudoLocal = `PIPE:${slot}`;\n // Allocate one slot for the result plus one slot per pipe argument\n const pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n const target = new PropertyRead(pipe.span, pipe.sourceSpan, pipe.nameSpan, new ImplicitReceiver(pipe.span, pipe.sourceSpan), slotPseudoLocal);\n const { identifier, isVarLength } = pipeBindingCallInfo(pipe.args);\n this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));\n const args = [pipe.exp, ...pipe.args];\n const convertedArgs = isVarLength ?\n this.visitAll([new LiteralArray(pipe.span, pipe.sourceSpan, args)]) :\n this.visitAll(args);\n const pipeBindExpr = new Call(pipe.span, pipe.sourceSpan, target, [\n new LiteralPrimitive(pipe.span, pipe.sourceSpan, slot),\n new LiteralPrimitive(pipe.span, pipe.sourceSpan, pureFunctionSlot),\n ...convertedArgs,\n ], null);\n this._pipeBindExprs.push(pipeBindExpr);\n return pipeBindExpr;\n }\n updatePipeSlotOffsets(bindingSlots) {\n this._pipeBindExprs.forEach((pipe) => {\n // update the slot offset arg (index 1) to account for binding slots\n const slotOffset = pipe.args[1];\n slotOffset.value += bindingSlots;\n });\n }\n visitLiteralArray(array, context) {\n return new BuiltinFunctionCall(array.span, array.sourceSpan, this.visitAll(array.expressions), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalArr(values);\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n visitLiteralMap(map, context) {\n return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), values => {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values.\n const literal = literalMap(values.map((value, index) => ({ key: map.keys[index].key, value, quoted: map.keys[index].quoted })));\n return getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n });\n }\n}\n// Pipes always have at least one parameter, the value they operate on\nconst pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];\nfunction pipeBindingCallInfo(args) {\n const identifier = pipeBindingIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pipeBindV,\n isVarLength: !identifier,\n };\n}\nconst pureFunctionIdentifiers = [\n Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4,\n Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8\n];\nfunction pureFunctionCallInfo(args) {\n const identifier = pureFunctionIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers.pureFunctionV,\n isVarLength: !identifier,\n };\n}\n// e.g. x(2);\nfunction generateNextContextExpr(relativeLevelDiff) {\n return importExpr(Identifiers.nextContext)\n .callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);\n}\nfunction getLiteralFactory(constantPool, literal$1, allocateSlots) {\n const { literalFactory, literalFactoryArguments } = constantPool.getLiteralFactory(literal$1);\n // Allocate 1 slot for the result plus 1 per argument\n const startSlot = allocateSlots(1 + literalFactoryArguments.length);\n const { identifier, isVarLength } = pureFunctionCallInfo(literalFactoryArguments);\n // Literal factories are pure functions that only need to be re-invoked when the parameters\n // change.\n const args = [literal(startSlot), literalFactory];\n if (isVarLength) {\n args.push(literalArr(literalFactoryArguments));\n }\n else {\n args.push(...literalFactoryArguments);\n }\n return importExpr(identifier).callFn(args);\n}\n/**\n * Gets an array of literals that can be added to an expression\n * to represent the name and namespace of an attribute. E.g.\n * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.\n *\n * @param name Name of the attribute, including the namespace.\n */\nfunction getAttributeNameLiterals(name) {\n const [attributeNamespace, attributeName] = splitNsName(name);\n const nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [\n literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral\n ];\n }\n return [nameLiteral];\n}\n/** The prefix used to get a shared context in BindingScope's map. */\nconst SHARED_CONTEXT_KEY = '$$shared_ctx$$';\nclass BindingScope {\n static createRootScope() {\n return new BindingScope();\n }\n constructor(bindingLevel = 0, parent = null, globals) {\n this.bindingLevel = bindingLevel;\n this.parent = parent;\n this.globals = globals;\n /** Keeps a map from local variables to their BindingData. */\n this.map = new Map();\n this.referenceNameIndex = 0;\n this.restoreViewVariable = null;\n this.usesRestoredViewContext = false;\n if (globals !== undefined) {\n for (const name of globals) {\n this.set(0, name, variable(name));\n }\n }\n }\n get(name) {\n let current = this;\n while (current) {\n let value = current.map.get(name);\n if (value != null) {\n if (current !== this) {\n // make a local copy and reset the `declare` state\n value = {\n retrievalLevel: value.retrievalLevel,\n lhs: value.lhs,\n declareLocalCallback: value.declareLocalCallback,\n declare: false,\n priority: value.priority\n };\n // Cache the value locally.\n this.map.set(name, value);\n // Possibly generate a shared context var\n this.maybeGenerateSharedContextVar(value);\n this.maybeRestoreView();\n }\n if (value.declareLocalCallback && !value.declare) {\n value.declare = true;\n }\n return value.lhs;\n }\n current = current.parent;\n }\n // If we get to this point, we are looking for a property on the top level component\n // - If level === 0, we are on the top and don't need to re-declare `ctx`.\n // - If level > 0, we are in an embedded view. We need to retrieve the name of the\n // local var we used to store the component context, e.g. const $comp$ = x();\n return this.bindingLevel === 0 ? null : this.getComponentProperty(name);\n }\n /**\n * Create a local variable for later reference.\n *\n * @param retrievalLevel The level from which this value can be retrieved\n * @param name Name of the variable.\n * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n * @param priority The sorting priority of this var\n * @param declareLocalCallback The callback to invoke when declaring this local var\n * @param localRef Whether or not this is a local ref\n */\n set(retrievalLevel, name, lhs, priority = 0 /* DeclarationPriority.DEFAULT */, declareLocalCallback, localRef) {\n if (this.map.has(name)) {\n if (localRef) {\n // Do not throw an error if it's a local ref and do not update existing value,\n // so the first defined ref is always returned.\n return this;\n }\n error(`The name ${name} is already defined in scope to be ${this.map.get(name)}`);\n }\n this.map.set(name, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declare: false,\n declareLocalCallback: declareLocalCallback,\n priority: priority,\n });\n return this;\n }\n // Implemented as part of LocalResolver.\n getLocal(name) {\n return this.get(name);\n }\n // Implemented as part of LocalResolver.\n notifyImplicitReceiverUse() {\n if (this.bindingLevel !== 0) {\n // Since the implicit receiver is accessed in an embedded view, we need to\n // ensure that we declare a shared context variable for the current template\n // in the update variables.\n this.map.get(SHARED_CONTEXT_KEY + 0).declare = true;\n }\n }\n nestedScope(level, globals) {\n const newScope = new BindingScope(level, this, globals);\n if (level > 0)\n newScope.generateSharedContextVar(0);\n return newScope;\n }\n /**\n * Gets or creates a shared context variable and returns its expression. Note that\n * this does not mean that the shared variable will be declared. Variables in the\n * binding scope will be only declared if they are used.\n */\n getOrCreateSharedContextVar(retrievalLevel) {\n const bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;\n if (!this.map.has(bindingKey)) {\n this.generateSharedContextVar(retrievalLevel);\n }\n // Shared context variables are always generated as \"ReadVarExpr\".\n return this.map.get(bindingKey).lhs;\n }\n getSharedContextName(retrievalLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel);\n // Shared context variables are always generated as \"ReadVarExpr\".\n return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;\n }\n maybeGenerateSharedContextVar(value) {\n if (value.priority === 1 /* DeclarationPriority.CONTEXT */ &&\n value.retrievalLevel < this.bindingLevel) {\n const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);\n if (sharedCtxObj) {\n sharedCtxObj.declare = true;\n }\n else {\n this.generateSharedContextVar(value.retrievalLevel);\n }\n }\n }\n generateSharedContextVar(retrievalLevel) {\n const lhs = variable(CONTEXT_NAME + this.freshReferenceName());\n this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {\n retrievalLevel: retrievalLevel,\n lhs: lhs,\n declareLocalCallback: (scope, relativeLevel) => {\n // const ctx_r0 = nextContext(2);\n return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];\n },\n declare: false,\n priority: 2 /* DeclarationPriority.SHARED_CONTEXT */,\n });\n }\n getComponentProperty(name) {\n const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);\n componentValue.declare = true;\n this.maybeRestoreView();\n return componentValue.lhs.prop(name);\n }\n maybeRestoreView() {\n // View restoration is required for listener instructions inside embedded views, because\n // they only run in creation mode and they can have references to the context object.\n // If the context object changes in update mode, the reference will be incorrect, because\n // it was established during creation.\n if (this.isListenerScope()) {\n if (!this.parent.restoreViewVariable) {\n // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction\n this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());\n }\n this.restoreViewVariable = this.parent.restoreViewVariable;\n }\n }\n restoreViewStatement() {\n if (this.restoreViewVariable) {\n const restoreCall = invokeInstruction(null, Identifiers.restoreView, [this.restoreViewVariable]);\n // Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`\n // depending on whether it is being used.\n return this.usesRestoredViewContext ?\n variable(RESTORED_VIEW_CONTEXT_NAME).set(restoreCall).toConstDecl() :\n restoreCall.toStmt();\n }\n return null;\n }\n viewSnapshotStatements() {\n // const $state$ = getCurrentView();\n return this.restoreViewVariable ?\n [\n this.restoreViewVariable.set(invokeInstruction(null, Identifiers.getCurrentView, [])).toConstDecl()\n ] :\n [];\n }\n isListenerScope() {\n return this.parent && this.parent.bindingLevel === this.bindingLevel;\n }\n variableDeclarations() {\n let currentContextLevel = 0;\n return Array.from(this.map.values())\n .filter(value => value.declare)\n .sort((a, b) => b.retrievalLevel - a.retrievalLevel || b.priority - a.priority)\n .reduce((stmts, value) => {\n const levelDiff = this.bindingLevel - value.retrievalLevel;\n const currStmts = value.declareLocalCallback(this, levelDiff - currentContextLevel);\n currentContextLevel = levelDiff;\n return stmts.concat(currStmts);\n }, []);\n }\n freshReferenceName() {\n let current = this;\n // Find the top scope as it maintains the global reference count\n while (current.parent)\n current = current.parent;\n const ref = `${REFERENCE_PREFIX}${current.referenceNameIndex++}`;\n return ref;\n }\n hasRestoreViewVariable() {\n return !!this.restoreViewVariable;\n }\n notifyRestoredViewContextUse() {\n this.usesRestoredViewContext = true;\n }\n}\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\nfunction createCssSelector(elementName, attributes) {\n const cssSelector = new CssSelector();\n const elementNameNoNs = splitNsName(elementName)[1];\n cssSelector.setElement(elementNameNoNs);\n Object.getOwnPropertyNames(attributes).forEach((name) => {\n const nameNoNs = splitNsName(name)[1];\n const value = attributes[name];\n cssSelector.addAttribute(nameNoNs, value);\n if (name.toLowerCase() === 'class') {\n const classes = value.trim().split(/\\s+/);\n classes.forEach(className => cssSelector.addClassName(className));\n }\n });\n return cssSelector;\n}\n/**\n * Creates an array of expressions out of an `ngProjectAs` attributes\n * which can be added to the instruction parameters.\n */\nfunction getNgProjectAsLiteral(attribute) {\n // Parse the attribute value into a CssSelectorList. Note that we only take the\n // first selector, because we don't support multiple selectors in ngProjectAs.\n const parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];\n return [literal(5 /* core.AttributeMarker.ProjectAs */), asLiteral(parsedR3Selector)];\n}\n/**\n * Gets the instruction to generate for an interpolated property\n * @param interpolation An Interpolation AST\n */\nfunction getPropertyInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.propertyInterpolate;\n case 3:\n return Identifiers.propertyInterpolate1;\n case 5:\n return Identifiers.propertyInterpolate2;\n case 7:\n return Identifiers.propertyInterpolate3;\n case 9:\n return Identifiers.propertyInterpolate4;\n case 11:\n return Identifiers.propertyInterpolate5;\n case 13:\n return Identifiers.propertyInterpolate6;\n case 15:\n return Identifiers.propertyInterpolate7;\n case 17:\n return Identifiers.propertyInterpolate8;\n default:\n return Identifiers.propertyInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for an interpolated attribute\n * @param interpolation An Interpolation AST\n */\nfunction getAttributeInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 3:\n return Identifiers.attributeInterpolate1;\n case 5:\n return Identifiers.attributeInterpolate2;\n case 7:\n return Identifiers.attributeInterpolate3;\n case 9:\n return Identifiers.attributeInterpolate4;\n case 11:\n return Identifiers.attributeInterpolate5;\n case 13:\n return Identifiers.attributeInterpolate6;\n case 15:\n return Identifiers.attributeInterpolate7;\n case 17:\n return Identifiers.attributeInterpolate8;\n default:\n return Identifiers.attributeInterpolateV;\n }\n}\n/**\n * Gets the instruction to generate for interpolated text.\n * @param interpolation An Interpolation AST\n */\nfunction getTextInterpolationExpression(interpolation) {\n switch (getInterpolationArgsLength(interpolation)) {\n case 1:\n return Identifiers.textInterpolate;\n case 3:\n return Identifiers.textInterpolate1;\n case 5:\n return Identifiers.textInterpolate2;\n case 7:\n return Identifiers.textInterpolate3;\n case 9:\n return Identifiers.textInterpolate4;\n case 11:\n return Identifiers.textInterpolate5;\n case 13:\n return Identifiers.textInterpolate6;\n case 15:\n return Identifiers.textInterpolate7;\n case 17:\n return Identifiers.textInterpolate8;\n default:\n return Identifiers.textInterpolateV;\n }\n}\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n * @param options options to modify how the template is parsed\n */\nfunction parseTemplate(template, templateUrl, options = {}) {\n const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;\n const bindingParser = makeBindingParser(interpolationConfig);\n const htmlParser = new HtmlParser();\n const parseResult = htmlParser.parse(template, templateUrl, {\n leadingTriviaChars: LEADING_TRIVIA_CHARS,\n ...options,\n tokenizeExpansionForms: true,\n tokenizeBlocks: options.enabledBlockTypes != null && options.enabledBlockTypes.size > 0,\n });\n if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors &&\n parseResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: parseResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n let rootNodes = parseResult.rootNodes;\n // process i18n meta information (scan attributes, generate ids)\n // before we run whitespace removal process, because existing i18n\n // extraction process (ng extract-i18n) relies on a raw content to generate\n // message ids\n const i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ !preserveWhitespaces, enableI18nLegacyMessageIdFormat);\n const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);\n if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors &&\n i18nMetaResult.errors.length > 0) {\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: i18nMetaResult.errors,\n nodes: [],\n styleUrls: [],\n styles: [],\n ngContentSelectors: []\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = [];\n }\n return parsedTemplate;\n }\n rootNodes = i18nMetaResult.rootNodes;\n if (!preserveWhitespaces) {\n rootNodes = visitAll(new WhitespaceVisitor(), rootNodes);\n // run i18n meta visitor again in case whitespaces are removed (because that might affect\n // generated i18n message content) and first pass indicated that i18n content is present in a\n // template. During this pass i18n IDs generated at the first pass will be preserved, so we can\n // mimic existing extraction process (ng extract-i18n)\n if (i18nMetaVisitor.hasI18nMeta) {\n rootNodes = visitAll(new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ false), rootNodes);\n }\n }\n const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, {\n collectCommentNodes: !!options.collectCommentNodes,\n enabledBlockTypes: options.enabledBlockTypes || new Set(),\n });\n errors.push(...parseResult.errors, ...i18nMetaResult.errors);\n const parsedTemplate = {\n interpolationConfig,\n preserveWhitespaces,\n errors: errors.length > 0 ? errors : null,\n nodes,\n styleUrls,\n styles,\n ngContentSelectors\n };\n if (options.collectCommentNodes) {\n parsedTemplate.commentNodes = commentNodes;\n }\n return parsedTemplate;\n}\nconst elementRegistry = new DomElementSchemaRegistry();\n/**\n * Construct a `BindingParser` with a default configuration.\n */\nfunction makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {\n return new BindingParser(new Parser$1(new Lexer()), interpolationConfig, elementRegistry, []);\n}\nfunction resolveSanitizationFn(context, isAttribute) {\n switch (context) {\n case SecurityContext.HTML:\n return importExpr(Identifiers.sanitizeHtml);\n case SecurityContext.SCRIPT:\n return importExpr(Identifiers.sanitizeScript);\n case SecurityContext.STYLE:\n // the compiler does not fill in an instruction for [style.prop?] binding\n // values because the style algorithm knows internally what props are subject\n // to sanitization (only [attr.style] values are explicitly sanitized)\n return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;\n case SecurityContext.URL:\n return importExpr(Identifiers.sanitizeUrl);\n case SecurityContext.RESOURCE_URL:\n return importExpr(Identifiers.sanitizeResourceUrl);\n default:\n return null;\n }\n}\nfunction trustedConstAttribute(tagName, attr) {\n const value = asLiteral(attr.value);\n if (isTrustedTypesSink(tagName, attr.name)) {\n switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */ true)) {\n case SecurityContext.HTML:\n return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n // NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.\n case SecurityContext.RESOURCE_URL:\n return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n default:\n return value;\n }\n }\n else {\n return value;\n }\n}\nfunction isSingleElementTemplate(children) {\n return children.length === 1 && children[0] instanceof Element$1;\n}\nfunction isTextNode(node) {\n return node instanceof Text$3 || node instanceof BoundText || node instanceof Icu$1;\n}\nfunction isIframeElement(tagName) {\n return tagName.toLowerCase() === 'iframe';\n}\nfunction hasTextChildrenOnly(children) {\n return children.every(isTextNode);\n}\nfunction getBindingFunctionParams(deferredParams, name, eagerParams) {\n return () => {\n const value = deferredParams();\n const fnParams = Array.isArray(value) ? value : [value];\n if (eagerParams) {\n fnParams.push(...eagerParams);\n }\n if (name) {\n // We want the property name to always be the first function parameter.\n fnParams.unshift(literal(name));\n }\n return fnParams;\n };\n}\n/** Name of the global variable that is used to determine if we use Closure translations or not */\nconst NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';\n/**\n * Generate statements that define a given translation message.\n *\n * ```\n * var I18N_1;\n * if (typeof ngI18nClosureMode !== undefined && ngI18nClosureMode) {\n * var MSG_EXTERNAL_XXX = goog.getMsg(\n * \"Some message with {$interpolation}!\",\n * { \"interpolation\": \"\\uFFFD0\\uFFFD\" }\n * );\n * I18N_1 = MSG_EXTERNAL_XXX;\n * }\n * else {\n * I18N_1 = $localize`Some message with ${'\\uFFFD0\\uFFFD'}!`;\n * }\n * ```\n *\n * @param message The original i18n AST message node\n * @param variable The variable that will be assigned the translation, e.g. `I18N_1`.\n * @param closureVar The variable for Closure `goog.getMsg` calls, e.g. `MSG_EXTERNAL_XXX`.\n * @param params Object mapping placeholder names to their values (e.g.\n * `{ \"interpolation\": \"\\uFFFD0\\uFFFD\" }`).\n * @param transformFn Optional transformation function that will be applied to the translation (e.g.\n * post-processing).\n * @returns An array of statements that defined a given translation.\n */\nfunction getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {\n const statements = [\n declareI18nVariable(variable),\n ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false))),\n ];\n if (transformFn) {\n statements.push(new ExpressionStatement(variable.set(transformFn(variable))));\n }\n return statements;\n}\n/**\n * Create the expression that will be used to guard the closure mode block\n * It is equivalent to:\n *\n * ```\n * typeof ngI18nClosureMode !== undefined && ngI18nClosureMode\n * ```\n */\nfunction createClosureModeGuard() {\n return typeofExpr(variable(NG_I18N_CLOSURE_MODE))\n .notIdentical(literal('undefined', STRING_TYPE))\n .and(variable(NG_I18N_CLOSURE_MODE));\n}\n\n// This regex matches any binding names that contain the \"attr.\" prefix, e.g. \"attr.required\"\n// If there is a match, the first matching group will contain the attribute name to bind.\nconst ATTR_REGEX = /attr\\.([^\\]]+)/;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction baseDirectiveFields(meta, constantPool, bindingParser) {\n const definitionMap = new DefinitionMap();\n const selectors = parseSelectorToR3Selector(meta.selector);\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.type.value);\n // e.g. `selectors: [['', 'someDir', '']]`\n if (selectors.length > 0) {\n definitionMap.set('selectors', asLiteral(selectors));\n }\n if (meta.queries.length > 0) {\n // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }\n definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));\n }\n if (meta.viewQueries.length) {\n definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));\n }\n // e.g. `hostBindings: (rf, ctx) => { ... }\n definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name, definitionMap));\n // e.g 'inputs: {a: 'a'}`\n definitionMap.set('inputs', conditionallyCreateDirectiveBindingLiteral(meta.inputs, true));\n // e.g 'outputs: {a: 'a'}`\n definitionMap.set('outputs', conditionallyCreateDirectiveBindingLiteral(meta.outputs));\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', literalArr(meta.exportAs.map(e => literal(e))));\n }\n if (meta.isStandalone) {\n definitionMap.set('standalone', literal(true));\n }\n if (meta.isSignal) {\n definitionMap.set('signals', literal(true));\n }\n return definitionMap;\n}\n/**\n * Add features to the definition map.\n */\nfunction addFeatures(definitionMap, meta) {\n // e.g. `features: [NgOnChangesFeature]`\n const features = [];\n const providers = meta.providers;\n const viewProviders = meta.viewProviders;\n const inputKeys = Object.keys(meta.inputs);\n if (providers || viewProviders) {\n const args = [providers || new LiteralArrayExpr([])];\n if (viewProviders) {\n args.push(viewProviders);\n }\n features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));\n }\n for (const key of inputKeys) {\n if (meta.inputs[key].transformFunction !== null) {\n features.push(importExpr(Identifiers.InputTransformsFeatureFeature));\n break;\n }\n }\n if (meta.usesInheritance) {\n features.push(importExpr(Identifiers.InheritDefinitionFeature));\n }\n if (meta.fullInheritance) {\n features.push(importExpr(Identifiers.CopyDefinitionFeature));\n }\n if (meta.lifecycle.usesOnChanges) {\n features.push(importExpr(Identifiers.NgOnChangesFeature));\n }\n // TODO: better way of differentiating component vs directive metadata.\n if (meta.hasOwnProperty('template') && meta.isStandalone) {\n features.push(importExpr(Identifiers.StandaloneFeature));\n }\n if (meta.hostDirectives?.length) {\n features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));\n }\n if (features.length) {\n definitionMap.set('features', literalArr(features));\n }\n}\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\nfunction compileDirectiveFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createDirectiveType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\nfunction compileComponentFromMetadata(meta, constantPool, bindingParser) {\n const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n addFeatures(definitionMap, meta);\n const selector = meta.selector && CssSelector.parse(meta.selector);\n const firstSelector = selector && selector[0];\n // e.g. `attr: [\"class\", \".my.app\"]`\n // This is optional an only included if the first selector of a component specifies attributes.\n if (firstSelector) {\n const selectorAttributes = firstSelector.getAttrs();\n if (selectorAttributes.length) {\n definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(value => value != null ? literal(value) : literal(undefined))), \n /* forceShared */ true));\n }\n }\n // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n const templateTypeName = meta.name;\n const templateName = templateTypeName ? `${templateTypeName}_Template` : null;\n const changeDetection = meta.changeDetection;\n // Template compilation is currently conditional as we're in the process of rewriting it.\n if (!USE_TEMPLATE_PIPELINE) {\n // This is the main path currently used in compilation, which compiles the template with the\n // legacy `TemplateDefinitionBuilder`.\n const template = meta.template;\n const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks);\n const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);\n // We need to provide this so that dynamically generated components know what\n // projected content blocks to pass through to the component when it is\n // instantiated.\n const ngContentSelectors = templateBuilder.getNgContentSelectors();\n if (ngContentSelectors) {\n definitionMap.set('ngContentSelectors', ngContentSelectors);\n }\n // e.g. `decls: 2`\n // definitionMap.set('decls', o.literal(tpl.root.decls!));\n definitionMap.set('decls', literal(templateBuilder.getConstCount()));\n // e.g. `vars: 2`\n // definitionMap.set('vars', o.literal(tpl.root.vars!));\n definitionMap.set('vars', literal(templateBuilder.getVarCount()));\n // Generate `consts` section of ComponentDef:\n // - either as an array:\n // `consts: [['one', 'two'], ['three', 'four']]`\n // - or as a factory function in case additional statements are present (to support i18n):\n // `consts: function() { var i18n_0; if (ngI18nClosureMode) {...} else {...} return [i18n_0];\n // }`\n const { constExpressions, prepareStatements } = templateBuilder.getConsts();\n if (constExpressions.length > 0) {\n let constsExpr = literalArr(constExpressions);\n // Prepare statements are present - turn `consts` into a function.\n if (prepareStatements.length > 0) {\n constsExpr = fn([], [...prepareStatements, new ReturnStatement(constsExpr)]);\n }\n definitionMap.set('consts', constsExpr);\n }\n definitionMap.set('template', templateFunctionExpression);\n }\n else {\n // This path compiles the template using the prototype template pipeline. First the template is\n // ingested into IR:\n const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool);\n // Then the IR is transformed to prepare it for cod egeneration.\n transformTemplate(tpl);\n // Finally we emit the template function:\n const templateFn = emitTemplateFn(tpl, constantPool);\n definitionMap.set('decls', literal(tpl.root.decls));\n definitionMap.set('vars', literal(tpl.root.vars));\n if (tpl.consts.length > 0) {\n definitionMap.set('consts', literalArr(tpl.consts));\n }\n definitionMap.set('template', templateFn);\n }\n if (meta.declarations.length > 0) {\n definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));\n }\n if (meta.encapsulation === null) {\n meta.encapsulation = ViewEncapsulation.Emulated;\n }\n // e.g. `styles: [str1, str2]`\n if (meta.styles && meta.styles.length) {\n const styleValues = meta.encapsulation == ViewEncapsulation.Emulated ?\n compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) :\n meta.styles;\n const styleNodes = styleValues.reduce((result, style) => {\n if (style.trim().length > 0) {\n result.push(constantPool.getConstLiteral(literal(style)));\n }\n return result;\n }, []);\n if (styleNodes.length > 0) {\n definitionMap.set('styles', literalArr(styleNodes));\n }\n }\n else if (meta.encapsulation === ViewEncapsulation.Emulated) {\n // If there is no style, don't generate css selectors on elements\n meta.encapsulation = ViewEncapsulation.None;\n }\n // Only set view encapsulation if it's not the default value\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', literal(meta.encapsulation));\n }\n // e.g. `animation: [trigger('123', [])]`\n if (meta.animations !== null) {\n definitionMap.set('data', literalMap([{ key: 'animation', value: meta.animations, quoted: false }]));\n }\n // Only set the change detection flag if it's defined and it's not the default.\n if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {\n definitionMap.set('changeDetection', literal(changeDetection));\n }\n const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createComponentType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Creates the type specification from the component meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createComponentType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));\n typeParams.push(expressionType(literal(meta.isStandalone)));\n typeParams.push(createHostDirectivesType(meta));\n // TODO(signals): Always include this metadata starting with v17. Right\n // now Angular v16.0.x does not support this field and library distributions\n // would then be incompatible with v16.0.x framework users.\n if (meta.isSignal) {\n typeParams.push(expressionType(literal(meta.isSignal)));\n }\n return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));\n}\n/**\n * Compiles the array literal of declarations into an expression according to the provided emit\n * mode.\n */\nfunction compileDeclarationList(list, mode) {\n switch (mode) {\n case 0 /* DeclarationListEmitMode.Direct */:\n // directives: [MyDir],\n return list;\n case 1 /* DeclarationListEmitMode.Closure */:\n // directives: function () { return [MyDir]; }\n return fn([], [new ReturnStatement(list)]);\n case 2 /* DeclarationListEmitMode.ClosureResolved */:\n // directives: function () { return [MyDir].map(ng.resolveForwardRef); }\n const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);\n return fn([], [new ReturnStatement(resolvedList)]);\n }\n}\nfunction prepareQueryParams(query, constantPool) {\n const parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];\n if (query.read) {\n parameters.push(query.read);\n }\n return parameters;\n}\n/**\n * Translates query flags into `TQueryFlags` type in packages/core/src/render3/interfaces/query.ts\n * @param query\n */\nfunction toQueryFlags(query) {\n return (query.descendants ? 1 /* QueryFlags.descendants */ : 0 /* QueryFlags.none */) |\n (query.static ? 2 /* QueryFlags.isStatic */ : 0 /* QueryFlags.none */) |\n (query.emitDistinctChangesOnly ? 4 /* QueryFlags.emitDistinctChangesOnly */ : 0 /* QueryFlags.none */);\n}\nfunction convertAttributesToExpressions(attributes) {\n const values = [];\n for (let key of Object.getOwnPropertyNames(attributes)) {\n const value = attributes[key];\n values.push(literal(key), value);\n }\n return values;\n}\n// Define and update any content queries\nfunction createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(Identifiers.contentQuery)\n .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])\n .toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),\n renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}\nfunction stringAsType(str) {\n return expressionType(literal(str));\n}\nfunction stringMapAsLiteralExpression(map) {\n const mapValues = Object.keys(map).map(key => {\n const value = Array.isArray(map[key]) ? map[key][0] : map[key];\n return {\n key,\n value: literal(value),\n quoted: true,\n };\n });\n return literalMap(mapValues);\n}\nfunction stringArrayAsType(arr) {\n return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :\n NONE_TYPE;\n}\nfunction createBaseDirectiveTypeParams(meta) {\n // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n // string literal, which must be on one line.\n const selectorForType = meta.selector !== null ? meta.selector.replace(/\\n/g, '') : null;\n return [\n typeWithParameters(meta.type.type, meta.typeArgumentCount),\n selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE,\n meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE,\n expressionType(getInputsTypeExpression(meta)),\n expressionType(stringMapAsLiteralExpression(meta.outputs)),\n stringArrayAsType(meta.queries.map(q => q.propertyName)),\n ];\n}\nfunction getInputsTypeExpression(meta) {\n return literalMap(Object.keys(meta.inputs).map(key => {\n const value = meta.inputs[key];\n return {\n key,\n value: literalMap([\n { key: 'alias', value: literal(value.bindingPropertyName), quoted: true },\n { key: 'required', value: literal(value.required), quoted: true }\n ]),\n quoted: true\n };\n }));\n}\n/**\n * Creates the type specification from the directive meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\nfunction createDirectiveType(meta) {\n const typeParams = createBaseDirectiveTypeParams(meta);\n // Directives have no NgContentSelectors slot, but instead express a `never` type\n // so that future fields align.\n typeParams.push(NONE_TYPE);\n typeParams.push(expressionType(literal(meta.isStandalone)));\n typeParams.push(createHostDirectivesType(meta));\n // TODO(signals): Always include this metadata starting with v17. Right\n // now Angular v16.0.x does not support this field and library distributions\n // would then be incompatible with v16.0.x framework users.\n if (meta.isSignal) {\n typeParams.push(expressionType(literal(meta.isSignal)));\n }\n return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n viewQueries.forEach((query) => {\n // creation, e.g. r3.viewQuery(somePredicate, true);\n const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));\n createStatements.push(queryDefinition.toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n });\n const viewQueryFnName = name ? `${name}_Query` : null;\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),\n renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)\n ], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {\n const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);\n // Calculate host event bindings\n const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);\n if (USE_TEMPLATE_PIPELINE) {\n // TODO: host binding metadata is not yet parsed in the template pipeline, so we need to extract\n // that code from below. Then, we will ingest a `HostBindingJob`, and run the template pipeline\n // phases.\n const hostJob = ingestHostBinding({\n componentName: name,\n properties: bindings,\n events: eventBindings,\n }, bindingParser, constantPool);\n transformHostBinding(hostJob);\n const varCount = hostJob.root.vars;\n if (varCount !== null && varCount > 0) {\n definitionMap.set('hostVars', literal(varCount));\n }\n return emitHostBindingFunction(hostJob);\n }\n const bindingContext = variable(CONTEXT_NAME);\n const styleBuilder = new StylingBuilder(bindingContext);\n const { styleAttr, classAttr } = hostBindingsMetadata.specialAttributes;\n if (styleAttr !== undefined) {\n styleBuilder.registerStyleAttr(styleAttr);\n }\n if (classAttr !== undefined) {\n styleBuilder.registerClassAttr(classAttr);\n }\n const createInstructions = [];\n const updateInstructions = [];\n const updateVariables = [];\n const hostBindingSourceSpan = typeSourceSpan;\n if (eventBindings && eventBindings.length) {\n createInstructions.push(...createHostListeners(eventBindings, name));\n }\n // Calculate the host property bindings\n const allOtherBindings = [];\n // We need to calculate the total amount of binding slots required by\n // all the instructions together before any value conversions happen.\n // Value conversions may require additional slots for interpolation and\n // bindings with pipes. These calculates happen after this block.\n let totalHostVarsCount = 0;\n bindings && bindings.forEach((binding) => {\n const stylingInputWasSet = styleBuilder.registerInputBasedOnName(binding.name, binding.expression, hostBindingSourceSpan);\n if (stylingInputWasSet) {\n totalHostVarsCount += MIN_STYLING_BINDING_SLOTS_REQUIRED;\n }\n else {\n allOtherBindings.push(binding);\n totalHostVarsCount++;\n }\n });\n let valueConverter;\n const getValueConverter = () => {\n if (!valueConverter) {\n const hostVarsCountFn = (numSlots) => {\n const originalVarsCount = totalHostVarsCount;\n totalHostVarsCount += numSlots;\n return originalVarsCount;\n };\n valueConverter = new ValueConverter(constantPool, () => error('Unexpected node'), // new nodes are illegal here\n hostVarsCountFn, () => error('Unexpected pipe')); // pipes are illegal here\n }\n return valueConverter;\n };\n const propertyBindings = [];\n const attributeBindings = [];\n const syntheticHostBindings = [];\n for (const binding of allOtherBindings) {\n // resolve literal arrays and literal objects\n const value = binding.expression.visit(getValueConverter());\n const bindingExpr = bindingFn(bindingContext, value);\n const { bindingName, instruction, isAttribute } = getBindingNameAndInstruction(binding);\n const securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute)\n .filter(context => context !== SecurityContext.NONE);\n let sanitizerFn = null;\n if (securityContexts.length) {\n if (securityContexts.length === 2 &&\n securityContexts.indexOf(SecurityContext.URL) > -1 &&\n securityContexts.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n // Special case for some URL attributes (such as \"src\" and \"href\") that may be a part\n // of different security contexts. In this case we use special sanitization function and\n // select the actual sanitizer at runtime based on a tag name that is provided while\n // invoking sanitization function.\n sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);\n }\n else {\n sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);\n }\n }\n const instructionParams = [literal(bindingName), bindingExpr.currValExpr];\n if (sanitizerFn) {\n instructionParams.push(sanitizerFn);\n }\n else {\n // If there was no sanitization function found based on the security context\n // of an attribute/property binding - check whether this attribute/property is\n // one of the security-sensitive <iframe> attributes.\n // Note: for host bindings defined on a directive, we do not try to find all\n // possible places where it can be matched, so we can not determine whether\n // the host element is an <iframe>. In this case, if an attribute/binding\n // name is in the `IFRAME_SECURITY_SENSITIVE_ATTRS` set - append a validation\n // function, which would be invoked at runtime and would have access to the\n // underlying DOM element, check if it's an <iframe> and if so - runs extra checks.\n if (isIframeSecuritySensitiveAttr(bindingName)) {\n instructionParams.push(importExpr(Identifiers.validateIframeAttribute));\n }\n }\n updateVariables.push(...bindingExpr.stmts);\n if (instruction === Identifiers.hostProperty) {\n propertyBindings.push(instructionParams);\n }\n else if (instruction === Identifiers.attribute) {\n attributeBindings.push(instructionParams);\n }\n else if (instruction === Identifiers.syntheticHostProperty) {\n syntheticHostBindings.push(instructionParams);\n }\n else {\n updateInstructions.push({ reference: instruction, paramsOrFn: instructionParams, span: null });\n }\n }\n for (const bindingParams of propertyBindings) {\n updateInstructions.push({ reference: Identifiers.hostProperty, paramsOrFn: bindingParams, span: null });\n }\n for (const bindingParams of attributeBindings) {\n updateInstructions.push({ reference: Identifiers.attribute, paramsOrFn: bindingParams, span: null });\n }\n for (const bindingParams of syntheticHostBindings) {\n updateInstructions.push({ reference: Identifiers.syntheticHostProperty, paramsOrFn: bindingParams, span: null });\n }\n // since we're dealing with directives/components and both have hostBinding\n // functions, we need to generate a special hostAttrs instruction that deals\n // with both the assignment of styling as well as static attributes to the host\n // element. The instruction below will instruct all initial styling (styling\n // that is inside of a host binding within a directive/component) to be attached\n // to the host element alongside any of the provided host attributes that were\n // collected earlier.\n const hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);\n styleBuilder.assignHostAttrs(hostAttrs, definitionMap);\n if (styleBuilder.hasBindings) {\n // finally each binding that was registered in the statement above will need to be added to\n // the update block of a component/directive templateFn/hostBindingsFn so that the bindings\n // are evaluated and updated for the element.\n styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(instruction => {\n for (const call of instruction.calls) {\n // we subtract a value of `1` here because the binding slot was already allocated\n // at the top of this method when all the input bindings were counted.\n totalHostVarsCount +=\n Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);\n updateInstructions.push({\n reference: instruction.reference,\n paramsOrFn: convertStylingCall(call, bindingContext, bindingFn),\n span: null\n });\n }\n });\n }\n if (totalHostVarsCount) {\n definitionMap.set('hostVars', literal(totalHostVarsCount));\n }\n if (createInstructions.length > 0 || updateInstructions.length > 0) {\n const hostBindingsFnName = name ? `${name}_HostBindings` : null;\n const statements = [];\n if (createInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, getInstructionStatements(createInstructions)));\n }\n if (updateInstructions.length > 0) {\n statements.push(renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));\n }\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);\n }\n return null;\n}\nfunction bindingFn(implicit, value) {\n return convertPropertyBinding(null, implicit, value, 'b');\n}\nfunction convertStylingCall(call, bindingContext, bindingFn) {\n return call.params(value => bindingFn(bindingContext, value).currValExpr);\n}\nfunction getBindingNameAndInstruction(binding) {\n let bindingName = binding.name;\n let instruction;\n // Check to see if this is an attr binding or a property binding\n const attrMatches = bindingName.match(ATTR_REGEX);\n if (attrMatches) {\n bindingName = attrMatches[1];\n instruction = Identifiers.attribute;\n }\n else {\n if (binding.isAnimation) {\n bindingName = prepareSyntheticPropertyName(bindingName);\n // host bindings that have a synthetic property (e.g. @foo) should always be rendered\n // in the context of the component and not the parent. Therefore there is a special\n // compatibility instruction available for this purpose.\n instruction = Identifiers.syntheticHostProperty;\n }\n else {\n instruction = Identifiers.hostProperty;\n }\n }\n return { bindingName, instruction, isAttribute: !!attrMatches };\n}\nfunction createHostListeners(eventBindings, name) {\n const listenerParams = [];\n const syntheticListenerParams = [];\n const instructions = [];\n for (const binding of eventBindings) {\n let bindingName = binding.name && sanitizeIdentifier(binding.name);\n const bindingFnName = binding.type === 1 /* ParsedEventType.Animation */ ?\n prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :\n bindingName;\n const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;\n const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);\n if (binding.type == 1 /* ParsedEventType.Animation */) {\n syntheticListenerParams.push(params);\n }\n else {\n listenerParams.push(params);\n }\n }\n for (const params of syntheticListenerParams) {\n instructions.push({ reference: Identifiers.syntheticHostListener, paramsOrFn: params, span: null });\n }\n for (const params of listenerParams) {\n instructions.push({ reference: Identifiers.listener, paramsOrFn: params, span: null });\n }\n return instructions;\n}\nconst HOST_REG_EXP = /^(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\))$/;\nfunction parseHostBindings(host) {\n const attributes = {};\n const listeners = {};\n const properties = {};\n const specialAttributes = {};\n for (const key of Object.keys(host)) {\n const value = host[key];\n const matches = key.match(HOST_REG_EXP);\n if (matches === null) {\n switch (key) {\n case 'class':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Class binding must be string`);\n }\n specialAttributes.classAttr = value;\n break;\n case 'style':\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Style binding must be string`);\n }\n specialAttributes.styleAttr = value;\n break;\n default:\n if (typeof value === 'string') {\n attributes[key] = literal(value);\n }\n else {\n attributes[key] = value;\n }\n }\n }\n else if (matches[1 /* HostBindingGroup.Binding */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Property binding must be string`);\n }\n // synthetic properties (the ones that have a `@` as a prefix)\n // are still treated the same as regular properties. Therefore\n // there is no point in storing them in a separate map.\n properties[matches[1 /* HostBindingGroup.Binding */]] = value;\n }\n else if (matches[2 /* HostBindingGroup.Event */] != null) {\n if (typeof value !== 'string') {\n // TODO(alxhub): make this a diagnostic.\n throw new Error(`Event binding must be string`);\n }\n listeners[matches[2 /* HostBindingGroup.Event */]] = value;\n }\n }\n return { attributes, listeners, properties, specialAttributes };\n}\n/**\n * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a\n * given set of host bindings has no errors.\n *\n * @param bindings set of host bindings to verify.\n * @param sourceSpan source span where host bindings were defined.\n * @returns array of errors associated with a given set of host bindings.\n */\nfunction verifyHostBindings(bindings, sourceSpan) {\n // TODO: abstract out host bindings verification logic and use it instead of\n // creating events and properties ASTs to detect errors (FW-996)\n const bindingParser = makeBindingParser();\n bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);\n bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);\n return bindingParser.errors;\n}\nfunction compileStyles(styles, selector, hostSelector) {\n const shadowCss = new ShadowCss();\n return styles.map(style => {\n return shadowCss.shimCssText(style, selector, hostSelector);\n });\n}\nfunction createHostDirectivesType(meta) {\n if (!meta.hostDirectives?.length) {\n return NONE_TYPE;\n }\n return expressionType(literalArr(meta.hostDirectives.map(hostMeta => literalMap([\n { key: 'directive', value: typeofExpr(hostMeta.directive.type), quoted: false },\n { key: 'inputs', value: stringMapAsLiteralExpression(hostMeta.inputs || {}), quoted: false },\n { key: 'outputs', value: stringMapAsLiteralExpression(hostMeta.outputs || {}), quoted: false },\n ]))));\n}\nfunction createHostDirectivesFeatureArg(hostDirectives) {\n const expressions = [];\n let hasForwardRef = false;\n for (const current of hostDirectives) {\n // Use a shorthand if there are no inputs or outputs.\n if (!current.inputs && !current.outputs) {\n expressions.push(current.directive.type);\n }\n else {\n const keys = [{ key: 'directive', value: current.directive.type, quoted: false }];\n if (current.inputs) {\n const inputsLiteral = createHostDirectivesMappingArray(current.inputs);\n if (inputsLiteral) {\n keys.push({ key: 'inputs', value: inputsLiteral, quoted: false });\n }\n }\n if (current.outputs) {\n const outputsLiteral = createHostDirectivesMappingArray(current.outputs);\n if (outputsLiteral) {\n keys.push({ key: 'outputs', value: outputsLiteral, quoted: false });\n }\n }\n expressions.push(literalMap(keys));\n }\n if (current.isForwardReference) {\n hasForwardRef = true;\n }\n }\n // If there's a forward reference, we generate a `function() { return [HostDir] }`,\n // otherwise we can save some bytes by using a plain array, e.g. `[HostDir]`.\n return hasForwardRef ?\n new FunctionExpr([], [new ReturnStatement(literalArr(expressions))]) :\n literalArr(expressions);\n}\n/**\n * Converts an input/output mapping object literal into an array where the even keys are the\n * public name of the binding and the odd ones are the name it was aliased to. E.g.\n * `{inputOne: 'aliasOne', inputTwo: 'aliasTwo'}` will become\n * `['inputOne', 'aliasOne', 'inputTwo', 'aliasTwo']`.\n *\n * This conversion is necessary, because hosts bind to the public name of the host directive and\n * keeping the mapping in an object literal will break for apps using property renaming.\n */\nfunction createHostDirectivesMappingArray(mapping) {\n const elements = [];\n for (const publicName in mapping) {\n if (mapping.hasOwnProperty(publicName)) {\n elements.push(literal(publicName), literal(mapping[publicName]));\n }\n }\n return elements.length > 0 ? literalArr(elements) : null;\n}\n\n/**\n * An interface for retrieving documents by URL that the compiler uses to\n * load templates.\n *\n * This is an abstract class, rather than an interface, so that it can be used\n * as injection token.\n */\nclass ResourceLoader {\n}\n\nlet enabledBlockTypes;\n/** Temporary utility that enables specific block types in JIT compilations. */\nfunction ɵsetEnabledBlockTypes(types) {\n enabledBlockTypes = types.length > 0 ? new Set(types) : undefined;\n}\nclass CompilerFacadeImpl {\n constructor(jitEvaluator = new JitEvaluator()) {\n this.jitEvaluator = jitEvaluator;\n this.FactoryTarget = FactoryTarget$1;\n this.ResourceLoader = ResourceLoader;\n this.elementSchemaRegistry = new DomElementSchemaRegistry();\n }\n compilePipe(angularCoreEnv, sourceMapUrl, facade) {\n const metadata = {\n name: facade.name,\n type: wrapReference(facade.type),\n typeArgumentCount: 0,\n deps: null,\n pipeName: facade.pipeName,\n pure: facade.pure,\n isStandalone: facade.isStandalone,\n };\n const res = compilePipeFromMetadata(metadata);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compilePipeDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclarePipeFacadeToMetadata(declaration);\n const res = compilePipeFromMetadata(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectable(angularCoreEnv, sourceMapUrl, facade) {\n const { expression, statements } = compileInjectable({\n name: facade.name,\n type: wrapReference(facade.type),\n typeArgumentCount: facade.typeArgumentCount,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DependencyMetadata),\n }, \n /* resolveForwardRefs */ true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjectableDeclaration(angularCoreEnv, sourceMapUrl, facade) {\n const { expression, statements } = compileInjectable({\n name: facade.type.name,\n type: wrapReference(facade.type),\n typeArgumentCount: 0,\n providedIn: computeProvidedIn(facade.providedIn),\n useClass: convertToProviderExpression(facade, 'useClass'),\n useFactory: wrapExpression(facade, 'useFactory'),\n useValue: convertToProviderExpression(facade, 'useValue'),\n useExisting: convertToProviderExpression(facade, 'useExisting'),\n deps: facade.deps?.map(convertR3DeclareDependencyMetadata),\n }, \n /* resolveForwardRefs */ true);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n }\n compileInjector(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n name: facade.name,\n type: wrapReference(facade.type),\n providers: facade.providers && facade.providers.length > 0 ?\n new WrappedNodeExpr(facade.providers) :\n null,\n imports: facade.imports.map(i => new WrappedNodeExpr(i)),\n };\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileInjectorDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const meta = convertDeclareInjectorFacadeToMetadata(declaration);\n const res = compileInjector(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModule(angularCoreEnv, sourceMapUrl, facade) {\n const meta = {\n kind: R3NgModuleMetadataKind.Global,\n type: wrapReference(facade.type),\n bootstrap: facade.bootstrap.map(wrapReference),\n declarations: facade.declarations.map(wrapReference),\n publicDeclarationTypes: null,\n imports: facade.imports.map(wrapReference),\n includeImportTypes: true,\n exports: facade.exports.map(wrapReference),\n selectorScopeMode: R3SelectorScopeMode.Inline,\n containsForwardDecls: false,\n schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,\n id: facade.id ? new WrappedNodeExpr(facade.id) : null,\n };\n const res = compileNgModule(meta);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileNgModuleDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const expression = compileNgModuleDeclarationExpression(declaration);\n return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []);\n }\n compileDirective(angularCoreEnv, sourceMapUrl, facade) {\n const meta = convertDirectiveFacadeToMetadata(facade);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Directive', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan);\n return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser();\n const res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileComponent(angularCoreEnv, sourceMapUrl, facade) {\n // Parse the template and check for errors.\n const { template, interpolation } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);\n // Compile the component metadata, including template, into an expression.\n const meta = {\n ...facade,\n ...convertDirectiveFacadeToMetadata(facade),\n selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),\n template,\n declarations: facade.declarations.map(convertDeclarationFacadeToMetadata),\n declarationListEmitMode: 0 /* DeclarationListEmitMode.Direct */,\n // TODO: leaving empty in JIT mode for now,\n // to be implemented as one of the next steps.\n deferBlocks: new Map(),\n deferrableDeclToImportDecl: new Map(),\n styles: [...facade.styles, ...template.styles],\n encapsulation: facade.encapsulation,\n interpolation,\n changeDetection: facade.changeDetection,\n animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,\n viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :\n null,\n relativeContextFilePath: '',\n i18nUseExternalIds: true,\n };\n const jitExpressionSourceMap = `ng:///${facade.name}.js`;\n return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);\n }\n compileComponentDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n const typeSourceSpan = this.createParseSourceSpan('Component', declaration.type.name, sourceMapUrl);\n const meta = convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl);\n return this.compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta);\n }\n compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n const constantPool = new ConstantPool();\n const bindingParser = makeBindingParser(meta.interpolation);\n const res = compileComponentFromMetadata(meta, constantPool, bindingParser);\n return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n }\n compileFactory(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.name,\n type: wrapReference(meta.type),\n typeArgumentCount: meta.typeArgumentCount,\n deps: convertR3DependencyMetadataArray(meta.deps),\n target: meta.target,\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n compileFactoryDeclaration(angularCoreEnv, sourceMapUrl, meta) {\n const factoryRes = compileFactoryFunction({\n name: meta.type.name,\n type: wrapReference(meta.type),\n typeArgumentCount: 0,\n deps: Array.isArray(meta.deps) ? meta.deps.map(convertR3DeclareDependencyMetadata) :\n meta.deps,\n target: meta.target,\n });\n return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n }\n createParseSourceSpan(kind, typeName, sourceUrl) {\n return r3JitTypeSourceSpan(kind, typeName, sourceUrl);\n }\n /**\n * JIT compiles an expression and returns the result of executing that expression.\n *\n * @param def the definition which will be compiled and executed to get the value to patch\n * @param context an object map of @angular/core symbol names to symbols which will be available\n * in the context of the compiled expression\n * @param sourceUrl a URL to use for the source map of the compiled expression\n * @param preStatements a collection of statements that should be evaluated before the expression.\n */\n jitExpression(def, context, sourceUrl, preStatements) {\n // The ConstantPool may contain Statements which declare variables used in the final expression.\n // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n // declaration of $def which is set to the expression being compiled.\n const statements = [\n ...preStatements,\n new DeclareVarStmt('$def', def, undefined, StmtModifier.Exported),\n ];\n const res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new R3JitReflector(context), /* enableSourceMaps */ true);\n return res['$def'];\n }\n}\nfunction convertToR3QueryMetadata(facade) {\n return {\n ...facade,\n predicate: convertQueryPredicate(facade.predicate),\n read: facade.read ? new WrappedNodeExpr(facade.read) : null,\n static: facade.static,\n emitDistinctChangesOnly: facade.emitDistinctChangesOnly,\n };\n}\nfunction convertQueryDeclarationToMetadata(declaration) {\n return {\n propertyName: declaration.propertyName,\n first: declaration.first ?? false,\n predicate: convertQueryPredicate(declaration.predicate),\n descendants: declaration.descendants ?? false,\n read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,\n static: declaration.static ?? false,\n emitDistinctChangesOnly: declaration.emitDistinctChangesOnly ?? true,\n };\n}\nfunction convertQueryPredicate(predicate) {\n return Array.isArray(predicate) ?\n // The predicate is an array of strings so pass it through.\n predicate :\n // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.\n createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* ForwardRefHandling.Wrapped */);\n}\nfunction convertDirectiveFacadeToMetadata(facade) {\n const inputsFromMetadata = parseInputsArray(facade.inputs || []);\n const outputsFromMetadata = parseMappingStringArray(facade.outputs || []);\n const propMetadata = facade.propMetadata;\n const inputsFromType = {};\n const outputsFromType = {};\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isInput(ann)) {\n inputsFromType[field] = {\n bindingPropertyName: ann.alias || field,\n classPropertyName: field,\n required: ann.required || false,\n transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null,\n };\n }\n else if (isOutput(ann)) {\n outputsFromType[field] = ann.alias || field;\n }\n });\n }\n }\n return {\n ...facade,\n typeArgumentCount: 0,\n typeSourceSpan: facade.typeSourceSpan,\n type: wrapReference(facade.type),\n deps: null,\n host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n inputs: { ...inputsFromMetadata, ...inputsFromType },\n outputs: { ...outputsFromMetadata, ...outputsFromType },\n queries: facade.queries.map(convertToR3QueryMetadata),\n providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,\n viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),\n fullInheritance: false,\n hostDirectives: convertHostDirectivesToMetadata(facade),\n };\n}\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeSourceSpan,\n selector: declaration.selector ?? null,\n inputs: declaration.inputs ? inputsMappingToInputMetadata(declaration.inputs) : {},\n outputs: declaration.outputs ?? {},\n host: convertHostDeclarationToMetadata(declaration.host),\n queries: (declaration.queries ?? []).map(convertQueryDeclarationToMetadata),\n viewQueries: (declaration.viewQueries ?? []).map(convertQueryDeclarationToMetadata),\n providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) :\n null,\n exportAs: declaration.exportAs ?? null,\n usesInheritance: declaration.usesInheritance ?? false,\n lifecycle: { usesOnChanges: declaration.usesOnChanges ?? false },\n deps: null,\n typeArgumentCount: 0,\n fullInheritance: false,\n isStandalone: declaration.isStandalone ?? false,\n isSignal: declaration.isSignal ?? false,\n hostDirectives: convertHostDirectivesToMetadata(declaration),\n };\n}\nfunction convertHostDeclarationToMetadata(host = {}) {\n return {\n attributes: convertOpaqueValuesToExpressions(host.attributes ?? {}),\n listeners: host.listeners ?? {},\n properties: host.properties ?? {},\n specialAttributes: {\n classAttr: host.classAttribute,\n styleAttr: host.styleAttribute,\n },\n };\n}\nfunction convertHostDirectivesToMetadata(metadata) {\n if (metadata.hostDirectives?.length) {\n return metadata.hostDirectives.map(hostDirective => {\n return typeof hostDirective === 'function' ?\n {\n directive: wrapReference(hostDirective),\n inputs: null,\n outputs: null,\n isForwardReference: false\n } :\n {\n directive: wrapReference(hostDirective.directive),\n isForwardReference: false,\n inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,\n outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null,\n };\n });\n }\n return null;\n}\nfunction convertOpaqueValuesToExpressions(obj) {\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = new WrappedNodeExpr(obj[key]);\n }\n return result;\n}\nfunction convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {\n const { template, interpolation } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation);\n const declarations = [];\n if (decl.dependencies) {\n for (const innerDep of decl.dependencies) {\n switch (innerDep.kind) {\n case 'directive':\n case 'component':\n declarations.push(convertDirectiveDeclarationToMetadata(innerDep));\n break;\n case 'pipe':\n declarations.push(convertPipeDeclarationToMetadata(innerDep));\n break;\n }\n }\n }\n else if (decl.components || decl.directives || decl.pipes) {\n // Existing declarations on NPM may not be using the new `dependencies` merged field, and may\n // have separate fields for dependencies instead. Unify them for JIT compilation.\n decl.components &&\n declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */ true)));\n decl.directives &&\n declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));\n decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));\n }\n return {\n ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),\n template,\n styles: decl.styles ?? [],\n declarations,\n viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) :\n null,\n animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null,\n // TODO: leaving empty in JIT mode for now,\n // to be implemented as one of the next steps.\n deferBlocks: new Map(),\n deferrableDeclToImportDecl: new Map(),\n changeDetection: decl.changeDetection ?? ChangeDetectionStrategy.Default,\n encapsulation: decl.encapsulation ?? ViewEncapsulation.Emulated,\n interpolation,\n declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */,\n relativeContextFilePath: '',\n i18nUseExternalIds: true,\n };\n}\nfunction convertDeclarationFacadeToMetadata(declaration) {\n return {\n ...declaration,\n type: new WrappedNodeExpr(declaration.type),\n };\n}\nfunction convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {\n return {\n kind: R3TemplateDependencyKind.Directive,\n isComponent: isComponent || declaration.kind === 'component',\n selector: declaration.selector,\n type: new WrappedNodeExpr(declaration.type),\n inputs: declaration.inputs ?? [],\n outputs: declaration.outputs ?? [],\n exportAs: declaration.exportAs ?? null,\n };\n}\nfunction convertPipeMapToMetadata(pipes) {\n if (!pipes) {\n return [];\n }\n return Object.keys(pipes).map(name => {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name,\n type: new WrappedNodeExpr(pipes[name]),\n };\n });\n}\nfunction convertPipeDeclarationToMetadata(pipe) {\n return {\n kind: R3TemplateDependencyKind.Pipe,\n name: pipe.name,\n type: new WrappedNodeExpr(pipe.type),\n };\n}\nfunction parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {\n const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;\n // Parse the template and check for errors.\n const parsed = parseTemplate(template, sourceMapUrl, { preserveWhitespaces, interpolationConfig, enabledBlockTypes });\n if (parsed.errors !== null) {\n const errors = parsed.errors.map(err => err.toString()).join(', ');\n throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);\n }\n return { template: parsed, interpolation: interpolationConfig };\n}\n/**\n * Convert the expression, if present to an `R3ProviderExpression`.\n *\n * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because,\n * if it is referencing a type that has not yet been defined, it will have already been wrapped in\n * a `forwardRef()` - either by the application developer or during partial-compilation. Thus we can\n * use `ForwardRefHandling.None`.\n */\nfunction convertToProviderExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* ForwardRefHandling.None */);\n }\n else {\n return undefined;\n }\n}\nfunction wrapExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return new WrappedNodeExpr(obj[property]);\n }\n else {\n return undefined;\n }\n}\nfunction computeProvidedIn(providedIn) {\n const expression = typeof providedIn === 'function' ? new WrappedNodeExpr(providedIn) :\n new LiteralExpr(providedIn ?? null);\n // See `convertToProviderExpression()` for why this uses `ForwardRefHandling.None`.\n return createMayBeForwardRefExpression(expression, 0 /* ForwardRefHandling.None */);\n}\nfunction convertR3DependencyMetadataArray(facades) {\n return facades == null ? null : facades.map(convertR3DependencyMetadata);\n}\nfunction convertR3DependencyMetadata(facade) {\n const isAttributeDep = facade.attribute != null; // both `null` and `undefined`\n const rawToken = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n // In JIT mode, if the dep is an `@Attribute()` then we use the attribute name given in\n // `attribute` rather than the `token`.\n const token = isAttributeDep ? new WrappedNodeExpr(facade.attribute) : rawToken;\n return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);\n}\nfunction convertR3DeclareDependencyMetadata(facade) {\n const isAttributeDep = facade.attribute ?? false;\n const token = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n return createR3DependencyMetadata(token, isAttributeDep, facade.host ?? false, facade.optional ?? false, facade.self ?? false, facade.skipSelf ?? false);\n}\nfunction createR3DependencyMetadata(token, isAttributeDep, host, optional, self, skipSelf) {\n // If the dep is an `@Attribute()` the `attributeNameType` ought to be the `unknown` type.\n // But types are not available at runtime so we just use a literal `\"<unknown>\"` string as a dummy\n // marker.\n const attributeNameType = isAttributeDep ? literal('unknown') : null;\n return { token, attributeNameType, host, optional, self, skipSelf };\n}\nfunction extractHostBindings(propMetadata, sourceSpan, host) {\n // First parse the declarations from the metadata.\n const bindings = parseHostBindings(host || {});\n // After that check host bindings for errors\n const errors = verifyHostBindings(bindings, sourceSpan);\n if (errors.length) {\n throw new Error(errors.map((error) => error.msg).join('\\n'));\n }\n // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n propMetadata[field].forEach(ann => {\n if (isHostBinding(ann)) {\n // Since this is a decorator, we know that the value is a class member. Always access it\n // through `this` so that further down the line it can't be confused for a literal value\n // (e.g. if there's a property called `true`).\n bindings.properties[ann.hostPropertyName || field] =\n getSafePropertyAccessString('this', field);\n }\n else if (isHostListener(ann)) {\n bindings.listeners[ann.eventName || field] = `${field}(${(ann.args || []).join(',')})`;\n }\n });\n }\n }\n return bindings;\n}\nfunction isHostBinding(value) {\n return value.ngMetadataName === 'HostBinding';\n}\nfunction isHostListener(value) {\n return value.ngMetadataName === 'HostListener';\n}\nfunction isInput(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction isOutput(value) {\n return value.ngMetadataName === 'Output';\n}\nfunction inputsMappingToInputMetadata(inputs) {\n return Object.keys(inputs).reduce((result, key) => {\n const value = inputs[key];\n if (typeof value === 'string') {\n result[key] = {\n bindingPropertyName: value,\n classPropertyName: value,\n transformFunction: null,\n required: false,\n };\n }\n else {\n result[key] = {\n bindingPropertyName: value[0],\n classPropertyName: value[1],\n transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,\n required: false,\n };\n }\n return result;\n }, {});\n}\nfunction parseInputsArray(values) {\n return values.reduce((results, value) => {\n if (typeof value === 'string') {\n const [bindingPropertyName, classPropertyName] = parseMappingString(value);\n results[classPropertyName] = {\n bindingPropertyName,\n classPropertyName,\n required: false,\n transformFunction: null,\n };\n }\n else {\n results[value.name] = {\n bindingPropertyName: value.alias || value.name,\n classPropertyName: value.name,\n required: value.required || false,\n transformFunction: value.transform != null ? new WrappedNodeExpr(value.transform) : null,\n };\n }\n return results;\n }, {});\n}\nfunction parseMappingStringArray(values) {\n return values.reduce((results, value) => {\n const [alias, fieldName] = parseMappingString(value);\n results[fieldName] = alias;\n return results;\n }, {});\n}\nfunction parseMappingString(value) {\n // Either the value is 'field' or 'field: property'. In the first case, `property` will\n // be undefined, in which case the field name should also be used as the property name.\n const [fieldName, bindingPropertyName] = value.split(':', 2).map(str => str.trim());\n return [bindingPropertyName ?? fieldName, fieldName];\n}\nfunction convertDeclarePipeFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeArgumentCount: 0,\n pipeName: declaration.name,\n deps: null,\n pure: declaration.pure ?? true,\n isStandalone: declaration.isStandalone ?? false,\n };\n}\nfunction convertDeclareInjectorFacadeToMetadata(declaration) {\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n providers: declaration.providers !== undefined && declaration.providers.length > 0 ?\n new WrappedNodeExpr(declaration.providers) :\n null,\n imports: declaration.imports !== undefined ?\n declaration.imports.map(i => new WrappedNodeExpr(i)) :\n [],\n };\n}\nfunction publishFacade(global) {\n const ng = global.ng || (global.ng = {});\n ng.ɵcompilerFacade = new CompilerFacadeImpl();\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the compiler package.\n */\nconst VERSION = new Version('16.2.12');\n\nclass CompilerConfig {\n constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {\n this.defaultEncapsulation = defaultEncapsulation;\n this.useJit = !!useJit;\n this.missingTranslation = missingTranslation;\n this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n this.strictInjectionParameters = strictInjectionParameters === true;\n }\n}\nfunction preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting = false) {\n return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n\nconst _I18N_ATTR = 'i18n';\nconst _I18N_ATTR_PREFIX = 'i18n-';\nconst _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nconst MEANING_SEPARATOR = '|';\nconst ID_SEPARATOR = '@@';\nlet i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n */\nfunction extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n}\nfunction mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n const visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.merge(nodes, translations, interpolationConfig);\n}\nclass ExtractionResult {\n constructor(messages, errors) {\n this.messages = messages;\n this.errors = errors;\n }\n}\nvar _VisitorMode;\n(function (_VisitorMode) {\n _VisitorMode[_VisitorMode[\"Extract\"] = 0] = \"Extract\";\n _VisitorMode[_VisitorMode[\"Merge\"] = 1] = \"Merge\";\n})(_VisitorMode || (_VisitorMode = {}));\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 */\nclass _Visitor {\n constructor(_implicitTags, _implicitAttrs) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n }\n /**\n * Extracts the messages from the tree\n */\n extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => 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 merge(nodes, translations, interpolationConfig) {\n this._init(_VisitorMode.Merge, interpolationConfig);\n this._translations = translations;\n // Construct a single fake root element\n const wrapper = new Element('wrapper', [], nodes, undefined, undefined, undefined);\n const 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 visitExpansionCase(icuCase, context) {\n // Parse cases for translatable html attributes\n const expression = visitAll(this, icuCase.expression, context);\n if (this._mode === _VisitorMode.Merge) {\n return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n }\n }\n visitExpansion(icu, context) {\n this._mayBeAddBlockChildren(icu);\n const 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 const cases = visitAll(this, icu.cases, context);\n if (this._mode === _VisitorMode.Merge) {\n icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n }\n this._inIcu = wasInIcu;\n return icu;\n }\n visitComment(comment, context) {\n const 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 const 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 <ng-container i18n> instead of i18n comments\n if (!i18nCommentsWarned && console && console.warn) {\n i18nCommentsWarned = true;\n const 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 <ng-container> element instead (${comment.sourceSpan.start}${details})`);\n }\n this._inI18nBlock = true;\n this._blockStartDepth = this._depth;\n this._blockChildren = [];\n this._blockMeaningAndDesc =\n 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 const message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc);\n // merge attributes in sections\n const nodes = this._translateMessage(comment, message);\n return 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 visitText(text, context) {\n if (this._isInTranslatableSection) {\n this._mayBeAddBlockChildren(text);\n }\n return text;\n }\n visitElement(el, context) {\n this._mayBeAddBlockChildren(el);\n this._depth++;\n const wasInI18nNode = this._inI18nNode;\n const wasInImplicitNode = this._inImplicitNode;\n let childNodes = [];\n let translatedChildNodes = undefined;\n // Extract:\n // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n // - ICU messages\n const i18nAttr = _getI18nAttr(el);\n const i18nMeta = i18nAttr ? i18nAttr.value : '';\n const isImplicit = this._implicitTags.some(tag => el.name === tag) && !this._inIcu &&\n !this._isInTranslatableSection;\n const isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n this._inImplicitNode = wasInImplicitNode || isImplicit;\n if (!this._isInTranslatableSection && !this._inIcu) {\n if (i18nAttr || isTopLevelImplicit) {\n this._inI18nNode = true;\n const message = this._addMessage(el.children, i18nMeta);\n translatedChildNodes = this._translateMessage(el, message);\n }\n if (this._mode == _VisitorMode.Extract) {\n const isTranslatable = i18nAttr || isTopLevelImplicit;\n if (isTranslatable)\n this._openTranslatableSection(el);\n 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 visitAll(this, el.children);\n }\n }\n if (this._mode === _VisitorMode.Merge) {\n const visitNodes = translatedChildNodes || el.children;\n visitNodes.forEach(child => {\n const 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 `<!-- /i18n -->`)\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 const translatedAttrs = this._translateAttributes(el);\n return new Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n }\n return null;\n }\n visitAttribute(attribute, context) {\n throw new Error('unreachable code');\n }\n visitBlockGroup(group, context) {\n visitAll(this, group.blocks, context);\n }\n visitBlock(block, context) {\n visitAll(this, block.children, context);\n }\n visitBlockParameter(parameter, context) { }\n _init(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 // looks for translatable attributes\n _visitAttributesOf(el) {\n const explicitAttrNameToValue = {};\n const implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs.filter(attr => attr.name.startsWith(_I18N_ATTR_PREFIX))\n .forEach(attr => explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n attr.value);\n el.attrs.forEach(attr => {\n if (attr.name in explicitAttrNameToValue) {\n this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n }\n else if (implicitAttrNames.some(name => attr.name === name)) {\n this._addMessage([attr]);\n }\n });\n }\n // add a translatable message\n _addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }\n // Translates the given message given the `TranslationBundle`\n // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n // no-op when called in extraction mode (returns [])\n _translateMessage(el, message) {\n if (message && this._mode === _VisitorMode.Merge) {\n const 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 // translate the attributes of an element and remove i18n specific attributes\n _translateAttributes(el) {\n const attributes = el.attrs;\n const i18nParsedMessageMeta = {};\n attributes.forEach(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 const translatedAttributes = [];\n attributes.forEach((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 const { meaning, description, id } = i18nParsedMessageMeta[attr.name];\n const message = this._createI18nMessage([attr], meaning, description, id);\n const nodes = this._translations.get(message);\n if (nodes) {\n if (nodes.length == 0) {\n translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\n }\n else if (nodes[0] instanceof Text) {\n const value = nodes[0].value;\n translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan, undefined /* keySpan */, undefined /* valueSpan */, undefined /* valueTokens */, undefined /* i18n */));\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 */\n _mayBeAddBlockChildren(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 */\n _openTranslatableSection(node) {\n if (this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section start');\n }\n else {\n this._msgCountAtSectionStart = this._messages.length;\n }\n }\n /**\n * A translatable section could be:\n * - the content of translatable element,\n * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n */\n get _isInTranslatableSection() {\n return this._msgCountAtSectionStart !== void 0;\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 * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n * - one for the <p> 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 */\n _closeTranslatableSection(node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n const startIndex = this._msgCountAtSectionStart;\n const significantChildren = directChildren.reduce((count, node) => count + (node instanceof Comment ? 0 : 1), 0);\n if (significantChildren == 1) {\n for (let i = this._messages.length - 1; i >= startIndex; i--) {\n const ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof Text$2)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = undefined;\n }\n _reportError(node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n }\n}\nfunction _isOpeningComment(n) {\n return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));\n}\nfunction _isClosingComment(n) {\n return !!(n instanceof Comment && n.value && n.value === '/i18n');\n}\nfunction _getI18nAttr(p) {\n return p.attrs.find(attr => attr.name === _I18N_ATTR) || null;\n}\nfunction _parseMessageMeta(i18n) {\n if (!i18n)\n return { meaning: '', description: '', id: '' };\n const idIndex = i18n.indexOf(ID_SEPARATOR);\n const descIndex = i18n.indexOf(MEANING_SEPARATOR);\n const [meaningAndDesc, id] = (idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''];\n const [meaning, description] = (descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc];\n return { meaning, description, id: id.trim() };\n}\n\nclass XmlTagDefinition {\n constructor() {\n this.closedByParent = false;\n this.implicitNamespacePrefix = null;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n this.preventNamespaceInheritance = false;\n }\n requireExtraParent(currentParent) {\n return false;\n }\n isClosedByChild(name) {\n return false;\n }\n getContentType() {\n return TagContentType.PARSABLE_DATA;\n }\n}\nconst _TAG_DEFINITION = new XmlTagDefinition();\nfunction getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n}\n\nclass XmlParser extends Parser {\n constructor() {\n super(getXmlTagDefinition);\n }\n parse(source, url, options = {}) {\n // Blocks aren't supported in an XML context.\n return super.parse(source, url, { ...options, tokenizeBlocks: false });\n }\n}\n\nconst _VERSION$1 = '1.2';\nconst _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG$1 = 'en';\nconst _PLACEHOLDER_TAG$2 = 'x';\nconst _MARKER_TAG$1 = 'mrk';\nconst _FILE_TAG = 'file';\nconst _SOURCE_TAG$1 = 'source';\nconst _SEGMENT_SOURCE_TAG = 'seg-source';\nconst _ALT_TRANS_TAG = 'alt-trans';\nconst _TARGET_TAG$1 = 'target';\nconst _UNIT_TAG$1 = 'trans-unit';\nconst _CONTEXT_GROUP_TAG = 'context-group';\nconst _CONTEXT_TAG = 'context';\n// https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\nclass Xliff extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor$1();\n const transUnits = [];\n messages.forEach(message => {\n let contextTags = [];\n message.sources.forEach((source) => {\n let contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, { purpose: 'location' });\n contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'sourcefile' }, [new Text$1(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new Text$1(`${source.startLine}`)]), new CR(8));\n contextTags.push(new CR(8), contextGroupTag);\n });\n const transUnit = new Tag(_UNIT_TAG$1, { id: message.id, datatype: 'html' });\n transUnit.children.push(new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes)), ...contextTags);\n if (message.description) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$1(message.meaning)]));\n }\n transUnit.children.push(new CR(6));\n transUnits.push(new CR(6), transUnit);\n });\n const body = new Tag('body', {}, [...transUnits, new CR(4)]);\n const file = new Tag('file', {\n 'source-language': locale || _DEFAULT_SOURCE_LANG$1,\n datatype: 'plaintext',\n original: 'ng2.template',\n }, [new CR(4), body, new CR(2)]);\n const xliff = new Tag('xliff', { version: _VERSION$1, xmlns: _XMLNS$1 }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliffParser = new XliffParser();\n const { locale, msgIdToHtml, errors } = xliffParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$2();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const { i18nNodes, errors: e } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...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: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return digest$1(message);\n }\n}\nclass _WriteVisitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const ctype = getCtypeForTag(ph.tag);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.startName, ctype, 'equiv-text': `<${ph.tag}/>` })];\n }\n const startTagPh = new Tag(_PLACEHOLDER_TAG$2, { id: ph.startName, ctype, 'equiv-text': `<${ph.tag}>` });\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$2, { id: ph.closeName, ctype, 'equiv-text': `</${ph.tag}>` });\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.name, 'equiv-text': `{{${ph.value}}}` })];\n }\n visitIcuPlaceholder(ph, context) {\n const equivText = `{${ph.value.expression}, ${ph.value.type}, ${Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ')}}`;\n return [new Tag(_PLACEHOLDER_TAG$2, { id: ph.name, 'equiv-text': equivText })];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\nclass XliffParser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG$1:\n this._unitMlString = null;\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG$1}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n 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$1:\n case _SEGMENT_SOURCE_TAG:\n case _ALT_TRANS_TAG:\n break;\n case _TARGET_TAG$1:\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _FILE_TAG:\n const localeAttr = element.attrs.find((attr) => attr.name === 'target-language');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n 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 visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$2 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG$2) {\n const nameAttr = el.attrs.find((attr) => attr.name === 'id');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$2}> misses the \"id\" attribute`);\n return null;\n }\n if (el.name === _MARKER_TAG$1) {\n return [].concat(...visitAll(this, el.children));\n }\n this._addError(el, `Unexpected tag`);\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach((c) => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n }\n visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\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\nconst _VERSION = '2.0';\nconst _XMLNS = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG = 'en';\nconst _PLACEHOLDER_TAG$1 = 'ph';\nconst _PLACEHOLDER_SPANNING_TAG = 'pc';\nconst _MARKER_TAG = 'mrk';\nconst _XLIFF_TAG = 'xliff';\nconst _SOURCE_TAG = 'source';\nconst _TARGET_TAG = 'target';\nconst _UNIT_TAG = 'unit';\n// https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\nclass Xliff2 extends Serializer {\n write(messages, locale) {\n const visitor = new _WriteVisitor();\n const units = [];\n messages.forEach(message => {\n const unit = new Tag(_UNIT_TAG, { id: message.id });\n const notes = new Tag('notes');\n if (message.description || message.meaning) {\n if (message.description) {\n notes.children.push(new CR(8), new Tag('note', { category: 'description' }, [new Text$1(message.description)]));\n }\n if (message.meaning) {\n notes.children.push(new CR(8), new Tag('note', { category: 'meaning' }, [new Text$1(message.meaning)]));\n }\n }\n message.sources.forEach((source) => {\n notes.children.push(new CR(8), new Tag('note', { category: 'location' }, [\n new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)\n ]));\n });\n notes.children.push(new CR(6));\n unit.children.push(new CR(6), notes);\n const segment = new Tag('segment');\n segment.children.push(new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new CR(6));\n unit.children.push(new CR(6), segment, new CR(4));\n units.push(new CR(4), unit);\n });\n const file = new Tag('file', { 'original': 'ng.template', id: 'ngi18n' }, [...units, new CR(2)]);\n const xliff = new Tag(_XLIFF_TAG, { version: _VERSION, xmlns: _XMLNS, srcLang: locale || _DEFAULT_SOURCE_LANG }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n }\n load(content, url) {\n // xliff to xml nodes\n const xliff2Parser = new Xliff2Parser();\n const { locale, msgIdToHtml, errors } = xliff2Parser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const converter = new XmlToI18n$1();\n Object.keys(msgIdToHtml).forEach(msgId => {\n const { i18nNodes, errors: e } = converter.convert(msgIdToHtml[msgId], url);\n errors.push(...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: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return decimalDigest(message);\n }\n}\nclass _WriteVisitor {\n constructor() {\n this._nextPlaceholderId = 0;\n }\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const type = getTypeForTag(ph.tag);\n if (ph.isVoid) {\n const tagPh = new Tag(_PLACEHOLDER_TAG$1, {\n id: (this._nextPlaceholderId++).toString(),\n equiv: ph.startName,\n type: type,\n disp: `<${ph.tag}/>`,\n });\n return [tagPh];\n }\n const tagPc = new 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: `</${ph.tag}>`,\n });\n const nodes = [].concat(...ph.children.map(node => node.visit(this)));\n if (nodes.length) {\n nodes.forEach((node) => tagPc.children.push(node));\n }\n else {\n tagPc.children.push(new Text$1(''));\n }\n return [tagPc];\n }\n visitPlaceholder(ph, context) {\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{{${ph.value}}}`,\n })];\n }\n visitIcuPlaceholder(ph, context) {\n const cases = Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ');\n const idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, { id: idStr, equiv: ph.name, disp: `{${ph.value.expression}, ${ph.value.type}, ${cases}}` })];\n }\n serialize(nodes) {\n this._nextPlaceholderId = 0;\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\n// Extract messages as xml nodes from the xliff file\nclass Xliff2Parser {\n constructor() {\n this._locale = null;\n }\n parse(xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n const xml = new XmlParser().parse(xliff, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = null;\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_UNIT_TAG}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n 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 const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _XLIFF_TAG:\n const localeAttr = element.attrs.find((attr) => attr.name === 'trgLang');\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n const versionAttr = element.attrs.find((attr) => attr.name === 'version');\n if (versionAttr) {\n const 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 visitAll(this, element.children, null);\n }\n }\n break;\n default:\n visitAll(this, element.children, null);\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n$1 {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n [].concat(...visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitElement(el, context) {\n switch (el.name) {\n case _PLACEHOLDER_TAG$1:\n const nameAttr = el.attrs.find((attr) => attr.name === 'equiv');\n if (nameAttr) {\n return [new Placeholder('', nameAttr.value, el.sourceSpan)];\n }\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equiv\" attribute`);\n break;\n case _PLACEHOLDER_SPANNING_TAG:\n const startAttr = el.attrs.find((attr) => attr.name === 'equivStart');\n const endAttr = el.attrs.find((attr) => attr.name === 'equivEnd');\n if (!startAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivStart\" attribute`);\n }\n else if (!endAttr) {\n this._addError(el, `<${_PLACEHOLDER_TAG$1}> misses the \"equivEnd\" attribute`);\n }\n else {\n const startId = startAttr.value;\n const endId = endAttr.value;\n const nodes = [];\n return nodes.concat(new Placeholder('', startId, el.sourceSpan), ...el.children.map(node => node.visit(this, null)), new Placeholder('', endId, el.sourceSpan));\n }\n break;\n case _MARKER_TAG:\n return [].concat(...visitAll(this, el.children));\n default:\n this._addError(el, `Unexpected tag`);\n }\n return null;\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach((c) => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: [].concat(...visitAll(this, icuCase.expression)),\n };\n }\n visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\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\nconst _TRANSLATIONS_TAG = 'translationbundle';\nconst _TRANSLATION_TAG = 'translation';\nconst _PLACEHOLDER_TAG = 'ph';\nclass Xtb extends Serializer {\n write(messages, locale) {\n throw new Error('Unsupported');\n }\n load(content, url) {\n // xtb to xml nodes\n const xtbParser = new XtbParser();\n const { locale, msgIdToHtml, errors } = xtbParser.parse(content, url);\n // xml nodes to i18n nodes\n const i18nNodesByMsgId = {};\n const 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(msgId => {\n const valueFn = function () {\n const { i18nNodes, errors } = converter.convert(msgIdToHtml[msgId], url);\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: locale, i18nNodesByMsgId };\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nfunction createLazyProperty(messages, id, valueFn) {\n Object.defineProperty(messages, id, {\n configurable: true,\n enumerable: true,\n get: function () {\n const value = valueFn();\n Object.defineProperty(messages, id, { enumerable: true, value });\n return value;\n },\n set: _ => {\n throw new Error('Could not overwrite an XTB translation');\n },\n });\n}\n// Extract messages as xml nodes from the xtb file\nclass XtbParser {\n constructor() {\n this._locale = null;\n }\n parse(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 const xml = new XmlParser().parse(xtb, url);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n }\n visitElement(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 const langAttr = element.attrs.find((attr) => attr.name === 'lang');\n if (langAttr) {\n this._locale = langAttr.value;\n }\n visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n const idAttr = element.attrs.find((attr) => attr.name === 'id');\n if (!idAttr) {\n this._addError(element, `<${_TRANSLATION_TAG}> misses the \"id\" attribute`);\n }\n else {\n const id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, `Duplicated translations for msg ${id}`);\n }\n else {\n const innerTextStart = element.startSourceSpan.end.offset;\n const innerTextEnd = element.endSourceSpan.start.offset;\n const content = element.startSourceSpan.start.file.content;\n const innerText = content.slice(innerTextStart, innerTextEnd);\n this._msgIdToHtml[id] = innerText;\n }\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n }\n visitAttribute(attribute, context) { }\n visitText(text, context) { }\n visitComment(comment, context) { }\n visitExpansion(expansion, context) { }\n visitExpansionCase(expansionCase, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(block, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n// Convert ml nodes (xtb syntax) to i18n nodes\nclass XmlToI18n {\n convert(message, url) {\n const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });\n this._errors = xmlIcu.errors;\n const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n visitAll(this, xmlIcu.rootNodes);\n return {\n i18nNodes,\n errors: this._errors,\n };\n }\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitExpansion(icu, context) {\n const caseMap = {};\n visitAll(this, icu.cases).forEach(c => {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n }\n visitExpansionCase(icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n }\n visitElement(el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n const nameAttr = el.attrs.find((attr) => attr.name === 'name');\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, 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 visitComment(comment, context) { }\n visitAttribute(attribute, context) { }\n visitBlockGroup(group, context) { }\n visitBlock(block, context) { }\n visitBlockParameter(block, context) { }\n _addError(node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n }\n}\n\n/**\n * A container for translated messages\n */\nclass TranslationBundle {\n constructor(_i18nNodesByMsgId = {}, locale, digest, mapperFactory, missingTranslationStrategy = MissingTranslationStrategy.Warning, console) {\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this.digest = digest;\n this.mapperFactory = mapperFactory;\n this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);\n }\n // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n static load(content, url, serializer, missingTranslationStrategy, console) {\n const { locale, i18nNodesByMsgId } = serializer.load(content, url);\n const digestFn = (m) => serializer.digest(m);\n const mapperFactory = (m) => 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 get(srcMsg) {\n const 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 has(srcMsg) {\n return this.digest(srcMsg) in this._i18nNodesByMsgId;\n }\n}\nclass I18nToHtmlVisitor {\n constructor(_i18nNodesByMsgId = {}, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {\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._errors = [];\n this._contextStack = [];\n }\n convert(srcMsg) {\n this._contextStack.length = 0;\n this._errors.length = 0;\n // i18n to text\n const text = this._convertToText(srcMsg);\n // text to html\n const url = srcMsg.nodes[0].sourceSpan.start.file.url;\n const html = new HtmlParser().parse(text, url, { tokenizeExpansionForms: true });\n return {\n nodes: html.rootNodes,\n errors: [...this._errors, ...html.errors],\n };\n }\n visitText(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 visitContainer(container, context) {\n return container.children.map(n => n.visit(this)).join('');\n }\n visitIcu(icu, context) {\n const cases = Object.keys(icu.cases).map(k => `${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 const exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?\n this._srcMsg.placeholders[icu.expression].text :\n icu.expression;\n return `{${exp}, ${icu.type}, ${cases.join(' ')}}`;\n }\n visitPlaceholder(ph, context) {\n const phName = this._mapper(ph.name);\n if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n return this._srcMsg.placeholders[phName].text;\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 visitTagPlaceholder(ph, context) {\n const tag = `${ph.tag}`;\n const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n if (ph.isVoid) {\n return `<${tag} ${attrs}/>`;\n }\n const children = ph.children.map((c) => c.visit(this)).join('');\n return `<${tag} ${attrs}>${children}</${tag}>`;\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 visitIcuPlaceholder(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 */\n _convertToText(srcMsg) {\n const id = this._digest(srcMsg);\n const mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n let 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 = (name) => mapper ? 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 const 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 const 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 = (name) => name;\n }\n const text = nodes.map(node => node.visit(this)).join('');\n const context = this._contextStack.pop();\n this._srcMsg = context.msg;\n this._mapper = context.mapper;\n return text;\n }\n _addError(el, msg) {\n this._errors.push(new I18nError(el.sourceSpan, msg));\n }\n}\n\nclass I18NHtmlParser {\n constructor(_htmlParser, translations, translationsFormat, missingTranslation = MissingTranslationStrategy.Warning, console) {\n this._htmlParser = _htmlParser;\n if (translations) {\n const 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$1, undefined, missingTranslation, console);\n }\n }\n parse(source, url, options = {}) {\n const interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n const parseResult = this._htmlParser.parse(source, url, { interpolationConfig, ...options });\n if (parseResult.errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n }\n return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n }\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\n/**\n * A container for message extracted from the templates.\n */\nclass MessageBundle {\n constructor(_htmlParser, _implicitTags, _implicitAttrs, _locale = null) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._messages = [];\n }\n updateFromTemplate(html, url, interpolationConfig) {\n const htmlParserResult = this._htmlParser.parse(html, url, { tokenizeExpansionForms: true, interpolationConfig });\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n const i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n if (i18nParserResult.errors.length) {\n return i18nParserResult.errors;\n }\n this._messages.push(...i18nParserResult.messages);\n return [];\n }\n // Return the message in the internal format\n // The public (serialized) format might be different, see the `write` method.\n getMessages() {\n return this._messages;\n }\n write(serializer, filterSources) {\n const messages = {};\n const mapperVisitor = new MapPlaceholderNames();\n // Deduplicate messages based on their ID\n this._messages.forEach(message => {\n const id = serializer.digest(message);\n if (!messages.hasOwnProperty(id)) {\n messages[id] = message;\n }\n else {\n messages[id].sources.push(...message.sources);\n }\n });\n // Transform placeholder names using the serializer mapping\n const msgList = Object.keys(messages).map(id => {\n const mapper = serializer.createNameMapper(messages[id]);\n const src = messages[id];\n const nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n let transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);\n transformedMessage.sources = src.sources;\n if (filterSources) {\n transformedMessage.sources.forEach((source) => source.filePath = filterSources(source.filePath));\n }\n return transformedMessage;\n });\n return serializer.write(msgList, this._locale);\n }\n}\n// Transform an i18n AST by renaming the placeholder nodes with the given mapper\nclass MapPlaceholderNames extends CloneVisitor {\n convert(nodes, mapper) {\n return mapper ? nodes.map(n => n.visit(this, mapper)) : nodes;\n }\n visitTagPlaceholder(ph, mapper) {\n const startName = mapper.toPublicName(ph.startName);\n const closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;\n const children = ph.children.map(n => n.visit(this, mapper));\n return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, mapper) {\n return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, mapper) {\n return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n }\n}\n\nvar FactoryTarget;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\n\n/**\n * Processes `Target`s with a given set of directives and performs a binding operation, which\n * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the\n * target.\n */\nclass R3TargetBinder {\n constructor(directiveMatcher) {\n this.directiveMatcher = directiveMatcher;\n }\n /**\n * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains\n * metadata about the types referenced in the template.\n */\n bind(target) {\n if (!target.template) {\n // TODO(alxhub): handle targets which contain things like HostBindings, etc.\n throw new Error('Binding without a template not yet supported');\n }\n // First, parse the template into a `Scope` structure. This operation captures the syntactic\n // scopes in the template and makes them available for later use.\n const scope = Scope.apply(target.template);\n // Use the `Scope` to extract the entities present at every level of the template.\n const templateEntities = extractTemplateEntities(scope);\n // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:\n // - directives: Map of nodes (elements & ng-templates) to the directives on them.\n // - bindings: Map of inputs, outputs, and attributes to the directive/element that claims\n // them. TODO(alxhub): handle multiple directives claiming an input/output/etc.\n // - references: Map of #references to their targets.\n const { directives, eagerDirectives, bindings, references } = DirectiveBinder.apply(target.template, this.directiveMatcher);\n // Finally, run the TemplateBinder to bind references, variables, and other entities within the\n // template. This extracts all the metadata that doesn't depend on directive matching.\n const { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks } = TemplateBinder.applyWithScope(target.template, scope);\n return new R3BoundTarget(target, directives, eagerDirectives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes, eagerPipes, deferBlocks);\n }\n}\n/**\n * Represents a binding scope within a template.\n *\n * Any variables, references, or other named entities declared within the template will\n * be captured and available by name in `namedEntities`. Additionally, child templates will\n * be analyzed and have their child `Scope`s available in `childScopes`.\n */\nclass Scope {\n constructor(parentScope, template) {\n this.parentScope = parentScope;\n this.template = template;\n /**\n * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n */\n this.namedEntities = new Map();\n /**\n * Child `Scope`s for immediately nested `Template`s.\n */\n this.childScopes = new Map();\n }\n static newRootScope() {\n return new Scope(null, null);\n }\n /**\n * Process a template (either as a `Template` sub-template with variables, or a plain array of\n * template `Node`s) and construct its `Scope`.\n */\n static apply(template) {\n const scope = Scope.newRootScope();\n scope.ingest(template);\n return scope;\n }\n /**\n * Internal method to process the template and populate the `Scope`.\n */\n ingest(template) {\n if (template instanceof Template) {\n // Variables on an <ng-template> are defined in the inner scope.\n template.variables.forEach(node => this.visitVariable(node));\n // Process the nodes of the template.\n template.children.forEach(node => node.visit(this));\n }\n else {\n // No overarching `Template` instance, so process the nodes directly.\n template.forEach(node => node.visit(this));\n }\n }\n visitElement(element) {\n // `Element`s in the template may have `Reference`s which are captured in the scope.\n element.references.forEach(node => this.visitReference(node));\n // Recurse into the `Element`'s children.\n element.children.forEach(node => node.visit(this));\n }\n visitTemplate(template) {\n // References on a <ng-template> are defined in the outer scope, so capture them before\n // processing the template's child scope.\n template.references.forEach(node => this.visitReference(node));\n // Next, create an inner scope and process the template within it.\n const scope = new Scope(this, template);\n scope.ingest(template);\n this.childScopes.set(template, scope);\n }\n visitVariable(variable) {\n // Declare the variable if it's not already.\n this.maybeDeclare(variable);\n }\n visitReference(reference) {\n // Declare the variable if it's not already.\n this.maybeDeclare(reference);\n }\n visitDeferredBlock(deferred) {\n deferred.children.forEach(node => node.visit(this));\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitDeferredBlockError(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(node => node.visit(this));\n }\n // Unused visitors.\n visitContent(content) { }\n visitBoundAttribute(attr) { }\n visitBoundEvent(event) { }\n visitBoundText(text) { }\n visitText(text) { }\n visitTextAttribute(attr) { }\n visitIcu(icu) { }\n visitDeferredTrigger(trigger) { }\n maybeDeclare(thing) {\n // Declare something with a name, as long as that name isn't taken.\n if (!this.namedEntities.has(thing.name)) {\n this.namedEntities.set(thing.name, thing);\n }\n }\n /**\n * Look up a variable within this `Scope`.\n *\n * This can recurse into a parent `Scope` if it's available.\n */\n lookup(name) {\n if (this.namedEntities.has(name)) {\n // Found in the local scope.\n return this.namedEntities.get(name);\n }\n else if (this.parentScope !== null) {\n // Not in the local scope, but there's a parent scope so check there.\n return this.parentScope.lookup(name);\n }\n else {\n // At the top level and it wasn't found.\n return null;\n }\n }\n /**\n * Get the child scope for a `Template`.\n *\n * This should always be defined.\n */\n getChildScope(template) {\n const res = this.childScopes.get(template);\n if (res === undefined) {\n throw new Error(`Assertion error: child scope for ${template} not found`);\n }\n return res;\n }\n}\n/**\n * Processes a template and matches directives on nodes (elements and templates).\n *\n * Usually used via the static `apply()` method.\n */\nclass DirectiveBinder {\n constructor(matcher, directives, eagerDirectives, bindings, references) {\n this.matcher = matcher;\n this.directives = directives;\n this.eagerDirectives = eagerDirectives;\n this.bindings = bindings;\n this.references = references;\n // Indicates whether we are visiting elements within a {#defer} block\n this.isInDeferBlock = false;\n }\n /**\n * Process a template (list of `Node`s) and perform directive matching against each node.\n *\n * @param template the list of template `Node`s to match (recursively).\n * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for\n * this template.\n * @returns three maps which contain information about directives in the template: the\n * `directives` map which lists directives matched on each node, the `bindings` map which\n * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`\n * map which resolves #references (`Reference`s) within the template to the named directive or\n * template node.\n */\n static apply(template, selectorMatcher) {\n const directives = new Map();\n const bindings = new Map();\n const references = new Map();\n const eagerDirectives = [];\n const matcher = new DirectiveBinder(selectorMatcher, directives, eagerDirectives, bindings, references);\n matcher.ingest(template);\n return { directives, eagerDirectives, bindings, references };\n }\n ingest(template) {\n template.forEach(node => node.visit(this));\n }\n visitElement(element) {\n this.visitElementOrTemplate(element.name, element);\n }\n visitTemplate(template) {\n this.visitElementOrTemplate('ng-template', template);\n }\n visitElementOrTemplate(elementName, node) {\n // First, determine the HTML shape of the node for the purpose of directive matching.\n // Do this by building up a `CssSelector` for the node.\n const cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node));\n // Next, use the `SelectorMatcher` to get the list of directives on the node.\n const directives = [];\n this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));\n if (directives.length > 0) {\n this.directives.set(node, directives);\n if (!this.isInDeferBlock) {\n this.eagerDirectives.push(...directives);\n }\n }\n // Resolve any references that are created on this node.\n node.references.forEach(ref => {\n let dirTarget = null;\n // If the reference expression is empty, then it matches the \"primary\" directive on the node\n // (if there is one). Otherwise it matches the host node itself (either an element or\n // <ng-template> node).\n if (ref.value.trim() === '') {\n // This could be a reference to a component if there is one.\n dirTarget = directives.find(dir => dir.isComponent) || null;\n }\n else {\n // This should be a reference to a directive exported via exportAs.\n dirTarget =\n directives.find(dir => dir.exportAs !== null && dir.exportAs.some(value => value === ref.value)) ||\n null;\n // Check if a matching directive was found.\n if (dirTarget === null) {\n // No matching directive was found - this reference points to an unknown target. Leave it\n // unmapped.\n return;\n }\n }\n if (dirTarget !== null) {\n // This reference points to a directive.\n this.references.set(ref, { directive: dirTarget, node });\n }\n else {\n // This reference points to the node itself.\n this.references.set(ref, node);\n }\n });\n const setAttributeBinding = (attribute, ioType) => {\n const dir = directives.find(dir => dir[ioType].hasBindingPropertyName(attribute.name));\n const binding = dir !== undefined ? dir : node;\n this.bindings.set(attribute, binding);\n };\n // Node inputs (bound attributes) and text attributes can be bound to an\n // input on a directive.\n node.inputs.forEach(input => setAttributeBinding(input, 'inputs'));\n node.attributes.forEach(attr => setAttributeBinding(attr, 'inputs'));\n if (node instanceof Template) {\n node.templateAttrs.forEach(attr => setAttributeBinding(attr, 'inputs'));\n }\n // Node outputs (bound events) can be bound to an output on a directive.\n node.outputs.forEach(output => setAttributeBinding(output, 'outputs'));\n // Recurse into the node's children.\n node.children.forEach(child => child.visit(this));\n }\n visitDeferredBlock(deferred) {\n this.isInDeferBlock = true;\n deferred.children.forEach(child => child.visit(this));\n this.isInDeferBlock = false;\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(child => child.visit(this));\n }\n visitDeferredBlockError(block) {\n block.children.forEach(child => child.visit(this));\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(child => child.visit(this));\n }\n // Unused visitors.\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitBoundAttributeOrEvent(node) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n visitDeferredTrigger(trigger) { }\n}\n/**\n * Processes a template and extract metadata about expressions and symbols within.\n *\n * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched\n * within the template in order to operate.\n *\n * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided\n * by overridden methods from that visitor.\n */\nclass TemplateBinder extends RecursiveAstVisitor {\n constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template, level) {\n super();\n this.bindings = bindings;\n this.symbols = symbols;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferBlocks = deferBlocks;\n this.nestingLevel = nestingLevel;\n this.scope = scope;\n this.template = template;\n this.level = level;\n // Indicates whether we are visiting elements within a {#defer} block\n this.isInDeferBlock = false;\n // Save a bit of processing time by constructing this closure in advance.\n this.visitNode = (node) => node.visit(this);\n }\n // This method is defined to reconcile the type of TemplateBinder since both\n // RecursiveAstVisitor and Visitor define the visit() method in their\n // interfaces.\n visit(node, context) {\n if (node instanceof AST) {\n node.visit(this, context);\n }\n else {\n node.visit(this);\n }\n }\n /**\n * Process a template and extract metadata about expressions and symbols within.\n *\n * @param nodes the nodes of the template to process\n * @param scope the `Scope` of the template being processed.\n * @returns three maps which contain metadata about the template: `expressions` which interprets\n * special `AST` nodes in expressions as pointing to references or variables declared within the\n * template, `symbols` which maps those variables and references to the nested `Template` which\n * declares them, if any, and `nestingLevel` which associates each `Template` with a integer\n * nesting level (how many levels deep within the template structure the `Template` is), starting\n * at 1.\n */\n static applyWithScope(nodes, scope) {\n const expressions = new Map();\n const symbols = new Map();\n const nestingLevel = new Map();\n const usedPipes = new Set();\n const eagerPipes = new Set();\n const template = nodes instanceof Template ? nodes : null;\n const deferBlocks = new Set();\n // The top-level template has nesting level 0.\n const binder = new TemplateBinder(expressions, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template, 0);\n binder.ingest(nodes);\n return { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks };\n }\n ingest(template) {\n if (template instanceof Template) {\n // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,\n // and references were all processed in the scope of the containing template.\n template.variables.forEach(this.visitNode);\n template.children.forEach(this.visitNode);\n // Set the nesting level.\n this.nestingLevel.set(template, this.level);\n }\n else {\n // Visit each node from the top-level template.\n template.forEach(this.visitNode);\n }\n }\n visitElement(element) {\n // Visit the inputs, outputs, and children of the element.\n element.inputs.forEach(this.visitNode);\n element.outputs.forEach(this.visitNode);\n element.children.forEach(this.visitNode);\n }\n visitTemplate(template) {\n // First, visit inputs, outputs and template attributes of the template node.\n template.inputs.forEach(this.visitNode);\n template.outputs.forEach(this.visitNode);\n template.templateAttrs.forEach(this.visitNode);\n // References are also evaluated in the outer context.\n template.references.forEach(this.visitNode);\n // Next, recurse into the template using its scope, and bumping the nesting level up by one.\n const childScope = this.scope.getChildScope(template);\n const binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, template, this.level + 1);\n binder.ingest(template);\n }\n visitVariable(variable) {\n // Register the `Variable` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(variable, this.template);\n }\n }\n visitReference(reference) {\n // Register the `Reference` as a symbol in the current `Template`.\n if (this.template !== null) {\n this.symbols.set(reference, this.template);\n }\n }\n // Unused template visitors\n visitText(text) { }\n visitContent(content) { }\n visitTextAttribute(attribute) { }\n visitIcu(icu) {\n Object.keys(icu.vars).forEach(key => icu.vars[key].visit(this));\n Object.keys(icu.placeholders).forEach(key => icu.placeholders[key].visit(this));\n }\n // The remaining visitors are concerned with processing AST expressions within template bindings\n visitBoundAttribute(attribute) {\n attribute.value.visit(this);\n }\n visitBoundEvent(event) {\n event.handler.visit(this);\n }\n visitDeferredBlock(deferred) {\n this.deferBlocks.add(deferred);\n this.isInDeferBlock = true;\n deferred.children.forEach(this.visitNode);\n this.isInDeferBlock = false;\n deferred.triggers.forEach(this.visitNode);\n deferred.prefetchTriggers.forEach(this.visitNode);\n deferred.placeholder && this.visitNode(deferred.placeholder);\n deferred.loading && this.visitNode(deferred.loading);\n deferred.error && this.visitNode(deferred.error);\n }\n visitDeferredTrigger(trigger) {\n if (trigger instanceof BoundDeferredTrigger) {\n trigger.value.visit(this);\n }\n }\n visitDeferredBlockPlaceholder(block) {\n block.children.forEach(this.visitNode);\n }\n visitDeferredBlockError(block) {\n block.children.forEach(this.visitNode);\n }\n visitDeferredBlockLoading(block) {\n block.children.forEach(this.visitNode);\n }\n visitBoundText(text) {\n text.value.visit(this);\n }\n visitPipe(ast, context) {\n this.usedPipes.add(ast.name);\n if (!this.isInDeferBlock) {\n this.eagerPipes.add(ast.name);\n }\n return super.visitPipe(ast, context);\n }\n // These five types of AST expressions can refer to expression roots, which could be variables\n // or references in the current scope.\n visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }\n visitSafePropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitSafePropertyRead(ast, context);\n }\n visitPropertyWrite(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyWrite(ast, context);\n }\n maybeMap(scope, ast, name) {\n // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an\n // `AST` expression that maps to a `Variable` or `Reference`.\n if (!(ast.receiver instanceof ImplicitReceiver)) {\n return;\n }\n // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is\n // probably a property on the top-level component context.\n let target = this.scope.lookup(name);\n if (target !== null) {\n this.bindings.set(ast, target);\n }\n }\n}\n/**\n * Metadata container for a `Target` that allows queries for specific bits of metadata.\n *\n * See `BoundTarget` for documentation on the individual methods.\n */\nclass R3BoundTarget {\n constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, templateEntities, usedPipes, eagerPipes, deferredBlocks) {\n this.target = target;\n this.directives = directives;\n this.eagerDirectives = eagerDirectives;\n this.bindings = bindings;\n this.references = references;\n this.exprTargets = exprTargets;\n this.symbols = symbols;\n this.nestingLevel = nestingLevel;\n this.templateEntities = templateEntities;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferredBlocks = deferredBlocks;\n }\n getEntitiesInTemplateScope(template) {\n return this.templateEntities.get(template) ?? new Set();\n }\n getDirectivesOfNode(node) {\n return this.directives.get(node) || null;\n }\n getReferenceTarget(ref) {\n return this.references.get(ref) || null;\n }\n getConsumerOfBinding(binding) {\n return this.bindings.get(binding) || null;\n }\n getExpressionTarget(expr) {\n return this.exprTargets.get(expr) || null;\n }\n getTemplateOfSymbol(symbol) {\n return this.symbols.get(symbol) || null;\n }\n getNestingLevel(template) {\n return this.nestingLevel.get(template) || 0;\n }\n getUsedDirectives() {\n const set = new Set();\n this.directives.forEach(dirs => dirs.forEach(dir => set.add(dir)));\n return Array.from(set.values());\n }\n getEagerlyUsedDirectives() {\n const set = new Set(this.eagerDirectives);\n return Array.from(set.values());\n }\n getUsedPipes() {\n return Array.from(this.usedPipes);\n }\n getEagerlyUsedPipes() {\n return Array.from(this.eagerPipes);\n }\n getDeferBlocks() {\n return Array.from(this.deferredBlocks);\n }\n}\nfunction extractTemplateEntities(rootScope) {\n const entityMap = new Map();\n function extractScopeEntities(scope) {\n if (entityMap.has(scope.template)) {\n return entityMap.get(scope.template);\n }\n const currentEntities = scope.namedEntities;\n let templateEntities;\n if (scope.parentScope !== null) {\n templateEntities = new Map([...extractScopeEntities(scope.parentScope), ...currentEntities]);\n }\n else {\n templateEntities = new Map(currentEntities);\n }\n entityMap.set(scope.template, templateEntities);\n return templateEntities;\n }\n const scopesToProcess = [rootScope];\n while (scopesToProcess.length > 0) {\n const scope = scopesToProcess.pop();\n for (const childScope of scope.childScopes.values()) {\n scopesToProcess.push(childScope);\n }\n extractScopeEntities(scope);\n }\n const templateEntities = new Map();\n for (const [template, entities] of entityMap) {\n templateEntities.set(template, new Set(entities.values()));\n }\n return templateEntities;\n}\n\nfunction compileClassMetadata(metadata) {\n // Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its\n // metadata.\n const fnCall = importExpr(Identifiers.setClassMetadata).callFn([\n metadata.type,\n metadata.decorators,\n metadata.ctorParameters ?? literal(null),\n metadata.propDecorators ?? literal(null),\n ]);\n const iife = fn([], [devOnlyGuardedExpression(fnCall).toStmt()]);\n return iife.callFn([]);\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';\nfunction compileDeclareClassMetadata(metadata) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', metadata.type);\n definitionMap.set('decorators', metadata.decorators);\n definitionMap.set('ctorParameters', metadata.ctorParameters);\n definitionMap.set('propDecorators', metadata.propDecorators);\n return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);\n}\n\n/**\n * Creates an array literal expression from the given array, mapping all values to an expression\n * using the provided mapping function. If the array is empty or null, then null is returned.\n *\n * @param values The array to transfer into literal array expression.\n * @param mapper The logic to use for creating an expression for the array's values.\n * @returns An array literal expression representing `values`, or null if `values` is empty or\n * is itself null.\n */\nfunction toOptionalLiteralArray(values, mapper) {\n if (values === null || values.length === 0) {\n return null;\n }\n return literalArr(values.map(value => mapper(value)));\n}\n/**\n * Creates an object literal expression from the given object, mapping all values to an expression\n * using the provided mapping function. If the object has no keys, then null is returned.\n *\n * @param object The object to transfer into an object literal expression.\n * @param mapper The logic to use for creating an expression for the object's values.\n * @returns An object literal expression representing `object`, or null if `object` does not have\n * any keys.\n */\nfunction toOptionalLiteralMap(object, mapper) {\n const entries = Object.keys(object).map(key => {\n const value = object[key];\n return { key, value: mapper(value), quoted: true };\n });\n if (entries.length > 0) {\n return literalMap(entries);\n }\n else {\n return null;\n }\n}\nfunction compileDependencies(deps) {\n if (deps === 'invalid') {\n // The `deps` can be set to the string \"invalid\" by the `unwrapConstructorDependencies()`\n // function, which tries to convert `ConstructorDeps` into `R3DependencyMetadata[]`.\n return literal('invalid');\n }\n else if (deps === null) {\n return literal(null);\n }\n else {\n return literalArr(deps.map(compileDependency));\n }\n}\nfunction compileDependency(dep) {\n const depMeta = new DefinitionMap();\n depMeta.set('token', dep.token);\n if (dep.attributeNameType !== null) {\n depMeta.set('attribute', literal(true));\n }\n if (dep.host) {\n depMeta.set('host', literal(true));\n }\n if (dep.optional) {\n depMeta.set('optional', literal(true));\n }\n if (dep.self) {\n depMeta.set('self', literal(true));\n }\n if (dep.skipSelf) {\n depMeta.set('skipSelf', literal(true));\n }\n return depMeta.toLiteralMap();\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$5 = '16.1.0';\n/**\n * Compile a directive declaration defined by the `R3DirectiveMetadata`.\n */\nfunction compileDeclareDirectiveFromMetadata(meta) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);\n const type = createDirectiveType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a directive into a `DefinitionMap`. This allows for reusing\n * this logic for components, as they extend the directive metadata.\n */\nfunction createDirectiveDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n const hasTransformFunctions = Object.values(meta.inputs).some(input => input.transformFunction !== null);\n // Note: in order to allow consuming Angular libraries that have been compiled with 16.1+ in\n // Angular 16.0, we only force a minimum version of 16.1 if input transform feature as introduced\n // in 16.1 is actually used.\n const minVersion = hasTransformFunctions ? MINIMUM_PARTIAL_LINKER_VERSION$5 : '14.0.0';\n definitionMap.set('minVersion', literal(minVersion));\n definitionMap.set('version', literal('16.2.12'));\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.type.value);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n if (meta.isSignal) {\n definitionMap.set('isSignal', literal(meta.isSignal));\n }\n // e.g. `selector: 'some-dir'`\n if (meta.selector !== null) {\n definitionMap.set('selector', literal(meta.selector));\n }\n definitionMap.set('inputs', conditionallyCreateDirectiveBindingLiteral(meta.inputs, true));\n definitionMap.set('outputs', conditionallyCreateDirectiveBindingLiteral(meta.outputs));\n definitionMap.set('host', compileHostMetadata(meta.host));\n definitionMap.set('providers', meta.providers);\n if (meta.queries.length > 0) {\n definitionMap.set('queries', literalArr(meta.queries.map(compileQuery)));\n }\n if (meta.viewQueries.length > 0) {\n definitionMap.set('viewQueries', literalArr(meta.viewQueries.map(compileQuery)));\n }\n if (meta.exportAs !== null) {\n definitionMap.set('exportAs', asLiteral(meta.exportAs));\n }\n if (meta.usesInheritance) {\n definitionMap.set('usesInheritance', literal(true));\n }\n if (meta.lifecycle.usesOnChanges) {\n definitionMap.set('usesOnChanges', literal(true));\n }\n if (meta.hostDirectives?.length) {\n definitionMap.set('hostDirectives', createHostDirectives(meta.hostDirectives));\n }\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n return definitionMap;\n}\n/**\n * Compiles the metadata of a single query into its partial declaration form as declared\n * by `R3DeclareQueryMetadata`.\n */\nfunction compileQuery(query) {\n const meta = new DefinitionMap();\n meta.set('propertyName', literal(query.propertyName));\n if (query.first) {\n meta.set('first', literal(true));\n }\n meta.set('predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) :\n convertFromMaybeForwardRefExpression(query.predicate));\n if (!query.emitDistinctChangesOnly) {\n // `emitDistinctChangesOnly` is special because we expect it to be `true`.\n // Therefore we explicitly emit the field, and explicitly place it only when it's `false`.\n meta.set('emitDistinctChangesOnly', literal(false));\n }\n else {\n // The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.\n }\n if (query.descendants) {\n meta.set('descendants', literal(true));\n }\n meta.set('read', query.read);\n if (query.static) {\n meta.set('static', literal(true));\n }\n return meta.toLiteralMap();\n}\n/**\n * Compiles the host metadata into its partial declaration form as declared\n * in `R3DeclareDirectiveMetadata['host']`\n */\nfunction compileHostMetadata(meta) {\n const hostMetadata = new DefinitionMap();\n hostMetadata.set('attributes', toOptionalLiteralMap(meta.attributes, expression => expression));\n hostMetadata.set('listeners', toOptionalLiteralMap(meta.listeners, literal));\n hostMetadata.set('properties', toOptionalLiteralMap(meta.properties, literal));\n if (meta.specialAttributes.styleAttr) {\n hostMetadata.set('styleAttribute', literal(meta.specialAttributes.styleAttr));\n }\n if (meta.specialAttributes.classAttr) {\n hostMetadata.set('classAttribute', literal(meta.specialAttributes.classAttr));\n }\n if (hostMetadata.values.length > 0) {\n return hostMetadata.toLiteralMap();\n }\n else {\n return null;\n }\n}\nfunction createHostDirectives(hostDirectives) {\n const expressions = hostDirectives.map(current => {\n const keys = [{\n key: 'directive',\n value: current.isForwardReference ? generateForwardRef(current.directive.type) :\n current.directive.type,\n quoted: false\n }];\n const inputsLiteral = current.inputs ? createHostDirectivesMappingArray(current.inputs) : null;\n const outputsLiteral = current.outputs ? createHostDirectivesMappingArray(current.outputs) : null;\n if (inputsLiteral) {\n keys.push({ key: 'inputs', value: inputsLiteral, quoted: false });\n }\n if (outputsLiteral) {\n keys.push({ key: 'outputs', value: outputsLiteral, quoted: false });\n }\n return literalMap(keys);\n });\n // If there's a forward reference, we generate a `function() { return [{directive: HostDir}] }`,\n // otherwise we can save some bytes by using a plain array, e.g. `[{directive: HostDir}]`.\n return literalArr(expressions);\n}\n\n/**\n * Compile a component declaration defined by the `R3ComponentMetadata`.\n */\nfunction compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {\n const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);\n const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);\n const type = createComponentType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a component into a `DefinitionMap`.\n */\nfunction createComponentDefinitionMap(meta, template, templateInfo) {\n const definitionMap = createDirectiveDefinitionMap(meta);\n definitionMap.set('template', getTemplateExpression(template, templateInfo));\n if (templateInfo.isInline) {\n definitionMap.set('isInline', literal(true));\n }\n definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));\n definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));\n definitionMap.set('viewProviders', meta.viewProviders);\n definitionMap.set('animations', meta.animations);\n if (meta.changeDetection !== undefined) {\n definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy)\n .prop(ChangeDetectionStrategy[meta.changeDetection]));\n }\n if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));\n }\n if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {\n definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));\n }\n if (template.preserveWhitespaces === true) {\n definitionMap.set('preserveWhitespaces', literal(true));\n }\n return definitionMap;\n}\nfunction getTemplateExpression(template, templateInfo) {\n // If the template has been defined using a direct literal, we use that expression directly\n // without any modifications. This is ensures proper source mapping from the partially\n // compiled code to the source file declaring the template. Note that this does not capture\n // template literals referenced indirectly through an identifier.\n if (templateInfo.inlineTemplateLiteralExpression !== null) {\n return templateInfo.inlineTemplateLiteralExpression;\n }\n // If the template is defined inline but not through a literal, the template has been resolved\n // through static interpretation. We create a literal but cannot provide any source span. Note\n // that we cannot use the expression defining the template because the linker expects the template\n // to be defined as a literal in the declaration.\n if (templateInfo.isInline) {\n return literal(templateInfo.content, null, null);\n }\n // The template is external so we must synthesize an expression node with\n // the appropriate source-span.\n const contents = templateInfo.content;\n const file = new ParseSourceFile(contents, templateInfo.sourceUrl);\n const start = new ParseLocation(file, 0, 0, 0);\n const end = computeEndLocation(file, contents);\n const span = new ParseSourceSpan(start, end);\n return literal(contents, null, span);\n}\nfunction computeEndLocation(file, contents) {\n const length = contents.length;\n let lineStart = 0;\n let lastLineStart = 0;\n let line = 0;\n do {\n lineStart = contents.indexOf('\\n', lastLineStart);\n if (lineStart !== -1) {\n lastLineStart = lineStart + 1;\n line++;\n }\n } while (lineStart !== -1);\n return new ParseLocation(file, length, line, length - lastLineStart);\n}\nfunction compileUsedDependenciesMetadata(meta) {\n const wrapType = meta.declarationListEmitMode !== 0 /* DeclarationListEmitMode.Direct */ ?\n generateForwardRef :\n (expr) => expr;\n return toOptionalLiteralArray(meta.declarations, decl => {\n switch (decl.kind) {\n case R3TemplateDependencyKind.Directive:\n const dirMeta = new DefinitionMap();\n dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));\n dirMeta.set('type', wrapType(decl.type));\n dirMeta.set('selector', literal(decl.selector));\n dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));\n dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));\n dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));\n return dirMeta.toLiteralMap();\n case R3TemplateDependencyKind.Pipe:\n const pipeMeta = new DefinitionMap();\n pipeMeta.set('kind', literal('pipe'));\n pipeMeta.set('type', wrapType(decl.type));\n pipeMeta.set('name', literal(decl.name));\n return pipeMeta.toLiteralMap();\n case R3TemplateDependencyKind.NgModule:\n const ngModuleMeta = new DefinitionMap();\n ngModuleMeta.set('kind', literal('ngmodule'));\n ngModuleMeta.set('type', wrapType(decl.type));\n return ngModuleMeta.toLiteralMap();\n }\n });\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';\nfunction compileDeclareFactoryFunction(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n definitionMap.set('deps', compileDependencies(meta.deps));\n definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));\n return {\n expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),\n statements: [],\n type: createFactoryType(meta),\n };\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';\n/**\n * Compile a Injectable declaration defined by the `R3InjectableMetadata`.\n */\nfunction compileDeclareInjectableFromMetadata(meta) {\n const definitionMap = createInjectableDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectableType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a Injectable into a `DefinitionMap`.\n */\nfunction createInjectableDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn !== undefined) {\n const providedIn = convertFromMaybeForwardRefExpression(meta.providedIn);\n if (providedIn.value !== null) {\n definitionMap.set('providedIn', providedIn);\n }\n }\n if (meta.useClass !== undefined) {\n definitionMap.set('useClass', convertFromMaybeForwardRefExpression(meta.useClass));\n }\n if (meta.useExisting !== undefined) {\n definitionMap.set('useExisting', convertFromMaybeForwardRefExpression(meta.useExisting));\n }\n if (meta.useValue !== undefined) {\n definitionMap.set('useValue', convertFromMaybeForwardRefExpression(meta.useValue));\n }\n // Factories do not contain `ForwardRef`s since any types are already wrapped in a function call\n // so the types will not be eagerly evaluated. Therefore we do not need to process this expression\n // with `convertFromProviderExpression()`.\n if (meta.useFactory !== undefined) {\n definitionMap.set('useFactory', meta.useFactory);\n }\n if (meta.deps !== undefined) {\n definitionMap.set('deps', literalArr(meta.deps.map(compileDependency)));\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';\nfunction compileDeclareInjectorFromMetadata(meta) {\n const definitionMap = createInjectorDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);\n const type = createInjectorType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for an Injector into a `DefinitionMap`.\n */\nfunction createInjectorDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n definitionMap.set('providers', meta.providers);\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION$1 = '14.0.0';\nfunction compileDeclareNgModuleFromMetadata(meta) {\n const definitionMap = createNgModuleDefinitionMap(meta);\n const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);\n const type = createNgModuleType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for an NgModule into a `DefinitionMap`.\n */\nfunction createNgModuleDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.kind === R3NgModuleMetadataKind.Local) {\n throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');\n }\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', meta.type.value);\n // We only generate the keys in the metadata if the arrays contain values.\n // We must wrap the arrays inside a function if any of the values are a forward reference to a\n // not-yet-declared class. This is to support JIT execution of the `ɵɵngDeclareNgModule()` call.\n // In the linker these wrappers are stripped and then reapplied for the `ɵɵdefineNgModule()` call.\n if (meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n }\n if (meta.declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n }\n if (meta.exports.length > 0) {\n definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n }\n if (meta.schemas !== null && meta.schemas.length > 0) {\n definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));\n }\n if (meta.id !== null) {\n definitionMap.set('id', meta.id);\n }\n return definitionMap;\n}\n\n/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\nconst MINIMUM_PARTIAL_LINKER_VERSION = '14.0.0';\n/**\n * Compile a Pipe declaration defined by the `R3PipeMetadata`.\n */\nfunction compileDeclarePipeFromMetadata(meta) {\n const definitionMap = createPipeDefinitionMap(meta);\n const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);\n const type = createPipeType(meta);\n return { expression, type, statements: [] };\n}\n/**\n * Gathers the declaration fields for a Pipe into a `DefinitionMap`.\n */\nfunction createPipeDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));\n definitionMap.set('version', literal('16.2.12'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n // e.g. `type: MyPipe`\n definitionMap.set('type', meta.type.value);\n if (meta.isStandalone) {\n definitionMap.set('isStandalone', literal(meta.isStandalone));\n }\n // e.g. `name: \"myPipe\"`\n definitionMap.set('name', literal(meta.pipeName));\n if (meta.pure === false) {\n // e.g. `pure: false`\n definitionMap.set('pure', literal(meta.pure));\n }\n return definitionMap;\n}\n\n//////////////////////////////////////\n// This file only reexports content of the `src` folder. Keep it that way.\n// This function call has a global side effects and publishes the compiler into global namespace for\n// the late binding of the Compiler to the @angular/core for jit compilation.\npublishFacade(_global);\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n// This file is not used to build this module. It is only used during editing\n\nexport { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, Block, BlockGroup, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,gBAAgB,GAAG,IAAIC,MAAM,CAAC,cAAc;AAAG;AACjD,uBAAuB;AAAG;AAC1B;AACA;AACA,4DAA4D;AAAG;AAC/D;AACA;AACA,QAAQ;AAAG;AACX,aAAa;AAAE;AACnB,GAAG,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AAO;AACvC;AACA,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,SAAS;AACrD;AACA,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;AACvC;AACA,QAAQ,EAAE,SAAS;AACnB;AACA,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU;AAChF;AACA,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CACrE,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0a,SAAS,CAAC;EACZrjD,WAAWA,CAAA,EAAG;IACV;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACQ,IAAI,CAACsjD,gCAAgC,GAAG,iFAAiF;EAC7H;EACA;AACJ;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACC,OAAO,EAAEljD,QAAQ,EAAEmjD,YAAY,GAAG,EAAE,EAAE;IAC9C;IACA;IACA;IACA;IACA,MAAMC,QAAQ,GAAG,EAAE;IACnBF,OAAO,GAAGA,OAAO,CAACrhD,OAAO,CAACwhD,UAAU,EAAGj2B,CAAC,IAAK;MACzC,I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CAAC;MACd6B,IAAI;MACJw2B,MAAM,EAAEv2B;IACZ,CAAC,CAAC;EACN;AACJ;AACA;AACA;AACA;AACA,SAAS6qE,aAAaA,CAAC7qE,KAAK,EAAE;EAC1B,IAAI,CAACssB,KAAK,CAACC,OAAO,CAACvsB,KAAK,CAAC,EAAE;IACvB,MAAM,IAAIvB,KAAK,CAAC,mCAAmC,CAAC;EACxD;AACJ;AAEA,MAAMqsE,qBAAqB,GAAG,KAAK;AAEnC,MAAMC,cAAc,GAAG,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kCAAkC,GAAG,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,CAAC;EACjB3tE,WAAWA,CAAC4tE,cAAc,EAAE;IACxB,IAAI,CAACA,cAAc,GAAGA,cAAc;IACpC;IACA,IAAI,CAACC,iBAAiB,GAAG,KAAK;IAC9B;AACR;AACA;AACA;IACQ,IAAI,CAACC,WAAW,GAAG,KAAK;IACxB,IAAI,CAACC,oBAAoB,GAAG,KAAK;IACjC;IACA,IAAI,CAACC,cAAc,GAAG,IAAI;IAC1B;IACA,IAAI,CAACC,cAAc,GAAG,IAAI;IAC1B;IACA,IAAI,CAACC,kBAAkB,GAAG,IAAI;IAC9B;IACA,IAAI,CAACC,kBAAkB,GAAG,IAAI;IAC9B,IAAI,CAACC,iBAAiB,GAAG,IAAI;IAC7B,IAAI,CAACC,kBAAkB,GAAG,IAAI;IAC9B;IACA;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