1 line
No EOL
3.5 MiB
1 line
No EOL
3.5 MiB
{"ast":null,"code":"/**\n * @license Angular v18.2.10\n * (c) 2010-2024 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 = {}));\n/** Flags describing an input for a directive. */\nvar InputFlags;\n(function (InputFlags) {\n InputFlags[InputFlags[\"None\"] = 0] = \"None\";\n InputFlags[InputFlags[\"SignalBased\"] = 1] = \"SignalBased\";\n InputFlags[InputFlags[\"HasDecoratorInputTransform\"] = 2] = \"HasDecoratorInputTransform\";\n})(InputFlags || (InputFlags = {}));\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 get InputFlags() {\n return InputFlags;\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 * 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, preservePlaceholders) {\n return message.id || computeDecimalDigest(message, preservePlaceholders);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message, preservePlaceholders) {\n const visitor = new _SerializerIgnoreExpVisitor(preservePlaceholders);\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 visitBlockPlaceholder(ph, context) {\n return `<ph block name=\"${ph.startName}\">${ph.children.map(child => child.visit(this)).join(', ')}</ph name=\"${ph.closeName}\">`;\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 expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreExpVisitor extends _SerializerVisitor {\n constructor(preservePlaceholders) {\n super();\n this.preservePlaceholders = preservePlaceholders;\n }\n visitPlaceholder(ph, context) {\n // Do not take the expression into account when `preservePlaceholders` is disabled.\n return this.preservePlaceholders ? super.visitPlaceholder(ph, context) : `<ph name=\"${ph.name}\"/>`;\n }\n visitIcu(icu) {\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 BigInt.asUintN(32, BigInt(hi)) << BigInt(32) | BigInt.asUintN(32, BigInt(lo));\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n // Rotate the 64-bit message fingerprint one bit to the left and then add the meaning\n // fingerprint.\n msgFingerprint = BigInt.asUintN(64, msgFingerprint << BigInt(1)) | msgFingerprint >> BigInt(63) & BigInt(1);\n msgFingerprint += fingerprint(meaning);\n }\n return BigInt.asUintN(63, msgFingerprint).toString();\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}\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// 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}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return a << count | a >>> 32 - count;\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//// 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[\"BitwiseOr\"] = 11] = \"BitwiseOr\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 12] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 13] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 14] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 15] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 16] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 17] = \"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 bitwiseOr(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);\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 || e instanceof DeclareFunctionStmt) && 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 ArrowFunctionExpr extends Expression {\n // Note that `body: Expression` represents `() => expr` whereas\n // `body: Statement[]` represents `() => { expr }`.\n constructor(params, body, type, sourceSpan) {\n super(type, sourceSpan);\n this.params = params;\n this.body = body;\n }\n isEquivalent(e) {\n if (!(e instanceof ArrowFunctionExpr) || !areAllEquivalent(this.params, e.params)) {\n return false;\n }\n if (this.body instanceof Expression && e.body instanceof Expression) {\n return this.body.isEquivalent(e.body);\n }\n if (Array.isArray(this.body) && Array.isArray(e.body)) {\n return areAllEquivalent(this.body, e.body);\n }\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitArrowFunctionExpr(this, context);\n }\n clone() {\n // TODO: Should we deep clone statements?\n return new ArrowFunctionExpr(this.params.map(p => p.clone()), Array.isArray(this.body) ? this.body : this.body.clone(), this.type, this.sourceSpan);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareVarStmt(name, this, INFERRED_TYPE, modifiers, this.sourceSpan);\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 visitArrowFunctionExpr(ast, context) {\n if (Array.isArray(ast.body)) {\n this.visitAllStatements(ast.body, context);\n } else {\n this.visitExpression(ast.body, context);\n }\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 arrowFn(params, body, type, sourceSpan) {\n return new ArrowFunctionExpr(params, body, type, sourceSpan);\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 ArrowFunctionExpr: ArrowFunctionExpr,\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 arrowFn: arrowFn,\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 /**\n * Constant pool also tracks claimed names from {@link uniqueName}.\n * This is useful to avoid collisions if variables are intended to be\n * named a certain way- but may conflict. We wouldn't want to always suffix\n * them with unique numbers.\n */\n this._claimedNames = 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 // TODO: useUniqueName(false) is necessary for naming compatibility with\n // TemplateDefinitionBuilder, but should be removed once Template Pipeline is the default.\n getSharedFunctionReference(fn, prefix, useUniqueName = true) {\n const isArrow = fn instanceof ArrowFunctionExpr;\n for (const current of this.statements) {\n // Arrow functions are saved as variables so we check if the\n // value of the variable is the same as the arrow function.\n if (isArrow && current instanceof DeclareVarStmt && current.value?.isEquivalent(fn)) {\n return variable(current.name);\n }\n // Function declarations are saved as function statements\n // so we compare them directly to the passed-in function.\n if (!isArrow && current instanceof DeclareFunctionStmt && fn instanceof FunctionExpr && fn.isEquivalent(current)) {\n return variable(current.name);\n }\n }\n // Otherwise declare the function.\n const name = useUniqueName ? this.uniqueName(prefix) : prefix;\n this.statements.push(fn instanceof FunctionExpr ? fn.toDeclStmt(name, StmtModifier.Final) : new DeclareVarStmt(name, fn, INFERRED_TYPE, StmtModifier.Final, fn.sourceSpan));\n return variable(name);\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 = arrowFn(parameters, 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 in the context of this pool.\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(name, alwaysIncludeSuffix = true) {\n const count = this._claimedNames.get(name) ?? 0;\n const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;\n this._claimedNames.set(name, count + 1);\n return result;\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.deferWhen = {\n name: 'ɵɵdeferWhen',\n moduleName: CORE\n };\n }\n static {\n this.deferOnIdle = {\n name: 'ɵɵdeferOnIdle',\n moduleName: CORE\n };\n }\n static {\n this.deferOnImmediate = {\n name: 'ɵɵdeferOnImmediate',\n moduleName: CORE\n };\n }\n static {\n this.deferOnTimer = {\n name: 'ɵɵdeferOnTimer',\n moduleName: CORE\n };\n }\n static {\n this.deferOnHover = {\n name: 'ɵɵdeferOnHover',\n moduleName: CORE\n };\n }\n static {\n this.deferOnInteraction = {\n name: 'ɵɵdeferOnInteraction',\n moduleName: CORE\n };\n }\n static {\n this.deferOnViewport = {\n name: 'ɵɵdeferOnViewport',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchWhen = {\n name: 'ɵɵdeferPrefetchWhen',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnIdle = {\n name: 'ɵɵdeferPrefetchOnIdle',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnImmediate = {\n name: 'ɵɵdeferPrefetchOnImmediate',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnTimer = {\n name: 'ɵɵdeferPrefetchOnTimer',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnHover = {\n name: 'ɵɵdeferPrefetchOnHover',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnInteraction = {\n name: 'ɵɵdeferPrefetchOnInteraction',\n moduleName: CORE\n };\n }\n static {\n this.deferPrefetchOnViewport = {\n name: 'ɵɵdeferPrefetchOnViewport',\n moduleName: CORE\n };\n }\n static {\n this.deferEnableTimerScheduling = {\n name: 'ɵɵdeferEnableTimerScheduling',\n moduleName: CORE\n };\n }\n static {\n this.conditional = {\n name: 'ɵɵconditional',\n moduleName: CORE\n };\n }\n static {\n this.repeater = {\n name: 'ɵɵrepeater',\n moduleName: CORE\n };\n }\n static {\n this.repeaterCreate = {\n name: 'ɵɵrepeaterCreate',\n moduleName: CORE\n };\n }\n static {\n this.repeaterTrackByIndex = {\n name: 'ɵɵrepeaterTrackByIndex',\n moduleName: CORE\n };\n }\n static {\n this.repeaterTrackByIdentity = {\n name: 'ɵɵrepeaterTrackByIdentity',\n moduleName: CORE\n };\n }\n static {\n this.componentInstance = {\n name: 'ɵɵcomponentInstance',\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.getComponentDepsFactory = {\n name: 'ɵɵgetComponentDepsFactory',\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.declareClassMetadataAsync = {\n name: 'ɵɵngDeclareClassMetadataAsync',\n moduleName: CORE\n };\n }\n static {\n this.setClassMetadata = {\n name: 'ɵsetClassMetadata',\n moduleName: CORE\n };\n }\n static {\n this.setClassMetadataAsync = {\n name: 'ɵsetClassMetadataAsync',\n moduleName: CORE\n };\n }\n static {\n this.setClassDebugInfo = {\n name: 'ɵsetClassDebugInfo',\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 // Signal queries\n static {\n this.viewQuerySignal = {\n name: 'ɵɵviewQuerySignal',\n moduleName: CORE\n };\n }\n static {\n this.contentQuerySignal = {\n name: 'ɵɵcontentQuerySignal',\n moduleName: CORE\n };\n }\n static {\n this.queryAdvance = {\n name: 'ɵɵqueryAdvance',\n moduleName: CORE\n };\n }\n // Two-way bindings\n static {\n this.twoWayProperty = {\n name: 'ɵɵtwoWayProperty',\n moduleName: CORE\n };\n }\n static {\n this.twoWayBindingSet = {\n name: 'ɵɵtwoWayBindingSet',\n moduleName: CORE\n };\n }\n static {\n this.twoWayListener = {\n name: 'ɵɵtwoWayListener',\n moduleName: CORE\n };\n }\n static {\n this.declareLet = {\n name: 'ɵɵdeclareLet',\n moduleName: CORE\n };\n }\n static {\n this.storeLet = {\n name: 'ɵɵstoreLet',\n moduleName: CORE\n };\n }\n static {\n this.readContextLet = {\n name: 'ɵɵreadContextLet',\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 // type-checking\n static {\n this.InputSignalBrandWriteType = {\n name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE',\n moduleName: CORE\n };\n }\n static {\n this.UnwrapDirectiveSignalInputs = {\n name: 'ɵUnwrapDirectiveSignalInputs',\n moduleName: CORE\n };\n }\n static {\n this.unwrapWritableSignal = {\n name: 'ɵunwrapWritableSignal',\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 const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;\n if (shouldParenthesize) {\n ctx.print(expr.fn, '(');\n }\n expr.fn.visitExpression(this, ctx);\n if (shouldParenthesize) {\n ctx.print(expr.fn, ')');\n }\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.BitwiseOr:\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 ? arrowFn([], 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([arrowFn([], 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('__ngFactoryType__');\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('__ngConditionalFactory__');\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.name, 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 = arrowFn([], [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}\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[\"TWO_WAY\"] = 3] = \"TWO_WAY\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nvar ParsedEventType;\n(function (ParsedEventType) {\n // DOM or Directive event\n ParsedEventType[ParsedEventType[\"Regular\"] = 0] = \"Regular\";\n // Animation specific event\n ParsedEventType[ParsedEventType[\"Animation\"] = 1] = \"Animation\";\n // Event side of a two-way binding (e.g. `[(property)]=\"expression\"`).\n ParsedEventType[ParsedEventType[\"TwoWay\"] = 2] = \"TwoWay\";\n})(ParsedEventType || (ParsedEventType = {}));\nclass ParsedEvent {\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}\nvar BindingType;\n(function (BindingType) {\n // A regular binding to a property (e.g. `[property]=\"expression\"`).\n BindingType[BindingType[\"Property\"] = 0] = \"Property\";\n // A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n BindingType[BindingType[\"Attribute\"] = 1] = \"Attribute\";\n // A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n BindingType[BindingType[\"Class\"] = 2] = \"Class\";\n // A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n BindingType[BindingType[\"Style\"] = 3] = \"Style\";\n // A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n BindingType[BindingType[\"Animation\"] = 4] = \"Animation\";\n // Property side of a two-way binding (e.g. `[(property)]=\"expression\"`).\n BindingType[BindingType[\"TwoWay\"] = 5] = \"TwoWay\";\n})(BindingType || (BindingType = {}));\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}\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, fatal = true) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const colonIndex = elementName.indexOf(':', 1);\n if (colonIndex === -1) {\n if (fatal) {\n throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n } else {\n return [null, elementName];\n }\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 * 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 === ParsedEventType.Regular ? event.targetOrPhase : null;\n const phase = event.type === 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(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan) {\n this.nameSpan = nameSpan;\n this.sourceSpan = sourceSpan;\n this.prefetchSpan = prefetchSpan;\n this.whenOrOnSourceSpan = whenOrOnSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredTrigger(this);\n }\n}\nclass BoundDeferredTrigger extends DeferredTrigger {\n constructor(value, sourceSpan, prefetchSpan, whenSourceSpan) {\n // BoundDeferredTrigger is for 'when' triggers. These aren't really \"triggers\" and don't have a\n // nameSpan. Trigger names are the built in event triggers like hover, interaction, etc.\n super( /** nameSpan */null, sourceSpan, prefetchSpan, whenSourceSpan);\n this.value = value;\n }\n}\nclass IdleDeferredTrigger extends DeferredTrigger {}\nclass ImmediateDeferredTrigger extends DeferredTrigger {}\nclass HoverDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass TimerDeferredTrigger extends DeferredTrigger {\n constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.delay = delay;\n }\n}\nclass InteractionDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass ViewportDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass BlockNode {\n constructor(nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {\n this.nameSpan = nameSpan;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n}\nclass DeferredBlockPlaceholder extends BlockNode {\n constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.minimumTime = minimumTime;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockPlaceholder(this);\n }\n}\nclass DeferredBlockLoading extends BlockNode {\n constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.afterTime = afterTime;\n this.minimumTime = minimumTime;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockLoading(this);\n }\n}\nclass DeferredBlockError extends BlockNode {\n constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockError(this);\n }\n}\nclass DeferredBlock extends BlockNode {\n constructor(children, triggers, prefetchTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.placeholder = placeholder;\n this.loading = loading;\n this.error = error;\n this.mainBlockSpan = mainBlockSpan;\n this.i18n = i18n;\n this.triggers = triggers;\n this.prefetchTriggers = prefetchTriggers;\n // We cache the keys since we know that they won't change and we\n // don't want to enumarate them every time we're traversing the AST.\n this.definedTriggers = Object.keys(triggers);\n this.definedPrefetchTriggers = Object.keys(prefetchTriggers);\n }\n visit(visitor) {\n return visitor.visitDeferredBlock(this);\n }\n visitAll(visitor) {\n this.visitTriggers(this.definedTriggers, this.triggers, visitor);\n this.visitTriggers(this.definedPrefetchTriggers, this.prefetchTriggers, visitor);\n visitAll$1(visitor, this.children);\n const remainingBlocks = [this.placeholder, this.loading, this.error].filter(x => x !== null);\n visitAll$1(visitor, remainingBlocks);\n }\n visitTriggers(keys, triggers, visitor) {\n visitAll$1(visitor, keys.map(k => triggers[k]));\n }\n}\nclass SwitchBlock extends BlockNode {\n constructor(expression, cases,\n /**\n * These blocks are only captured to allow for autocompletion in the language service. They\n * aren't meant to be processed in any other way.\n */\n unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.cases = cases;\n this.unknownBlocks = unknownBlocks;\n }\n visit(visitor) {\n return visitor.visitSwitchBlock(this);\n }\n}\nclass SwitchBlockCase extends BlockNode {\n constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitSwitchBlockCase(this);\n }\n}\nclass ForLoopBlock extends BlockNode {\n constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.item = item;\n this.expression = expression;\n this.trackBy = trackBy;\n this.trackKeywordSpan = trackKeywordSpan;\n this.contextVariables = contextVariables;\n this.children = children;\n this.empty = empty;\n this.mainBlockSpan = mainBlockSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitForLoopBlock(this);\n }\n}\nclass ForLoopBlockEmpty extends BlockNode {\n constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitForLoopBlockEmpty(this);\n }\n}\nclass IfBlock extends BlockNode {\n constructor(branches, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.branches = branches;\n }\n visit(visitor) {\n return visitor.visitIfBlock(this);\n }\n}\nclass IfBlockBranch extends BlockNode {\n constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.children = children;\n this.expressionAlias = expressionAlias;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIfBlockBranch(this);\n }\n}\nclass UnknownBlock {\n constructor(name, sourceSpan, nameSpan) {\n this.name = name;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n }\n visit(visitor) {\n return visitor.visitUnknownBlock(this);\n }\n}\nclass LetDeclaration$1 {\n constructor(name, value, sourceSpan, nameSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitLetDeclaration(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, children, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.children = children;\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 deferred.visitAll(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 visitSwitchBlock(block) {\n visitAll$1(this, block.cases);\n }\n visitSwitchBlockCase(block) {\n visitAll$1(this, block.children);\n }\n visitForLoopBlock(block) {\n const blockItems = [block.item, ...block.contextVariables, ...block.children];\n block.empty && blockItems.push(block.empty);\n visitAll$1(this, blockItems);\n }\n visitForLoopBlockEmpty(block) {\n visitAll$1(this, block.children);\n }\n visitIfBlock(block) {\n visitAll$1(this, block.branches);\n }\n visitIfBlockBranch(block) {\n const blockItems = block.children;\n block.expressionAlias && blockItems.push(block.expressionAlias);\n visitAll$1(this, blockItems);\n }\n visitContent(content) {\n visitAll$1(this, content.children);\n }\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 visitUnknownBlock(block) {}\n visitLetDeclaration(decl) {}\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}\nclass BlockPlaceholder {\n constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {\n this.name = name;\n this.parameters = parameters;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockPlaceholder(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 visitBlockPlaceholder(ph, context) {\n const children = ph.children.map(n => n.visit(this, context));\n return new BlockPlaceholder(ph.name, ph.parameters, ph.startName, ph.closeName, children, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\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 visitBlockPlaceholder(ph, context) {\n ph.children.forEach(child => child.visit(this));\n }\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 visitBlockPlaceholder(ph) {\n const children = ph.children.map(child => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\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 visitBlockPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitBlockPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\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, '&'], [/\"/g, '"'], [/'/g, '''], [/</g, '<'], [/>/g, '>']];\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\n/**\n * Defines the `handler` value on the serialized XMB, indicating that Angular\n * generated the bundle. This is useful for analytics in Translation Console.\n *\n * NOTE: Keep in sync with\n * packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.ts.\n */\nconst _XMB_HANDLER = 'angular';\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 constructor(preservePlaceholders = true) {\n super();\n this.preservePlaceholders = preservePlaceholders;\n }\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n const rootNode = new Tag(_MESSAGES_TAG);\n rootNode.attrs['handler'] = _XMB_HANDLER;\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, this.preservePlaceholders);\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 visitBlockPlaceholder(ph, context) {\n const startAsText = new Text$1(`@${ph.name}`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startAsText]);\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, startAsText]);\n const closeAsText = new Text$1(`}`);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeAsText]);\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, closeAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\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, preservePlaceholders) {\n return decimalDigest(message, preservePlaceholders);\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/** 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_';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some(attr => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\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}\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/**\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 * not work in some cases when object keys are mangled by a 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/**\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(pushStatement, name) {\n let temp = null;\n return () => {\n if (!temp) {\n pushStatement(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}\n/**\n * Serializes inputs and outputs for `defineDirective` and `defineComponent`.\n *\n * This will attempt to generate optimized data structures to minimize memory or\n * file size of fully compiled applications.\n */\nfunction conditionallyCreateDirectiveBindingLiteral(map, forInputs) {\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 const differentDeclaringName = publicName !== declaredName;\n const hasDecoratorInputTransform = value.transformFunction !== null;\n let flags = InputFlags.None;\n // Build up input flags\n if (value.isSignal) {\n flags |= InputFlags.SignalBased;\n }\n if (hasDecoratorInputTransform) {\n flags |= InputFlags.HasDecoratorInputTransform;\n }\n // Inputs, compared to outputs, will track their declared name (for `ngOnChanges`), support\n // decorator input transform functions, or store flag information if there is any.\n if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== InputFlags.None)) {\n const result = [literal(flags), asLiteral(publicName)];\n if (differentDeclaringName || hasDecoratorInputTransform) {\n result.push(asLiteral(declaredName));\n if (hasDecoratorInputTransform) {\n result.push(value.transformFunction);\n }\n }\n expressionValue = literalArr(result);\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 * 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 const existing = this.values.find(value => value.key === key);\n if (existing) {\n existing.value = value;\n } else {\n this.values.push({\n key: key,\n value,\n quoted: false\n });\n }\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Creates a `CssSelector` from an AST node.\n */\nfunction createCssSelectorFromNode(node) {\n const elementName = node instanceof Element$1 ? node.name : 'ng-template';\n const attributes = getAttrsForDirectiveMatching(node);\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 * 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 === BindingType.Property || i.type === BindingType.TwoWay) {\n attributesMap[i.name] = '';\n }\n });\n elOrTpl.outputs.forEach(o => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\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: arrowFn([], 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 const t = new FnParam('__ngFactoryType__', DYNAMIC_TYPE);\n return arrowFn([t], type.prop('ɵfac').callFn([variable(t.name)]));\n}\nconst UNUSABLE_INTERPOLATION_REGEXPS = [/@/,\n// control flow reserved symbol\n/^\\s*$/,\n// empty\n/[<>]/,\n// html tag\n/^[{}]$/,\n// i18n expansion\n/&(#|[a-z])/i,\n// character reference,\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 } 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 DEFAULT_CONTAINER_BLOCKS = new Set(['switch']);\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 visitArrowFunctionExpr(ast, ctx) {\n ctx.print(ast, '(');\n this._visitParams(ast.params, ctx);\n ctx.print(ast, ') =>');\n if (Array.isArray(ast.body)) {\n ctx.println(ast, `{`);\n ctx.incIndent();\n this.visitAllStatements(ast.body, ctx);\n ctx.decIndent();\n ctx.print(ast, `}`);\n } else {\n const isObjectLiteral = ast.body instanceof LiteralMapExpr;\n if (isObjectLiteral) {\n ctx.print(ast, '(');\n }\n ast.body.visitExpression(this, ctx);\n if (isObjectLiteral) {\n ctx.print(ast, ')');\n }\n }\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 const trustedTypes = _global['trustedTypes'];\n policy = null;\n if (trustedTypes) {\n try {\n policy = 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. In local compilation mode (i.e., for\n // `R3NgModuleMetadataKind.LOCAL`) we assign the bootstrap field using the runtime\n // `ɵɵsetNgModuleScope`.\n if (meta.kind === R3NgModuleMetadataKind.Global && meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\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 (meta.kind === R3NgModuleMetadataKind.Local && meta.bootstrapExpression) {\n scopeMap.set('bootstrap', meta.bootstrapExpression);\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 = {}));\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 array contains all of the CSS at-rule identifiers which are scoped.\n */\nconst scopedAtRuleIdentifiers = ['@media', '@supports', '@document', '@layer', '@container', '@scope', '@starting-style'];\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 * captures how many (if any) leading whitespaces are present or a comma\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 sensitive 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 (scopedAtRuleIdentifiers.some(atRule => rule.selector.startsWith(atRule))) {\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.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 p;\n }\n if (p.includes(_polyfillHostNoCombinator)) {\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.includes(_polyfillHostNoCombinator);\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 // Do not trim the selector, as otherwise this will break sourcemaps\n // when they are defined on multiple lines\n // Example:\n // div,\n // p { color: red}\n const part = selector.slice(startIndex, res.index);\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(/__esc-ph-(\\d+)__/) && selector[res.index + 1]?.match(/[a-fA-F\\d]/)) {\n continue;\n }\n shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator);\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.includes(_polyfillHostNoCombinator);\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 // Escaped characters have a specific placeholder so they can be detected separately.\n selector = selector.replace(/(\\\\.)/g, (_, keep) => {\n const replaceBy = `__esc-ph-${this.index}__`;\n this.placeholders.push(keep);\n this.index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, 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(/__(?:ph|esc-ph)-(\\d+)__/g, (_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 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}\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 op to conditionally render a template.\n */\n OpKind[OpKind[\"Conditional\"] = 11] = \"Conditional\";\n /**\n * An operation to re-enable binding, after it was previously disabled.\n */\n OpKind[OpKind[\"EnableBindings\"] = 12] = \"EnableBindings\";\n /**\n * An operation to render a text node.\n */\n OpKind[OpKind[\"Text\"] = 13] = \"Text\";\n /**\n * An operation declaring an event listener for an element.\n */\n OpKind[OpKind[\"Listener\"] = 14] = \"Listener\";\n /**\n * An operation to interpolate text into a text node.\n */\n OpKind[OpKind[\"InterpolateText\"] = 15] = \"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\"] = 16] = \"Binding\";\n /**\n * An operation to bind an expression to a property of an element.\n */\n OpKind[OpKind[\"Property\"] = 17] = \"Property\";\n /**\n * An operation to bind an expression to a style property of an element.\n */\n OpKind[OpKind[\"StyleProp\"] = 18] = \"StyleProp\";\n /**\n * An operation to bind an expression to a class property of an element.\n */\n OpKind[OpKind[\"ClassProp\"] = 19] = \"ClassProp\";\n /**\n * An operation to bind an expression to the styles of an element.\n */\n OpKind[OpKind[\"StyleMap\"] = 20] = \"StyleMap\";\n /**\n * An operation to bind an expression to the classes of an element.\n */\n OpKind[OpKind[\"ClassMap\"] = 21] = \"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\"] = 22] = \"Advance\";\n /**\n * An operation to instantiate a pipe.\n */\n OpKind[OpKind[\"Pipe\"] = 23] = \"Pipe\";\n /**\n * An operation to associate an attribute with an element.\n */\n OpKind[OpKind[\"Attribute\"] = 24] = \"Attribute\";\n /**\n * An attribute that has been extracted for inclusion in the consts array.\n */\n OpKind[OpKind[\"ExtractedAttribute\"] = 25] = \"ExtractedAttribute\";\n /**\n * An operation that configures a `@defer` block.\n */\n OpKind[OpKind[\"Defer\"] = 26] = \"Defer\";\n /**\n * An operation that controls when a `@defer` loads.\n */\n OpKind[OpKind[\"DeferOn\"] = 27] = \"DeferOn\";\n /**\n * An operation that controls when a `@defer` loads, using a custom expression as the condition.\n */\n OpKind[OpKind[\"DeferWhen\"] = 28] = \"DeferWhen\";\n /**\n * An i18n message that has been extracted for inclusion in the consts array.\n */\n OpKind[OpKind[\"I18nMessage\"] = 29] = \"I18nMessage\";\n /**\n * A host binding property.\n */\n OpKind[OpKind[\"HostProperty\"] = 30] = \"HostProperty\";\n /**\n * A namespace change, which causes the subsequent elements to be processed as either HTML or SVG.\n */\n OpKind[OpKind[\"Namespace\"] = 31] = \"Namespace\";\n /**\n * Configure a content projeciton definition for the view.\n */\n OpKind[OpKind[\"ProjectionDef\"] = 32] = \"ProjectionDef\";\n /**\n * Create a content projection slot.\n */\n OpKind[OpKind[\"Projection\"] = 33] = \"Projection\";\n /**\n * Create a repeater creation instruction op.\n */\n OpKind[OpKind[\"RepeaterCreate\"] = 34] = \"RepeaterCreate\";\n /**\n * An update up for a repeater.\n */\n OpKind[OpKind[\"Repeater\"] = 35] = \"Repeater\";\n /**\n * An operation to bind an expression to the property side of a two-way binding.\n */\n OpKind[OpKind[\"TwoWayProperty\"] = 36] = \"TwoWayProperty\";\n /**\n * An operation declaring the event side of a two-way binding.\n */\n OpKind[OpKind[\"TwoWayListener\"] = 37] = \"TwoWayListener\";\n /**\n * A creation-time operation that initializes the slot for a `@let` declaration.\n */\n OpKind[OpKind[\"DeclareLet\"] = 38] = \"DeclareLet\";\n /**\n * An update-time operation that stores the current value of a `@let` declaration.\n */\n OpKind[OpKind[\"StoreLet\"] = 39] = \"StoreLet\";\n /**\n * The start of an i18n block.\n */\n OpKind[OpKind[\"I18nStart\"] = 40] = \"I18nStart\";\n /**\n * A self-closing i18n on a single element.\n */\n OpKind[OpKind[\"I18n\"] = 41] = \"I18n\";\n /**\n * The end of an i18n block.\n */\n OpKind[OpKind[\"I18nEnd\"] = 42] = \"I18nEnd\";\n /**\n * An expression in an i18n message.\n */\n OpKind[OpKind[\"I18nExpression\"] = 43] = \"I18nExpression\";\n /**\n * An instruction that applies a set of i18n expressions.\n */\n OpKind[OpKind[\"I18nApply\"] = 44] = \"I18nApply\";\n /**\n * An instruction to create an ICU expression.\n */\n OpKind[OpKind[\"IcuStart\"] = 45] = \"IcuStart\";\n /**\n * An instruction to update an ICU expression.\n */\n OpKind[OpKind[\"IcuEnd\"] = 46] = \"IcuEnd\";\n /**\n * An instruction representing a placeholder in an ICU expression.\n */\n OpKind[OpKind[\"IcuPlaceholder\"] = 47] = \"IcuPlaceholder\";\n /**\n * An i18n context containing information needed to generate an i18n message.\n */\n OpKind[OpKind[\"I18nContext\"] = 48] = \"I18nContext\";\n /**\n * A creation op that corresponds to i18n attributes on an element.\n */\n OpKind[OpKind[\"I18nAttributes\"] = 49] = \"I18nAttributes\";\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 * A reference to the view context, for use inside a track function.\n */\n ExpressionKind[ExpressionKind[\"TrackContext\"] = 2] = \"TrackContext\";\n /**\n * Read of a variable declared in a `VariableOp`.\n */\n ExpressionKind[ExpressionKind[\"ReadVariable\"] = 3] = \"ReadVariable\";\n /**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\n ExpressionKind[ExpressionKind[\"NextContext\"] = 4] = \"NextContext\";\n /**\n * Runtime operation to retrieve the value of a local reference.\n */\n ExpressionKind[ExpressionKind[\"Reference\"] = 5] = \"Reference\";\n /**\n * A call storing the value of a `@let` declaration.\n */\n ExpressionKind[ExpressionKind[\"StoreLet\"] = 6] = \"StoreLet\";\n /**\n * A reference to a `@let` declaration read from the context view.\n */\n ExpressionKind[ExpressionKind[\"ContextLetReference\"] = 7] = \"ContextLetReference\";\n /**\n * Runtime operation to snapshot the current view context.\n */\n ExpressionKind[ExpressionKind[\"GetCurrentView\"] = 8] = \"GetCurrentView\";\n /**\n * Runtime operation to restore a snapshotted view.\n */\n ExpressionKind[ExpressionKind[\"RestoreView\"] = 9] = \"RestoreView\";\n /**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\n ExpressionKind[ExpressionKind[\"ResetView\"] = 10] = \"ResetView\";\n /**\n * Defines and calls a function with change-detected arguments.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionExpr\"] = 11] = \"PureFunctionExpr\";\n /**\n * Indicates a positional parameter to a pure function definition.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionParameterExpr\"] = 12] = \"PureFunctionParameterExpr\";\n /**\n * Binding to a pipe transformation.\n */\n ExpressionKind[ExpressionKind[\"PipeBinding\"] = 13] = \"PipeBinding\";\n /**\n * Binding to a pipe transformation with a variable number of arguments.\n */\n ExpressionKind[ExpressionKind[\"PipeBindingVariadic\"] = 14] = \"PipeBindingVariadic\";\n /*\n * A safe property read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafePropertyRead\"] = 15] = \"SafePropertyRead\";\n /**\n * A safe keyed read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeKeyedRead\"] = 16] = \"SafeKeyedRead\";\n /**\n * A safe function call requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeInvokeFunction\"] = 17] = \"SafeInvokeFunction\";\n /**\n * An intermediate expression that will be expanded from a safe read into an explicit ternary.\n */\n ExpressionKind[ExpressionKind[\"SafeTernaryExpr\"] = 18] = \"SafeTernaryExpr\";\n /**\n * An empty expression that will be stipped before generating the final output.\n */\n ExpressionKind[ExpressionKind[\"EmptyExpr\"] = 19] = \"EmptyExpr\";\n /*\n * An assignment to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"AssignTemporaryExpr\"] = 20] = \"AssignTemporaryExpr\";\n /**\n * A reference to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"ReadTemporaryExpr\"] = 21] = \"ReadTemporaryExpr\";\n /**\n * An expression that will cause a literal slot index to be emitted.\n */\n ExpressionKind[ExpressionKind[\"SlotLiteralExpr\"] = 22] = \"SlotLiteralExpr\";\n /**\n * A test expression for a conditional op.\n */\n ExpressionKind[ExpressionKind[\"ConditionalCase\"] = 23] = \"ConditionalCase\";\n /**\n * An expression that will be automatically extracted to the component const array.\n */\n ExpressionKind[ExpressionKind[\"ConstCollected\"] = 24] = \"ConstCollected\";\n /**\n * Operation that sets the value of a two-way binding.\n */\n ExpressionKind[ExpressionKind[\"TwoWayBindingSet\"] = 25] = \"TwoWayBindingSet\";\n})(ExpressionKind || (ExpressionKind = {}));\nvar VariableFlags;\n(function (VariableFlags) {\n VariableFlags[VariableFlags[\"None\"] = 0] = \"None\";\n /**\n * Always inline this variable, regardless of the number of times it's used.\n * An `AlwaysInline` variable may not depend on context, because doing so may cause side effects\n * that are illegal when multi-inlined. (The optimizer will enforce this constraint.)\n */\n VariableFlags[VariableFlags[\"AlwaysInline\"] = 1] = \"AlwaysInline\";\n})(VariableFlags || (VariableFlags = {}));\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 /**\n * An alias generated by a special embedded view type (e.g. a `@for` block).\n */\n SemanticVariableKind[SemanticVariableKind[\"Alias\"] = 3] = \"Alias\";\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\n * of 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 * 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 * Animation property bindings.\n */\n BindingKind[BindingKind[\"Animation\"] = 6] = \"Animation\";\n /**\n * Property side of a two-way binding.\n */\n BindingKind[BindingKind[\"TwoWayProperty\"] = 7] = \"TwoWayProperty\";\n})(BindingKind || (BindingKind = {}));\n/**\n * Enumeration of possible times i18n params can be resolved.\n */\nvar I18nParamResolutionTime;\n(function (I18nParamResolutionTime) {\n /**\n * Param is resolved at message creation time. Most params should be resolved at message creation\n * time. However, ICU params need to be handled in post-processing.\n */\n I18nParamResolutionTime[I18nParamResolutionTime[\"Creation\"] = 0] = \"Creation\";\n /**\n * Param is resolved during post-processing. This should be used for params whose value comes from\n * an ICU.\n */\n I18nParamResolutionTime[I18nParamResolutionTime[\"Postproccessing\"] = 1] = \"Postproccessing\";\n})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));\n/**\n * The contexts in which an i18n expression can be used.\n */\nvar I18nExpressionFor;\n(function (I18nExpressionFor) {\n /**\n * This expression is used as a value (i.e. inside an i18n block).\n */\n I18nExpressionFor[I18nExpressionFor[\"I18nText\"] = 0] = \"I18nText\";\n /**\n * This expression is used in a binding.\n */\n I18nExpressionFor[I18nExpressionFor[\"I18nAttribute\"] = 1] = \"I18nAttribute\";\n})(I18nExpressionFor || (I18nExpressionFor = {}));\n/**\n * Flags that describe what an i18n param value. These determine how the value is serialized into\n * the final map.\n */\nvar I18nParamValueFlags;\n(function (I18nParamValueFlags) {\n I18nParamValueFlags[I18nParamValueFlags[\"None\"] = 0] = \"None\";\n /**\n * This value represents an element tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"ElementTag\"] = 1] = \"ElementTag\";\n /**\n * This value represents a template tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"TemplateTag\"] = 2] = \"TemplateTag\";\n /**\n * This value represents the opening of a tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"OpenTag\"] = 4] = \"OpenTag\";\n /**\n * This value represents the closing of a tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"CloseTag\"] = 8] = \"CloseTag\";\n /**\n * This value represents an i18n expression index.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"ExpressionIndex\"] = 16] = \"ExpressionIndex\";\n})(I18nParamValueFlags || (I18nParamValueFlags = {}));\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 = {}));\n/**\n * The type of a `@defer` trigger, for use in the ir.\n */\nvar DeferTriggerKind;\n(function (DeferTriggerKind) {\n DeferTriggerKind[DeferTriggerKind[\"Idle\"] = 0] = \"Idle\";\n DeferTriggerKind[DeferTriggerKind[\"Immediate\"] = 1] = \"Immediate\";\n DeferTriggerKind[DeferTriggerKind[\"Timer\"] = 2] = \"Timer\";\n DeferTriggerKind[DeferTriggerKind[\"Hover\"] = 3] = \"Hover\";\n DeferTriggerKind[DeferTriggerKind[\"Interaction\"] = 4] = \"Interaction\";\n DeferTriggerKind[DeferTriggerKind[\"Viewport\"] = 5] = \"Viewport\";\n})(DeferTriggerKind || (DeferTriggerKind = {}));\n/**\n * Kinds of i18n contexts. They can be created because of root i18n blocks, or ICUs.\n */\nvar I18nContextKind;\n(function (I18nContextKind) {\n I18nContextKind[I18nContextKind[\"RootI18n\"] = 0] = \"RootI18n\";\n I18nContextKind[I18nContextKind[\"Icu\"] = 1] = \"Icu\";\n I18nContextKind[I18nContextKind[\"Attr\"] = 2] = \"Attr\";\n})(I18nContextKind || (I18nContextKind = {}));\nvar TemplateKind;\n(function (TemplateKind) {\n TemplateKind[TemplateKind[\"NgTemplate\"] = 0] = \"NgTemplate\";\n TemplateKind[TemplateKind[\"Structural\"] = 1] = \"Structural\";\n TemplateKind[TemplateKind[\"Block\"] = 2] = \"Block\";\n})(TemplateKind || (TemplateKind = {}));\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 `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 numSlotsUsed: 1\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 * Test whether an operation implements `ConsumesSlotOpTrait`.\n */\nfunction hasConsumesSlotTrait(op) {\n return op[ConsumesSlot] === true;\n}\nfunction hasDependsOnSlotContextTrait(value) {\n return value[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}\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, flags) {\n return {\n kind: OpKind.Variable,\n xref,\n variable,\n initializer,\n flags,\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, i18nPlaceholders) {\n this.strings = strings;\n this.expressions = expressions;\n this.i18nPlaceholders = i18nPlaceholders;\n if (i18nPlaceholders.length !== 0 && i18nPlaceholders.length !== expressions.length) {\n throw new Error(`Expected ${expressions.length} placeholders to match interpolation expression count, but got ${i18nPlaceholders.length}`);\n }\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, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Binding,\n bindingKind: kind,\n target,\n name,\n expression,\n unit,\n securityContext,\n isTextAttribute,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext: null,\n i18nMessage,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Create a `PropertyOp`.\n */\nfunction createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Property,\n target,\n name,\n expression,\n isAnimationTrigger,\n securityContext,\n sanitizer: null,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext,\n i18nMessage,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n/**\n * Create a `TwoWayPropertyOp`.\n */\nfunction createTwoWayPropertyOp(target, name, expression, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.TwoWayProperty,\n target,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext,\n i18nMessage,\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, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Attribute,\n target,\n namespace,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isTextAttribute,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext: null,\n i18nMessage,\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/**\n * Create a conditional op, which will display an embedded view according to a condtion.\n */\nfunction createConditionalOp(target, test, conditions, sourceSpan) {\n return {\n kind: OpKind.Conditional,\n target,\n test,\n conditions,\n processed: null,\n sourceSpan,\n contextValue: null,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS\n };\n}\nfunction createRepeaterOp(repeaterCreate, targetSlot, collection, sourceSpan) {\n return {\n kind: OpKind.Repeater,\n target: repeaterCreate,\n targetSlot,\n collection,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT\n };\n}\nfunction createDeferWhenOp(target, expr, prefetch, sourceSpan) {\n return {\n kind: OpKind.DeferWhen,\n target,\n expr,\n prefetch,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS\n };\n}\n/**\n * Create an i18n expression op.\n */\nfunction createI18nExpressionOp(context, target, i18nOwner, handle, expression, icuPlaceholder, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {\n return {\n kind: OpKind.I18nExpression,\n context,\n target,\n i18nOwner,\n handle,\n expression,\n icuPlaceholder,\n i18nPlaceholder,\n resolutionTime,\n usage,\n name,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_VARS,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT\n };\n}\n/**\n * Creates an op to apply i18n expression ops.\n */\nfunction createI18nApplyOp(owner, handle, sourceSpan) {\n return {\n kind: OpKind.I18nApply,\n owner,\n handle,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Creates a `StoreLetOp`.\n */\nfunction createStoreLetOp(target, declaredName, value, sourceSpan) {\n return {\n kind: OpKind.StoreLet,\n target,\n declaredName,\n value,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\nvar _a, _b, _c, _d, _e, _f, _g, _h;\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(other) {\n // We assume that the lexical reads are in the same context, which must be true for parent\n // expressions to be equivalent.\n // TODO: is this generally safe?\n return this.name === other.name;\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 constructor(target, targetSlot, offset) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.offset = offset;\n this.kind = ExpressionKind.Reference;\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 return new ReferenceExpr(this.target, this.targetSlot, this.offset);\n }\n}\nclass StoreLetExpr extends ExpressionBase {\n static {\n _a = ConsumesVarsTrait, _b = DependsOnSlotContext;\n }\n constructor(target, value, sourceSpan) {\n super();\n this.target = target;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.kind = ExpressionKind.StoreLet;\n this[_a] = true;\n this[_b] = true;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof StoreLetExpr && e.target === this.target && e.value.isEquivalent(this.value);\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.value = transformExpressionsInExpression(this.value, transform, flags);\n }\n clone() {\n return new StoreLetExpr(this.target, this.value, this.sourceSpan);\n }\n}\nclass ContextLetReferenceExpr extends ExpressionBase {\n constructor(target, targetSlot) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.kind = ExpressionKind.ContextLetReference;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof ContextLetReferenceExpr && e.target === this.target;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n return new ContextLetReferenceExpr(this.target, this.targetSlot);\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 * A reference to the current view context inside a track function.\n */\nclass TrackContextExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.TrackContext;\n }\n visitExpression() {}\n isEquivalent(e) {\n return e instanceof TrackContextExpr && e.view === this.view;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() {}\n clone() {\n return new TrackContextExpr(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}\nclass TwoWayBindingSetExpr extends ExpressionBase {\n constructor(target, value) {\n super();\n this.target = target;\n this.value = value;\n this.kind = ExpressionKind.TwoWayBindingSet;\n }\n visitExpression(visitor, context) {\n this.target.visitExpression(visitor, context);\n this.value.visitExpression(visitor, context);\n }\n isEquivalent(other) {\n return this.target.isEquivalent(other.target) && this.value.isEquivalent(other.value);\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.target = transformExpressionsInExpression(this.target, transform, flags);\n this.value = transformExpressionsInExpression(this.value, transform, flags);\n }\n clone() {\n return new TwoWayBindingSetExpr(this.target, this.value);\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 _c = ConsumesVarsTrait, _d = UsesVarOffset;\n }\n constructor(expression, args) {\n super();\n this.kind = ExpressionKind.PureFunctionExpr;\n this[_c] = true;\n this[_d] = 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 _e = ConsumesVarsTrait, _f = UsesVarOffset;\n }\n constructor(target, targetSlot, name, args) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.name = name;\n this.args = args;\n this.kind = ExpressionKind.PipeBinding;\n this[_e] = true;\n this[_f] = true;\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.targetSlot, this.name, this.args.map(a => a.clone()));\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass PipeBindingVariadicExpr extends ExpressionBase {\n static {\n _g = ConsumesVarsTrait, _h = UsesVarOffset;\n }\n constructor(target, targetSlot, name, args, numArgs) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\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.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.targetSlot, this.name, this.args.clone(), this.numArgs);\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, sourceSpan) {\n super(sourceSpan);\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(), this.sourceSpan);\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 SlotLiteralExpr extends ExpressionBase {\n constructor(slot) {\n super();\n this.slot = slot;\n this.kind = ExpressionKind.SlotLiteralExpr;\n }\n visitExpression(visitor, context) {}\n isEquivalent(e) {\n return e instanceof SlotLiteralExpr && e.slot === this.slot;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new SlotLiteralExpr(this.slot);\n }\n transformInternalExpressions() {}\n}\nclass ConditionalCaseExpr extends ExpressionBase {\n /**\n * Create an expression for one branch of a conditional.\n * @param expr The expression to be tested for this case. Might be null, as in an `else` case.\n * @param target The Xref of the view to be displayed if this condition is true.\n */\n constructor(expr, target, targetSlot, alias = null) {\n super();\n this.expr = expr;\n this.target = target;\n this.targetSlot = targetSlot;\n this.alias = alias;\n this.kind = ExpressionKind.ConditionalCase;\n }\n visitExpression(visitor, context) {\n if (this.expr !== null) {\n this.expr.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof ConditionalCaseExpr && e.expr === this.expr;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new ConditionalCaseExpr(this.expr, this.target, this.targetSlot);\n }\n transformInternalExpressions(transform, flags) {\n if (this.expr !== null) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n }\n}\nclass ConstCollectedExpr extends ExpressionBase {\n constructor(expr) {\n super();\n this.expr = expr;\n this.kind = ExpressionKind.ConstCollected;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transform(this.expr, flags);\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent(e) {\n if (!(e instanceof ConstCollectedExpr)) {\n return false;\n }\n return this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n clone() {\n return new ConstCollectedExpr(this.expr);\n }\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 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.HostProperty:\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.TwoWayProperty:\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags);\n break;\n case OpKind.I18nExpression:\n op.expression = transformExpressionsInExpression(op.expression, 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.Conditional:\n for (const condition of op.conditions) {\n if (condition.expr === null) {\n // This is a default case.\n continue;\n }\n condition.expr = transformExpressionsInExpression(condition.expr, transform, flags);\n }\n if (op.processed !== null) {\n op.processed = transformExpressionsInExpression(op.processed, transform, flags);\n }\n if (op.contextValue !== null) {\n op.contextValue = transformExpressionsInExpression(op.contextValue, transform, flags);\n }\n break;\n case OpKind.Listener:\n case OpKind.TwoWayListener:\n for (const innerOp of op.handlerOps) {\n transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);\n }\n break;\n case OpKind.ExtractedAttribute:\n op.expression = op.expression && transformExpressionsInExpression(op.expression, transform, flags);\n op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform, flags);\n break;\n case OpKind.RepeaterCreate:\n op.track = transformExpressionsInExpression(op.track, transform, flags);\n if (op.trackByFn !== null) {\n op.trackByFn = transformExpressionsInExpression(op.trackByFn, transform, flags);\n }\n break;\n case OpKind.Repeater:\n op.collection = transformExpressionsInExpression(op.collection, transform, flags);\n break;\n case OpKind.Defer:\n if (op.loadingConfig !== null) {\n op.loadingConfig = transformExpressionsInExpression(op.loadingConfig, transform, flags);\n }\n if (op.placeholderConfig !== null) {\n op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform, flags);\n }\n if (op.resolverFn !== null) {\n op.resolverFn = transformExpressionsInExpression(op.resolverFn, transform, flags);\n }\n break;\n case OpKind.I18nMessage:\n for (const [placeholder, expr] of op.params) {\n op.params.set(placeholder, transformExpressionsInExpression(expr, transform, flags));\n }\n for (const [placeholder, expr] of op.postprocessingParams) {\n op.postprocessingParams.set(placeholder, transformExpressionsInExpression(expr, transform, flags));\n }\n break;\n case OpKind.DeferWhen:\n op.expr = transformExpressionsInExpression(op.expr, transform, flags);\n break;\n case OpKind.StoreLet:\n op.value = transformExpressionsInExpression(op.value, transform, flags);\n break;\n case OpKind.Advance:\n case OpKind.Container:\n case OpKind.ContainerEnd:\n case OpKind.ContainerStart:\n case OpKind.DeferOn:\n case OpKind.DisableBindings:\n case OpKind.Element:\n case OpKind.ElementEnd:\n case OpKind.ElementStart:\n case OpKind.EnableBindings:\n case OpKind.I18n:\n case OpKind.I18nApply:\n case OpKind.I18nContext:\n case OpKind.I18nEnd:\n case OpKind.I18nStart:\n case OpKind.IcuEnd:\n case OpKind.IcuStart:\n case OpKind.Namespace:\n case OpKind.Pipe:\n case OpKind.Projection:\n case OpKind.ProjectionDef:\n case OpKind.Template:\n case OpKind.Text:\n case OpKind.I18nAttributes:\n case OpKind.IcuPlaceholder:\n case OpKind.DeclareLet:\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 UnaryOperatorExpr) {\n expr.expr = transformExpressionsInExpression(expr.expr, 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 TypeofExpr) {\n expr.expr = transformExpressionsInExpression(expr.expr, transform, flags);\n } else if (expr instanceof WriteVarExpr) {\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n } else if (expr instanceof LocalizedString) {\n for (let i = 0; i < expr.expressions.length; i++) {\n expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform, flags);\n }\n } else if (expr instanceof NotExpr) {\n expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);\n } else if (expr instanceof TaggedTemplateExpr) {\n expr.tag = transformExpressionsInExpression(expr.tag, transform, flags);\n expr.template.expressions = expr.template.expressions.map(e => transformExpressionsInExpression(e, transform, flags));\n } else if (expr instanceof ArrowFunctionExpr) {\n if (Array.isArray(expr.body)) {\n for (let i = 0; i < expr.body.length; i++) {\n transformExpressionsInStatement(expr.body[i], transform, flags);\n }\n } else {\n expr.body = transformExpressionsInExpression(expr.body, transform, flags);\n }\n } else if (expr instanceof WrappedNodeExpr) {\n // TODO: Do we need to transform any TS nodes nested inside of this expression?\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 if (stmt instanceof IfStmt) {\n stmt.condition = transformExpressionsInExpression(stmt.condition, transform, flags);\n for (const caseStatement of stmt.trueCase) {\n transformExpressionsInStatement(caseStatement, transform, flags);\n }\n for (const caseStatement of stmt.falseCase) {\n transformExpressionsInStatement(caseStatement, transform, flags);\n }\n } else {\n throw new Error(`Unhandled statement kind: ${stmt.constructor.name}`);\n }\n}\n/**\n * Checks whether the given expression is a string literal.\n */\nfunction isStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string';\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 if (Array.isArray(op)) {\n for (const o of op) {\n this.push(o);\n }\n return;\n }\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 = oldPrev;\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 if (Array.isArray(op)) {\n for (const o of op) {\n this.insertBefore(o, target);\n }\n return;\n }\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}\nclass SlotHandle {\n constructor() {\n this.slot = null;\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, OpKind.RepeaterCreate]);\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, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.ElementStart,\n xref,\n tag,\n handle: new SlotHandle(),\n attributes: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n i18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create a `TemplateOp`.\n */\nfunction createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.Template,\n xref,\n templateKind,\n attributes: null,\n tag,\n handle: new SlotHandle(),\n functionNameSuffix,\n decls: null,\n vars: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n i18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\nfunction createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, emptyTag, i18nPlaceholder, emptyI18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.RepeaterCreate,\n attributes: null,\n xref: primaryView,\n handle: new SlotHandle(),\n emptyView,\n track,\n trackByFn: null,\n tag,\n emptyTag,\n emptyAttributes: null,\n functionNameSuffix: 'For',\n namespace: Namespace.HTML,\n nonBindable: false,\n localRefs: [],\n decls: null,\n vars: null,\n varNames,\n usesComponentInstance: false,\n i18nPlaceholder,\n emptyI18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n ...TRAIT_CONSUMES_VARS,\n numSlotsUsed: emptyView === null ? 2 : 3\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, icuPlaceholder, sourceSpan) {\n return {\n kind: OpKind.Text,\n xref,\n handle: new SlotHandle(),\n initialValue,\n icuPlaceholder,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create a `ListenerOp`. Host bindings reuse all the listener logic.\n */\nfunction createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {\n const handlerList = new OpList();\n handlerList.push(handlerOps);\n return {\n kind: OpKind.Listener,\n target,\n targetSlot,\n tag,\n hostListener,\n name,\n handlerOps: handlerList,\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: animationPhase !== null,\n animationPhase,\n eventTarget,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Create a `TwoWayListenerOp`.\n */\nfunction createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {\n const handlerList = new OpList();\n handlerList.push(handlerOps);\n return {\n kind: OpKind.TwoWayListener,\n target,\n targetSlot,\n tag,\n name,\n handlerOps: handlerList,\n handlerFnName: null,\n sourceSpan,\n ...NEW_OP\n };\n}\nfunction createPipeOp(xref, slot, name) {\n return {\n kind: OpKind.Pipe,\n xref,\n handle: slot,\n name,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT\n };\n}\nfunction createNamespaceOp(namespace) {\n return {\n kind: OpKind.Namespace,\n active: namespace,\n ...NEW_OP\n };\n}\nfunction createProjectionDefOp(def) {\n return {\n kind: OpKind.ProjectionDef,\n def,\n ...NEW_OP\n };\n}\nfunction createProjectionOp(xref, selector, i18nPlaceholder, fallbackView, sourceSpan) {\n return {\n kind: OpKind.Projection,\n xref,\n handle: new SlotHandle(),\n selector,\n i18nPlaceholder,\n fallbackView,\n projectionSlotIndex: 0,\n attributes: null,\n localRefs: [],\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n numSlotsUsed: fallbackView === null ? 1 : 2\n };\n}\n/**\n * Create an `ExtractedAttributeOp`.\n */\nfunction createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {\n return {\n kind: OpKind.ExtractedAttribute,\n target,\n bindingKind,\n namespace,\n name,\n expression,\n i18nContext,\n i18nMessage,\n securityContext,\n trustedValueFn: null,\n ...NEW_OP\n };\n}\nfunction createDeferOp(xref, main, mainSlot, ownResolverFn, resolverFn, sourceSpan) {\n return {\n kind: OpKind.Defer,\n xref,\n handle: new SlotHandle(),\n mainView: main,\n mainSlot,\n loadingView: null,\n loadingSlot: null,\n loadingConfig: null,\n loadingMinimumTime: null,\n loadingAfterTime: null,\n placeholderView: null,\n placeholderSlot: null,\n placeholderConfig: null,\n placeholderMinimumTime: null,\n errorView: null,\n errorSlot: null,\n ownResolverFn,\n resolverFn,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n numSlotsUsed: 2\n };\n}\nfunction createDeferOnOp(defer, trigger, prefetch, sourceSpan) {\n return {\n kind: OpKind.DeferOn,\n defer,\n trigger,\n prefetch,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Creates a `DeclareLetOp`.\n */\nfunction createDeclareLetOp(xref, declaredName, sourceSpan) {\n return {\n kind: OpKind.DeclareLet,\n xref,\n declaredName,\n sourceSpan,\n handle: new SlotHandle(),\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP\n };\n}\n/**\n * Create an `ExtractedMessageOp`.\n */\nfunction createI18nMessageOp(xref, i18nContext, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {\n return {\n kind: OpKind.I18nMessage,\n xref,\n i18nContext,\n i18nBlock,\n message,\n messagePlaceholder,\n params,\n postprocessingParams,\n needsPostprocessing,\n subMessages: [],\n ...NEW_OP\n };\n}\n/**\n * Create an `I18nStartOp`.\n */\nfunction createI18nStartOp(xref, message, root, sourceSpan) {\n return {\n kind: OpKind.I18nStart,\n xref,\n handle: new SlotHandle(),\n root: root ?? xref,\n message,\n messageIndex: null,\n subTemplateIndex: null,\n context: null,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT\n };\n}\n/**\n * Create an `I18nEndOp`.\n */\nfunction createI18nEndOp(xref, sourceSpan) {\n return {\n kind: OpKind.I18nEnd,\n xref,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Creates an ICU start op.\n */\nfunction createIcuStartOp(xref, message, messagePlaceholder, sourceSpan) {\n return {\n kind: OpKind.IcuStart,\n xref,\n message,\n messagePlaceholder,\n context: null,\n sourceSpan,\n ...NEW_OP\n };\n}\n/**\n * Creates an ICU end op.\n */\nfunction createIcuEndOp(xref) {\n return {\n kind: OpKind.IcuEnd,\n xref,\n ...NEW_OP\n };\n}\n/**\n * Creates an ICU placeholder op.\n */\nfunction createIcuPlaceholderOp(xref, name, strings) {\n return {\n kind: OpKind.IcuPlaceholder,\n xref,\n name,\n strings,\n expressionPlaceholders: [],\n ...NEW_OP\n };\n}\nfunction createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {\n if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {\n throw new Error('AssertionError: i18nBlock must be provided for non-attribute contexts.');\n }\n return {\n kind: OpKind.I18nContext,\n contextKind,\n xref,\n i18nBlock,\n message,\n sourceSpan,\n params: new Map(),\n postprocessingParams: new Map(),\n ...NEW_OP\n };\n}\nfunction createI18nAttributesOp(xref, handle, target) {\n return {\n kind: OpKind.I18nAttributes,\n xref,\n handle,\n target,\n i18nAttributesConfig: null,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT\n };\n}\nfunction createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {\n return {\n kind: OpKind.HostProperty,\n name,\n expression,\n isAnimationTrigger,\n i18nContext,\n securityContext,\n sanitizer: null,\n sourceSpan,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP\n };\n}\n\n/**\n * When referenced in the template's context parameters, this indicates a reference to the entire\n * context object, rather than a specific parameter.\n */\nconst CTX_REF = 'CTX_REF_MARKER';\nvar CompilationJobKind;\n(function (CompilationJobKind) {\n CompilationJobKind[CompilationJobKind[\"Tmpl\"] = 0] = \"Tmpl\";\n CompilationJobKind[CompilationJobKind[\"Host\"] = 1] = \"Host\";\n CompilationJobKind[CompilationJobKind[\"Both\"] = 2] = \"Both\";\n})(CompilationJobKind || (CompilationJobKind = {}));\n/**\n * An entire ongoing compilation, which will result in one or more template functions when complete.\n * Contains one or more corresponding compilation units.\n */\nclass CompilationJob {\n constructor(componentName, pool, compatibility) {\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.kind = CompilationJobKind.Both;\n /**\n * Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.\n */\n this.nextXrefId = 0;\n }\n /**\n * Generate a new unique `ir.XrefId` in this job.\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 extends CompilationJob {\n constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) {\n super(componentName, pool, compatibility);\n this.relativeContextFilePath = relativeContextFilePath;\n this.i18nUseExternalIds = i18nUseExternalIds;\n this.deferMeta = deferMeta;\n this.allDeferrableDepsFn = allDeferrableDepsFn;\n this.kind = CompilationJobKind.Tmpl;\n this.fnSuffix = 'Template';\n this.views = new Map();\n /**\n * Causes ngContentSelectors to be emitted, for content projection slots in the view. Possibly a\n * reference into the constant pool.\n */\n this.contentSelectors = null;\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 /**\n * Initialization statements needed to set up the consts.\n */\n this.constsInitializers = [];\n this.root = new ViewCompilationUnit(this, this.allocateXrefId(), null);\n this.views.set(this.root.xref, this.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 get units() {\n return this.views.values();\n }\n /**\n * Add a constant `o.Expression` to the compilation and return its index in the `consts` array.\n */\n addConst(newConst, initializers) {\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 if (initializers) {\n this.constsInitializers.push(...initializers);\n }\n return idx;\n }\n}\n/**\n * A compilation unit is compiled into a template function. Some example units are views and host\n * 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 || op.kind === OpKind.TwoWayListener) {\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}\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 * Set of aliases available within this view. An alias is a variable whose provided expression is\n * inlined at every location it is used. It may also depend on context variables, by name.\n */\n this.aliases = new Set();\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}\n/**\n * Compilation-in-progress of a host binding, which contains a single unit for that host binding.\n */\nclass HostBindingCompilationJob extends CompilationJob {\n constructor(componentName, pool, compatibility) {\n super(componentName, pool, compatibility);\n this.kind = CompilationJobKind.Host;\n this.fnSuffix = 'HostBindings';\n this.root = new HostBindingCompilationUnit(this);\n }\n get units() {\n return [this.root];\n }\n}\nclass HostBindingCompilationUnit extends CompilationUnit {\n constructor(job) {\n super(0);\n this.job = job;\n /**\n * Much like an element can have attributes, so can a host binding function.\n */\n this.attributes = null;\n }\n}\n\n/**\n * Find any function calls to `$any`, excluding `this.$any`, and delete them, since they have no\n * runtime effects.\n */\nfunction deleteAnyCasts(job) {\n for (const unit of job.units) {\n for (const op of unit.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 * Adds apply operations after i18n expressions.\n */\nfunction applyI18nExpressions(job) {\n const i18nContexts = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nContext) {\n i18nContexts.set(op.xref, op);\n }\n }\n }\n for (const unit of job.units) {\n for (const op of unit.update) {\n // Only add apply after expressions that are not followed by more expressions.\n if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {\n // TODO: what should be the source span for the apply op?\n OpList.insertAfter(createI18nApplyOp(op.i18nOwner, op.handle, null), op);\n }\n }\n }\n}\n/**\n * Checks whether the given expression op needs to be followed with an apply op.\n */\nfunction needsApplication(i18nContexts, op) {\n // If the next op is not another expression, we need to apply.\n if (op.next?.kind !== OpKind.I18nExpression) {\n return true;\n }\n const context = i18nContexts.get(op.context);\n const nextContext = i18nContexts.get(op.next.context);\n if (context === undefined) {\n throw new Error(\"AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context\");\n }\n if (nextContext === undefined) {\n throw new Error(\"AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context\");\n }\n // If the next op is an expression targeting a different i18n block (or different element, in the\n // case of i18n attributes), we need to apply.\n // First, handle the case of i18n blocks.\n if (context.i18nBlock !== null) {\n // This is a block context. Compare the blocks.\n if (context.i18nBlock !== nextContext.i18nBlock) {\n return true;\n }\n return false;\n }\n // Second, handle the case of i18n attributes.\n if (op.i18nOwner !== op.next.i18nOwner) {\n return true;\n }\n return false;\n}\n\n/**\n * Updates i18n expression ops to target the last slot in their owning i18n block, and moves them\n * after the last update instruction that depends on that slot.\n */\nfunction assignI18nSlotDependencies(job) {\n for (const unit of job.units) {\n // The first update op.\n let updateOp = unit.update.head;\n // I18n expressions currently being moved during the iteration.\n let i18nExpressionsInProgress = [];\n // Non-null while we are iterating through an i18nStart/i18nEnd pair\n let state = null;\n for (const createOp of unit.create) {\n if (createOp.kind === OpKind.I18nStart) {\n state = {\n blockXref: createOp.xref,\n lastSlotConsumer: createOp.xref\n };\n } else if (createOp.kind === OpKind.I18nEnd) {\n for (const op of i18nExpressionsInProgress) {\n op.target = state.lastSlotConsumer;\n OpList.insertBefore(op, updateOp);\n }\n i18nExpressionsInProgress.length = 0;\n state = null;\n }\n if (hasConsumesSlotTrait(createOp)) {\n if (state !== null) {\n state.lastSlotConsumer = createOp.xref;\n }\n while (true) {\n if (updateOp.next === null) {\n break;\n }\n if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) {\n const opToRemove = updateOp;\n updateOp = updateOp.next;\n OpList.remove(opToRemove);\n i18nExpressionsInProgress.push(opToRemove);\n continue;\n }\n if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {\n break;\n }\n updateOp = updateOp.next;\n }\n }\n }\n }\n}\n\n/**\n * Gets a map of all elements in the given view by their xref id.\n */\nfunction createOpXrefMap(unit) {\n const map = new Map();\n for (const op of unit.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n map.set(op.xref, op);\n // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here,\n // because the slot consumer trait currently only supports one slot per consumer and we\n // need two. This should be revisited when making the refactors mentioned in:\n // https://github.com/angular/angular/pull/53620#discussion_r1430918822\n if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) {\n map.set(op.emptyView, op);\n }\n }\n return map;\n}\n\n/**\n * Find all extractable attribute and binding ops, and create ExtractedAttributeOps for them.\n * In cases where no instruction needs to be generated for the attribute or binding, it is removed.\n */\nfunction extractAttributes(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Attribute:\n extractAttributeOp(unit, op, elements);\n break;\n case OpKind.Property:\n if (!op.isAnimationTrigger) {\n let bindingKind;\n if (op.i18nMessage !== null && op.templateKind === null) {\n // If the binding has an i18n context, it is an i18n attribute, and should have that\n // kind in the consts array.\n bindingKind = BindingKind.I18n;\n } else if (op.isStructuralTemplateAttribute) {\n bindingKind = BindingKind.Template;\n } else {\n bindingKind = BindingKind.Property;\n }\n OpList.insertBefore(\n // Deliberately null i18nMessage value\n createExtractedAttributeOp(op.target, bindingKind, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, op.securityContext), lookupElement$2(elements, op.target));\n }\n break;\n case OpKind.TwoWayProperty:\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.TwoWayProperty, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, op.securityContext), lookupElement$2(elements, op.target));\n break;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n // TODO: Can style or class bindings be i18n attributes?\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 if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.STYLE), lookupElement$2(elements, op.target));\n }\n break;\n case OpKind.Listener:\n if (!op.isAnimationListener) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.NONE);\n if (job.kind === CompilationJobKind.Host) {\n if (job.compatibility) {\n // TemplateDefinitionBuilder does not extract listener bindings to the const array\n // (which is honestly pretty inconsistent).\n break;\n }\n // This attribute will apply to the enclosing host binding compilation unit, so order\n // doesn't matter.\n unit.create.push(extractedAttributeOp);\n } else {\n OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));\n }\n }\n break;\n case OpKind.TwoWayListener:\n // Two-way listeners aren't supported in host bindings.\n if (job.kind !== CompilationJobKind.Host) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.NONE);\n OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));\n }\n break;\n }\n }\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 * Extracts an attribute binding.\n */\nfunction extractAttributeOp(unit, op, elements) {\n if (op.expression instanceof Interpolation) {\n return;\n }\n let extractable = op.isTextAttribute || op.expression.isConstant();\n if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // TemplateDefinitionBuilder only extracts text attributes. It does not extract attriibute\n // bindings, even if they are constants.\n extractable &&= op.isTextAttribute;\n }\n if (extractable) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);\n if (unit.job.kind === CompilationJobKind.Host) {\n // This attribute will apply to the enclosing host binding compilation unit, so order doesn't\n // matter.\n unit.create.push(extractedAttributeOp);\n } else {\n const ownerOp = lookupElement$2(elements, op.target);\n OpList.insertBefore(extractedAttributeOp, ownerOp);\n }\n OpList.remove(op);\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 specializeBindings(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 const [namespace, name] = splitNsName(op.name);\n OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));\n }\n break;\n case BindingKind.Property:\n case BindingKind.Animation:\n if (job.kind === CompilationJobKind.Host) {\n OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));\n } else {\n OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));\n }\n break;\n case BindingKind.TwoWayProperty:\n if (!(op.expression instanceof Expression)) {\n // We shouldn't be able to hit this code path since interpolations in two-way bindings\n // result in a parser error. We assert here so that downstream we can assume that\n // the value is always an expression.\n throw new Error(`Expected value of two-way property binding \"${op.name}\" to be an expression`);\n }\n OpList.replace(op, createTwoWayPropertyOp(op.target, op.name, op.expression, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));\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.attribute, Identifiers.classProp, Identifiers.element, Identifiers.elementContainer, Identifiers.elementContainerEnd, Identifiers.elementContainerStart, Identifiers.elementEnd, Identifiers.elementStart, Identifiers.hostProperty, Identifiers.i18nExp, Identifiers.listener, Identifiers.listener, Identifiers.property, Identifiers.styleProp, Identifiers.stylePropInterpolate1, Identifiers.stylePropInterpolate2, Identifiers.stylePropInterpolate3, Identifiers.stylePropInterpolate4, Identifiers.stylePropInterpolate5, Identifiers.stylePropInterpolate6, Identifiers.stylePropInterpolate7, Identifiers.stylePropInterpolate8, Identifiers.stylePropInterpolateV, Identifiers.syntheticHostListener, Identifiers.syntheticHostProperty, Identifiers.templateCreate, Identifiers.twoWayProperty, Identifiers.twoWayListener, Identifiers.declareLet]);\n/**\n * Chaining results in repeated call expressions, causing a deep AST of receiver expressions. To prevent running out of\n * stack depth the maximum number of chained instructions is limited to this threshold, which has been selected\n * arbitrarily.\n */\nconst MAX_CHAIN_LENGTH = 256;\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 chain(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 && chain.length < MAX_CHAIN_LENGTH) {\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 chain.length++;\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 length: 1\n };\n }\n }\n}\n\n/**\n * Attribute interpolations of the form `[attr.foo]=\"{{foo}}\"\"` should be \"collapsed\" into a plain\n * attribute instruction, instead of an `attributeInterpolate` instruction.\n *\n * (We cannot do this for singleton property interpolations, because `propertyInterpolate`\n * stringifies its expression.)\n *\n * The reification step is also capable of performing this transformation, but doing it early in the\n * pipeline allows other phases to accurately know what instruction will be emitted.\n */\nfunction collapseSingletonInterpolations(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n const eligibleOpKind = op.kind === OpKind.Attribute;\n if (eligibleOpKind && op.expression instanceof Interpolation && op.expression.strings.length === 2 && op.expression.strings.every(s => s === '')) {\n op.expression = op.expression.expressions[0];\n }\n }\n }\n}\n\n/**\n * Collapse the various conditions of conditional ops (if, switch) into a single test expression.\n */\nfunction generateConditionalExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind !== OpKind.Conditional) {\n continue;\n }\n let test;\n // Any case with a `null` condition is `default`. If one exists, default to it instead.\n const defaultCase = op.conditions.findIndex(cond => cond.expr === null);\n if (defaultCase >= 0) {\n const slot = op.conditions.splice(defaultCase, 1)[0].targetSlot;\n test = new SlotLiteralExpr(slot);\n } else {\n // By default, a switch evaluates to `-1`, causing no template to be displayed.\n test = literal(-1);\n }\n // Switch expressions assign their main test to a temporary, to avoid re-executing it.\n let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());\n // For each remaining condition, test whether the temporary satifies the check. (If no temp is\n // present, just check each expression directly.)\n for (let i = op.conditions.length - 1; i >= 0; i--) {\n let conditionalCase = op.conditions[i];\n if (conditionalCase.expr === null) {\n continue;\n }\n if (tmp !== null) {\n const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);\n conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);\n } else if (conditionalCase.alias !== null) {\n const caseExpressionTemporaryXref = job.allocateXrefId();\n conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);\n op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);\n }\n test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.targetSlot), test);\n }\n // Save the resulting aggregate Joost-expression.\n op.processed = test;\n // Clear the original conditions array, since we no longer need it, and don't want it to\n // affect subsequent phases (e.g. pipe creation).\n op.conditions = [];\n }\n }\n}\nconst BINARY_OPERATORS = new Map([['&&', BinaryOperator.And], ['>', BinaryOperator.Bigger], ['>=', BinaryOperator.BiggerEquals], ['|', BinaryOperator.BitwiseOr], ['&', 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]]);\nfunction namespaceForKey(namespacePrefixKey) {\n const NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]);\n if (namespacePrefixKey === null) {\n return Namespace.HTML;\n }\n return NAMESPACES.get(namespacePrefixKey) ?? Namespace.HTML;\n}\nfunction keyForNamespace(namespace) {\n const NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]);\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}\nfunction literalOrArrayLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(literalOrArrayLiteral));\n }\n return literal(value);\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 collectElementConsts(job) {\n // Collect all extracted attributes.\n const allElementAttributes = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute) {\n const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);\n allElementAttributes.set(op.target, attributes);\n attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);\n OpList.remove(op);\n }\n }\n }\n // Serialize the extracted attributes into the const array.\n if (job instanceof ComponentCompilationJob) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n // TODO: Simplify and combine these cases.\n if (op.kind == OpKind.Projection) {\n const attributes = allElementAttributes.get(op.xref);\n if (attributes !== undefined) {\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n op.attributes = attrArray;\n }\n }\n } else if (isElementOrContainerOp(op)) {\n op.attributes = getConstIndex(job, allElementAttributes, op.xref);\n // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here,\n // because the slot consumer trait currently only supports one slot per consumer and we\n // need two. This should be revisited when making the refactors mentioned in:\n // https://github.com/angular/angular/pull/53620#discussion_r1430918822\n if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) {\n op.emptyAttributes = getConstIndex(job, allElementAttributes, op.emptyView);\n }\n }\n }\n }\n } else if (job instanceof HostBindingCompilationJob) {\n // TODO: If the host binding case further diverges, we may want to split it into its own\n // phase.\n for (const [xref, attributes] of allElementAttributes.entries()) {\n if (xref !== job.root.xref) {\n throw new Error(`An attribute would be const collected into the host binding's template function, but is not associated with the root xref.`);\n }\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n job.root.attributes = attrArray;\n }\n }\n }\n}\nfunction getConstIndex(job, allElementAttributes, xref) {\n const attributes = allElementAttributes.get(xref);\n if (attributes !== undefined) {\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n return job.addConst(attrArray);\n }\n }\n return null;\n}\n/**\n * Shared instance of an empty array to avoid unnecessary array allocations.\n */\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 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.propertyBindings ?? 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 constructor(compatibility) {\n this.compatibility = compatibility;\n this.known = new Map();\n this.byKind = new Map();\n this.propertyBindings = null;\n this.projectAs = null;\n }\n isKnown(kind, name) {\n const nameToValue = this.known.get(kind) ?? new Set();\n this.known.set(kind, nameToValue);\n if (nameToValue.has(name)) {\n return true;\n }\n nameToValue.add(name);\n return false;\n }\n add(kind, name, value, namespace, trustedValueFn) {\n // TemplateDefinitionBuilder puts duplicate attribute, class, and style values into the consts\n // array. This seems inefficient, we can probably keep just the first one or the last value\n // (whichever actually gets applied when multiple values are listed for the same attribute).\n const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);\n if (!allowDuplicates && this.isKnown(kind, name)) {\n return;\n }\n // TODO: Can this be its own phase\n if (name === 'ngProjectAs') {\n if (value === null || !(value instanceof LiteralExpr) || value.value == null || typeof value.value?.toString() !== 'string') {\n throw Error('ngProjectAs must have a string literal value');\n }\n this.projectAs = value.value.toString();\n // TODO: TemplateDefinitionBuilder allows `ngProjectAs` to also be assigned as a literal\n // attribute. Is this sane?\n }\n const array = this.arrayFor(kind);\n array.push(...getAttributeNameLiterals(namespace, name));\n if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {\n if (value === null) {\n throw Error('Attribute, i18n attribute, & style element attributes must have a value');\n }\n if (trustedValueFn !== null) {\n if (!isStringLiteral(value)) {\n throw Error('AssertionError: extracted attribute value should be string literal');\n }\n array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), undefined, value.sourceSpan));\n } else {\n array.push(value);\n }\n }\n }\n arrayFor(kind) {\n if (kind === BindingKind.Property || kind === BindingKind.TwoWayProperty) {\n this.propertyBindings ??= [];\n return this.propertyBindings;\n } else {\n if (!this.byKind.has(kind)) {\n this.byKind.set(kind, []);\n }\n return this.byKind.get(kind);\n }\n }\n}\n/**\n * Gets an array of literal expressions representing the attribute's namespaced name.\n */\nfunction getAttributeNameLiterals(namespace, name) {\n const nameLiteral = literal(name);\n if (namespace) {\n return [literal(0 /* core.AttributeMarker.NamespaceURI */), literal(namespace), nameLiteral];\n }\n return [nameLiteral];\n}\n/**\n * Serializes an ElementAttributes object into an array expression.\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 // 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(projectAs)[0];\n attrArray.push(literal(5 /* core.AttributeMarker.ProjectAs */), literalOrArrayLiteral(parsedR3Selector));\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\n/**\n * Some binding instructions in the update block may actually correspond to i18n bindings. In that\n * case, they should be replaced with i18nExp instructions for the dynamic portions.\n */\nfunction convertI18nBindings(job) {\n const i18nAttributesByElem = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nAttributes) {\n i18nAttributesByElem.set(op.target, op);\n }\n }\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n if (op.i18nContext === null) {\n continue;\n }\n if (!(op.expression instanceof Interpolation)) {\n continue;\n }\n const i18nAttributesForElem = i18nAttributesByElem.get(op.target);\n if (i18nAttributesForElem === undefined) {\n throw new Error('AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction');\n }\n if (i18nAttributesForElem.target !== op.target) {\n throw new Error('AssertionError: Expected i18nAttributes target element to match binding target element');\n }\n const ops = [];\n for (let i = 0; i < op.expression.expressions.length; i++) {\n const expr = op.expression.expressions[i];\n if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {\n throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);\n }\n ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, null, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));\n }\n OpList.replaceWithMany(op, ops);\n break;\n }\n }\n }\n}\n\n/**\n * Resolve the dependency function of a deferred block.\n */\nfunction resolveDeferDepsFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Defer) {\n if (op.resolverFn !== null) {\n continue;\n }\n if (op.ownResolverFn !== null) {\n if (op.handle.slot === null) {\n throw new Error('AssertionError: slot must be assigned before extracting defer deps functions');\n }\n const fullPathName = unit.fnName?.replace('_Template', '');\n op.resolverFn = job.pool.getSharedFunctionReference(op.ownResolverFn, `${fullPathName}_Defer_${op.handle.slot}_DepsFn`, /* Don't use unique names for TDB compatibility */false);\n }\n }\n }\n }\n}\n\n/**\n * Create one helper context op per i18n block (including generate descending blocks).\n *\n * Also, if an ICU exists inside an i18n block that also contains other localizable content (such as\n * string), create an additional helper context op for the ICU.\n *\n * These context ops are later used for generating i18n messages. (Although we generate at least one\n * context op per nested view, we will collect them up the tree later, to generate a top-level\n * message.)\n */\nfunction createI18nContexts(job) {\n // Create i18n context ops for i18n attrs.\n const attrContextByMessage = new Map();\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Binding:\n case OpKind.Property:\n case OpKind.Attribute:\n case OpKind.ExtractedAttribute:\n if (op.i18nMessage === null) {\n continue;\n }\n if (!attrContextByMessage.has(op.i18nMessage)) {\n const i18nContext = createI18nContextOp(I18nContextKind.Attr, job.allocateXrefId(), null, op.i18nMessage, null);\n unit.create.push(i18nContext);\n attrContextByMessage.set(op.i18nMessage, i18nContext.xref);\n }\n op.i18nContext = attrContextByMessage.get(op.i18nMessage);\n break;\n }\n }\n }\n // Create i18n context ops for root i18n blocks.\n const blockContextByI18nBlock = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (op.xref === op.root) {\n const contextOp = createI18nContextOp(I18nContextKind.RootI18n, job.allocateXrefId(), op.xref, op.message, null);\n unit.create.push(contextOp);\n op.context = contextOp.xref;\n blockContextByI18nBlock.set(op.xref, contextOp);\n }\n break;\n }\n }\n }\n // Assign i18n contexts for child i18n blocks. These don't need their own conext, instead they\n // should inherit from their root i18n block.\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nStart && op.xref !== op.root) {\n const rootContext = blockContextByI18nBlock.get(op.root);\n if (rootContext === undefined) {\n throw Error('AssertionError: Root i18n block i18n context should have been created.');\n }\n op.context = rootContext.xref;\n blockContextByI18nBlock.set(op.xref, rootContext);\n }\n }\n }\n // Create or assign i18n contexts for ICUs.\n let currentI18nOp = null;\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n currentI18nOp = op;\n break;\n case OpKind.I18nEnd:\n currentI18nOp = null;\n break;\n case OpKind.IcuStart:\n if (currentI18nOp === null) {\n throw Error('AssertionError: Unexpected ICU outside of an i18n block.');\n }\n if (op.message.id !== currentI18nOp.message.id) {\n // This ICU is a sub-message inside its parent i18n block message. We need to give it\n // its own context.\n const contextOp = createI18nContextOp(I18nContextKind.Icu, job.allocateXrefId(), currentI18nOp.root, op.message, null);\n unit.create.push(contextOp);\n op.context = contextOp.xref;\n } else {\n // This ICU is the only translatable content in its parent i18n block. We need to\n // convert the parent's context into an ICU context.\n op.context = currentI18nOp.context;\n blockContextByI18nBlock.get(currentI18nOp.xref).contextKind = I18nContextKind.Icu;\n }\n break;\n }\n }\n }\n}\n\n/**\n * Deduplicate text bindings, e.g. <div class=\"cls1\" class=\"cls2\">\n */\nfunction deduplicateTextBindings(job) {\n const seen = new Map();\n for (const unit of job.units) {\n for (const op of unit.update.reversed()) {\n if (op.kind === OpKind.Binding && op.isTextAttribute) {\n const seenForElement = seen.get(op.target) || new Set();\n if (seenForElement.has(op.name)) {\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // For most duplicated attributes, TemplateDefinitionBuilder lists all of the values in\n // the consts array. However, for style and class attributes it only keeps the last one.\n // We replicate that behavior here since it has actual consequences for apps with\n // duplicate class or style attrs.\n if (op.name === 'style' || op.name === 'class') {\n OpList.remove(op);\n }\n } else {\n // TODO: Determine the correct behavior. It would probably make sense to merge multiple\n // style and class attributes. Alternatively we could just throw an error, as HTML\n // doesn't permit duplicate attributes.\n }\n }\n seenForElement.add(op.name);\n seen.set(op.target, seenForElement);\n }\n }\n }\n}\n\n/**\n * Defer instructions take a configuration array, which should be collected into the component\n * consts. This phase finds the config options, and creates the corresponding const array.\n */\nfunction configureDeferInstructions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.Defer) {\n continue;\n }\n if (op.placeholderMinimumTime !== null) {\n op.placeholderConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.placeholderMinimumTime]));\n }\n if (op.loadingMinimumTime !== null || op.loadingAfterTime !== null) {\n op.loadingConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.loadingMinimumTime, op.loadingAfterTime]));\n }\n }\n }\n}\n\n/**\n * Some `defer` conditions can reference other elements in the template, using their local reference\n * names. However, the semantics are quite different from the normal local reference system: in\n * particular, we need to look at local reference names in enclosing views. This phase resolves\n * all such references to actual xrefs.\n */\nfunction resolveDeferTargetNames(job) {\n const scopes = new Map();\n function getScopeForView(view) {\n if (scopes.has(view.xref)) {\n return scopes.get(view.xref);\n }\n const scope = new Scope$1();\n for (const op of view.create) {\n // add everything that can be referenced.\n if (!isElementOrContainerOp(op) || op.localRefs === null) {\n continue;\n }\n if (!Array.isArray(op.localRefs)) {\n throw new Error('LocalRefs were already processed, but were needed to resolve defer targets.');\n }\n for (const ref of op.localRefs) {\n if (ref.target !== '') {\n continue;\n }\n scope.targets.set(ref.name, {\n xref: op.xref,\n slot: op.handle\n });\n }\n }\n scopes.set(view.xref, scope);\n return scope;\n }\n function resolveTrigger(deferOwnerView, op, placeholderView) {\n switch (op.trigger.kind) {\n case DeferTriggerKind.Idle:\n case DeferTriggerKind.Immediate:\n case DeferTriggerKind.Timer:\n return;\n case DeferTriggerKind.Hover:\n case DeferTriggerKind.Interaction:\n case DeferTriggerKind.Viewport:\n if (op.trigger.targetName === null) {\n // A `null` target name indicates we should default to the first element in the\n // placeholder block.\n if (placeholderView === null) {\n throw new Error('defer on trigger with no target name must have a placeholder block');\n }\n const placeholder = job.views.get(placeholderView);\n if (placeholder == undefined) {\n throw new Error('AssertionError: could not find placeholder view for defer on trigger');\n }\n for (const placeholderOp of placeholder.create) {\n if (hasConsumesSlotTrait(placeholderOp) && (isElementOrContainerOp(placeholderOp) || placeholderOp.kind === OpKind.Projection)) {\n op.trigger.targetXref = placeholderOp.xref;\n op.trigger.targetView = placeholderView;\n op.trigger.targetSlotViewSteps = -1;\n op.trigger.targetSlot = placeholderOp.handle;\n return;\n }\n }\n return;\n }\n let view = placeholderView !== null ? job.views.get(placeholderView) : deferOwnerView;\n let step = placeholderView !== null ? -1 : 0;\n while (view !== null) {\n const scope = getScopeForView(view);\n if (scope.targets.has(op.trigger.targetName)) {\n const {\n xref,\n slot\n } = scope.targets.get(op.trigger.targetName);\n op.trigger.targetXref = xref;\n op.trigger.targetView = view.xref;\n op.trigger.targetSlotViewSteps = step;\n op.trigger.targetSlot = slot;\n return;\n }\n view = view.parent !== null ? job.views.get(view.parent) : null;\n step++;\n }\n break;\n default:\n throw new Error(`Trigger kind ${op.trigger.kind} not handled`);\n }\n }\n // Find the defer ops, and assign the data about their targets.\n for (const unit of job.units) {\n const defers = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.Defer:\n defers.set(op.xref, op);\n break;\n case OpKind.DeferOn:\n const deferOp = defers.get(op.defer);\n resolveTrigger(unit, op, deferOp.placeholderView);\n break;\n }\n }\n }\n}\nclass Scope$1 {\n constructor() {\n this.targets = new Map();\n }\n}\nconst REPLACEMENTS = new Map([[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]], [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]], [OpKind.I18nEnd, [OpKind.I18nStart, OpKind.I18n]]]);\n/**\n * Op kinds that should not prevent merging of start/end ops.\n */\nconst IGNORED_OP_KINDS = new Set([OpKind.Pipe]);\n/**\n * Replace sequences of mergable instructions (e.g. `ElementStart` and `ElementEnd`) with a\n * consolidated instruction (e.g. `Element`).\n */\nfunction collapseEmptyInstructions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n // Find end ops that may be able to be merged.\n const opReplacements = REPLACEMENTS.get(op.kind);\n if (opReplacements === undefined) {\n continue;\n }\n const [startKind, mergedKind] = opReplacements;\n // Locate the previous (non-ignored) op.\n let prevOp = op.prev;\n while (prevOp !== null && IGNORED_OP_KINDS.has(prevOp.kind)) {\n prevOp = prevOp.prev;\n }\n // If the previous op is the corresponding start op, we can megre.\n if (prevOp !== null && prevOp.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 prevOp.kind = mergedKind;\n // Remove the end instruction.\n OpList.remove(op);\n }\n }\n }\n}\n\n/**\n * Safe read expressions such as `a?.b` have different semantics in Angular templates as\n * compared to JavaScript. In particular, they default to `null` instead of `undefined`. This phase\n * finds all unresolved safe read expressions, and converts them into the appropriate output AST\n * reads, guarded by null checks. We generate temporaries as needed, to avoid re-evaluating the same\n * sub-expression multiple times.\n */\nfunction expandSafeReads(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 * The escape sequence used indicate message param values.\n */\nconst ESCAPE$1 = '\\uFFFD';\n/**\n * Marker used to indicate an element tag.\n */\nconst ELEMENT_MARKER = '#';\n/**\n * Marker used to indicate a template tag.\n */\nconst TEMPLATE_MARKER = '*';\n/**\n * Marker used to indicate closing of an element or template tag.\n */\nconst TAG_CLOSE_MARKER = '/';\n/**\n * Marker used to indicate the sub-template context.\n */\nconst CONTEXT_MARKER = ':';\n/**\n * Marker used to indicate the start of a list of values.\n */\nconst LIST_START_MARKER = '[';\n/**\n * Marker used to indicate the end of a list of values.\n */\nconst LIST_END_MARKER = ']';\n/**\n * Delimiter used to separate multiple values in a list.\n */\nconst LIST_DELIMITER = '|';\n/**\n * Formats the param maps on extracted message ops into a maps of `Expression` objects that can be\n * used in the final output.\n */\nfunction extractI18nMessages(job) {\n // Create an i18n message for each context.\n // TODO: Merge the context op with the message op since they're 1:1 anyways.\n const i18nMessagesByContext = new Map();\n const i18nBlocks = new Map();\n const i18nContexts = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n const i18nMessageOp = createI18nMessage(job, op);\n unit.create.push(i18nMessageOp);\n i18nMessagesByContext.set(op.xref, i18nMessageOp);\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.I18nStart:\n i18nBlocks.set(op.xref, op);\n break;\n }\n }\n }\n // Associate sub-messages for ICUs with their root message. At this point we can also remove the\n // ICU start/end ops, as they are no longer needed.\n let currentIcu = null;\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.IcuStart:\n currentIcu = op;\n OpList.remove(op);\n // Skip any contexts not associated with an ICU.\n const icuContext = i18nContexts.get(op.context);\n if (icuContext.contextKind !== I18nContextKind.Icu) {\n continue;\n }\n // Skip ICUs that share a context with their i18n message. These represent root-level\n // ICUs, not sub-messages.\n const i18nBlock = i18nBlocks.get(icuContext.i18nBlock);\n if (i18nBlock.context === icuContext.xref) {\n continue;\n }\n // Find the root message and push this ICUs message as a sub-message.\n const rootI18nBlock = i18nBlocks.get(i18nBlock.root);\n const rootMessage = i18nMessagesByContext.get(rootI18nBlock.context);\n if (rootMessage === undefined) {\n throw Error('AssertionError: ICU sub-message should belong to a root message.');\n }\n const subMessage = i18nMessagesByContext.get(icuContext.xref);\n subMessage.messagePlaceholder = op.messagePlaceholder;\n rootMessage.subMessages.push(subMessage.xref);\n break;\n case OpKind.IcuEnd:\n currentIcu = null;\n OpList.remove(op);\n break;\n case OpKind.IcuPlaceholder:\n // Add ICU placeholders to the message, then remove the ICU placeholder ops.\n if (currentIcu === null || currentIcu.context == null) {\n throw Error('AssertionError: Unexpected ICU placeholder outside of i18n context');\n }\n const msg = i18nMessagesByContext.get(currentIcu.context);\n msg.postprocessingParams.set(op.name, literal(formatIcuPlaceholder(op)));\n OpList.remove(op);\n break;\n }\n }\n }\n}\n/**\n * Create an i18n message op from an i18n context op.\n */\nfunction createI18nMessage(job, context, messagePlaceholder) {\n let formattedParams = formatParams(context.params);\n const formattedPostprocessingParams = formatParams(context.postprocessingParams);\n let needsPostprocessing = [...context.params.values()].some(v => v.length > 1);\n return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder ?? null, formattedParams, formattedPostprocessingParams, needsPostprocessing);\n}\n/**\n * Formats an ICU placeholder into a single string with expression placeholders.\n */\nfunction formatIcuPlaceholder(op) {\n if (op.strings.length !== op.expressionPlaceholders.length + 1) {\n throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);\n }\n const values = op.expressionPlaceholders.map(formatValue);\n return op.strings.flatMap((str, i) => [str, values[i] || '']).join('');\n}\n/**\n * Formats a map of `I18nParamValue[]` values into a map of `Expression` values.\n */\nfunction formatParams(params) {\n const formattedParams = new Map();\n for (const [placeholder, placeholderValues] of params) {\n const serializedValues = formatParamValues(placeholderValues);\n if (serializedValues !== null) {\n formattedParams.set(placeholder, literal(serializedValues));\n }\n }\n return formattedParams;\n}\n/**\n * Formats an `I18nParamValue[]` into a string (or null for empty array).\n */\nfunction formatParamValues(values) {\n if (values.length === 0) {\n return null;\n }\n const serializedValues = values.map(value => formatValue(value));\n return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;\n}\n/**\n * Formats a single `I18nParamValue` into a string\n */\nfunction formatValue(value) {\n // Element tags with a structural directive use a special form that concatenates the element and\n // template values.\n if (value.flags & I18nParamValueFlags.ElementTag && value.flags & I18nParamValueFlags.TemplateTag) {\n if (typeof value.value !== 'object') {\n throw Error('AssertionError: Expected i18n param value to have an element and template slot');\n }\n const elementValue = formatValue({\n ...value,\n value: value.value.element,\n flags: value.flags & ~I18nParamValueFlags.TemplateTag\n });\n const templateValue = formatValue({\n ...value,\n value: value.value.template,\n flags: value.flags & ~I18nParamValueFlags.ElementTag\n });\n // TODO(mmalerba): This is likely a bug in TemplateDefinitionBuilder, we should not need to\n // record the template value twice. For now I'm re-implementing the behavior here to keep the\n // output consistent with TemplateDefinitionBuilder.\n if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {\n return `${templateValue}${elementValue}${templateValue}`;\n }\n // To match the TemplateDefinitionBuilder output, flip the order depending on whether the\n // values represent a closing or opening tag (or both).\n // TODO(mmalerba): Figure out if this makes a difference in terms of either functionality,\n // or the resulting message ID. If not, we can remove the special-casing in the future.\n return value.flags & I18nParamValueFlags.CloseTag ? `${elementValue}${templateValue}` : `${templateValue}${elementValue}`;\n }\n // Self-closing tags use a special form that concatenates the start and close tag values.\n if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {\n return `${formatValue({\n ...value,\n flags: value.flags & ~I18nParamValueFlags.CloseTag\n })}${formatValue({\n ...value,\n flags: value.flags & ~I18nParamValueFlags.OpenTag\n })}`;\n }\n // If there are no special flags, just return the raw value.\n if (value.flags === I18nParamValueFlags.None) {\n return `${value.value}`;\n }\n // Encode the remaining flags as part of the value.\n let tagMarker = '';\n let closeMarker = '';\n if (value.flags & I18nParamValueFlags.ElementTag) {\n tagMarker = ELEMENT_MARKER;\n } else if (value.flags & I18nParamValueFlags.TemplateTag) {\n tagMarker = TEMPLATE_MARKER;\n }\n if (tagMarker !== '') {\n closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : '';\n }\n const context = value.subTemplateIndex === null ? '' : `${CONTEXT_MARKER}${value.subTemplateIndex}`;\n return `${ESCAPE$1}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE$1}`;\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 generateAdvance(job) {\n for (const unit of job.units) {\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 unit.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n } else if (op.handle.slot === null) {\n throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);\n }\n slotMap.set(op.xref, op.handle.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 unit.update) {\n let consumer = null;\n if (hasDependsOnSlotContextTrait(op)) {\n consumer = op;\n } else {\n visitExpressionsInOp(op, expr => {\n if (consumer === null && hasDependsOnSlotContextTrait(expr)) {\n consumer = expr;\n }\n });\n }\n if (consumer === null) {\n continue;\n }\n if (!slotMap.has(consumer.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 target ${consumer.target}`);\n }\n const slot = slotMap.get(consumer.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, consumer.sourceSpan), op);\n slotContext = slot;\n }\n }\n }\n}\n\n/**\n * Locate projection slots, populate the each component's `ngContentSelectors` literal field,\n * populate `project` arguments, and generate the required `projectionDef` instruction for the job's\n * root view.\n */\nfunction generateProjectionDefs(job) {\n // TODO: Why does TemplateDefinitionBuilder force a shared constant?\n const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;\n // Collect all selectors from this component, and its nested views. Also, assign each projection a\n // unique ascending projection slot index.\n const selectors = [];\n let projectionSlotIndex = 0;\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Projection) {\n selectors.push(op.selector);\n op.projectionSlotIndex = projectionSlotIndex++;\n }\n }\n }\n if (selectors.length > 0) {\n // Create the projectionDef array. If we only found a single wildcard selector, then we use the\n // default behavior with no arguments instead.\n let defExpr = null;\n if (selectors.length > 1 || selectors[0] !== '*') {\n const def = selectors.map(s => s === '*' ? s : parseSelectorToR3Selector(s));\n defExpr = job.pool.getConstLiteral(literalOrArrayLiteral(def), share);\n }\n // Create the ngContentSelectors constant.\n job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral(selectors), share);\n // The projection def instruction goes at the beginning of the root view, before any\n // `projection` instructions.\n job.root.create.prepend([createProjectionDefOp(defExpr)]);\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 generateVariables(job) {\n recursivelyProcessView(job.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.Projection:\n if (op.fallbackView !== null) {\n recursivelyProcessView(view.job.views.get(op.fallbackView), scope);\n }\n break;\n case OpKind.RepeaterCreate:\n // Descend into child embedded views.\n recursivelyProcessView(view.job.views.get(op.xref), scope);\n if (op.emptyView) {\n recursivelyProcessView(view.job.views.get(op.emptyView), scope);\n }\n break;\n case OpKind.Listener:\n case OpKind.TwoWayListener:\n // Prepend variables to listener handler functions.\n op.handlerOps.prepend(generateVariablesInScopeForView(view, scope, true));\n break;\n }\n }\n view.update.prepend(generateVariablesInScopeForView(view, scope, false));\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 aliases: view.aliases,\n references: [],\n letDeclarations: [],\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 local: false\n });\n }\n for (const op of view.create) {\n switch (op.kind) {\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 targetSlot: op.handle,\n offset,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.localRefs[offset].name,\n local: false\n }\n });\n }\n break;\n case OpKind.DeclareLet:\n scope.letDeclarations.push({\n targetId: op.xref,\n targetSlot: op.handle,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.declaredName,\n local: false\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, isListener) {\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(), VariableFlags.None));\n }\n // Add variables for all context variables available in this scope's view.\n const scopeView = view.job.views.get(scope.view);\n for (const [name, value] of scopeView.contextVariables) {\n const context = new ContextExpr(scope.view);\n // We either read the context, or, if the variable is CTX_REF, use the context directly.\n const variable = value === CTX_REF ? context : new ReadPropExpr(context, value);\n // Add the variable declaration.\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), variable, VariableFlags.None));\n }\n for (const alias of scopeView.aliases) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), alias, alias.expression.clone(), VariableFlags.AlwaysInline));\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.targetSlot, ref.offset), VariableFlags.None));\n }\n if (scope.view !== view.xref || isListener) {\n for (const decl of scope.letDeclarations) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), decl.variable, new ContextLetReferenceExpr(decl.targetId, decl.targetSlot), VariableFlags.None));\n }\n }\n if (scope.parent !== null) {\n // Recursively add variables from the parent scope.\n newOps.push(...generateVariablesInScopeForView(view, scope.parent, false));\n }\n return newOps;\n}\n\n/**\n * `ir.ConstCollectedExpr` may be present in any IR expression. This means that expression needs to\n * be lifted into the component const array, and replaced with a reference to the const array at its\n *\n * usage site. This phase walks the IR and performs this transformation.\n */\nfunction collectConstExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof ConstCollectedExpr)) {\n return expr;\n }\n return literal(job.addConst(expr.expr));\n }, VisitorContextFlag.None);\n }\n }\n}\nconst STYLE_DOT = 'style.';\nconst CLASS_DOT = 'class.';\nconst STYLE_BANG = 'style!';\nconst CLASS_BANG = 'class!';\nconst BANG_IMPORTANT = '!important';\n/**\n * Host bindings are compiled using a different parser entrypoint, and are parsed quite differently\n * as a result. Therefore, we need to do some extra parsing for host style properties, as compared\n * to non-host style properties.\n * TODO: Unify host bindings and non-host bindings in the parser.\n */\nfunction parseHostStyleProperties(job) {\n for (const op of job.root.update) {\n if (!(op.kind === OpKind.Binding && op.bindingKind === BindingKind.Property)) {\n continue;\n }\n if (op.name.endsWith(BANG_IMPORTANT)) {\n // Delete any `!important` suffixes from the binding name.\n op.name = op.name.substring(0, op.name.length - BANG_IMPORTANT.length);\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(op.name)) {\n op.name = hyphenate$1(op.name);\n }\n const {\n property,\n suffix\n } = parseProperty(op.name);\n op.name = property;\n op.unit = suffix;\n } else if (op.name.startsWith(STYLE_BANG)) {\n op.bindingKind = BindingKind.StyleProperty;\n op.name = 'style';\n } else if (op.name.startsWith(CLASS_DOT)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty(op.name.substring(CLASS_DOT.length)).property;\n } else if (op.name.startsWith(CLASS_BANG)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty(op.name.substring(CLASS_BANG.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(name) {\n return name.startsWith('--');\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}\nfunction parseProperty(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}\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}\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 visitBlockPlaceholder(ph) {\n return `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\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}\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 Block extends NodeWithI18n {\n constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.parameters = parameters;\n this.children = children;\n this.nameSpan = nameSpan;\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}\nclass LetDeclaration {\n constructor(name, value, sourceSpan, nameSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor, context) {\n return visitor.visitLetDeclaration(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 visitBlock(block, context) {\n this.visitChildren(context, visit => {\n visit(block.parameters);\n visit(block.children);\n });\n }\n visitBlockParameter(ast, context) {}\n visitLetDeclaration(decl, 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}\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 ?? true;\n this._tokenizeLet = options.tokenizeLet ?? true;\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._tokenizeLet &&\n // Use `peek` instead of `attempCharCode` since we\n // don't want to advance in case it's not `@let`.\n this._cursor.peek() === $AT && !this._inInterpolation && this._attemptStr('@let')) {\n this._consumeLetDeclaration(start);\n } else if (this._tokenizeBlocks && this._attemptCharCode($AT)) {\n this._consumeBlockStart(start);\n } else if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode($RBRACE)) {\n this._consumeBlockEnd(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(33 /* TokenType.EOF */);\n this._endToken([]);\n }\n _getBlockName() {\n // This allows us to capture up something like `@else if`, but not `@ if`.\n let spacesInNameAllowed = false;\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn(code => {\n if (isWhitespace(code)) {\n return !spacesInNameAllowed;\n }\n if (isBlockNameChar(code)) {\n spacesInNameAllowed = true;\n return false;\n }\n return true;\n });\n return this._cursor.getChars(nameCursor).trim();\n }\n _consumeBlockStart(start) {\n this._beginToken(24 /* TokenType.BLOCK_OPEN_START */, start);\n const startToken = this._endToken([this._getBlockName()]);\n if (this._cursor.peek() === $LPAREN) {\n // Advance past the opening paren.\n this._cursor.advance();\n // Capture the parameters.\n this._consumeBlockParameters();\n // Allow spaces before the closing paren.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($RPAREN)) {\n // Allow spaces after the paren.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n } else {\n startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */;\n return;\n }\n }\n if (this._attemptCharCode($LBRACE)) {\n this._beginToken(25 /* TokenType.BLOCK_OPEN_END */);\n this._endToken([]);\n } else {\n startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */;\n }\n }\n _consumeBlockEnd(start) {\n this._beginToken(26 /* TokenType.BLOCK_CLOSE */, start);\n this._endToken([]);\n }\n _consumeBlockParameters() {\n // Trim the whitespace until the first parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n while (this._cursor.peek() !== $RPAREN && this._cursor.peek() !== $EOF) {\n this._beginToken(27 /* TokenType.BLOCK_PARAMETER */);\n const start = this._cursor.clone();\n let inQuote = null;\n let openParens = 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 === $LPAREN && inQuote === null) {\n openParens++;\n } else if (char === $RPAREN && inQuote === null) {\n if (openParens === 0) {\n break;\n } else if (openParens > 0) {\n openParens--;\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 _consumeLetDeclaration(start) {\n this._beginToken(29 /* TokenType.LET_START */, start);\n // Require at least one white space after the `@let`.\n if (isWhitespace(this._cursor.peek())) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n } else {\n const token = this._endToken([this._cursor.getChars(start)]);\n token.type = 32 /* TokenType.INCOMPLETE_LET */;\n return;\n }\n const startToken = this._endToken([this._getLetDeclarationName()]);\n // Skip over white space before the equals character.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n // Expect an equals sign.\n if (!this._attemptCharCode($EQ)) {\n startToken.type = 32 /* TokenType.INCOMPLETE_LET */;\n return;\n }\n // Skip spaces after the equals.\n this._attemptCharCodeUntilFn(code => isNotWhitespace(code) && !isNewLine(code));\n this._consumeLetDeclarationValue();\n // Terminate the `@let` with a semicolon.\n const endChar = this._cursor.peek();\n if (endChar === $SEMICOLON) {\n this._beginToken(31 /* TokenType.LET_END */);\n this._endToken([]);\n this._cursor.advance();\n } else {\n startToken.type = 32 /* TokenType.INCOMPLETE_LET */;\n startToken.sourceSpan = this._cursor.getSpan(start);\n }\n }\n _getLetDeclarationName() {\n const nameCursor = this._cursor.clone();\n let allowDigit = false;\n this._attemptCharCodeUntilFn(code => {\n if (isAsciiLetter(code) || code === $$ || code === $_ ||\n // `@let` names can't start with a digit, but digits are valid anywhere else in the name.\n allowDigit && isDigit(code)) {\n allowDigit = true;\n return false;\n }\n return true;\n });\n return this._cursor.getChars(nameCursor).trim();\n }\n _consumeLetDeclarationValue() {\n const start = this._cursor.clone();\n this._beginToken(30 /* TokenType.LET_VALUE */, start);\n while (this._cursor.peek() !== $EOF) {\n const char = this._cursor.peek();\n // `@let` declarations terminate with a semicolon.\n if (char === $SEMICOLON) {\n break;\n }\n // If we hit a quote, skip over its content since we don't care what's inside.\n if (isQuote(char)) {\n this._cursor.advance();\n this._attemptCharCodeUntilFn(inner => {\n if (inner === $BACKSLASH) {\n this._cursor.advance();\n return false;\n }\n return inner === char;\n });\n }\n this._cursor.advance();\n }\n this._endToken([this._cursor.getChars(start)]);\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._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 if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._cursor.peek() === $AT || this._cursor.peek() === $RBRACE)) {\n return true;\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 _readUntil(char) {\n const start = this._cursor.clone();\n this._attemptUntilChar(char);\n return this._cursor.getChars(start);\n }\n _isInExpansion() {\n return this._isInExpansionCase() || this._isInExpansionForm();\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$1 {\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 !== 33 /* 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 === 24 /* TokenType.BLOCK_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlockOpen(this._advance());\n } else if (this._peek.type === 26 /* TokenType.BLOCK_CLOSE */) {\n this._closeVoidElement();\n this._consumeBlockClose(this._advance());\n } else if (this._peek.type === 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */) {\n this._closeVoidElement();\n this._consumeIncompleteBlock(this._advance());\n } else if (this._peek.type === 29 /* TokenType.LET_START */) {\n this._closeVoidElement();\n this._consumeLet(this._advance());\n } else if (this._peek.type === 32 /* TokenType.INCOMPLETE_LET */) {\n this._closeVoidElement();\n this._consumeIncompleteLet(this._advance());\n } else {\n // Skip all other tokens...\n this._advance();\n }\n }\n for (const leftoverContainer of this._containerStack) {\n // Unlike HTML elements, blocks aren't closed implicitly by the end of the file.\n if (leftoverContainer instanceof Block) {\n this.errors.push(TreeError.create(leftoverContainer.name, leftoverContainer.sourceSpan, `Unclosed block \"${leftoverContainer.name}\"`));\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: 33 /* 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 === 33 /* 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 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(expectedName, expectedType, endSourceSpan) {\n let unexpectedCloseTagDetected = false;\n for (let stackIndex = this._containerStack.length - 1; stackIndex >= 0; stackIndex--) {\n const node = this._containerStack[stackIndex];\n if ((node.name === expectedName || expectedName === null) && 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 and most elements are not self closing.\n if (node instanceof Block || 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 _consumeBlockOpen(token) {\n const parameters = [];\n while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\n }\n if (this._peek.type === 25 /* TokenType.BLOCK_OPEN_END */) {\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, token.sourceSpan, startSpan);\n this._pushContainer(block, false);\n }\n _consumeBlockClose(token) {\n if (!this._popContainer(null, Block, token.sourceSpan)) {\n this.errors.push(TreeError.create(null, token.sourceSpan, `Unexpected closing block. The block may have been closed earlier. ` + `If you meant to write the } character, you should use the \"}\" ` + `HTML entity instead.`));\n }\n }\n _consumeIncompleteBlock(token) {\n const parameters = [];\n while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\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, token.sourceSpan, startSpan);\n this._pushContainer(block, false);\n // Incomplete blocks don't have children so we close them immediately and report an error.\n this._popContainer(null, Block, null);\n this.errors.push(TreeError.create(token.parts[0], span, `Incomplete block \"${token.parts[0]}\". If you meant to write the @ character, ` + `you should use the \"@\" HTML entity instead.`));\n }\n _consumeLet(startToken) {\n const name = startToken.parts[0];\n let valueToken;\n let endToken;\n if (this._peek.type !== 30 /* TokenType.LET_VALUE */) {\n this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Invalid @let declaration \"${name}\". Declaration must have a value.`));\n return;\n } else {\n valueToken = this._advance();\n }\n // Type cast is necessary here since TS narrowed the type of `peek` above.\n if (this._peek.type !== 31 /* TokenType.LET_END */) {\n this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Unterminated @let declaration \"${name}\". Declaration must be terminated with a semicolon.`));\n return;\n } else {\n endToken = this._advance();\n }\n const end = endToken.sourceSpan.fullStart;\n const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);\n // The start token usually captures the `@let`. Construct a name span by\n // offsetting the start by the length of any text before the name.\n const startOffset = startToken.sourceSpan.toString().lastIndexOf(name);\n const nameStart = startToken.sourceSpan.start.moveBy(startOffset);\n const nameSpan = new ParseSourceSpan(nameStart, startToken.sourceSpan.end);\n const node = new LetDeclaration(name, valueToken.parts[0], span, nameSpan, valueToken.sourceSpan);\n this._addToParent(node);\n }\n _consumeIncompleteLet(token) {\n // Incomplete `@let` declaration may end up with an empty name.\n const name = token.parts[0] ?? '';\n const nameString = name ? ` \"${name}\"` : '';\n // If there's at least a name, we can salvage an AST node that can be used for completions.\n if (name.length > 0) {\n const startOffset = token.sourceSpan.toString().lastIndexOf(name);\n const nameStart = token.sourceSpan.start.moveBy(startOffset);\n const nameSpan = new ParseSourceSpan(nameStart, token.sourceSpan.end);\n const valueSpan = new ParseSourceSpan(token.sourceSpan.start, token.sourceSpan.start.moveBy(0));\n const node = new LetDeclaration(name, '', token.sourceSpan, nameSpan, valueSpan);\n this._addToParent(node);\n }\n this.errors.push(TreeError.create(token.parts[0], token.sourceSpan, `Incomplete @let declaration${nameString}. ` + `@let declarations must be written as \\`@let <name> = <value>;\\``));\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 {\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}\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 *\n * If `originalNodeMap` is provided, the transformed nodes will be mapped back to their original\n * inputs. Any output nodes not in the map were not transformed. This supports correlating and\n * porting information between the trimmed nodes and original nodes (such as `i18n` properties)\n * such that trimming whitespace does not does not drop required information from the node.\n */\nclass WhitespaceVisitor {\n constructor(preserveSignificantWhitespace, originalNodeMap, requireContext = true) {\n this.preserveSignificantWhitespace = preserveSignificantWhitespace;\n this.originalNodeMap = originalNodeMap;\n this.requireContext = requireContext;\n // How many ICU expansions which are currently being visited. ICUs can be nested, so this\n // tracks the current depth of nesting. If this depth is greater than 0, then this visitor is\n // currently processing content inside an ICU expansion.\n this.icuExpansionDepth = 0;\n }\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 const newElement = new Element(element.name, visitAllWithSiblings(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n this.originalNodeMap?.set(newElement, element);\n return newElement;\n }\n const newElement = new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n this.originalNodeMap?.set(newElement, element);\n return newElement;\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 // Do not trim whitespace within ICU expansions when preserving significant whitespace.\n // Historically, ICU whitespace was never trimmed and this is really a bug. However fixing it\n // would change message IDs which we can't easily do. Instead we only trim ICU whitespace within\n // ICU expansions when not preserving significant whitespace, which is the new behavior where it\n // most matters.\n const inIcuExpansion = this.icuExpansionDepth > 0;\n if (inIcuExpansion && this.preserveSignificantWhitespace) return text;\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 // Fully trim message when significant whitespace is not preserved.\n if (!this.preserveSignificantWhitespace && tokens.length > 0) {\n // The first token should only call `.trimStart()` and the last token\n // should only call `.trimEnd()`, but there might be only one token which\n // needs to call both.\n const firstToken = tokens[0];\n tokens.splice(0, 1, trimLeadingWhitespace(firstToken, context));\n const lastToken = tokens[tokens.length - 1]; // Could be the same as the first token.\n tokens.splice(tokens.length - 1, 1, trimTrailingWhitespace(lastToken, context));\n }\n // Process the whitespace of the value of this Text node. Also trim the leading/trailing\n // whitespace when we don't need to preserve significant whitespace.\n const processed = processWhitespace(text.value);\n const value = this.preserveSignificantWhitespace ? processed : trimLeadingAndTrailingWhitespace(processed, context);\n const result = new Text(value, text.sourceSpan, tokens, text.i18n);\n this.originalNodeMap?.set(result, text);\n return result;\n }\n return null;\n }\n visitComment(comment, context) {\n return comment;\n }\n visitExpansion(expansion, context) {\n this.icuExpansionDepth++;\n let newExpansion;\n try {\n newExpansion = new Expansion(expansion.switchValue, expansion.type, visitAllWithSiblings(this, expansion.cases), expansion.sourceSpan, expansion.switchValueSourceSpan, expansion.i18n);\n } finally {\n this.icuExpansionDepth--;\n }\n this.originalNodeMap?.set(newExpansion, expansion);\n return newExpansion;\n }\n visitExpansionCase(expansionCase, context) {\n const newExpansionCase = new ExpansionCase(expansionCase.value, visitAllWithSiblings(this, expansionCase.expression), expansionCase.sourceSpan, expansionCase.valueSourceSpan, expansionCase.expSourceSpan);\n this.originalNodeMap?.set(newExpansionCase, expansionCase);\n return newExpansionCase;\n }\n visitBlock(block, context) {\n const newBlock = new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);\n this.originalNodeMap?.set(newBlock, block);\n return newBlock;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n visitLetDeclaration(decl, context) {\n return decl;\n }\n visit(_node, context) {\n // `visitAllWithSiblings` provides context necessary for ICU messages to be handled correctly.\n // Prefer that over calling `html.visitAll` directly on this visitor.\n if (this.requireContext && !context) {\n throw new Error(`WhitespaceVisitor requires context. Visit via \\`visitAllWithSiblings\\` to get this context.`);\n }\n return false;\n }\n}\nfunction trimLeadingWhitespace(token, context) {\n if (token.type !== 5 /* TokenType.TEXT */) return token;\n const isFirstTokenInTag = !context?.prev;\n if (!isFirstTokenInTag) return token;\n return transformTextToken(token, text => text.trimStart());\n}\nfunction trimTrailingWhitespace(token, context) {\n if (token.type !== 5 /* TokenType.TEXT */) return token;\n const isLastTokenInTag = !context?.next;\n if (!isLastTokenInTag) return token;\n return transformTextToken(token, text => text.trimEnd());\n}\nfunction trimLeadingAndTrailingWhitespace(text, context) {\n const isFirstTokenInTag = !context?.prev;\n const isLastTokenInTag = !context?.next;\n const maybeTrimmedStart = isFirstTokenInTag ? text.trimStart() : text;\n const maybeTrimmed = isLastTokenInTag ? maybeTrimmedStart.trimEnd() : maybeTrimmedStart;\n return maybeTrimmed;\n}\nfunction createWhitespaceProcessedTextToken({\n type,\n parts,\n sourceSpan\n}) {\n return {\n type,\n parts: [processWhitespace(parts[0])],\n sourceSpan\n };\n}\nfunction transformTextToken({\n type,\n parts,\n sourceSpan\n}, transform) {\n // `TextToken` only ever has one part as defined in its type, so we just transform the first element.\n return {\n type,\n parts: [transform(parts[0])],\n sourceSpan\n };\n}\nfunction processWhitespace(text) {\n return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\nfunction removeWhitespaces(htmlAstWithErrors, preserveSignificantWhitespace) {\n return new ParseTreeResult(visitAllWithSiblings(new WhitespaceVisitor(preserveSignificantWhitespace), 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}\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 {\n constructor(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n parseAction(input, 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 const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1 /* ParseFlags.Action */, 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 const literalMapKey = {\n key,\n quoted\n };\n keys.push(literalMapKey);\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 literalMapKey.isShorthandInitialized = true;\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.consumeOptionalOperator('=')) {\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.consumeOptionalOperator('=')) {\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 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}\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}\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,!inert,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:|', ':math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*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,*scrollend,*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', ':math:math^:math:|', ':math:maction^:math:|', ':math:menclose^:math:|', ':math:merror^:math:|', ':math:mfenced^:math:|', ':math:mfrac^:math:|', ':math:mi^:math:|', ':math:mmultiscripts^:math:|', ':math:mn^:math:|', ':math:mo^:math:|', ':math:mover^:math:|', ':math:mpadded^:math:|', ':math:mphantom^:math:|', ':math:mroot^:math:|', ':math:mrow^:math:|', ':math:ms^:math:|', ':math:mspace^:math:|', ':math:msqrt^:math:|', ':math:mstyle^:math:|', ':math:msub^:math:|', ':math:msubsup^:math:|', ':math:msup^:math:|', ':math:mtable^:math:|', ':math:mtd^:math:|', ':math:mtext^:math:|', ':math:mtr^:math:|', ':math:munder^:math:|', ':math:munderover^:math:|', ':math:semantics^:math:|'];\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 = Object.assign(Object.create(null), {\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[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}\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 getStartBlockPlaceholderName(name, parameters) {\n const signature = this._hashBlock(name, parameters);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);\n this._signatureToName[signature] = placeholder;\n return placeholder;\n }\n getCloseBlockPlaceholderName(name) {\n const signature = this._hashClosingBlock(name);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);\n this._signatureToName[signature] = placeholder;\n return placeholder;\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 _hashBlock(name, parameters) {\n const params = parameters.length === 0 ? '' : ` (${parameters.sort().join('; ')})`;\n return `@${name}${params} {}`;\n }\n _hashClosingBlock(name) {\n return this._hashBlock(`close_${name}`, []);\n }\n _toSnakeCase(name) {\n return name.toUpperCase().replace(/[^A-Z0-9]/g, '_');\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(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig, containerBlocks, retainEmptyTokens) {\n const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks, retainEmptyTokens);\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, _containerBlocks, _retainEmptyTokens) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n this._containerBlocks = _containerBlocks;\n this._retainEmptyTokens = _retainEmptyTokens;\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 visitBlock(block, context) {\n const children = visitAll(this, block.children, context);\n if (this._containerBlocks.has(block.name)) {\n return new Container(children, block.sourceSpan);\n }\n const parameters = block.parameters.map(param => param.expression);\n const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);\n const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);\n context.placeholderToContent[startPhName] = {\n text: block.startSourceSpan.toString(),\n sourceSpan: block.startSourceSpan\n };\n context.placeholderToContent[closePhName] = {\n text: block.endSourceSpan ? block.endSourceSpan.toString() : '}',\n sourceSpan: block.endSourceSpan ?? block.sourceSpan\n };\n const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);\n return context.visitNodeFn(block, node);\n }\n visitBlockParameter(_parameter, _context) {\n throw new Error('Unreachable code');\n }\n visitLetDeclaration(decl, context) {\n return null;\n }\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 // Try to merge text tokens with previous tokens. We do this even for all tokens\n // when `retainEmptyTokens == true` because whitespace tokens may have non-zero\n // length, but will be trimmed by `WhitespaceVisitor` in one extraction pass and\n // be considered \"empty\" there. Therefore a whitespace token with\n // `retainEmptyTokens === true` should be treated like an empty token and either\n // retained or merged into the previous node. Since extraction does two passes with\n // different trimming behavior, the second pass needs to have identical node count\n // to reuse source spans, so we need this check to get the same answer when both\n // trimming and not trimming.\n if (token.parts[0].length > 0 || this._retainEmptyTokens) {\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 } else {\n // Retain empty tokens to avoid breaking dropping entire nodes such that source\n // spans should not be reusable across multiple parses of a template. We *should*\n // do this all the time, however we need to maintain backwards compatibility\n // with existing message IDs so we can't do it by default and should only enable\n // this when removing significant whitespace.\n if (this._retainEmptyTokens) {\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(`\nThe number of i18n message children changed between first and second pass.\n\nFirst pass (${previousNodes.length} tokens):\n${previousNodes.map(node => `\"${node.sourceSpan.toString()}\"`).join('\\n')}\n\nSecond pass (${nodes.length} tokens):\n${nodes.map(node => `\"${node.sourceSpan.toString()}\"`).join('\\n')}\n `.trim());\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\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 setI18nRefs = originalNodeMap => {\n return (trimmedNode, i18nNode) => {\n // We need to set i18n properties on the original, untrimmed AST nodes. The i18n nodes needs to\n // use the trimmed content for message IDs to make messages more stable to whitespace changes.\n // But we don't want to actually trim the content, so we can't use the trimmed HTML AST for\n // general code gen. Instead we map the trimmed HTML AST back to the original AST and then\n // attach the i18n nodes so we get trimmed i18n nodes on the original (untrimmed) HTML AST.\n const originalNode = originalNodeMap.get(trimmedNode) ?? trimmedNode;\n if (originalNode instanceof NodeWithI18n) {\n if (i18nNode instanceof IcuPlaceholder && originalNode.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 = originalNode.i18n;\n }\n originalNode.i18n = i18nNode;\n }\n return i18nNode;\n };\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, containerBlocks = DEFAULT_CONTAINER_BLOCKS, preserveSignificantWhitespace = true,\n // When dropping significant whitespace we need to retain empty tokens or\n // else we won't be able to reuse source spans because empty tokens would be\n // removed and cause a mismatch. Unfortunately this still needs to be\n // configurable and sometimes needs to be set independently in order to make\n // sure the number of nodes don't change between parses, even when\n // `preserveSignificantWhitespace` changes.\n retainEmptyTokens = !preserveSignificantWhitespace) {\n this.interpolationConfig = interpolationConfig;\n this.keepI18nAttrs = keepI18nAttrs;\n this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;\n this.containerBlocks = containerBlocks;\n this.preserveSignificantWhitespace = preserveSignificantWhitespace;\n this.retainEmptyTokens = retainEmptyTokens;\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, this.containerBlocks, this.retainEmptyTokens);\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 // Generate a new AST with whitespace trimmed, but also generate a map\n // to correlate each new node to its original so we can apply i18n\n // information to the original node based on the trimmed content.\n //\n // `WhitespaceVisitor` removes *insignificant* whitespace as well as\n // significant whitespace. Enabling this visitor should be conditional\n // on `preserveWhitespace` rather than `preserveSignificantWhitespace`,\n // however this would be a breaking change for existing behavior where\n // `preserveWhitespace` was not respected correctly when generating\n // message IDs. This is really a bug but one we need to keep to maintain\n // backwards compatibility.\n const originalNodeMap = new Map();\n const trimmedNodes = this.preserveSignificantWhitespace ? element.children : visitAllWithSiblings(new WhitespaceVisitor(false /* preserveSignificantWhitespace */, originalNodeMap), element.children);\n message = this._generateI18nMessage(trimmedNodes, i18n, setI18nRefs(originalNodeMap));\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 visitBlock(block, context) {\n visitAll(this, block.children, context);\n return block;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n visitLetDeclaration(decl, context) {\n return decl;\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, /* preservePlaceholders */this.preserveSignificantWhitespace);\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, /* preservePlaceholders */this.preserveSignificantWhitespace)];\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 visitBlockPlaceholder(ph) {\n return `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\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 visitBlockPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.startName, ph.startSourceSpan ?? ph.sourceSpan));\n ph.children.forEach(child => child.visit(this));\n this.pieces.push(this.createPlaceholderPiece(ph.closeName, ph.endSourceSpan ?? 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/** 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 * 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/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/**\n * The escape sequence used for message param values.\n */\nconst ESCAPE = '\\uFFFD';\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\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 * Lifts i18n properties into the consts array.\n * TODO: Can we use `ConstCollectedExpr`?\n * TODO: The way the various attributes are linked together is very complex. Perhaps we could\n * simplify the process, maybe by combining the context and message ops?\n */\nfunction collectI18nConsts(job) {\n const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_').toUpperCase() + '_';\n // Step One: Build up various lookup maps we need to collect all the consts.\n // Context Xref -> Extracted Attribute Ops\n const extractedAttributesByI18nContext = new Map();\n // Element/ElementStart Xref -> I18n Attributes config op\n const i18nAttributesByElement = new Map();\n // Element/ElementStart Xref -> All I18n Expression ops for attrs on that target\n const i18nExpressionsByElement = new Map();\n // I18n Message Xref -> I18n Message Op (TODO: use a central op map)\n const messages = new Map();\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {\n const attributes = extractedAttributesByI18nContext.get(op.i18nContext) ?? [];\n attributes.push(op);\n extractedAttributesByI18nContext.set(op.i18nContext, attributes);\n } else if (op.kind === OpKind.I18nAttributes) {\n i18nAttributesByElement.set(op.target, op);\n } else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {\n const expressions = i18nExpressionsByElement.get(op.target) ?? [];\n expressions.push(op);\n i18nExpressionsByElement.set(op.target, expressions);\n } else if (op.kind === OpKind.I18nMessage) {\n messages.set(op.xref, op);\n }\n }\n }\n // Step Two: Serialize the extracted i18n messages for root i18n blocks and i18n attributes into\n // the const array.\n //\n // Also, each i18n message will have a variable expression that can refer to its\n // value. Store these expressions in the appropriate place:\n // 1. For normal i18n content, it also goes in the const array. We save the const index to use\n // later.\n // 2. For extracted attributes, it becomes the value of the extracted attribute instruction.\n // 3. For i18n bindings, it will go in a separate const array instruction below; for now, we just\n // save it.\n const i18nValuesByContext = new Map();\n const messageConstIndices = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nMessage) {\n if (op.messagePlaceholder === null) {\n const {\n mainVar,\n statements\n } = collectMessage(job, fileBasedI18nSuffix, messages, op);\n if (op.i18nBlock !== null) {\n // This is a regular i18n message with a corresponding i18n block. Collect it into the\n // const array.\n const i18nConst = job.addConst(mainVar, statements);\n messageConstIndices.set(op.i18nBlock, i18nConst);\n } else {\n // This is an i18n attribute. Extract the initializers into the const pool.\n job.constsInitializers.push(...statements);\n // Save the i18n variable value for later.\n i18nValuesByContext.set(op.i18nContext, mainVar);\n // This i18n message may correspond to an individual extracted attribute. If so, The\n // value of that attribute is updated to read the extracted i18n variable.\n const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);\n if (attributesForMessage !== undefined) {\n for (const attr of attributesForMessage) {\n attr.expression = mainVar.clone();\n }\n }\n }\n }\n OpList.remove(op);\n }\n }\n }\n // Step Three: Serialize I18nAttributes configurations into the const array. Each I18nAttributes\n // instruction has a config array, which contains k-v pairs describing each binding name, and the\n // i18n variable that provides the value.\n for (const unit of job.units) {\n for (const elem of unit.create) {\n if (isElementOrContainerOp(elem)) {\n const i18nAttributes = i18nAttributesByElement.get(elem.xref);\n if (i18nAttributes === undefined) {\n // This element is not associated with an i18n attributes configuration instruction.\n continue;\n }\n let i18nExpressions = i18nExpressionsByElement.get(elem.xref);\n if (i18nExpressions === undefined) {\n // Unused i18nAttributes should have already been removed.\n // TODO: Should the removal of those dead instructions be merged with this phase?\n throw new Error('AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction');\n }\n // Find expressions for all the unique property names, removing duplicates.\n const seenPropertyNames = new Set();\n i18nExpressions = i18nExpressions.filter(i18nExpr => {\n const seen = seenPropertyNames.has(i18nExpr.name);\n seenPropertyNames.add(i18nExpr.name);\n return !seen;\n });\n const i18nAttributeConfig = i18nExpressions.flatMap(i18nExpr => {\n const i18nExprValue = i18nValuesByContext.get(i18nExpr.context);\n if (i18nExprValue === undefined) {\n throw new Error(\"AssertionError: Could not find i18n expression's value\");\n }\n return [literal(i18nExpr.name), i18nExprValue];\n });\n i18nAttributes.i18nAttributesConfig = job.addConst(new LiteralArrayExpr(i18nAttributeConfig));\n }\n }\n }\n // Step Four: Propagate the extracted const index into i18n ops that messages were extracted from.\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nStart) {\n const msgIndex = messageConstIndices.get(op.root);\n if (msgIndex === undefined) {\n throw new Error('AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?');\n }\n op.messageIndex = msgIndex;\n }\n }\n }\n}\n/**\n * Collects the given message into a set of statements that can be added to the const array.\n * This will recursively collect any sub-messages referenced from the parent message as well.\n */\nfunction collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {\n // Recursively collect any sub-messages, record each sub-message's main variable under its\n // placeholder so that we can add them to the params for the parent message. It is possible\n // that multiple sub-messages will share the same placeholder, so we need to track an array of\n // variables for each placeholder.\n const statements = [];\n const subMessagePlaceholders = new Map();\n for (const subMessageId of messageOp.subMessages) {\n const subMessage = messages.get(subMessageId);\n const {\n mainVar: subMessageVar,\n statements: subMessageStatements\n } = collectMessage(job, fileBasedI18nSuffix, messages, subMessage);\n statements.push(...subMessageStatements);\n const subMessages = subMessagePlaceholders.get(subMessage.messagePlaceholder) ?? [];\n subMessages.push(subMessageVar);\n subMessagePlaceholders.set(subMessage.messagePlaceholder, subMessages);\n }\n addSubMessageParams(messageOp, subMessagePlaceholders);\n // Sort the params for consistency with TemaplateDefinitionBuilder output.\n messageOp.params = new Map([...messageOp.params.entries()].sort());\n const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX));\n // Closure Compiler requires const names to start with `MSG_` but disallows any other\n // const to start with `MSG_`. We define a variable starting with `MSG_` just for the\n // `goog.getMsg` call\n const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);\n let transformFn = undefined;\n // If nescessary, add a post-processing step and resolve any placeholder params that are\n // set in post-processing.\n if (messageOp.needsPostprocessing || messageOp.postprocessingParams.size > 0) {\n // Sort the post-processing params for consistency with TemaplateDefinitionBuilder output.\n const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());\n const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, /* useCamelCase */false);\n const extraTransformFnParams = [];\n if (messageOp.postprocessingParams.size > 0) {\n extraTransformFnParams.push(mapLiteral(formattedPostprocessingParams, /* quoted */true));\n }\n transformFn = expr => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);\n }\n // Add the message's statements\n statements.push(...getTranslationDeclStmts(messageOp.message, mainVar, closureVar, messageOp.params, transformFn));\n return {\n mainVar,\n statements\n };\n}\n/**\n * Adds the given subMessage placeholders to the given message op.\n *\n * If a placeholder only corresponds to a single sub-message variable, we just set that variable\n * as the param value. However, if the placeholder corresponds to multiple sub-message\n * variables, we need to add a special placeholder value that is handled by the post-processing\n * step. We then add the array of variables as a post-processing param.\n */\nfunction addSubMessageParams(messageOp, subMessagePlaceholders) {\n for (const [placeholder, subMessages] of subMessagePlaceholders) {\n if (subMessages.length === 1) {\n messageOp.params.set(placeholder, subMessages[0]);\n } else {\n messageOp.params.set(placeholder, literal(`${ESCAPE}${I18N_ICU_MAPPING_PREFIX}${placeholder}${ESCAPE}`));\n messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));\n }\n }\n}\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\n * (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 paramsObject = Object.fromEntries(params);\n const statements = [declareI18nVariable(variable), ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, paramsObject), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(paramsObject, /* 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 * Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n */\nfunction i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExternalIds) {\n let name;\n const suffix = fileBasedI18nSuffix;\n if (useExternalIds) {\n const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n const uniqueSuffix = pool.uniqueName(suffix);\n name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n } else {\n const prefix = getTranslationConstPrefix(suffix);\n name = pool.uniqueName(prefix);\n }\n return variable(name);\n}\n\n/**\n * Removes text nodes within i18n blocks since they are already hardcoded into the i18n message.\n * Also, replaces interpolations on these text nodes with i18n expressions of the non-text portions,\n * which will be applied later.\n */\nfunction convertI18nText(job) {\n for (const unit of job.units) {\n // Remove all text nodes within i18n blocks, their content is already captured in the i18n\n // message.\n let currentI18n = null;\n let currentIcu = null;\n const textNodeI18nBlocks = new Map();\n const textNodeIcus = new Map();\n const icuPlaceholderByText = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (op.context === null) {\n throw Error('I18n op should have its context set.');\n }\n currentI18n = op;\n break;\n case OpKind.I18nEnd:\n currentI18n = null;\n break;\n case OpKind.IcuStart:\n if (op.context === null) {\n throw Error('Icu op should have its context set.');\n }\n currentIcu = op;\n break;\n case OpKind.IcuEnd:\n currentIcu = null;\n break;\n case OpKind.Text:\n if (currentI18n !== null) {\n textNodeI18nBlocks.set(op.xref, currentI18n);\n textNodeIcus.set(op.xref, currentIcu);\n if (op.icuPlaceholder !== null) {\n // Create an op to represent the ICU placeholder. Initially set its static text to the\n // value of the text op, though this may be overwritten later if this text op is a\n // placeholder for an interpolation.\n const icuPlaceholderOp = createIcuPlaceholderOp(job.allocateXrefId(), op.icuPlaceholder, [op.initialValue]);\n OpList.replace(op, icuPlaceholderOp);\n icuPlaceholderByText.set(op.xref, icuPlaceholderOp);\n } else {\n // Otherwise just remove the text op, since its value is already accounted for in the\n // translated message.\n OpList.remove(op);\n }\n }\n break;\n }\n }\n // Update any interpolations to the removed text, and instead represent them as a series of i18n\n // expressions that we then apply.\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.InterpolateText:\n if (!textNodeI18nBlocks.has(op.target)) {\n continue;\n }\n const i18nOp = textNodeI18nBlocks.get(op.target);\n const icuOp = textNodeIcus.get(op.target);\n const icuPlaceholder = icuPlaceholderByText.get(op.target);\n const contextId = icuOp ? icuOp.context : i18nOp.context;\n const resolutionTime = icuOp ? I18nParamResolutionTime.Postproccessing : I18nParamResolutionTime.Creation;\n const ops = [];\n for (let i = 0; i < op.interpolation.expressions.length; i++) {\n const expr = op.interpolation.expressions[i];\n // For now, this i18nExpression depends on the slot context of the enclosing i18n block.\n // Later, we will modify this, and advance to a different point.\n ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, icuPlaceholder?.xref ?? null, op.interpolation.i18nPlaceholders[i] ?? null, resolutionTime, I18nExpressionFor.I18nText, '', expr.sourceSpan ?? op.sourceSpan));\n }\n OpList.replaceWithMany(op, ops);\n // If this interpolation is part of an ICU placeholder, add the strings and expressions to\n // the placeholder.\n if (icuPlaceholder !== undefined) {\n icuPlaceholder.strings = op.interpolation.strings;\n }\n break;\n }\n }\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 liftLocalRefs(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\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 still`);\n }\n op.numSlotsUsed += op.localRefs.length;\n if (op.localRefs.length > 0) {\n const localRefs = serializeLocalRefs(op.localRefs);\n op.localRefs = job.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 emitNamespaceChanges(job) {\n for (const unit of job.units) {\n let activeNamespace = Namespace.HTML;\n for (const op of unit.create) {\n if (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\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 // TODO: Do not hyphenate CSS custom property names like: `--intentionallyCamelCase`\n currentProp = hyphenate(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(value) {\n return value.replace(/[a-z][A-Z]/g, v => {\n return v.charAt(0) + '-' + v.charAt(1);\n }).toLowerCase();\n}\n/**\n * Parses extracted style and class attributes into separate ExtractedAttributeOps per style or\n * class property.\n */\nfunction parseExtractedStyles(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 elements.set(op.xref, op);\n }\n }\n }\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute && op.bindingKind === BindingKind.Attribute && isStringLiteral(op.expression)) {\n const target = elements.get(op.target);\n if (target !== undefined && target.kind === OpKind.Template && target.templateKind === TemplateKind.Structural) {\n // TemplateDefinitionBuilder will not apply class and style bindings to structural\n // directives; instead, it will leave them as attributes.\n // (It's not clear what that would mean, anyway -- classes and styles on a structural\n // element should probably be a parse error.)\n // TODO: We may be able to remove this once Template Pipeline is the default.\n continue;\n }\n if (op.name === 'style') {\n const parsedStyles = parse(op.expression.value);\n for (let i = 0; i < parsedStyles.length - 1; i += 2) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);\n }\n OpList.remove(op);\n } else if (op.name === 'class') {\n const parsedClasses = op.expression.value.trim().split(/\\s+/g);\n for (const parsedClass of parsedClasses) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);\n }\n OpList.remove(op);\n }\n }\n }\n }\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 nameFunctionsAndVariables(job) {\n addNamesToView(job.root, job.componentName, {\n index: 0\n }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);\n}\nfunction addNamesToView(unit, baseName, state, compatibility) {\n if (unit.fnName === null) {\n // Ensure unique names for view units. This is necessary because there might be multiple\n // components with same names in the context of the same pool. Only add the suffix\n // if really needed.\n unit.fnName = unit.job.pool.uniqueName(sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`), /* alwaysIncludeSuffix */false);\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 case OpKind.HostProperty:\n if (op.isAnimationTrigger) {\n op.name = '@' + op.name;\n }\n break;\n case OpKind.Listener:\n if (op.handlerFnName !== null) {\n break;\n }\n if (!op.hostListener && op.targetSlot.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n let animation = '';\n if (op.isAnimationListener) {\n op.name = `@${op.name}.${op.animationPhase}`;\n animation = 'animation';\n }\n if (op.hostListener) {\n op.handlerFnName = `${baseName}_${animation}${op.name}_HostBindingHandler`;\n } else {\n op.handlerFnName = `${unit.fnName}_${op.tag.replace('-', '_')}_${animation}${op.name}_${op.targetSlot.slot}_listener`;\n }\n op.handlerFnName = sanitizeIdentifier(op.handlerFnName);\n break;\n case OpKind.TwoWayListener:\n if (op.handlerFnName !== null) {\n break;\n }\n if (op.targetSlot.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${op.tag.replace('-', '_')}_${op.name}_${op.targetSlot.slot}_listener`);\n break;\n case OpKind.Variable:\n varNames.set(op.xref, getVariableName(unit, op.variable, state));\n break;\n case OpKind.RepeaterCreate:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (op.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n if (op.emptyView !== null) {\n const emptyView = unit.job.views.get(op.emptyView);\n // Repeater empty view function is at slot +2 (metadata is in the first slot).\n addNamesToView(emptyView, `${baseName}_${op.functionNameSuffix}Empty_${op.handle.slot + 2}`, state, compatibility);\n }\n // Repeater primary view function is at slot +1 (metadata is in the first slot).\n addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);\n break;\n case OpKind.Projection:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (op.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n if (op.fallbackView !== null) {\n const fallbackView = unit.job.views.get(op.fallbackView);\n addNamesToView(fallbackView, `${baseName}_ProjectionFallback_${op.handle.slot}`, state, compatibility);\n }\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.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n const suffix = op.functionNameSuffix.length === 0 ? '' : `_${op.functionNameSuffix}`;\n addNamesToView(childView, `${baseName}${suffix}_${op.handle.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(unit, 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 if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // TODO: Prefix increment and `_r` are for compatibility with the old naming scheme.\n // This has the potential to cause collisions when `ctx` is the identifier, so we need a\n // special check for that as well.\n const compatPrefix = variable.identifier === 'ctx' ? 'i' : '';\n variable.name = `${variable.identifier}_${compatPrefix}r${++state.index}`;\n } else {\n variable.name = `${variable.identifier}_i${state.index++}`;\n }\n break;\n default:\n // TODO: Prefix increment for compatibility only.\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(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 mergeNextContextExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n mergeNextContextsInOps(op.handlerOps);\n }\n }\n mergeNextContextsInOps(unit.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 case ExpressionKind.ContextLetReference:\n // Can't merge past a dependency on the context.\n tryToMerge = false;\n break;\n }\n return;\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 generateNgContainerOps(job) {\n for (const unit of job.units) {\n const updatedElementXrefs = new Set();\n for (const op of unit.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 * 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 disableBindings$1(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 unit of job.units) {\n for (const op of unit.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}\n\n/**\n * Nullish coalescing expressions such as `a ?? b` have different semantics in Angular templates as\n * compared to JavaScript. In particular, they default to `null` instead of `undefined`. Therefore,\n * we replace them with ternary expressions, assigning temporaries as needed to avoid re-evaluating\n * the same sub-expression multiple times.\n */\nfunction generateNullishCoalesceExpressions(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 kindTest(kind) {\n return op => op.kind === kind;\n}\nfunction kindWithInterpolationTest(kind, interpolation) {\n return op => {\n return op.kind === kind && interpolation === op.expression instanceof Interpolation;\n };\n}\nfunction basicListenerKindTest(op) {\n return op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) || op.kind === OpKind.TwoWayListener;\n}\nfunction nonInterpolationPropertyKindTest(op) {\n return (op.kind === OpKind.Property || op.kind === OpKind.TwoWayProperty) && !(op.expression instanceof Interpolation);\n}\n/**\n * Defines the groups based on `OpKind` that ops will be divided into, for the various create\n * op kinds. Ops will be collected into groups, then optionally transformed, before recombining\n * the groups in the order defined here.\n */\nconst CREATE_ORDERING = [{\n test: op => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener\n}, {\n test: basicListenerKindTest\n}];\n/**\n * Defines the groups based on `OpKind` that ops will be divided into, for the various update\n * op kinds.\n */\nconst UPDATE_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: kindWithInterpolationTest(OpKind.Attribute, true)\n}, {\n test: kindWithInterpolationTest(OpKind.Property, true)\n}, {\n test: nonInterpolationPropertyKindTest\n}, {\n test: kindWithInterpolationTest(OpKind.Attribute, false)\n}];\n/**\n * Host bindings have their own update ordering.\n */\nconst UPDATE_HOST_ORDERING = [{\n test: kindWithInterpolationTest(OpKind.HostProperty, true)\n}, {\n test: kindWithInterpolationTest(OpKind.HostProperty, false)\n}, {\n test: kindTest(OpKind.Attribute)\n}, {\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/**\n * The set of all op kinds we handle in the reordering phase.\n */\nconst handledOpKinds = new Set([OpKind.Listener, OpKind.TwoWayListener, OpKind.StyleMap, OpKind.ClassMap, OpKind.StyleProp, OpKind.ClassProp, OpKind.Property, OpKind.TwoWayProperty, OpKind.HostProperty, OpKind.Attribute]);\n/**\n * Many type of operations have ordering constraints that must be respected. For example, a\n * `ClassMap` instruction must be ordered after a `StyleMap` instruction, in order to have\n * predictable semantics that match TemplateDefinitionBuilder and don't break applications.\n */\nfunction orderOps(job) {\n for (const unit of job.units) {\n // First, we pull out ops that need to be ordered. Then, when we encounter an op that shouldn't\n // be reordered, put the ones we've pulled so far back in the correct order. Finally, if we\n // still have ops pulled at the end, put them back in the correct order.\n // Create mode:\n orderWithin(unit.create, CREATE_ORDERING);\n // Update mode:\n const ordering = unit.job.kind === CompilationJobKind.Host ? UPDATE_HOST_ORDERING : UPDATE_ORDERING;\n orderWithin(unit.update, ordering);\n }\n}\n/**\n * Order all the ops within the specified group.\n */\nfunction orderWithin(opList, ordering) {\n let opsToOrder = [];\n // Only reorder ops that target the same xref; do not mix ops that target different xrefs.\n let firstTargetInGroup = null;\n for (const op of opList) {\n const currentTarget = hasDependsOnSlotContextTrait(op) ? op.target : null;\n if (!handledOpKinds.has(op.kind) || currentTarget !== firstTargetInGroup && firstTargetInGroup !== null && currentTarget !== null) {\n OpList.insertBefore(reorder(opsToOrder, ordering), op);\n opsToOrder = [];\n firstTargetInGroup = null;\n }\n if (handledOpKinds.has(op.kind)) {\n opsToOrder.push(op);\n OpList.remove(op);\n firstTargetInGroup = currentTarget ?? firstTargetInGroup;\n }\n }\n opList.push(reorder(opsToOrder, ordering));\n}\n/**\n * Reorders the given list of ops according to the ordering defined by `ORDERING`.\n */\nfunction reorder(ops, ordering) {\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\n/**\n * Attributes of `ng-content` named 'select' are specifically removed, because they control which\n * content matches as a property of the `projection`, and are not a plain attribute.\n */\nfunction removeContentSelectors(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Binding:\n const target = lookupInXrefMap(elements, op.target);\n if (isSelectAttribute(op.name) && target.kind === OpKind.Projection) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\nfunction isSelectAttribute(name) {\n return name.toLowerCase() === 'select';\n}\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupInXrefMap(map, xref) {\n const el = map.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an slottable target.');\n }\n return el;\n}\n\n/**\n * This phase generates pipe creation instructions. We do this based on the pipe bindings found in\n * the update block, in the order we see them.\n *\n * When not in compatibility mode, we can simply group all these creation instructions together, to\n * maximize chaining opportunities.\n */\nfunction createPipes(job) {\n for (const unit of job.units) {\n processPipeBindingsInView(unit);\n }\n}\nfunction processPipeBindingsInView(unit) {\n for (const updateOp of unit.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 (unit.job.compatibility) {\n // TODO: We can delete this cast and check once compatibility mode is removed.\n const slotHandle = updateOp.target;\n if (slotHandle == undefined) {\n throw new Error(`AssertionError: expected slot handle to be assigned for pipe creation`);\n }\n addPipeToCreationBlock(unit, updateOp.target, expr);\n } else {\n // When not in compatibility mode, we just add the pipe to the end of the create block. This\n // is not only simpler and faster, but allows more chaining opportunities for other\n // instructions.\n unit.create.push(createPipeOp(expr.target, expr.targetSlot, expr.name));\n }\n });\n }\n}\nfunction addPipeToCreationBlock(unit, 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 = unit.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.targetSlot, 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\n/**\n * Pipes that accept more than 4 arguments are variadic, and are handled with a different runtime\n * instruction.\n */\nfunction createVariadicPipes(job) {\n for (const unit of job.units) {\n for (const op of unit.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.targetSlot, expr.name, literalArr(expr.args), expr.args.length);\n }, VisitorContextFlag.None);\n }\n }\n}\n\n/**\n * Propagate i18n blocks down through child templates that act as placeholders in the root i18n\n * message. Specifically, perform an in-order traversal of all the views, and add i18nStart/i18nEnd\n * op pairs into descending views. Also, assign an increasing sub-template index to each\n * descending view.\n */\nfunction propagateI18nBlocks(job) {\n propagateI18nBlocksToTemplates(job.root, 0);\n}\n/**\n * Propagates i18n ops in the given view through to any child views recursively.\n */\nfunction propagateI18nBlocksToTemplates(unit, subTemplateIndex) {\n let i18nBlock = null;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n op.subTemplateIndex = subTemplateIndex === 0 ? null : subTemplateIndex;\n i18nBlock = op;\n break;\n case OpKind.I18nEnd:\n // When we exit a root-level i18n block, reset the sub-template index counter.\n if (i18nBlock.subTemplateIndex === null) {\n subTemplateIndex = 0;\n }\n i18nBlock = null;\n break;\n case OpKind.Template:\n subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);\n break;\n case OpKind.RepeaterCreate:\n // Propagate i18n blocks to the @for template.\n const forView = unit.job.views.get(op.xref);\n subTemplateIndex = propagateI18nBlocksForView(forView, i18nBlock, op.i18nPlaceholder, subTemplateIndex);\n // Then if there's an @empty template, propagate the i18n blocks for it as well.\n if (op.emptyView !== null) {\n subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);\n }\n break;\n }\n }\n return subTemplateIndex;\n}\n/**\n * Propagate i18n blocks for a view.\n */\nfunction propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {\n // We found an <ng-template> inside an i18n block; increment the sub-template counter and\n // wrap the template's view in a child i18n block.\n if (i18nPlaceholder !== undefined) {\n if (i18nBlock === null) {\n throw Error('Expected template with i18n placeholder to be in an i18n block.');\n }\n subTemplateIndex++;\n wrapTemplateWithI18n(view, i18nBlock);\n }\n // Continue traversing inside the template's view.\n return propagateI18nBlocksToTemplates(view, subTemplateIndex);\n}\n/**\n * Wraps a template view with i18n start and end ops.\n */\nfunction wrapTemplateWithI18n(unit, parentI18n) {\n // Only add i18n ops if they have not already been propagated to this template.\n if (unit.create.head.next?.kind !== OpKind.I18nStart) {\n const id = unit.job.allocateXrefId();\n OpList.insertAfter(\n // Nested ng-template i18n start/end ops should not receive source spans.\n createI18nStartOp(id, parentI18n.message, parentI18n.root, null), unit.create.head);\n OpList.insertBefore(createI18nEndOp(id, null), unit.create.tail);\n }\n}\nfunction extractPureFunctions(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 // TODO: Use the new pool method `getSharedFunctionReference`\n toSharedConstantDeclaration(declName, keyExpr) {\n const fnParams = [];\n for (let idx = 0; idx < this.numArgs; idx++) {\n fnParams.push(new FnParam('a' + 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('a' + expr.index);\n }, VisitorContextFlag.None);\n return new DeclareVarStmt(declName, new ArrowFunctionExpr(fnParams, returnExpr), undefined, StmtModifier.Final);\n }\n}\nfunction generatePureLiteralStructures(job) {\n for (const unit of job.units) {\n for (const op of unit.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, localRefs, sourceSpan) {\n const args = [literal(slot), templateFnRef, literal(decls), literal(vars), literal(tag), literal(constIndex)];\n if (localRefs !== null) {\n args.push(literal(localRefs));\n args.push(importExpr(Identifiers.templateRefExtractor));\n }\n while (args[args.length - 1].isEquivalent(NULL_EXPR)) {\n args.pop();\n }\n return call(Identifiers.templateCreate, args, sourceSpan);\n}\nfunction disableBindings() {\n return call(Identifiers.disableBindings, [], null);\n}\nfunction enableBindings() {\n return call(Identifiers.enableBindings, [], null);\n}\nfunction listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {\n const args = [literal(name), handlerFn];\n if (eventTargetResolver !== null) {\n args.push(literal(false)); // `useCapture` flag, defaults to `false`\n args.push(importExpr(eventTargetResolver));\n }\n return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);\n}\nfunction twoWayBindingSet(target, value) {\n return importExpr(Identifiers.twoWayBindingSet).callFn([target, value]);\n}\nfunction twoWayListener(name, handlerFn, sourceSpan) {\n return call(Identifiers.twoWayListener, [literal(name), handlerFn], sourceSpan);\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, delta > 1 ? [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 defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeholderSlot, errorSlot, loadingConfig, placeholderConfig, enableTimerScheduling, sourceSpan) {\n const args = [literal(selfSlot), literal(primarySlot), dependencyResolverFn ?? literal(null), literal(loadingSlot), literal(placeholderSlot), literal(errorSlot), loadingConfig ?? literal(null), placeholderConfig ?? literal(null), enableTimerScheduling ? importExpr(Identifiers.deferEnableTimerScheduling) : literal(null)];\n let expr;\n while ((expr = args[args.length - 1]) !== null && expr instanceof LiteralExpr && expr.value === null) {\n args.pop();\n }\n return call(Identifiers.defer, args, sourceSpan);\n}\nconst deferTriggerToR3TriggerInstructionsMap = new Map([[DeferTriggerKind.Idle, [Identifiers.deferOnIdle, Identifiers.deferPrefetchOnIdle]], [DeferTriggerKind.Immediate, [Identifiers.deferOnImmediate, Identifiers.deferPrefetchOnImmediate]], [DeferTriggerKind.Timer, [Identifiers.deferOnTimer, Identifiers.deferPrefetchOnTimer]], [DeferTriggerKind.Hover, [Identifiers.deferOnHover, Identifiers.deferPrefetchOnHover]], [DeferTriggerKind.Interaction, [Identifiers.deferOnInteraction, Identifiers.deferPrefetchOnInteraction]], [DeferTriggerKind.Viewport, [Identifiers.deferOnViewport, Identifiers.deferPrefetchOnViewport]]]);\nfunction deferOn(trigger, args, prefetch, sourceSpan) {\n const instructions = deferTriggerToR3TriggerInstructionsMap.get(trigger);\n if (instructions === undefined) {\n throw new Error(`Unable to determine instruction for trigger ${trigger}`);\n }\n const instructionToCall = prefetch ? instructions[1] : instructions[0];\n return call(instructionToCall, args.map(a => literal(a)), sourceSpan);\n}\nfunction projectionDef(def) {\n return call(Identifiers.projectionDef, def ? [def] : [], null);\n}\nfunction projection(slot, projectionSlotIndex, attributes, fallbackFnName, fallbackDecls, fallbackVars, sourceSpan) {\n const args = [literal(slot)];\n if (projectionSlotIndex !== 0 || attributes !== null || fallbackFnName !== null) {\n args.push(literal(projectionSlotIndex));\n if (attributes !== null) {\n args.push(attributes);\n }\n if (fallbackFnName !== null) {\n if (attributes === null) {\n args.push(literal(null));\n }\n args.push(variable(fallbackFnName), literal(fallbackDecls), literal(fallbackVars));\n }\n }\n return call(Identifiers.projection, args, sourceSpan);\n}\nfunction i18nStart(slot, constIndex, subTemplateIndex, sourceSpan) {\n const args = [literal(slot), literal(constIndex)];\n if (subTemplateIndex !== null) {\n args.push(literal(subTemplateIndex));\n }\n return call(Identifiers.i18nStart, args, sourceSpan);\n}\nfunction repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByFn, trackByUsesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, emptyTag, emptyConstIndex, sourceSpan) {\n const args = [literal(slot), variable(viewFnName), literal(decls), literal(vars), literal(tag), literal(constIndex), trackByFn];\n if (trackByUsesComponentInstance || emptyViewFnName !== null) {\n args.push(literal(trackByUsesComponentInstance));\n if (emptyViewFnName !== null) {\n args.push(variable(emptyViewFnName), literal(emptyDecls), literal(emptyVars));\n if (emptyTag !== null || emptyConstIndex !== null) {\n args.push(literal(emptyTag));\n }\n if (emptyConstIndex !== null) {\n args.push(literal(emptyConstIndex));\n }\n }\n }\n return call(Identifiers.repeaterCreate, args, sourceSpan);\n}\nfunction repeater(collection, sourceSpan) {\n return call(Identifiers.repeater, [collection], sourceSpan);\n}\nfunction deferWhen(prefetch, expr, sourceSpan) {\n return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);\n}\nfunction declareLet(slot, sourceSpan) {\n return call(Identifiers.declareLet, [literal(slot)], sourceSpan);\n}\nfunction storeLet(value, sourceSpan) {\n return importExpr(Identifiers.storeLet).callFn([value], sourceSpan);\n}\nfunction readContextLet(slot) {\n return importExpr(Identifiers.readContextLet).callFn([literal(slot)]);\n}\nfunction i18n(slot, constIndex, subTemplateIndex, sourceSpan) {\n const args = [literal(slot), literal(constIndex)];\n if (subTemplateIndex) {\n args.push(literal(subTemplateIndex));\n }\n return call(Identifiers.i18n, args, sourceSpan);\n}\nfunction i18nEnd(endSourceSpan) {\n return call(Identifiers.i18nEnd, [], endSourceSpan);\n}\nfunction i18nAttributes(slot, i18nAttributesConfig) {\n const args = [literal(slot), literal(i18nAttributesConfig)];\n return call(Identifiers.i18nAttributes, args, null);\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 twoWayProperty(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.twoWayProperty, args, sourceSpan);\n}\nfunction attribute(name, expression, sanitizer, namespace) {\n const args = [literal(name), expression];\n if (sanitizer !== null || namespace !== null) {\n args.push(sanitizer ?? literal(null));\n }\n if (namespace !== null) {\n args.push(literal(namespace));\n }\n return call(Identifiers.attribute, args, null);\n}\nfunction styleProp(name, expression, unit, sourceSpan) {\n const args = [literal(name), expression];\n if (unit !== null) {\n args.push(literal(unit));\n }\n return call(Identifiers.styleProp, args, sourceSpan);\n}\nfunction classProp(name, expression, sourceSpan) {\n return call(Identifiers.classProp, [literal(name), expression], sourceSpan);\n}\nfunction styleMap(expression, sourceSpan) {\n return call(Identifiers.styleMap, [expression], sourceSpan);\n}\nfunction classMap(expression, sourceSpan) {\n return call(Identifiers.classMap, [expression], sourceSpan);\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 const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction i18nExp(expr, sourceSpan) {\n return call(Identifiers.i18nExp, [expr], sourceSpan);\n}\nfunction i18nApply(slot, sourceSpan) {\n return call(Identifiers.i18nApply, [literal(slot)], 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, sourceSpan) {\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, sourceSpan);\n}\nfunction stylePropInterpolate(name, strings, expressions, unit, sourceSpan) {\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, sourceSpan);\n}\nfunction styleMapInterpolate(strings, expressions, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(STYLE_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction classMapInterpolate(strings, expressions, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction hostProperty(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.hostProperty, args, sourceSpan);\n}\nfunction syntheticHostProperty(name, expression, sourceSpan) {\n return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);\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}\nfunction conditional(condition, contextValue, sourceSpan) {\n const args = [condition];\n if (contextValue !== null) {\n args.push(contextValue);\n }\n return call(Identifiers.conditional, args, 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 target resolvers for event listeners.\n */\nconst GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);\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 reify(job) {\n for (const unit of job.units) {\n reifyCreateOperations(unit, unit.create);\n reifyUpdateOperations(unit, unit.update);\n }\n}\n/**\n * This function can be used a sanity check -- it walks every expression in the const pool, and\n * every expression reachable from an op, and makes sure that there are no IR expressions\n * left. This is nice to use for debugging mysterious failures where an IR expression cannot be\n * output from the output AST code.\n */\nfunction ensureNoIrForDebug(job) {\n for (const stmt of job.pool.statements) {\n transformExpressionsInStatement(stmt, expr => {\n if (isIrExpression(expr)) {\n throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (isIrExpression(expr)) {\n throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);\n }\n });\n }\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.handle.slot, op.initialValue, op.sourceSpan));\n break;\n case OpKind.ElementStart:\n OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));\n break;\n case OpKind.Element:\n OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));\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.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));\n break;\n case OpKind.Container:\n OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));\n break;\n case OpKind.ContainerEnd:\n OpList.replace(op, elementContainerEnd());\n break;\n case OpKind.I18nStart:\n OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));\n break;\n case OpKind.I18nEnd:\n OpList.replace(op, i18nEnd(op.sourceSpan));\n break;\n case OpKind.I18n:\n OpList.replace(op, i18n(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));\n break;\n case OpKind.I18nAttributes:\n if (op.i18nAttributesConfig === null) {\n throw new Error(`AssertionError: i18nAttributesConfig was not set`);\n }\n OpList.replace(op, i18nAttributes(op.handle.slot, op.i18nAttributesConfig));\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: local refs array should have been extracted into a constant`);\n }\n const childView = unit.job.views.get(op.xref);\n OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));\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.handle.slot, op.name));\n break;\n case OpKind.DeclareLet:\n OpList.replace(op, declareLet(op.handle.slot, op.sourceSpan));\n break;\n case OpKind.Listener:\n const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);\n const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;\n if (eventTargetResolver === undefined) {\n throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);\n }\n OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));\n break;\n case OpKind.TwoWayListener:\n OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));\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.Defer:\n const timerScheduling = !!op.loadingMinimumTime || !!op.loadingAfterTime || !!op.placeholderMinimumTime;\n OpList.replace(op, defer(op.handle.slot, op.mainSlot.slot, op.resolverFn, op.loadingSlot?.slot ?? null, op.placeholderSlot?.slot ?? null, op.errorSlot?.slot ?? null, op.loadingConfig, op.placeholderConfig, timerScheduling, op.sourceSpan));\n break;\n case OpKind.DeferOn:\n let args = [];\n switch (op.trigger.kind) {\n case DeferTriggerKind.Idle:\n case DeferTriggerKind.Immediate:\n break;\n case DeferTriggerKind.Timer:\n args = [op.trigger.delay];\n break;\n case DeferTriggerKind.Interaction:\n case DeferTriggerKind.Hover:\n case DeferTriggerKind.Viewport:\n if (op.trigger.targetSlot?.slot == null || op.trigger.targetSlotViewSteps === null) {\n throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${op.trigger.kind}`);\n }\n args = [op.trigger.targetSlot.slot];\n if (op.trigger.targetSlotViewSteps !== 0) {\n args.push(op.trigger.targetSlotViewSteps);\n }\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${op.trigger.kind}`);\n }\n OpList.replace(op, deferOn(op.trigger.kind, args, op.prefetch, op.sourceSpan));\n break;\n case OpKind.ProjectionDef:\n OpList.replace(op, projectionDef(op.def));\n break;\n case OpKind.Projection:\n if (op.handle.slot === null) {\n throw new Error('No slot was assigned for project instruction');\n }\n let fallbackViewFnName = null;\n let fallbackDecls = null;\n let fallbackVars = null;\n if (op.fallbackView !== null) {\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const fallbackView = unit.job.views.get(op.fallbackView);\n if (fallbackView === undefined) {\n throw new Error('AssertionError: projection had fallback view xref, but fallback view was not found');\n }\n if (fallbackView.fnName === null || fallbackView.decls === null || fallbackView.vars === null) {\n throw new Error(`AssertionError: expected projection fallback view to have been named and counted`);\n }\n fallbackViewFnName = fallbackView.fnName;\n fallbackDecls = fallbackView.decls;\n fallbackVars = fallbackView.vars;\n }\n OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, fallbackViewFnName, fallbackDecls, fallbackVars, op.sourceSpan));\n break;\n case OpKind.RepeaterCreate:\n if (op.handle.slot === null) {\n throw new Error('No slot was assigned for repeater instruction');\n }\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const repeaterView = unit.job.views.get(op.xref);\n if (repeaterView.fnName === null) {\n throw new Error(`AssertionError: expected repeater primary view to have been named`);\n }\n let emptyViewFnName = null;\n let emptyDecls = null;\n let emptyVars = null;\n if (op.emptyView !== null) {\n const emptyView = unit.job.views.get(op.emptyView);\n if (emptyView === undefined) {\n throw new Error('AssertionError: repeater had empty view xref, but empty view was not found');\n }\n if (emptyView.fnName === null || emptyView.decls === null || emptyView.vars === null) {\n throw new Error(`AssertionError: expected repeater empty view to have been named and counted`);\n }\n emptyViewFnName = emptyView.fnName;\n emptyDecls = emptyView.decls;\n emptyVars = emptyView.vars;\n }\n OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.emptyTag, op.emptyAttributes, op.wholeSourceSpan));\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.TwoWayProperty:\n OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));\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, op.sourceSpan));\n } else {\n OpList.replace(op, styleProp(op.name, op.expression, op.unit, op.sourceSpan));\n }\n break;\n case OpKind.ClassProp:\n OpList.replace(op, classProp(op.name, op.expression, op.sourceSpan));\n break;\n case OpKind.StyleMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, styleMapInterpolate(op.expression.strings, op.expression.expressions, op.sourceSpan));\n } else {\n OpList.replace(op, styleMap(op.expression, op.sourceSpan));\n }\n break;\n case OpKind.ClassMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, classMapInterpolate(op.expression.strings, op.expression.expressions, op.sourceSpan));\n } else {\n OpList.replace(op, classMap(op.expression, op.sourceSpan));\n }\n break;\n case OpKind.I18nExpression:\n OpList.replace(op, i18nExp(op.expression, op.sourceSpan));\n break;\n case OpKind.I18nApply:\n OpList.replace(op, i18nApply(op.handle.slot, op.sourceSpan));\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, op.sourceSpan));\n } else {\n OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));\n }\n break;\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n throw new Error('not yet handled');\n } else {\n if (op.isAnimationTrigger) {\n OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));\n } else {\n OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));\n }\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.Conditional:\n if (op.processed === null) {\n throw new Error(`Conditional test was not set.`);\n }\n OpList.replace(op, conditional(op.processed, op.contextValue, op.sourceSpan));\n break;\n case OpKind.Repeater:\n OpList.replace(op, repeater(op.collection, op.sourceSpan));\n break;\n case OpKind.DeferWhen:\n OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));\n break;\n case OpKind.StoreLet:\n throw new Error(`AssertionError: unexpected storeLet ${op.declaredName}`);\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.targetSlot.slot + 1 + expr.offset);\n case ExpressionKind.LexicalRead:\n throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);\n case ExpressionKind.TwoWayBindingSet:\n throw new Error(`AssertionError: unresolved TwoWayBindingSet`);\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.targetSlot.slot, expr.varOffset, expr.args);\n case ExpressionKind.PipeBindingVariadic:\n return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);\n case ExpressionKind.SlotLiteralExpr:\n return literal(expr.slot.slot);\n case ExpressionKind.ContextLetReference:\n return readContextLet(expr.targetSlot.slot);\n case ExpressionKind.StoreLet:\n return storeLet(expr.value, expr.sourceSpan);\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\n/**\n * Binding with no content can be safely deleted.\n */\nfunction removeEmptyBindings(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 * Remove the i18n context ops after they are no longer needed, and null out references to them to\n * be safe.\n */\nfunction removeI18nContexts(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n OpList.remove(op);\n break;\n case OpKind.I18nStart:\n op.context = null;\n break;\n }\n }\n }\n}\n\n/**\n * i18nAttributes ops will be generated for each i18n attribute. However, not all i18n attribues\n * will contain dynamic content, and so some of these i18nAttributes ops may be unnecessary.\n */\nfunction removeUnusedI18nAttributesOps(job) {\n for (const unit of job.units) {\n const ownersWithI18nExpressions = new Set();\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.I18nExpression:\n ownersWithI18nExpressions.add(op.i18nOwner);\n }\n }\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nAttributes:\n if (ownersWithI18nExpressions.has(op.xref)) {\n continue;\n }\n OpList.remove(op);\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 resolveContexts(job) {\n for (const unit of job.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 case OpKind.TwoWayListener:\n processLexicalScope$1(view, op.handlerOps);\n break;\n }\n }\n if (view === view.job.root) {\n // Prefer `ctx` of the root view to any variables which happen to contain the root context.\n scope.set(view.xref, variable('ctx'));\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 resolveDollarEvent(job) {\n for (const unit of job.units) {\n transformDollarEvent(unit.create);\n transformDollarEvent(unit.update);\n }\n}\nfunction transformDollarEvent(ops) {\n for (const op of ops) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n transformExpressionsInOp(op, expr => {\n if (expr instanceof LexicalReadExpr && expr.name === '$event') {\n // Two-way listeners always consume `$event` so they omit this field.\n if (op.kind === OpKind.Listener) {\n op.consumesDollarEvent = true;\n }\n return new ReadVarExpr(expr.name);\n }\n return expr;\n }, VisitorContextFlag.InChildOperation);\n }\n }\n}\n\n/**\n * Resolve the element placeholders in i18n messages.\n */\nfunction resolveI18nElementPlaceholders(job) {\n // Record all of the element and i18n context ops for use later.\n const i18nContexts = new Map();\n const elements = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.ElementStart:\n elements.set(op.xref, op);\n break;\n }\n }\n }\n resolvePlaceholdersForView(job, job.root, i18nContexts, elements);\n}\n/**\n * Recursively resolves element and template tag placeholders in the given view.\n */\nfunction resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingStructuralDirective) {\n // Track the current i18n op and corresponding i18n context op as we step through the creation\n // IR.\n let currentOps = null;\n let pendingStructuralDirectiveCloses = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (!op.context) {\n throw Error('Could not find i18n context for i18n op');\n }\n currentOps = {\n i18nBlock: op,\n i18nContext: i18nContexts.get(op.context)\n };\n break;\n case OpKind.I18nEnd:\n currentOps = null;\n break;\n case OpKind.ElementStart:\n // For elements with i18n placeholders, record its slot value in the params map under the\n // corresponding tag start placeholder.\n if (op.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n // If there is a separate close tag placeholder for this element, save the pending\n // structural directive so we can pass it to the closing tag as well.\n if (pendingStructuralDirective && op.i18nPlaceholder.closeName) {\n pendingStructuralDirectiveCloses.set(op.xref, pendingStructuralDirective);\n }\n // Clear out the pending structural directive now that its been accounted for.\n pendingStructuralDirective = undefined;\n }\n break;\n case OpKind.ElementEnd:\n // For elements with i18n placeholders, record its slot value in the params map under the\n // corresponding tag close placeholder.\n const startOp = elements.get(op.xref);\n if (startOp && startOp.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('AssertionError: i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementClose(startOp, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirectiveCloses.get(op.xref));\n // Clear out the pending structural directive close that was accounted for.\n pendingStructuralDirectiveCloses.delete(op.xref);\n }\n break;\n case OpKind.Projection:\n // For content projections with i18n placeholders, record its slot value in the params map\n // under the corresponding tag start and close placeholders.\n if (op.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n // Clear out the pending structural directive now that its been accounted for.\n pendingStructuralDirective = undefined;\n }\n break;\n case OpKind.Template:\n const view = job.views.get(op.xref);\n if (op.i18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, view, i18nContexts, elements);\n } else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n if (op.templateKind === TemplateKind.Structural) {\n // If this is a structural directive template, don't record anything yet. Instead pass\n // the current template as a pending structural directive to be recorded when we find\n // the element, content, or template it belongs to. This allows us to create combined\n // values that represent, e.g. the start of a template and element at the same time.\n resolvePlaceholdersForView(job, view, i18nContexts, elements, op);\n } else {\n // If this is some other kind of template, we can record its start, recurse into its\n // view, and then record its end.\n recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, view, i18nContexts, elements);\n recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n }\n break;\n case OpKind.RepeaterCreate:\n if (pendingStructuralDirective !== undefined) {\n throw Error('AssertionError: Unexpected structural directive associated with @for block');\n }\n // RepeaterCreate has 3 slots: the first is for the op itself, the second is for the @for\n // template and the (optional) third is for the @empty template.\n const forSlot = op.handle.slot + 1;\n const forView = job.views.get(op.xref);\n // First record all of the placeholders for the @for template.\n if (op.i18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, forView, i18nContexts, elements);\n } else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, forView, i18nContexts, elements);\n recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n // Then if there's an @empty template, add its placeholders as well.\n if (op.emptyView !== null) {\n // RepeaterCreate has 3 slots: the first is for the op itself, the second is for the @for\n // template and the (optional) third is for the @empty template.\n const emptySlot = op.handle.slot + 2;\n const emptyView = job.views.get(op.emptyView);\n if (op.emptyI18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);\n } else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);\n recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n }\n break;\n }\n }\n}\n/**\n * Records an i18n param value for the start of an element.\n */\nfunction recordElementStart(op, i18nContext, i18nBlock, structuralDirective) {\n const {\n startName,\n closeName\n } = op.i18nPlaceholder;\n let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;\n let value = op.handle.slot;\n // If the element is associated with a structural directive, start it as well.\n if (structuralDirective !== undefined) {\n flags |= I18nParamValueFlags.TemplateTag;\n value = {\n element: value,\n template: structuralDirective.handle.slot\n };\n }\n // For self-closing tags, there is no close tag placeholder. Instead, the start tag\n // placeholder accounts for the start and close of the element.\n if (!closeName) {\n flags |= I18nParamValueFlags.CloseTag;\n }\n addParam(i18nContext.params, startName, value, i18nBlock.subTemplateIndex, flags);\n}\n/**\n * Records an i18n param value for the closing of an element.\n */\nfunction recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {\n const {\n closeName\n } = op.i18nPlaceholder;\n // Self-closing tags don't have a closing tag placeholder, instead the element closing is\n // recorded via an additional flag on the element start value.\n if (closeName) {\n let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag;\n let value = op.handle.slot;\n // If the element is associated with a structural directive, close it as well.\n if (structuralDirective !== undefined) {\n flags |= I18nParamValueFlags.TemplateTag;\n value = {\n element: value,\n template: structuralDirective.handle.slot\n };\n }\n addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);\n }\n}\n/**\n * Records an i18n param value for the start of a template.\n */\nfunction recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {\n let {\n startName,\n closeName\n } = i18nPlaceholder;\n let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;\n // For self-closing tags, there is no close tag placeholder. Instead, the start tag\n // placeholder accounts for the start and close of the element.\n if (!closeName) {\n flags |= I18nParamValueFlags.CloseTag;\n }\n // If the template is associated with a structural directive, record the structural directive's\n // start first. Since this template must be in the structural directive's view, we can just\n // directly use the current i18n block's sub-template index.\n if (structuralDirective !== undefined) {\n addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);\n }\n // Record the start of the template. For the sub-template index, pass the index for the template's\n // view, rather than the current i18n block's index.\n addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);\n}\n/**\n * Records an i18n param value for the closing of a template.\n */\nfunction recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {\n const {\n closeName\n } = i18nPlaceholder;\n const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;\n // Self-closing tags don't have a closing tag placeholder, instead the template's closing is\n // recorded via an additional flag on the template start value.\n if (closeName) {\n // Record the closing of the template. For the sub-template index, pass the index for the\n // template's view, rather than the current i18n block's index.\n addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);\n // If the template is associated with a structural directive, record the structural directive's\n // closing after. Since this template must be in the structural directive's view, we can just\n // directly use the current i18n block's sub-template index.\n if (structuralDirective !== undefined) {\n addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);\n }\n }\n}\n/**\n * Get the subTemplateIndex for the given template op. For template ops, use the subTemplateIndex of\n * the child i18n block inside the template.\n */\nfunction getSubTemplateIndexForTemplateTag(job, i18nOp, view) {\n for (const childOp of view.create) {\n if (childOp.kind === OpKind.I18nStart) {\n return childOp.subTemplateIndex;\n }\n }\n return i18nOp.subTemplateIndex;\n}\n/**\n * Add a param value to the given params map.\n */\nfunction addParam(params, placeholder, value, subTemplateIndex, flags) {\n const values = params.get(placeholder) ?? [];\n values.push({\n value,\n subTemplateIndex,\n flags\n });\n params.set(placeholder, values);\n}\n\n/**\n * Resolve the i18n expression placeholders in i18n messages.\n */\nfunction resolveI18nExpressionPlaceholders(job) {\n // Record all of the i18n context ops, and the sub-template index for each i18n op.\n const subTemplateIndices = new Map();\n const i18nContexts = new Map();\n const icuPlaceholders = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n subTemplateIndices.set(op.xref, op.subTemplateIndex);\n break;\n case OpKind.I18nContext:\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.IcuPlaceholder:\n icuPlaceholders.set(op.xref, op);\n break;\n }\n }\n }\n // Keep track of the next available expression index for each i18n message.\n const expressionIndices = new Map();\n // Keep track of a reference index for each expression.\n // We use different references for normal i18n expressio and attribute i18n expressions. This is\n // because child i18n blocks in templates don't get their own context, since they're rolled into\n // the translated message of the parent, but they may target a different slot.\n const referenceIndex = op => op.usage === I18nExpressionFor.I18nText ? op.i18nOwner : op.context;\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind === OpKind.I18nExpression) {\n const index = expressionIndices.get(referenceIndex(op)) || 0;\n const subTemplateIndex = subTemplateIndices.get(op.i18nOwner) ?? null;\n const value = {\n value: index,\n subTemplateIndex: subTemplateIndex,\n flags: I18nParamValueFlags.ExpressionIndex\n };\n updatePlaceholder(op, value, i18nContexts, icuPlaceholders);\n expressionIndices.set(referenceIndex(op), index + 1);\n }\n }\n }\n}\nfunction updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {\n if (op.i18nPlaceholder !== null) {\n const i18nContext = i18nContexts.get(op.context);\n const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;\n const values = params.get(op.i18nPlaceholder) || [];\n values.push(value);\n params.set(op.i18nPlaceholder, values);\n }\n if (op.icuPlaceholder !== null) {\n const icuPlaceholderOp = icuPlaceholders.get(op.icuPlaceholder);\n icuPlaceholderOp?.expressionPlaceholders.push(value);\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 resolveNames(job) {\n for (const unit of job.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 // Symbols defined within the current scope. They take precedence over ones defined outside.\n const localDefinitions = 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 if (op.variable.local) {\n if (localDefinitions.has(op.variable.identifier)) {\n continue;\n }\n localDefinitions.set(op.variable.identifier, op.xref);\n } else if (scope.has(op.variable.identifier)) {\n continue;\n }\n scope.set(op.variable.identifier, op.xref);\n break;\n case SemanticVariableKind.Alias:\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 case OpKind.TwoWayListener:\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 || op.kind === OpKind.TwoWayListener) {\n // Listeners were already processed above with their own scopes.\n continue;\n }\n transformExpressionsInOp(op, expr => {\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 (localDefinitions.has(expr.name)) {\n return new ReadVariableExpr(localDefinitions.get(expr.name));\n } else 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 * Map of security contexts to their sanitizer function.\n */\nconst sanitizerFns = new Map([[SecurityContext.HTML, Identifiers.sanitizeHtml], [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl], [SecurityContext.SCRIPT, Identifiers.sanitizeScript], [SecurityContext.STYLE, Identifiers.sanitizeStyle], [SecurityContext.URL, Identifiers.sanitizeUrl]]);\n/**\n * Map of security contexts to their trusted value function.\n */\nconst trustedValueFns = new Map([[SecurityContext.HTML, Identifiers.trustConstantHtml], [SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]]);\n/**\n * Resolves sanitization functions for ops that need them.\n */\nfunction resolveSanitizers(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n // For normal element bindings we create trusted values for security sensitive constant\n // attributes. However, for host bindings we skip this step (this matches what\n // TemplateDefinitionBuilder does).\n // TODO: Is the TDB behavior correct here?\n if (job.kind !== CompilationJobKind.Host) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute) {\n const trustedValueFn = trustedValueFns.get(getOnlySecurityContext(op.securityContext)) ?? null;\n op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;\n }\n }\n }\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n case OpKind.HostProperty:\n let sanitizerFn = null;\n if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n // When the host element isn't known, some URL attributes (such as \"src\" and \"href\") may\n // be part of multiple different security contexts. In this case we use special\n // sanitization function and select the actual sanitizer at runtime based on a tag name\n // that is provided while invoking sanitization function.\n sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;\n } else {\n sanitizerFn = sanitizerFns.get(getOnlySecurityContext(op.securityContext)) ?? null;\n }\n op.sanitizer = sanitizerFn !== null ? importExpr(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 let isIframe = false;\n if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {\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, we just assume it is and append a\n // validation function, which is invoked at runtime and would have access to the\n // underlying DOM element to check if it's an <iframe> and if so - run extra checks.\n isIframe = true;\n } else {\n // For a normal binding we can just check if the element its on is an iframe.\n const ownerOp = elements.get(op.target);\n if (ownerOp === undefined || !isElementOrContainerOp(ownerOp)) {\n throw Error('Property should have an element-like owner');\n }\n isIframe = isIframeElement(ownerOp);\n }\n if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {\n op.sanitizer = importExpr(Identifiers.validateIframeAttribute);\n }\n }\n break;\n }\n }\n }\n}\n/**\n * Checks whether the given op represents an iframe element.\n */\nfunction isIframeElement(op) {\n return op.kind === OpKind.ElementStart && op.tag?.toLowerCase() === 'iframe';\n}\n/**\n * Asserts that there is only a single security context and returns it.\n */\nfunction getOnlySecurityContext(securityContext) {\n if (Array.isArray(securityContext)) {\n if (securityContext.length > 1) {\n // TODO: What should we do here? TDB just took the first one, but this feels like something we\n // would want to know about and create a special case for like we did for Url/ResourceUrl. My\n // guess is that, outside of the Url/ResourceUrl case, this never actually happens. If there\n // do turn out to be other cases, throwing an error until we can address it feels safer.\n throw Error(`AssertionError: Ambiguous security context`);\n }\n return securityContext[0] || SecurityContext.NONE;\n }\n return securityContext;\n}\n\n/**\n * Transforms a `TwoWayBindingSet` expression into an expression that either\n * sets a value through the `twoWayBindingSet` instruction or falls back to setting\n * the value directly. E.g. the expression `TwoWayBindingSet(target, value)` becomes:\n * `ng.twoWayBindingSet(target, value) || (target = value)`.\n */\nfunction transformTwoWayBindingSet(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.TwoWayListener) {\n transformExpressionsInOp(op, expr => {\n if (!(expr instanceof TwoWayBindingSetExpr)) {\n return expr;\n }\n const {\n target,\n value\n } = expr;\n if (target instanceof ReadPropExpr || target instanceof ReadKeyExpr) {\n return twoWayBindingSet(target, value).or(target.set(value));\n }\n // ASSUMPTION: here we're assuming that `ReadVariableExpr` will be a reference\n // to a local template variable. This appears to be the case at the time of writing.\n // If the expression is targeting a variable read, we only emit the `twoWayBindingSet`\n // since the fallback would be attempting to write into a constant. Invalid usages will be\n // flagged during template type checking.\n if (target instanceof ReadVariableExpr) {\n return twoWayBindingSet(target, value);\n }\n throw new Error(`Unsupported expression in two-way action binding.`);\n }, VisitorContextFlag.InChildOperation);\n }\n }\n }\n}\n\n/**\n * When inside of a listener, we may need access to one or more enclosing views. Therefore, each\n * view should save the current view, and each listener must have the ability to restore the\n * appropriate view. We eagerly generate all save view variables; they will be optimized away later.\n */\nfunction saveAndRestoreView(job) {\n for (const unit of job.units) {\n unit.create.prepend([createVariableOp(unit.job.allocateXrefId(), {\n kind: SemanticVariableKind.SavedView,\n name: null,\n view: unit.xref\n }, new GetCurrentViewExpr(), VariableFlags.None)]);\n for (const op of unit.create) {\n if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {\n continue;\n }\n // Embedded views always need the save/restore view operation.\n let needsRestoreView = unit !== job.root;\n if (!needsRestoreView) {\n for (const handlerOp of op.handlerOps) {\n visitExpressionsInOp(handlerOp, expr => {\n if (expr instanceof ReferenceExpr || expr instanceof ContextLetReferenceExpr) {\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(unit, op);\n }\n }\n }\n}\nfunction addSaveRestoreViewOperationToListener(unit, op) {\n op.handlerOps.prepend([createVariableOp(unit.job.allocateXrefId(), {\n kind: SemanticVariableKind.Context,\n name: null,\n view: unit.xref\n }, new RestoreViewExpr(unit.xref), VariableFlags.None)]);\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 allocateSlots(job) {\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 unit of job.units) {\n // Slot indices start at 0 for each view (and are not unique between views).\n let slotCount = 0;\n for (const op of unit.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.handle.slot = slotCount;\n // And track its assigned slot in the `slotMap`.\n slotMap.set(op.xref, op.handle.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 unit.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 unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind === OpKind.Template || op.kind === OpKind.RepeaterCreate) {\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 = job.views.get(op.xref);\n op.decls = childView.decls;\n // TODO: currently we handle the decls for the RepeaterCreate empty template in the reify\n // phase. We should handle that here instead.\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 specializeStyleBindings(job) {\n for (const unit of job.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 generateTemporaryVariables(job) {\n for (const unit of job.units) {\n unit.create.prepend(generateTemporaries(unit.create));\n unit.update.prepend(generateTemporaries(unit.update));\n }\n}\nfunction generateTemporaries(ops) {\n let opCount = 0;\n let generatedStatements = [];\n // For each op, search for any variables that are assigned or read. For each variable, generate a\n // name and produce a `DeclareVarStmt` to the beginning of the block.\n for (const op of ops) {\n // Identify the final time each temp var is read.\n const finalReads = new Map();\n visitExpressionsInOp(op, (expr, flag) => {\n if (flag & VisitorContextFlag.InChildOperation) {\n return;\n }\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, flag) => {\n if (flag & VisitorContextFlag.InChildOperation) {\n return;\n }\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 if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n op.handlerOps.prepend(generateTemporaries(op.handlerOps));\n }\n }\n return generatedStatements;\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 * Generate track functions that need to be extracted to the constant pool. This entails wrapping\n * them in an arrow (or traditional) function, replacing context reads with `this.`, and storing\n * them in the constant pool.\n *\n * Note that, if a track function was previously optimized, it will not need to be extracted, and\n * this phase is a no-op.\n */\nfunction generateTrackFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n if (op.trackByFn !== null) {\n // The final track function was already set, probably because it was optimized.\n continue;\n }\n // Find all component context reads.\n let usesComponentContext = false;\n op.track = transformExpressionsInExpression(op.track, expr => {\n if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {\n throw new Error(`Illegal State: Pipes are not allowed in this context`);\n }\n if (expr instanceof TrackContextExpr) {\n usesComponentContext = true;\n return variable('this');\n }\n return expr;\n }, VisitorContextFlag.None);\n let fn;\n const fnParams = [new FnParam('$index'), new FnParam('$item')];\n if (usesComponentContext) {\n fn = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);\n } else {\n fn = arrowFn(fnParams, op.track);\n }\n op.trackByFn = job.pool.getSharedFunctionReference(fn, '_forTrack');\n }\n }\n}\n\n/**\n * `track` functions in `for` repeaters can sometimes be \"optimized,\" i.e. transformed into inline\n * expressions, in lieu of an external function call. For example, tracking by `$index` can be be\n * optimized into an inline `trackByIndex` reference. This phase checks track expressions for\n * optimizable cases.\n */\nfunction optimizeTrackFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n if (op.track instanceof ReadVarExpr && op.track.name === '$index') {\n // Top-level access of `$index` uses the built in `repeaterTrackByIndex`.\n op.trackByFn = importExpr(Identifiers.repeaterTrackByIndex);\n } else if (op.track instanceof ReadVarExpr && op.track.name === '$item') {\n // Top-level access of the item uses the built in `repeaterTrackByIdentity`.\n op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);\n } else if (isTrackByFunctionCall(job.root.xref, op.track)) {\n // Mark the function as using the component instance to play it safe\n // since the method might be using `this` internally (see #53628).\n op.usesComponentInstance = true;\n // Top-level method calls in the form of `fn($index, item)` can be passed in directly.\n if (op.track.receiver.receiver.view === unit.xref) {\n // TODO: this may be wrong\n op.trackByFn = op.track.receiver;\n } else {\n // This is a plain method call, but not in the component's root view.\n // We need to get the component instance, and then call the method on it.\n op.trackByFn = importExpr(Identifiers.componentInstance).callFn([]).prop(op.track.receiver.name);\n // Because the context is not avaiable (without a special function), we don't want to\n // try to resolve it later. Let's get rid of it by overwriting the original track\n // expression (which won't be used anyway).\n op.track = op.trackByFn;\n }\n } else {\n // The track function could not be optimized.\n // Replace context reads with a special IR expression, since context reads in a track\n // function are emitted specially.\n op.track = transformExpressionsInExpression(op.track, expr => {\n if (expr instanceof ContextExpr) {\n op.usesComponentInstance = true;\n return new TrackContextExpr(expr.view);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n }\n }\n}\nfunction isTrackByFunctionCall(rootView, expr) {\n if (!(expr instanceof InvokeFunctionExpr) || expr.args.length === 0 || expr.args.length > 2) {\n return false;\n }\n if (!(expr.receiver instanceof ReadPropExpr && expr.receiver.receiver instanceof ContextExpr) || expr.receiver.receiver.view !== rootView) {\n return false;\n }\n const [arg0, arg1] = expr.args;\n if (!(arg0 instanceof ReadVarExpr) || arg0.name !== '$index') {\n return false;\n } else if (expr.args.length === 1) {\n return true;\n }\n if (!(arg1 instanceof ReadVarExpr) || arg1.name !== '$item') {\n return false;\n }\n return true;\n}\n\n/**\n * Inside the `track` expression on a `for` repeater, the `$index` and `$item` variables are\n * ambiently available. In this phase, we find those variable usages, and replace them with the\n * appropriate output read.\n */\nfunction generateTrackVariables(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n op.track = transformExpressionsInExpression(op.track, expr => {\n if (expr instanceof LexicalReadExpr) {\n if (op.varNames.$index.has(expr.name)) {\n return variable('$index');\n } else if (expr.name === op.varNames.$implicit) {\n return variable('$item');\n }\n // TODO: handle prohibited context variables (emit as globals?)\n }\n return expr;\n }, VisitorContextFlag.None);\n }\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 countVariables(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 // Count variables on top-level ops first. Don't explore nested expressions just yet.\n for (const op of unit.ops()) {\n if (hasConsumesVarsTrait(op)) {\n varCount += varsUsedByOp(op);\n }\n }\n // Count variables on expressions inside ops. We do this later because some of these expressions\n // might be conditional (e.g. `pipeBinding` inside of a ternary), and we don't want to interfere\n // with indices for top-level binding slots (e.g. `property`).\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr)) {\n return;\n }\n // TemplateDefinitionBuilder assigns variable offsets for everything but pure functions\n // first, and then assigns offsets to pure functions lazily. We emulate that behavior by\n // assigning offsets in two passes instead of one, only in compatibility mode.\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && expr instanceof PureFunctionExpr) {\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 // Compatibility mode pass for pure function offsets (as explained above).\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (!isIrExpression(expr) || !(expr instanceof PureFunctionExpr)) {\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 }\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 unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.Template && op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n const childView = job.views.get(op.xref);\n op.vars = childView.vars;\n // TODO: currently we handle the vars for the RepeaterCreate empty template in the reify\n // phase. We should handle that here instead.\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 && !isSingletonInterpolation(op.expression)) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.TwoWayProperty:\n // Two-way properties can only have expressions so they only need one variable slot.\n return 1;\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 case OpKind.I18nExpression:\n case OpKind.Conditional:\n case OpKind.DeferWhen:\n case OpKind.StoreLet:\n return 1;\n case OpKind.RepeaterCreate:\n // Repeaters may require an extra variable binding slot, if they have an empty view, for the\n // empty block tracking.\n // TODO: It's a bit odd to have a create mode instruction consume variable slots. Maybe we can\n // find a way to use the Repeater update op instead.\n return op.emptyView ? 1 : 0;\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 case ExpressionKind.StoreLet:\n return 1;\n default:\n throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${expr.constructor.name}`);\n }\n}\nfunction isSingletonInterpolation(expr) {\n if (expr.expressions.length !== 1 || expr.strings.length !== 2) {\n return false;\n }\n if (expr.strings[0] !== '' || expr.strings[1] !== '') {\n return false;\n }\n return true;\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 optimizeVariables(job) {\n for (const unit of job.units) {\n inlineAlwaysInlineVariables(unit.create);\n inlineAlwaysInlineVariables(unit.update);\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n inlineAlwaysInlineVariables(op.handlerOps);\n }\n }\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 || op.kind === OpKind.TwoWayListener) {\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\"] = 2] = \"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 = {}));\nfunction inlineAlwaysInlineVariables(ops) {\n const vars = new Map();\n for (const op of ops) {\n if (op.kind === OpKind.Variable && op.flags & VariableFlags.AlwaysInline) {\n visitExpressionsInOp(op, expr => {\n if (isIrExpression(expr) && fencesForIrExpression(expr) !== Fence.None) {\n throw new Error(`AssertionError: A context-sensitive variable was marked AlwaysInline`);\n }\n });\n vars.set(op.xref, op);\n }\n transformExpressionsInOp(op, expr => {\n if (expr instanceof ReadVariableExpr && vars.has(expr.xref)) {\n const varOp = vars.get(expr.xref);\n // Inline by cloning, because we might inline into multiple places.\n return varOp.initializer.clone();\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n for (const op of vars.values()) {\n OpList.remove(op);\n }\n}\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 const decl = varDecls.get(id);\n // We can inline variables that:\n // - are used exactly once, and\n // - are not used remotely\n // OR\n // - are marked for always inlining\n const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);\n if (count !== 1 || isAlwaysInline) {\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 const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);\n if (isAlwaysInline) {\n throw new Error(`AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.`);\n }\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.ViewContextRead | Fence.ViewContextWrite;\n case ExpressionKind.RestoreView:\n return Fence.ViewContextRead | Fence.ViewContextWrite | Fence.SideEffectful;\n case ExpressionKind.StoreLet:\n return Fence.SideEffectful;\n case ExpressionKind.Reference:\n case ExpressionKind.ContextLetReference:\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 if (decl.initializer instanceof ReadVarExpr && decl.initializer.name === 'ctx') {\n // Although TemplateDefinitionBuilder is cautious about inlining, we still want to do so\n // when the variable is the context, to imitate its behavior with aliases in control flow\n // blocks. This quirky behavior will become dead code once compatibility mode is no longer\n // supported.\n return true;\n }\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 * Wraps ICUs that do not already belong to an i18n block in a new i18n block.\n */\nfunction wrapI18nIcus(job) {\n for (const unit of job.units) {\n let currentI18nOp = null;\n let addedI18nId = null;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n currentI18nOp = op;\n break;\n case OpKind.I18nEnd:\n currentI18nOp = null;\n break;\n case OpKind.IcuStart:\n if (currentI18nOp === null) {\n addedI18nId = job.allocateXrefId();\n // ICU i18n start/end ops should not receive source spans.\n OpList.insertBefore(createI18nStartOp(addedI18nId, op.message, undefined, null), op);\n }\n break;\n case OpKind.IcuEnd:\n if (addedI18nId !== null) {\n OpList.insertAfter(createI18nEndOp(addedI18nId, null), op);\n addedI18nId = null;\n }\n break;\n }\n }\n }\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes any `storeLet` calls that aren't referenced outside of the current view.\n */\nfunction optimizeStoreLet(job) {\n const letUsedExternally = new Set();\n // Since `@let` declarations can be referenced in child views, both in\n // the creation block (via listeners) and in the update block, we have\n // to look through all the ops to find the references.\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, expr => {\n if (expr instanceof ContextLetReferenceExpr) {\n letUsedExternally.add(expr.target);\n }\n });\n }\n }\n // TODO(crisbeto): potentially remove the unused calls completely, pending discussion.\n for (const unit of job.units) {\n for (const op of unit.update) {\n transformExpressionsInOp(op, expression => expression instanceof StoreLetExpr && !letUsedExternally.has(expression.target) ? expression.value : expression, VisitorContextFlag.None);\n }\n }\n}\n\n/**\n * It's not allowed to access a `@let` declaration before it has been defined. This is enforced\n * already via template type checking, however it can trip some of the assertions in the pipeline.\n * E.g. the naming phase can fail because we resolved the variable here, but the variable doesn't\n * exist anymore because the optimization phase removed it since it's invalid. To avoid surfacing\n * confusing errors to users in the case where template type checking isn't running (e.g. in JIT\n * mode) this phase detects illegal forward references and replaces them with `undefined`.\n * Eventually users will see the proper error from the template type checker.\n */\nfunction removeIllegalLetReferences(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.Variable || op.variable.kind !== SemanticVariableKind.Identifier || !(op.initializer instanceof StoreLetExpr)) {\n continue;\n }\n const name = op.variable.identifier;\n let current = op;\n while (current && current.kind !== OpKind.ListEnd) {\n transformExpressionsInOp(current, expr => expr instanceof LexicalReadExpr && expr.name === name ? literal(undefined) : expr, VisitorContextFlag.None);\n current = current.prev;\n }\n }\n }\n}\n\n/**\n * Replaces the `storeLet` ops with variables that can be\n * used to reference the value within the same view.\n */\nfunction generateLocalLetReferences(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.StoreLet) {\n continue;\n }\n const variable = {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.declaredName,\n local: true\n };\n OpList.replace(op, createVariableOp(job.allocateXrefId(), variable, new StoreLetExpr(op.target, op.value, op.sourceSpan), VariableFlags.None));\n }\n }\n}\n\n/**\n *\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst phases = [{\n kind: CompilationJobKind.Tmpl,\n fn: removeContentSelectors\n}, {\n kind: CompilationJobKind.Host,\n fn: parseHostStyleProperties\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: emitNamespaceChanges\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: propagateI18nBlocks\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: wrapI18nIcus\n}, {\n kind: CompilationJobKind.Both,\n fn: deduplicateTextBindings\n}, {\n kind: CompilationJobKind.Both,\n fn: specializeStyleBindings\n}, {\n kind: CompilationJobKind.Both,\n fn: specializeBindings\n}, {\n kind: CompilationJobKind.Both,\n fn: extractAttributes\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: createI18nContexts\n}, {\n kind: CompilationJobKind.Both,\n fn: parseExtractedStyles\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: removeEmptyBindings\n}, {\n kind: CompilationJobKind.Both,\n fn: collapseSingletonInterpolations\n}, {\n kind: CompilationJobKind.Both,\n fn: orderOps\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateConditionalExpressions\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: createPipes\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: configureDeferInstructions\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: convertI18nText\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: convertI18nBindings\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: removeUnusedI18nAttributesOps\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: assignI18nSlotDependencies\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: applyI18nExpressions\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: createVariadicPipes\n}, {\n kind: CompilationJobKind.Both,\n fn: generatePureLiteralStructures\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateProjectionDefs\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateLocalLetReferences\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateVariables\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: saveAndRestoreView\n}, {\n kind: CompilationJobKind.Both,\n fn: deleteAnyCasts\n}, {\n kind: CompilationJobKind.Both,\n fn: resolveDollarEvent\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateTrackVariables\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: removeIllegalLetReferences\n}, {\n kind: CompilationJobKind.Both,\n fn: resolveNames\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: resolveDeferTargetNames\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: transformTwoWayBindingSet\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: optimizeTrackFns\n}, {\n kind: CompilationJobKind.Both,\n fn: resolveContexts\n}, {\n kind: CompilationJobKind.Both,\n fn: resolveSanitizers\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: liftLocalRefs\n}, {\n kind: CompilationJobKind.Both,\n fn: generateNullishCoalesceExpressions\n}, {\n kind: CompilationJobKind.Both,\n fn: expandSafeReads\n}, {\n kind: CompilationJobKind.Both,\n fn: generateTemporaryVariables\n}, {\n kind: CompilationJobKind.Both,\n fn: optimizeVariables\n}, {\n kind: CompilationJobKind.Both,\n fn: optimizeStoreLet\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: allocateSlots\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: resolveI18nElementPlaceholders\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: resolveI18nExpressionPlaceholders\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: extractI18nMessages\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateTrackFns\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: collectI18nConsts\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: collectConstExpressions\n}, {\n kind: CompilationJobKind.Both,\n fn: collectElementConsts\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: removeI18nContexts\n}, {\n kind: CompilationJobKind.Both,\n fn: countVariables\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateAdvance\n}, {\n kind: CompilationJobKind.Both,\n fn: nameFunctionsAndVariables\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: resolveDeferDepsFns\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: mergeNextContextExpressions\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: generateNgContainerOps\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: collapseEmptyInstructions\n}, {\n kind: CompilationJobKind.Tmpl,\n fn: disableBindings$1\n}, {\n kind: CompilationJobKind.Both,\n fn: extractPureFunctions\n}, {\n kind: CompilationJobKind.Both,\n fn: reify\n}, {\n kind: CompilationJobKind.Both,\n fn: chain\n}];\n/**\n * Run all transformation phases in the correct order against a compilation job. After this\n * processing, the compilation should be in a state where it can be emitted.\n */\nfunction transform(job, kind) {\n for (const phase of phases) {\n if (phase.kind === kind || phase.kind === CompilationJobKind.Both) {\n // The type of `Phase` above ensures it is impossible to call a phase that doesn't support the\n // job kind.\n phase.fn(job);\n }\n }\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 unit of parent.job.units) {\n if (unit.parent !== parent.xref) {\n continue;\n }\n // Child views are emitted depth-first.\n emitChildViews(unit, pool);\n const viewFn = emitView(unit);\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.root.fnName === null) {\n throw new Error(`AssertionError: host binding function is unnamed`);\n }\n const createStatements = [];\n for (const op of job.root.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.root.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.root.fnName);\n}\nconst compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;\n// Schema containing DOM elements and their properties.\nconst domSchema = new DomElementSchemaRegistry();\n// Tag name of the `ng-template` element.\nconst NG_TEMPLATE_TAG_NAME = 'ng-template';\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}\n/**\n * Process a template AST and convert it into a `ComponentCompilation` in the intermediate\n * representation.\n * TODO: Refactor more of the ingestion code into phases.\n */\nfunction ingestComponent(componentName, template, constantPool, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) {\n const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn);\n ingestNodes(job.root, template);\n return job;\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 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 if (property.isAnimation) {\n bindingKind = BindingKind.Animation;\n }\n const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property.name, bindingKind === BindingKind.Attribute).filter(context => context !== SecurityContext.NONE);\n ingestHostProperty(job, property, bindingKind, securityContexts);\n }\n for (const [name, expr] of Object.entries(input.attributes) ?? []) {\n const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter(context => context !== SecurityContext.NONE);\n ingestHostAttribute(job, name, expr, securityContexts);\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, bindingKind, securityContexts) {\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, property.sourceSpan)), []);\n } else {\n expression = convertAst(ast, job, property.sourceSpan);\n }\n job.root.update.push(createBindingOp(job.root.xref, bindingKind, property.name, expression, null, securityContexts, false, false, null, /* TODO: How do Host bindings handle i18n attrs? */null, property.sourceSpan));\n}\nfunction ingestHostAttribute(job, name, value, securityContexts) {\n const attrBinding = createBindingOp(job.root.xref, BindingKind.Attribute, name, value, null, securityContexts,\n /* Host attributes should always be extracted to const hostAttrs, even if they are not\n *strictly* text literals */\n true, false, null, /* TODO */null, /** TODO: May be null? */value.sourceSpan);\n job.root.update.push(attrBinding);\n}\nfunction ingestHostEvent(job, event) {\n const [phase, target] = event.type !== ParsedEventType.Animation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];\n const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);\n job.root.create.push(eventBinding);\n}\n/**\n * Ingest the nodes of a template AST into the given `ViewCompilation`.\n */\nfunction ingestNodes(unit, template) {\n for (const node of template) {\n if (node instanceof Element$1) {\n ingestElement(unit, node);\n } else if (node instanceof Template) {\n ingestTemplate(unit, node);\n } else if (node instanceof Content) {\n ingestContent(unit, node);\n } else if (node instanceof Text$3) {\n ingestText(unit, node, null);\n } else if (node instanceof BoundText) {\n ingestBoundText(unit, node, null);\n } else if (node instanceof IfBlock) {\n ingestIfBlock(unit, node);\n } else if (node instanceof SwitchBlock) {\n ingestSwitchBlock(unit, node);\n } else if (node instanceof DeferredBlock) {\n ingestDeferBlock(unit, node);\n } else if (node instanceof Icu$1) {\n ingestIcu(unit, node);\n } else if (node instanceof ForLoopBlock) {\n ingestForBlock(unit, node);\n } else if (node instanceof LetDeclaration$1) {\n ingestLetDeclaration(unit, 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(unit, element) {\n if (element.i18n !== undefined && !(element.i18n instanceof Message || element.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for element: ${element.i18n.constructor.name}`);\n }\n const id = unit.job.allocateXrefId();\n const [namespaceKey, elementName] = splitNsName(element.name);\n const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element.i18n instanceof TagPlaceholder ? element.i18n : undefined, element.startSourceSpan, element.sourceSpan);\n unit.create.push(startOp);\n ingestElementBindings(unit, startOp, element);\n ingestReferences(startOp, element);\n // Start i18n, if needed, goes after the element create and bindings, but before the nodes\n let i18nBlockId = null;\n if (element.i18n instanceof Message) {\n i18nBlockId = unit.job.allocateXrefId();\n unit.create.push(createI18nStartOp(i18nBlockId, element.i18n, undefined, element.startSourceSpan));\n }\n ingestNodes(unit, element.children);\n // The source span for the end op is typically the element closing tag. However, if no closing tag\n // exists, such as in `<input>`, we use the start source span instead. Usually the start and end\n // instructions will be collapsed into one `element` instruction, negating the purpose of this\n // fallback, but in cases when it is not collapsed (such as an input with a binding), we still\n // want to map the end instruction to the main element.\n const endOp = createElementEndOp(id, element.endSourceSpan ?? element.startSourceSpan);\n unit.create.push(endOp);\n // If there is an i18n message associated with this element, insert i18n start and end ops.\n if (i18nBlockId !== null) {\n OpList.insertBefore(createI18nEndOp(i18nBlockId, element.endSourceSpan ?? element.startSourceSpan), endOp);\n }\n}\n/**\n * Ingest an `ng-template` node from the AST into the given `ViewCompilation`.\n */\nfunction ingestTemplate(unit, tmpl) {\n if (tmpl.i18n !== undefined && !(tmpl.i18n instanceof Message || tmpl.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for template: ${tmpl.i18n.constructor.name}`);\n }\n const childView = unit.job.allocateView(unit.xref);\n let tagNameWithoutNamespace = tmpl.tagName;\n let namespacePrefix = '';\n if (tmpl.tagName) {\n [namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);\n }\n const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : undefined;\n const namespace = namespaceForKey(namespacePrefix);\n const functionNameSuffix = tagNameWithoutNamespace === null ? '' : prefixWithNamespace(tagNameWithoutNamespace, namespace);\n const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;\n const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan, tmpl.sourceSpan);\n unit.create.push(templateOp);\n ingestTemplateBindings(unit, templateOp, tmpl, templateKind);\n ingestReferences(templateOp, tmpl);\n ingestNodes(childView, tmpl.children);\n for (const {\n name,\n value\n } of tmpl.variables) {\n childView.contextVariables.set(name, value !== '' ? value : '$implicit');\n }\n // If this is a plain template and there is an i18n message associated with it, insert i18n start\n // and end ops. For structural directive templates, the i18n ops will be added when ingesting the\n // element/template the directive is placed on.\n if (templateKind === TemplateKind.NgTemplate && tmpl.i18n instanceof Message) {\n const id = unit.job.allocateXrefId();\n OpList.insertAfter(createI18nStartOp(id, tmpl.i18n, undefined, tmpl.startSourceSpan), childView.create.head);\n OpList.insertBefore(createI18nEndOp(id, tmpl.endSourceSpan ?? tmpl.startSourceSpan), childView.create.tail);\n }\n}\n/**\n * Ingest a content node from the AST into the given `ViewCompilation`.\n */\nfunction ingestContent(unit, content) {\n if (content.i18n !== undefined && !(content.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);\n }\n let fallbackView = null;\n // Don't capture default content that's only made up of empty text nodes and comments.\n // Note that we process the default content before the projection in order to match the\n // insertion order at runtime.\n if (content.children.some(child => !(child instanceof Comment$1) && (!(child instanceof Text$3) || child.value.trim().length > 0))) {\n fallbackView = unit.job.allocateView(unit.xref);\n ingestNodes(fallbackView, content.children);\n }\n const id = unit.job.allocateXrefId();\n const op = createProjectionOp(id, content.selector, content.i18n, fallbackView?.xref ?? null, content.sourceSpan);\n for (const attr of content.attributes) {\n const securityContext = domSchema.securityContext(content.name, attr.name, true);\n unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n }\n unit.create.push(op);\n}\n/**\n * Ingest a literal text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestText(unit, text, icuPlaceholder) {\n unit.create.push(createTextOp(unit.job.allocateXrefId(), text.value, icuPlaceholder, text.sourceSpan));\n}\n/**\n * Ingest an interpolated text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestBoundText(unit, text, icuPlaceholder) {\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 if (text.i18n !== undefined && !(text.i18n instanceof Container)) {\n throw Error(`Unhandled i18n metadata type for text interpolation: ${text.i18n?.constructor.name}`);\n }\n const i18nPlaceholders = text.i18n instanceof Container ? text.i18n.children.filter(node => node instanceof Placeholder).map(placeholder => placeholder.name) : [];\n if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {\n throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);\n }\n const textXref = unit.job.allocateXrefId();\n unit.create.push(createTextOp(textXref, '', icuPlaceholder, text.sourceSpan));\n // TemplateDefinitionBuilder does not generate source maps for sub-expressions inside an\n // interpolation. We copy that behavior in compatibility mode.\n // TODO: is it actually correct to generate these extra maps in modern mode?\n const baseSourceSpan = unit.job.compatibility ? null : text.sourceSpan;\n unit.update.push(createInterpolateTextOp(textXref, new Interpolation(value.strings, value.expressions.map(expr => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text.sourceSpan));\n}\n/**\n * Ingest an `@if` block into the given `ViewCompilation`.\n */\nfunction ingestIfBlock(unit, ifBlock) {\n let firstXref = null;\n let conditions = [];\n for (let i = 0; i < ifBlock.branches.length; i++) {\n const ifCase = ifBlock.branches[i];\n const cView = unit.job.allocateView(unit.xref);\n const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);\n if (ifCase.expressionAlias !== null) {\n cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);\n }\n let ifCaseI18nMeta = undefined;\n if (ifCase.i18n !== undefined) {\n if (!(ifCase.i18n instanceof BlockPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for if block: ${ifCase.i18n?.constructor.name}`);\n }\n ifCaseI18nMeta = ifCase.i18n;\n }\n const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, 'Conditional', Namespace.HTML, ifCaseI18nMeta, ifCase.startSourceSpan, ifCase.sourceSpan);\n unit.create.push(templateOp);\n if (firstXref === null) {\n firstXref = cView.xref;\n }\n const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;\n const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle, ifCase.expressionAlias);\n conditions.push(conditionalCaseExpr);\n ingestNodes(cView, ifCase.children);\n }\n unit.update.push(createConditionalOp(firstXref, null, conditions, ifBlock.sourceSpan));\n}\n/**\n * Ingest an `@switch` block into the given `ViewCompilation`.\n */\nfunction ingestSwitchBlock(unit, switchBlock) {\n // Don't ingest empty switches since they won't render anything.\n if (switchBlock.cases.length === 0) {\n return;\n }\n let firstXref = null;\n let conditions = [];\n for (const switchCase of switchBlock.cases) {\n const cView = unit.job.allocateView(unit.xref);\n const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCase);\n let switchCaseI18nMeta = undefined;\n if (switchCase.i18n !== undefined) {\n if (!(switchCase.i18n instanceof BlockPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for switch block: ${switchCase.i18n?.constructor.name}`);\n }\n switchCaseI18nMeta = switchCase.i18n;\n }\n const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, 'Case', Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);\n unit.create.push(templateOp);\n if (firstXref === null) {\n firstXref = cView.xref;\n }\n const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;\n const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle);\n conditions.push(conditionalCaseExpr);\n ingestNodes(cView, switchCase.children);\n }\n unit.update.push(createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan));\n}\nfunction ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {\n if (i18nMeta !== undefined && !(i18nMeta instanceof BlockPlaceholder)) {\n throw Error('Unhandled i18n metadata type for defer block');\n }\n if (children === undefined) {\n return null;\n }\n const secondaryView = unit.job.allocateView(unit.xref);\n ingestNodes(secondaryView, children);\n const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan, sourceSpan);\n unit.create.push(templateOp);\n return templateOp;\n}\nfunction ingestDeferBlock(unit, deferBlock) {\n let ownResolverFn = null;\n if (unit.job.deferMeta.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n if (!unit.job.deferMeta.blocks.has(deferBlock)) {\n throw new Error(`AssertionError: unable to find a dependency function for this deferred block`);\n }\n ownResolverFn = unit.job.deferMeta.blocks.get(deferBlock) ?? null;\n }\n // Generate the defer main view and all secondary views.\n const main = ingestDeferView(unit, '', deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);\n const loading = ingestDeferView(unit, 'Loading', deferBlock.loading?.i18n, deferBlock.loading?.children, deferBlock.loading?.sourceSpan);\n const placeholder = ingestDeferView(unit, 'Placeholder', deferBlock.placeholder?.i18n, deferBlock.placeholder?.children, deferBlock.placeholder?.sourceSpan);\n const error = ingestDeferView(unit, 'Error', deferBlock.error?.i18n, deferBlock.error?.children, deferBlock.error?.sourceSpan);\n // Create the main defer op, and ops for all secondary views.\n const deferXref = unit.job.allocateXrefId();\n const deferOp = createDeferOp(deferXref, main.xref, main.handle, ownResolverFn, unit.job.allDeferrableDepsFn, deferBlock.sourceSpan);\n deferOp.placeholderView = placeholder?.xref ?? null;\n deferOp.placeholderSlot = placeholder?.handle ?? null;\n deferOp.loadingSlot = loading?.handle ?? null;\n deferOp.errorSlot = error?.handle ?? null;\n deferOp.placeholderMinimumTime = deferBlock.placeholder?.minimumTime ?? null;\n deferOp.loadingMinimumTime = deferBlock.loading?.minimumTime ?? null;\n deferOp.loadingAfterTime = deferBlock.loading?.afterTime ?? null;\n unit.create.push(deferOp);\n // Configure all defer `on` conditions.\n // TODO: refactor prefetch triggers to use a separate op type, with a shared superclass. This will\n // make it easier to refactor prefetch behavior in the future.\n let prefetch = false;\n let deferOnOps = [];\n let deferWhenOps = [];\n for (const triggers of [deferBlock.triggers, deferBlock.prefetchTriggers]) {\n if (triggers.idle !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Idle\n }, prefetch, triggers.idle.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.immediate !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Immediate\n }, prefetch, triggers.immediate.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.timer !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Timer,\n delay: triggers.timer.delay\n }, prefetch, triggers.timer.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.hover !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Hover,\n targetName: triggers.hover.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null\n }, prefetch, triggers.hover.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.interaction !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Interaction,\n targetName: triggers.interaction.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null\n }, prefetch, triggers.interaction.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.viewport !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Viewport,\n targetName: triggers.viewport.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null\n }, prefetch, triggers.viewport.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.when !== undefined) {\n if (triggers.when.value instanceof Interpolation$1) {\n // TemplateDefinitionBuilder supports this case, but it's very strange to me. What would it\n // even mean?\n throw new Error(`Unexpected interpolation in defer block when trigger`);\n }\n const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);\n deferWhenOps.push(deferOnOp);\n }\n // If no (non-prefetching) defer triggers were provided, default to `idle`.\n if (deferOnOps.length === 0 && deferWhenOps.length === 0) {\n deferOnOps.push(createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Idle\n }, false, null));\n }\n prefetch = true;\n }\n unit.create.push(deferOnOps);\n unit.update.push(deferWhenOps);\n}\nfunction ingestIcu(unit, icu) {\n if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {\n const xref = unit.job.allocateXrefId();\n unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));\n for (const [placeholder, text] of Object.entries({\n ...icu.vars,\n ...icu.placeholders\n })) {\n if (text instanceof BoundText) {\n ingestBoundText(unit, text, placeholder);\n } else {\n ingestText(unit, text, placeholder);\n }\n }\n unit.create.push(createIcuEndOp(xref));\n } else {\n throw Error(`Unhandled i18n metadata type for ICU: ${icu.i18n?.constructor.name}`);\n }\n}\n/**\n * Ingest an `@for` block into the given `ViewCompilation`.\n */\nfunction ingestForBlock(unit, forBlock) {\n const repeaterView = unit.job.allocateView(unit.xref);\n // We copy TemplateDefinitionBuilder's scheme of creating names for `$count` and `$index`\n // that are suffixed with special information, to disambiguate which level of nested loop\n // the below aliases refer to.\n // TODO: We should refactor Template Pipeline's variable phases to gracefully handle\n // shadowing, and arbitrarily many levels of variables depending on each other.\n const indexName = `ɵ$index_${repeaterView.xref}`;\n const countName = `ɵ$count_${repeaterView.xref}`;\n const indexVarNames = new Set();\n // Set all the context variables and aliases available in the repeater.\n repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);\n for (const variable of forBlock.contextVariables) {\n if (variable.value === '$index') {\n indexVarNames.add(variable.name);\n }\n if (variable.name === '$index') {\n repeaterView.contextVariables.set('$index', variable.value).set(indexName, variable.value);\n } else if (variable.name === '$count') {\n repeaterView.contextVariables.set('$count', variable.value).set(countName, variable.value);\n } else {\n repeaterView.aliases.add({\n kind: SemanticVariableKind.Alias,\n name: null,\n identifier: variable.name,\n expression: getComputedForLoopVariableExpression(variable, indexName, countName)\n });\n }\n }\n const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);\n const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);\n ingestNodes(repeaterView, forBlock.children);\n let emptyView = null;\n let emptyTagName = null;\n if (forBlock.empty !== null) {\n emptyView = unit.job.allocateView(unit.xref);\n ingestNodes(emptyView, forBlock.empty.children);\n emptyTagName = ingestControlFlowInsertionPoint(unit, emptyView.xref, forBlock.empty);\n }\n const varNames = {\n $index: indexVarNames,\n $implicit: forBlock.item.name\n };\n if (forBlock.i18n !== undefined && !(forBlock.i18n instanceof BlockPlaceholder)) {\n throw Error('AssertionError: Unhandled i18n metadata type or @for');\n }\n if (forBlock.empty?.i18n !== undefined && !(forBlock.empty.i18n instanceof BlockPlaceholder)) {\n throw Error('AssertionError: Unhandled i18n metadata type or @empty');\n }\n const i18nPlaceholder = forBlock.i18n;\n const emptyI18nPlaceholder = forBlock.empty?.i18n;\n const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);\n const repeaterCreate = createRepeaterCreateOp(repeaterView.xref, emptyView?.xref ?? null, tagName, track, varNames, emptyTagName, i18nPlaceholder, emptyI18nPlaceholder, forBlock.startSourceSpan, forBlock.sourceSpan);\n unit.create.push(repeaterCreate);\n const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));\n const repeater = createRepeaterOp(repeaterCreate.xref, repeaterCreate.handle, expression, forBlock.sourceSpan);\n unit.update.push(repeater);\n}\n/**\n * Gets an expression that represents a variable in an `@for` loop.\n * @param variable AST representing the variable.\n * @param indexName Loop-specific name for `$index`.\n * @param countName Loop-specific name for `$count`.\n */\nfunction getComputedForLoopVariableExpression(variable, indexName, countName) {\n switch (variable.value) {\n case '$index':\n return new LexicalReadExpr(indexName);\n case '$count':\n return new LexicalReadExpr(countName);\n case '$first':\n return new LexicalReadExpr(indexName).identical(literal(0));\n case '$last':\n return new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)));\n case '$even':\n return new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0));\n case '$odd':\n return new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0));\n default:\n throw new Error(`AssertionError: unknown @for loop variable ${variable.value}`);\n }\n}\nfunction ingestLetDeclaration(unit, node) {\n const target = unit.job.allocateXrefId();\n unit.create.push(createDeclareLetOp(target, node.name, node.sourceSpan));\n unit.update.push(createStoreLetOp(target, node.name, convertAst(node.value, unit.job, node.valueSpan), node.sourceSpan));\n}\n/**\n * Convert a template AST expression into an output AST expression.\n */\nfunction convertAst(ast, job, baseSourceSpan) {\n if (ast instanceof ASTWithSource) {\n return convertAst(ast.ast, job, baseSourceSpan);\n } else if (ast instanceof PropertyRead) {\n const isThisReceiver = ast.receiver instanceof ThisReceiver;\n // Whether this is an implicit receiver, *excluding* explicit reads of `this`.\n const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver);\n // Whether the name of the read is a node that should be never retain its explicit this\n // receiver.\n const isSpecialNode = ast.name === '$any' || ast.name === '$event';\n // TODO: The most sensible condition here would be simply `isImplicitReceiver`, to convert only\n // actual implicit `this` reads, and not explicit ones. However, TemplateDefinitionBuilder (and\n // the Typecheck block!) both have the same bug, in which they also consider explicit `this`\n // reads to be implicit. This causes problems when the explicit `this` read is inside a\n // template with a context that also provides the variable name being read:\n // ```\n // <ng-template let-a>{{this.a}}</ng-template>\n // ```\n // The whole point of the explicit `this` was to access the class property, but TDB and the\n // current TCB treat the read as implicit, and give you the context property instead!\n //\n // For now, we emulate this old behavior by aggressively converting explicit reads to to\n // implicit reads, except for the special cases that TDB and the current TCB protect. However,\n // it would be an improvement to fix this.\n //\n // See also the corresponding comment for the TCB, in `type_check_block.ts`.\n if (isImplicitReceiver || isThisReceiver && !isSpecialNode) {\n return new LexicalReadExpr(ast.name);\n } else {\n return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));\n }\n } else if (ast instanceof PropertyWrite) {\n if (ast.receiver instanceof ImplicitReceiver) {\n return new WritePropExpr(\n // TODO: Is it correct to always use the root context in place of the implicit receiver?\n new ContextExpr(job.root.xref), ast.name, convertAst(ast.value, job, baseSourceSpan), null, convertSourceSpan(ast.span, baseSourceSpan));\n }\n return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof KeyedWrite) {\n return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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, job, baseSourceSpan), ast.args.map(arg => convertAst(arg, job, baseSourceSpan)), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n } else if (ast instanceof LiteralPrimitive) {\n return literal(ast.value, undefined, convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof Unary) {\n switch (ast.operator) {\n case '+':\n return new UnaryOperatorExpr(UnaryOperator.Plus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n case '-':\n return new UnaryOperatorExpr(UnaryOperator.Minus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n default:\n throw new Error(`AssertionError: unknown unary operator ${ast.operator}`);\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, job, baseSourceSpan), convertAst(ast.right, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof ThisReceiver) {\n // TODO: should context expressions have source maps?\n return new ContextExpr(job.root.xref);\n } else if (ast instanceof KeyedRead) {\n return new ReadKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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 // TODO: should literals have source maps, or do we just map the whole surrounding\n // expression?\n return new LiteralMapEntry(key.key, convertAst(value, job, baseSourceSpan), key.quoted);\n });\n return new LiteralMapExpr(entries, undefined, convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof LiteralArray) {\n // TODO: should literals have source maps, or do we just map the whole surrounding expression?\n return new LiteralArrayExpr(ast.expressions.map(expr => convertAst(expr, job, baseSourceSpan)));\n } else if (ast instanceof Conditional) {\n return new ConditionalExpr(convertAst(ast.condition, job, baseSourceSpan), convertAst(ast.trueExp, job, baseSourceSpan), convertAst(ast.falseExp, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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, job, baseSourceSpan);\n } else if (ast instanceof BindingPipe) {\n // TODO: pipes should probably have source maps; figure out details.\n return new PipeBindingExpr(job.allocateXrefId(), new SlotHandle(), ast.name, [convertAst(ast.exp, job, baseSourceSpan), ...ast.args.map(arg => convertAst(arg, job, baseSourceSpan))]);\n } else if (ast instanceof SafeKeyedRead) {\n return new SafeKeyedReadExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof SafePropertyRead) {\n // TODO: source span\n return new SafePropertyReadExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name);\n } else if (ast instanceof SafeCall) {\n // TODO: source span\n return new SafeInvokeFunctionExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.args.map(a => convertAst(a, job, baseSourceSpan)));\n } else if (ast instanceof EmptyExpr$1) {\n return new EmptyExpr(convertSourceSpan(ast.span, baseSourceSpan));\n } else if (ast instanceof PrefixNot) {\n return not(convertAst(ast.expression, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));\n } else {\n throw new Error(`Unhandled expression type \"${ast.constructor.name}\" in file \"${baseSourceSpan?.start.file.url}\"`);\n }\n}\nfunction convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {\n let expression;\n if (value instanceof Interpolation$1) {\n expression = new Interpolation(value.strings, value.expressions.map(e => convertAst(e, job, sourceSpan ?? null)), Object.keys(asMessage(i18nMeta)?.placeholders ?? {}));\n } else if (value instanceof AST) {\n expression = convertAst(value, job, sourceSpan ?? null);\n } else {\n expression = literal(value);\n }\n return expression;\n}\n// TODO: Can we populate Template binding kinds in ingest?\nconst BINDING_KINDS = new Map([[BindingType.Property, BindingKind.Property], [BindingType.TwoWay, BindingKind.TwoWayProperty], [BindingType.Attribute, BindingKind.Attribute], [BindingType.Class, BindingKind.ClassName], [BindingType.Style, BindingKind.StyleProperty], [BindingType.Animation, BindingKind.Animation]]);\n/**\n * Checks whether the given template is a plain ng-template (as opposed to another kind of template\n * such as a structural directive template or control flow template). This is checked based on the\n * tagName. We can expect that only plain ng-templates will come through with a tagName of\n * 'ng-template'.\n *\n * Here are some of the cases we expect:\n *\n * | Angular HTML | Template tagName |\n * | ---------------------------------- | ------------------ |\n * | `<ng-template>` | 'ng-template' |\n * | `<div *ngIf=\"true\">` | 'div' |\n * | `<svg><ng-template>` | 'svg:ng-template' |\n * | `@if (true) {` | 'Conditional' |\n * | `<ng-template *ngIf>` (plain) | 'ng-template' |\n * | `<ng-template *ngIf>` (structural) | null |\n */\nfunction isPlainTemplate(tmpl) {\n return splitNsName(tmpl.tagName ?? '')[1] === NG_TEMPLATE_TAG_NAME;\n}\n/**\n * Ensures that the i18nMeta, if provided, is an i18n.Message.\n */\nfunction asMessage(i18nMeta) {\n if (i18nMeta == null) {\n return null;\n }\n if (!(i18nMeta instanceof Message)) {\n throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);\n }\n return i18nMeta;\n}\n/**\n * Process all of the bindings on an element in the template AST and convert them to their IR\n * representation.\n */\nfunction ingestElementBindings(unit, op, element) {\n let bindings = new Array();\n let i18nAttributeBindingNames = new Set();\n for (const attr of element.attributes) {\n // Attribute literal bindings, such as `attr.foo=\"bar\"`.\n const securityContext = domSchema.securityContext(element.name, attr.name, true);\n bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n if (attr.i18n) {\n i18nAttributeBindingNames.add(attr.name);\n }\n }\n for (const input of element.inputs) {\n if (i18nAttributeBindingNames.has(input.name)) {\n console.error(`On component ${unit.job.componentName}, the binding ${input.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`);\n }\n // All dynamic bindings (both attribute and property bindings).\n bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, asMessage(input.i18n) ?? null, input.sourceSpan));\n }\n unit.create.push(bindings.filter(b => b?.kind === OpKind.ExtractedAttribute));\n unit.update.push(bindings.filter(b => b?.kind === OpKind.Binding));\n for (const output of element.outputs) {\n if (output.type === ParsedEventType.Animation && output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n if (output.type === ParsedEventType.TwoWay) {\n unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));\n } else {\n unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));\n }\n }\n // If any of the bindings on this element have an i18n message, then an i18n attrs configuration\n // op is also required.\n if (bindings.some(b => b?.i18nMessage) !== null) {\n unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));\n }\n}\n/**\n * Process all of the bindings on a template in the template AST and convert them to their IR\n * representation.\n */\nfunction ingestTemplateBindings(unit, op, template, templateKind) {\n let bindings = new Array();\n for (const attr of template.templateAttrs) {\n if (attr instanceof TextAttribute) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n bindings.push(createTemplateBinding(unit, op.xref, BindingType.Attribute, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n } else {\n bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n }\n }\n for (const attr of template.attributes) {\n // Attribute literal bindings, such as `attr.foo=\"bar\"`.\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n bindings.push(createTemplateBinding(unit, op.xref, BindingType.Attribute, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n }\n for (const input of template.inputs) {\n // Dynamic bindings (both attribute and property bindings).\n bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));\n }\n unit.create.push(bindings.filter(b => b?.kind === OpKind.ExtractedAttribute));\n unit.update.push(bindings.filter(b => b?.kind === OpKind.Binding));\n for (const output of template.outputs) {\n if (output.type === ParsedEventType.Animation && output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n if (templateKind === TemplateKind.NgTemplate) {\n if (output.type === ParsedEventType.TwoWay) {\n unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));\n } else {\n unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));\n }\n }\n if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.Animation) {\n // Animation bindings are excluded from the structural template's const array.\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);\n unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));\n }\n }\n // TODO: Perhaps we could do this in a phase? (It likely wouldn't change the slot indices.)\n if (bindings.some(b => b?.i18nMessage) !== null) {\n unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));\n }\n}\n/**\n * Helper to ingest an individual binding on a template, either an explicit `ng-template`, or an\n * implicit template created via structural directive.\n *\n * Bindings on templates are *extremely* tricky. I have tried to isolate all of the confusing edge\n * cases into this function, and to comment it well to document the behavior.\n *\n * Some of this behavior is intuitively incorrect, and we should consider changing it in the future.\n *\n * @param view The compilation unit for the view containing the template.\n * @param xref The xref of the template op.\n * @param type The binding type, according to the parser. This is fairly reasonable, e.g. both\n * dynamic and static attributes have e.BindingType.Attribute.\n * @param name The binding's name.\n * @param value The bindings's value, which will either be an input AST expression, or a string\n * literal. Note that the input AST expression may or may not be const -- it will only be a\n * string literal if the parser considered it a text binding.\n * @param unit If the binding has a unit (e.g. `px` for style bindings), then this is the unit.\n * @param securityContext The security context of the binding.\n * @param isStructuralTemplateAttribute Whether this binding actually applies to the structural\n * ng-template. For example, an `ngFor` would actually apply to the structural template. (Most\n * bindings on structural elements target the inner element, not the template.)\n * @param templateKind Whether this is an explicit `ng-template` or an implicit template created by\n * a structural directive. This should never be a block template.\n * @param i18nMessage The i18n metadata for the binding, if any.\n * @param sourceSpan The source span of the binding.\n * @returns An IR binding op, or null if the binding should be skipped.\n */\nfunction createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n const isTextBinding = typeof value === 'string';\n // If this is a structural template, then several kinds of bindings should not result in an\n // update instruction.\n if (templateKind === TemplateKind.Structural) {\n if (!isStructuralTemplateAttribute) {\n switch (type) {\n case BindingType.Property:\n case BindingType.Class:\n case BindingType.Style:\n // Because this binding doesn't really target the ng-template, it must be a binding on an\n // inner node of a structural template. We can't skip it entirely, because we still need\n // it on the ng-template's consts (e.g. for the purposes of directive matching). However,\n // we should not generate an update instruction for it.\n return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);\n case BindingType.TwoWay:\n return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);\n }\n }\n if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.Animation)) {\n // Again, this binding doesn't really target the ng-template; it actually targets the element\n // inside the structural template. In the case of non-text attribute or animation bindings,\n // the binding doesn't even show up on the ng-template const array, so we just skip it\n // entirely.\n return null;\n }\n }\n let bindingType = BINDING_KINDS.get(type);\n if (templateKind === TemplateKind.NgTemplate) {\n // We know we are dealing with bindings directly on an explicit ng-template.\n // Static attribute bindings should be collected into the const array as k/v pairs. Property\n // bindings should result in a `property` instruction, and `AttributeMarker.Bindings` const\n // entries.\n //\n // The difficulty is with dynamic attribute, style, and class bindings. These don't really make\n // sense on an `ng-template` and should probably be parser errors. However,\n // TemplateDefinitionBuilder generates `property` instructions for them, and so we do that as\n // well.\n //\n // Note that we do have a slight behavior difference with TemplateDefinitionBuilder: although\n // TDB emits `property` instructions for dynamic attributes, styles, and classes, only styles\n // and classes also get const collected into the `AttributeMarker.Bindings` field. Dynamic\n // attribute bindings are missing from the consts entirely. We choose to emit them into the\n // consts field anyway, to avoid creating special cases for something so arcane and nonsensical.\n if (type === BindingType.Class || type === BindingType.Style || type === BindingType.Attribute && !isTextBinding) {\n // TODO: These cases should be parse errors.\n bindingType = BindingKind.Property;\n }\n }\n return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);\n}\nfunction makeListenerHandlerOps(unit, handler, handlerSpan) {\n handler = astOf(handler);\n const handlerOps = new Array();\n let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];\n if (handlerExprs.length === 0) {\n throw new Error('Expected listener to have non-empty expression list.');\n }\n const expressions = handlerExprs.map(expr => convertAst(expr, unit.job, handlerSpan));\n const returnExpr = expressions.pop();\n handlerOps.push(...expressions.map(e => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));\n handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));\n return handlerOps;\n}\nfunction makeTwoWayListenerHandlerOps(unit, handler, handlerSpan) {\n handler = astOf(handler);\n const handlerOps = new Array();\n if (handler instanceof Chain) {\n if (handler.expressions.length === 1) {\n handler = handler.expressions[0];\n } else {\n // This is validated during parsing already, but we do it here just in case.\n throw new Error('Expected two-way listener to have a single expression.');\n }\n }\n const handlerExpr = convertAst(handler, unit.job, handlerSpan);\n const eventReference = new LexicalReadExpr('$event');\n const twoWaySetExpr = new TwoWayBindingSetExpr(handlerExpr, eventReference);\n handlerOps.push(createStatementOp(new ExpressionStatement(twoWaySetExpr)));\n handlerOps.push(createStatementOp(new ReturnStatement(eventReference)));\n return handlerOps;\n}\nfunction astOf(ast) {\n return ast instanceof ASTWithSource ? ast.ast : ast;\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}\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 * @param baseSourceSpan a span corresponding to the base of the expression tree.\n * @returns a `ParseSourceSpan` for the given span or null if no `baseSourceSpan` was provided.\n */\nfunction convertSourceSpan(span, baseSourceSpan) {\n if (baseSourceSpan === null) {\n return null;\n }\n const start = baseSourceSpan.start.moveBy(span.start);\n const end = baseSourceSpan.start.moveBy(span.end);\n const fullStart = baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n}\n/**\n * With the directive-based control flow users were able to conditionally project content using\n * the `*` syntax. E.g. `<div *ngIf=\"expr\" projectMe></div>` will be projected into\n * `<ng-content select=\"[projectMe]\"/>`, because the attributes and tag name from the `div` are\n * copied to the template via the template creation instruction. With `@if` and `@for` that is\n * not the case, because the conditional is placed *around* elements, rather than *on* them.\n * The result is that content projection won't work in the same way if a user converts from\n * `*ngIf` to `@if`.\n *\n * This function aims to cover the most common case by doing the same copying when a control flow\n * node has *one and only one* root element or template node.\n *\n * This approach comes with some caveats:\n * 1. As soon as any other node is added to the root, the copying behavior won't work anymore.\n * A diagnostic will be added to flag cases like this and to explain how to work around it.\n * 2. If `preserveWhitespaces` is enabled, it's very likely that indentation will break this\n * workaround, because it'll include an additional text node as the first child. We can work\n * around it here, but in a discussion it was decided not to, because the user explicitly opted\n * into preserving the whitespace and we would have to drop it from the generated code.\n * The diagnostic mentioned point #1 will flag such cases to users.\n *\n * @returns Tag name to be used for the control flow template.\n */\nfunction ingestControlFlowInsertionPoint(unit, xref, node) {\n let root = null;\n for (const child of node.children) {\n // Skip over comment nodes.\n if (child instanceof Comment$1) {\n continue;\n }\n // We can only infer the tag name/attributes if there's a single root node.\n if (root !== null) {\n return null;\n }\n // Root nodes can only elements or templates with a tag name (e.g. `<div *foo></div>`).\n if (child instanceof Element$1 || child instanceof Template && child.tagName !== null) {\n root = child;\n }\n }\n // If we've found a single root node, its tag name and attributes can be\n // copied to the surrounding template to be used for content projection.\n if (root !== null) {\n // Collect the static attributes for content projection purposes.\n for (const attr of root.attributes) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n }\n // Also collect the inputs since they participate in content projection as well.\n // Note that TDB used to collect the outputs as well, but it wasn't passing them into\n // the template instruction. Here we just don't collect them.\n for (const attr of root.inputs) {\n if (attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));\n }\n }\n const tagName = root instanceof Element$1 ? root.name : root.tagName;\n // Don't pass along `ng-template` tag name since it enables directive matching.\n return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;\n }\n return null;\n}\n\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\n/**\n * Translates query flags into `TQueryFlags` type in\n * 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 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}\nfunction createQueryCreateCall(query, constantPool, queryTypeFns, prependParams) {\n const parameters = [];\n if (prependParams !== undefined) {\n parameters.push(...prependParams);\n }\n if (query.isSignal) {\n parameters.push(new ReadPropExpr(variable(CONTEXT_NAME), query.propertyName));\n }\n parameters.push(getQueryPredicate(query, constantPool), literal(toQueryFlags(query)));\n if (query.read) {\n parameters.push(query.read);\n }\n const queryCreateFn = query.isSignal ? queryTypeFns.signalBased : queryTypeFns.nonSignal;\n return importExpr(queryCreateFn).callFn(parameters);\n}\nconst queryAdvancePlaceholder = Symbol('queryAdvancePlaceholder');\n/**\n * Collapses query advance placeholders in a list of statements.\n *\n * This allows for less generated code because multiple sibling query advance\n * statements can be collapsed into a single call with the count as argument.\n *\n * e.g.\n *\n * ```ts\n * bla();\n * queryAdvance();\n * queryAdvance();\n * bla();\n * ```\n *\n * --> will turn into\n *\n * ```\n * bla();\n * queryAdvance(2);\n * bla();\n * ```\n */\nfunction collapseAdvanceStatements(statements) {\n const result = [];\n let advanceCollapseCount = 0;\n const flushAdvanceCount = () => {\n if (advanceCollapseCount > 0) {\n result.unshift(importExpr(Identifiers.queryAdvance).callFn(advanceCollapseCount === 1 ? [] : [literal(advanceCollapseCount)]).toStmt());\n advanceCollapseCount = 0;\n }\n };\n // Iterate through statements in reverse and collapse advance placeholders.\n for (let i = statements.length - 1; i >= 0; i--) {\n const st = statements[i];\n if (st === queryAdvancePlaceholder) {\n advanceCollapseCount++;\n } else {\n flushAdvanceCount();\n result.unshift(st);\n }\n }\n flushAdvanceCount();\n return result;\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(st => updateStatements.push(st), TEMPORARY_NAME);\n viewQueries.forEach(query => {\n // creation call, e.g. r3.viewQuery(somePredicate, true) or\n // r3.viewQuerySignal(ctx.prop, somePredicate, true);\n const queryDefinitionCall = createQueryCreateCall(query, constantPool, {\n signalBased: Identifiers.viewQuerySignal,\n nonSignal: Identifiers.viewQuery\n });\n createStatements.push(queryDefinitionCall.toStmt());\n // Signal queries update lazily and we just advance the index.\n if (query.isSignal) {\n updateStatements.push(queryAdvancePlaceholder);\n return;\n }\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 */, collapseAdvanceStatements(updateStatements))], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Define and update any content queries\nfunction createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(st => updateStatements.push(st), TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null) or\n // r3.contentQuerySignal(dirIndex, propName, somePredicate, <flags>, <read>).\n createStatements.push(createQueryCreateCall(query, constantPool, {\n nonSignal: Identifiers.contentQuery,\n signalBased: Identifiers.contentQuerySignal\n }, /* prependParams */[variable('dirIndex')]).toStmt());\n // Signal queries update lazily and we just advance the index.\n if (query.isSignal) {\n updateStatements.push(queryAdvancePlaceholder);\n continue;\n }\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 */, collapseAdvanceStatements(updateStatements))], INFERRED_TYPE, null, contentQueriesFnName);\n}\nclass HtmlParser extends Parser$1 {\n constructor() {\n super(getHtmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\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, _allowInvalidAssignmentEvents = false) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n this._allowInvalidAssignmentEvents = _allowInvalidAssignmentEvents;\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, false, 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, false, 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, isPartOfAssignmentBinding, 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), isPartOfAssignmentBinding, 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, false, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n }\n _parsePropertyAst(name, ast, isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : 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, 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 = BindingType.Attribute;\n } else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 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 = 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 = boundProp.type === ParsedPropertyType.TWO_WAY ? BindingType.TwoWay : 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, 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, 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, handlerSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 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 prevErrorCount = this.errors.length;\n const ast = this._parseAction(expression, handlerSpan);\n const isValid = this.errors.length === prevErrorCount;\n targetMatchableAttrs.push([name, ast.source]);\n // Don't try to validate assignment events if there were other\n // parsing errors to avoid adding more noise to the error logs.\n if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {\n this._reportError('Unsupported expression in a two-way binding', sourceSpan);\n }\n targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : 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, 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, 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 /**\n * Returns whether a parsed AST is allowed to be used within the event side of a two-way binding.\n * @param ast Parsed AST to be checked.\n */\n _isAllowedAssignmentEvent(ast) {\n if (ast instanceof ASTWithSource) {\n return this._isAllowedAssignmentEvent(ast.ast);\n }\n if (ast instanceof NonNullAssert) {\n return this._isAllowedAssignmentEvent(ast.expression);\n }\n if (ast instanceof PropertyRead || ast instanceof KeyedRead) {\n return true;\n }\n // TODO(crisbeto): this logic is only here to support the automated migration away\n // from invalid bindings. It should be removed once the migration is deleted.\n if (!this._allowInvalidAssignmentEvents) {\n return false;\n }\n if (ast instanceof Binary) {\n return (ast.operation === '&&' || ast.operation === '||' || ast.operation === '??') && (ast.right instanceof PropertyRead || ast.right instanceof KeyedRead);\n }\n return ast instanceof Conditional || ast instanceof PrefixNot;\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 = '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) {\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 the expression in a for loop block. */\nconst FOR_LOOP_EXPRESSION_PATTERN = /^\\s*([0-9A-Za-z_$]*)\\s+of\\s+([\\S\\s]*)/;\n/** Pattern for the tracking expression in a for loop block. */\nconst FOR_LOOP_TRACK_PATTERN = /^track\\s+([\\S\\s]*)/;\n/** Pattern for the `as` expression in a conditional block. */\nconst CONDITIONAL_ALIAS_PATTERN = /^(as\\s)+(.*)/;\n/** Pattern used to identify an `else if` block. */\nconst ELSE_IF_PATTERN = /^else[^\\S\\r\\n]+if/;\n/** Pattern used to identify a `let` parameter. */\nconst FOR_LOOP_LET_PATTERN = /^let\\s+([\\S\\s]*)/;\n/**\n * Pattern to group a string into leading whitespace, non whitespace, and trailing whitespace.\n * Useful for getting the variable name span when a span can contain leading and trailing space.\n */\nconst CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN = /(\\s*)(\\S+)(\\s*)/;\n/** Names of variables that are allowed to be used in the `let` expression of a `for` loop. */\nconst ALLOWED_FOR_LOOP_LET_VARIABLES = new Set(['$index', '$first', '$last', '$even', '$odd', '$count']);\n/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to a `for` block.\n */\nfunction isConnectedForLoopBlock(name) {\n return name === 'empty';\n}\n/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to an `if` block.\n */\nfunction isConnectedIfLoopBlock(name) {\n return name === 'else' || ELSE_IF_PATTERN.test(name);\n}\n/** Creates an `if` loop block from an HTML AST node. */\nfunction createIfBlock(ast, connectedBlocks, visitor, bindingParser) {\n const errors = validateIfConnectedBlocks(connectedBlocks);\n const branches = [];\n const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);\n if (mainBlockParams !== null) {\n branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));\n }\n for (const block of connectedBlocks) {\n if (ELSE_IF_PATTERN.test(block.name)) {\n const params = parseConditionalBlockParameters(block, errors, bindingParser);\n if (params !== null) {\n const children = visitAll(visitor, block.children, block.children);\n branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));\n }\n } else if (block.name === 'else') {\n const children = visitAll(visitor, block.children, block.children);\n branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));\n }\n }\n // The outer IfBlock should have a span that encapsulates all branches.\n const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;\n const ifBlockEndSourceSpan = branches.length > 0 ? branches[branches.length - 1].endSourceSpan : ast.endSourceSpan;\n let wholeSourceSpan = ast.sourceSpan;\n const lastBranch = branches[branches.length - 1];\n if (lastBranch !== undefined) {\n wholeSourceSpan = new ParseSourceSpan(ifBlockStartSourceSpan.start, lastBranch.sourceSpan.end);\n }\n return {\n node: new IfBlock(branches, wholeSourceSpan, ast.startSourceSpan, ifBlockEndSourceSpan, ast.nameSpan),\n errors\n };\n}\n/** Creates a `for` loop block from an HTML AST node. */\nfunction createForLoop(ast, connectedBlocks, visitor, bindingParser) {\n const errors = [];\n const params = parseForLoopParameters(ast, errors, bindingParser);\n let node = null;\n let empty = null;\n for (const block of connectedBlocks) {\n if (block.name === 'empty') {\n if (empty !== null) {\n errors.push(new ParseError(block.sourceSpan, '@for loop can only have one @empty block'));\n } else if (block.parameters.length > 0) {\n errors.push(new ParseError(block.sourceSpan, '@empty block cannot have parameters'));\n } else {\n empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);\n }\n } else {\n errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block \"${block.name}\"`));\n }\n }\n if (params !== null) {\n if (params.trackBy === null) {\n // TODO: We should not fail here, and instead try to produce some AST for the language\n // service.\n errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a \"track\" expression'));\n } else {\n // The `for` block has a main span that includes the `empty` branch. For only the span of the\n // main `for` body, use `mainSourceSpan`.\n const endSpan = empty?.endSourceSpan ?? ast.endSourceSpan;\n const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, endSpan?.end ?? ast.sourceSpan.end);\n node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);\n }\n }\n return {\n node,\n errors\n };\n}\n/** Creates a switch block from an HTML AST node. */\nfunction createSwitchBlock(ast, visitor, bindingParser) {\n const errors = validateSwitchBlock(ast);\n const primaryExpression = ast.parameters.length > 0 ? parseBlockParameterToBinding(ast.parameters[0], bindingParser) : bindingParser.parseBinding('', false, ast.sourceSpan, 0);\n const cases = [];\n const unknownBlocks = [];\n let defaultCase = null;\n // Here we assume that all the blocks are valid given that we validated them above.\n for (const node of ast.children) {\n if (!(node instanceof Block)) {\n continue;\n }\n if ((node.name !== 'case' || node.parameters.length === 0) && node.name !== 'default') {\n unknownBlocks.push(new UnknownBlock(node.name, node.sourceSpan, node.nameSpan));\n continue;\n }\n const expression = node.name === 'case' ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;\n const ast = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);\n if (expression === null) {\n defaultCase = ast;\n } else {\n cases.push(ast);\n }\n }\n // Ensure that the default case is last in the array.\n if (defaultCase !== null) {\n cases.push(defaultCase);\n }\n return {\n node: new SwitchBlock(primaryExpression, cases, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan),\n errors\n };\n}\n/** Parses the parameters of a `for` loop block. */\nfunction parseForLoopParameters(block, errors, bindingParser) {\n if (block.parameters.length === 0) {\n errors.push(new ParseError(block.startSourceSpan, '@for loop does not have an expression'));\n return null;\n }\n const [expressionParam, ...secondaryParams] = block.parameters;\n const match = stripOptionalParentheses(expressionParam, errors)?.match(FOR_LOOP_EXPRESSION_PATTERN);\n if (!match || match[2].trim().length === 0) {\n errors.push(new ParseError(expressionParam.sourceSpan, 'Cannot parse expression. @for loop expression must match the pattern \"<identifier> of <expression>\"'));\n return null;\n }\n const [, itemName, rawExpression] = match;\n if (ALLOWED_FOR_LOOP_LET_VARIABLES.has(itemName)) {\n errors.push(new ParseError(expressionParam.sourceSpan, `@for loop item name cannot be one of ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(', ')}.`));\n }\n // `expressionParam.expression` contains the variable declaration and the expression of the\n // for...of statement, i.e. 'user of users' The variable of a ForOfStatement is _only_ the \"const\n // user\" part and does not include \"of x\".\n const variableName = expressionParam.expression.split(' ')[0];\n const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));\n const result = {\n itemName: new Variable(itemName, '$implicit', variableSpan, variableSpan),\n trackBy: null,\n expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),\n context: Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES, variableName => {\n // Give ambiently-available context variables empty spans at the end of\n // the start of the `for` block, since they are not explicitly defined.\n const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);\n return new Variable(variableName, variableName, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);\n })\n };\n for (const param of secondaryParams) {\n const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);\n if (letMatch !== null) {\n const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);\n parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, itemName, result.context, errors);\n continue;\n }\n const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);\n if (trackMatch !== null) {\n if (result.trackBy !== null) {\n errors.push(new ParseError(param.sourceSpan, '@for loop can only have one \"track\" expression'));\n } else {\n const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);\n if (expression.ast instanceof EmptyExpr$1) {\n errors.push(new ParseError(block.startSourceSpan, '@for loop must have a \"track\" expression'));\n }\n const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy('track'.length));\n result.trackBy = {\n expression,\n keywordSpan\n };\n }\n continue;\n }\n errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater \"${param.expression}\"`));\n }\n return result;\n}\n/** Parses the `let` parameter of a `for` loop block. */\nfunction parseLetParameter(sourceSpan, expression, span, loopItemName, context, errors) {\n const parts = expression.split(',');\n let startSpan = span.start;\n for (const part of parts) {\n const expressionParts = part.split('=');\n const name = expressionParts.length === 2 ? expressionParts[0].trim() : '';\n const variableName = expressionParts.length === 2 ? expressionParts[1].trim() : '';\n if (name.length === 0 || variableName.length === 0) {\n errors.push(new ParseError(sourceSpan, `Invalid @for loop \"let\" parameter. Parameter should match the pattern \"<name> = <variable name>\"`));\n } else if (!ALLOWED_FOR_LOOP_LET_VARIABLES.has(variableName)) {\n errors.push(new ParseError(sourceSpan, `Unknown \"let\" parameter variable \"${variableName}\". The allowed variables are: ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(', ')}`));\n } else if (name === loopItemName) {\n errors.push(new ParseError(sourceSpan, `Invalid @for loop \"let\" parameter. Variable cannot be called \"${loopItemName}\"`));\n } else if (context.some(v => v.name === name)) {\n errors.push(new ParseError(sourceSpan, `Duplicate \"let\" parameter variable \"${variableName}\"`));\n } else {\n const [, keyLeadingWhitespace, keyName] = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN) ?? [];\n const keySpan = keyLeadingWhitespace !== undefined && expressionParts.length === 2 ? new ParseSourceSpan( /* strip leading spaces */\n startSpan.moveBy(keyLeadingWhitespace.length), /* advance to end of the variable name */\n startSpan.moveBy(keyLeadingWhitespace.length + keyName.length)) : span;\n let valueSpan = undefined;\n if (expressionParts.length === 2) {\n const [, valueLeadingWhitespace, implicit] = expressionParts[1].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN) ?? [];\n valueSpan = valueLeadingWhitespace !== undefined ? new ParseSourceSpan(startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length), startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length + implicit.length)) : undefined;\n }\n const sourceSpan = new ParseSourceSpan(keySpan.start, valueSpan?.end ?? keySpan.end);\n context.push(new Variable(name, variableName, sourceSpan, keySpan, valueSpan));\n }\n startSpan = startSpan.moveBy(part.length + 1 /* add 1 to move past the comma */);\n }\n}\n/**\n * Checks that the shape of the blocks connected to an\n * `@if` block is correct. Returns an array of errors.\n */\nfunction validateIfConnectedBlocks(connectedBlocks) {\n const errors = [];\n let hasElse = false;\n for (let i = 0; i < connectedBlocks.length; i++) {\n const block = connectedBlocks[i];\n if (block.name === 'else') {\n if (hasElse) {\n errors.push(new ParseError(block.startSourceSpan, 'Conditional can only have one @else block'));\n } else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {\n errors.push(new ParseError(block.startSourceSpan, '@else block must be last inside the conditional'));\n } else if (block.parameters.length > 0) {\n errors.push(new ParseError(block.startSourceSpan, '@else block cannot have parameters'));\n }\n hasElse = true;\n } else if (!ELSE_IF_PATTERN.test(block.name)) {\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));\n }\n }\n return errors;\n}\n/** Checks that the shape of a `switch` block is valid. Returns an array of errors. */\nfunction validateSwitchBlock(ast) {\n const errors = [];\n let hasDefault = false;\n if (ast.parameters.length !== 1) {\n errors.push(new ParseError(ast.startSourceSpan, '@switch block must have exactly one parameter'));\n return errors;\n }\n for (const node of ast.children) {\n // Skip over comments and empty text nodes inside the switch block.\n // Empty text nodes can be used for formatting while comments don't affect the runtime.\n if (node instanceof Comment || node instanceof Text && node.value.trim().length === 0) {\n continue;\n }\n if (!(node instanceof Block) || node.name !== 'case' && node.name !== 'default') {\n errors.push(new ParseError(node.sourceSpan, '@switch block can only contain @case and @default blocks'));\n continue;\n }\n if (node.name === 'default') {\n if (hasDefault) {\n errors.push(new ParseError(node.startSourceSpan, '@switch block can only have one @default block'));\n } else if (node.parameters.length > 0) {\n errors.push(new ParseError(node.startSourceSpan, '@default block cannot have parameters'));\n }\n hasDefault = true;\n } else if (node.name === 'case' && node.parameters.length !== 1) {\n errors.push(new ParseError(node.startSourceSpan, '@case block must have exactly one parameter'));\n }\n }\n return errors;\n}\n/**\n * Parses a block parameter into a binding AST.\n * @param ast Block parameter that should be parsed.\n * @param bindingParser Parser that the expression should be parsed with.\n * @param part Specific part of the expression that should be parsed.\n */\nfunction parseBlockParameterToBinding(ast, bindingParser, part) {\n let start;\n let end;\n if (typeof part === 'string') {\n // Note: `lastIndexOf` here should be enough to know the start index of the expression,\n // because we know that it'll be at the end of the param. Ideally we could use the `d`\n // flag when matching via regex and get the index from `match.indices`, but it's unclear\n // if we can use it yet since it's a relatively new feature. See:\n // https://github.com/tc39/proposal-regexp-match-indices\n start = Math.max(0, ast.expression.lastIndexOf(part));\n end = start + part.length;\n } else {\n start = 0;\n end = ast.expression.length;\n }\n return bindingParser.parseBinding(ast.expression.slice(start, end), false, ast.sourceSpan, ast.sourceSpan.start.offset + start);\n}\n/** Parses the parameter of a conditional block (`if` or `else if`). */\nfunction parseConditionalBlockParameters(block, errors, bindingParser) {\n if (block.parameters.length === 0) {\n errors.push(new ParseError(block.startSourceSpan, 'Conditional block does not have an expression'));\n return null;\n }\n const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);\n let expressionAlias = null;\n // Start from 1 since we processed the first parameter already.\n for (let i = 1; i < block.parameters.length; i++) {\n const param = block.parameters[i];\n const aliasMatch = param.expression.match(CONDITIONAL_ALIAS_PATTERN);\n // For now conditionals can only have an `as` parameter.\n // We may want to rework this later if we add more.\n if (aliasMatch === null) {\n errors.push(new ParseError(param.sourceSpan, `Unrecognized conditional paramater \"${param.expression}\"`));\n } else if (block.name !== 'if') {\n errors.push(new ParseError(param.sourceSpan, '\"as\" expression is only allowed on the primary @if block'));\n } else if (expressionAlias !== null) {\n errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one \"as\" expression'));\n } else {\n const name = aliasMatch[2].trim();\n const variableStart = param.sourceSpan.start.moveBy(aliasMatch[1].length);\n const variableSpan = new ParseSourceSpan(variableStart, variableStart.moveBy(name.length));\n expressionAlias = new Variable(name, name, variableSpan, variableSpan);\n }\n }\n return {\n expression,\n expressionAlias\n };\n}\n/** Strips optional parentheses around from a control from expression parameter. */\nfunction stripOptionalParentheses(param, errors) {\n const expression = param.expression;\n const spaceRegex = /^\\s$/;\n let openParens = 0;\n let start = 0;\n let end = expression.length - 1;\n for (let i = 0; i < expression.length; i++) {\n const char = expression[i];\n if (char === '(') {\n start = i + 1;\n openParens++;\n } else if (spaceRegex.test(char)) {\n continue;\n } else {\n break;\n }\n }\n if (openParens === 0) {\n return expression;\n }\n for (let i = expression.length - 1; i > -1; i--) {\n const char = expression[i];\n if (char === ')') {\n end = i;\n openParens--;\n if (openParens === 0) {\n break;\n }\n } else if (spaceRegex.test(char)) {\n continue;\n } else {\n break;\n }\n }\n if (openParens !== 0) {\n errors.push(new ParseError(param.sourceSpan, 'Unclosed parentheses in expression'));\n return null;\n }\n return expression.slice(start, end);\n}\n\n/** Pattern for a timing value in a trigger. */\nconst TIME_PATTERN = /^\\d+\\.?\\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],\n// Object literals\n[$LBRACKET, $RBRACKET],\n// Array literals\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({\n expression,\n sourceSpan\n}, bindingParser, triggers, errors) {\n const whenIndex = expression.indexOf('when');\n const whenSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(whenIndex), sourceSpan.start.moveBy(whenIndex + 'when'.length));\n const prefetchSpan = getPrefetchSpan(expression, sourceSpan);\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 } else {\n const start = getTriggerParametersStart(expression, whenIndex + 1);\n const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);\n trackTrigger('when', triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan, prefetchSpan, whenSourceSpan));\n }\n}\n/** Parses an `on` trigger */\nfunction parseOnTrigger({\n expression,\n sourceSpan\n}, triggers, errors, placeholder) {\n const onIndex = expression.indexOf('on');\n const onSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(onIndex), sourceSpan.start.moveBy(onIndex + 'on'.length));\n const prefetchSpan = getPrefetchSpan(expression, sourceSpan);\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 } else {\n const start = getTriggerParametersStart(expression, onIndex + 1);\n const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, placeholder, prefetchSpan, onSourceSpan);\n parser.parse();\n }\n}\nfunction getPrefetchSpan(expression, sourceSpan) {\n if (!expression.startsWith('prefetch')) {\n return null;\n }\n return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy('prefetch'.length));\n}\nclass OnTriggerParser {\n constructor(expression, start, span, triggers, errors, placeholder, prefetchSpan, onSourceSpan) {\n this.expression = expression;\n this.start = start;\n this.span = span;\n this.triggers = triggers;\n this.errors = errors;\n this.placeholder = placeholder;\n this.prefetchSpan = prefetchSpan;\n this.onSourceSpan = onSourceSpan;\n this.index = 0;\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 }\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 triggerNameStartSpan = this.span.start.moveBy(this.start + identifier.index - this.tokens[0].index);\n const nameSpan = new ParseSourceSpan(triggerNameStartSpan, triggerNameStartSpan.moveBy(identifier.strValue.length));\n const endSpan = triggerNameStartSpan.moveBy(this.token().end - identifier.index);\n // Put the prefetch and on spans with the first trigger\n // This should maybe be refactored to have something like an outer OnGroup AST\n // Since triggers can be grouped with commas \"on hover(x), interaction(y)\"\n const isFirstTrigger = identifier.index === 0;\n const onSourceSpan = isFirstTrigger ? this.onSourceSpan : null;\n const prefetchSourceSpan = isFirstTrigger ? this.prefetchSpan : null;\n const sourceSpan = new ParseSourceSpan(isFirstTrigger ? this.span.start : triggerNameStartSpan, endSpan);\n try {\n switch (identifier.toString()) {\n case OnTriggerType.IDLE:\n this.trackTrigger('idle', createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSourceSpan, onSourceSpan));\n break;\n case OnTriggerType.TIMER:\n this.trackTrigger('timer', createTimerTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));\n break;\n case OnTriggerType.INTERACTION:\n this.trackTrigger('interaction', createInteractionTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\n break;\n case OnTriggerType.IMMEDIATE:\n this.trackTrigger('immediate', createImmediateTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));\n break;\n case OnTriggerType.HOVER:\n this.trackTrigger('hover', createHoverTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\n break;\n case OnTriggerType.VIEWPORT:\n this.trackTrigger('viewport', createViewportTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\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 trackTrigger(name, trigger) {\n trackTrigger(name, this.triggers, this.errors, trigger);\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}\n/** Adds a trigger to a map of triggers. */\nfunction trackTrigger(name, allTriggers, errors, trigger) {\n if (allTriggers[name]) {\n errors.push(new ParseError(trigger.sourceSpan, `Duplicate \"${name}\" trigger is not allowed`));\n } else {\n allTriggers[name] = trigger;\n }\n}\nfunction createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IDLE}\" trigger cannot have parameters`);\n }\n return new IdleDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\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, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createImmediateTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IMMEDIATE}\" trigger cannot have parameters`);\n }\n return new ImmediateDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createHoverTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.HOVER, parameters, placeholder);\n return new HoverDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createInteractionTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.INTERACTION, parameters, placeholder);\n return new InteractionDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createViewportTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.VIEWPORT, parameters, placeholder);\n return new ViewportDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction validateReferenceBasedTrigger(type, parameters, placeholder) {\n if (parameters.length > 1) {\n throw new Error(`\"${type}\" trigger can only have zero or one parameters`);\n }\n if (parameters.length === 0) {\n if (placeholder === null) {\n throw new Error(`\"${type}\" trigger with no parameters can only be placed on an @defer that has a @placeholder block`);\n }\n if (placeholder.children.length !== 1 || !(placeholder.children[0] instanceof Element$1)) {\n throw new Error(`\"${type}\" trigger with no parameters can only be placed on an @defer that has a ` + `@placeholder block with exactly one root element node`);\n }\n }\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 parseFloat(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/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to a `defer` block.\n */\nfunction isConnectedDeferLoopBlock(name) {\n return name === 'placeholder' || name === 'loading' || name === 'error';\n}\n/** Creates a deferred block from an HTML AST node. */\nfunction createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {\n const errors = [];\n const {\n placeholder,\n loading,\n error\n } = parseConnectedBlocks(connectedBlocks, errors, visitor);\n const {\n triggers,\n prefetchTriggers\n } = parsePrimaryTriggers(ast.parameters, bindingParser, errors, placeholder);\n // The `defer` block has a main span encompassing all of the connected branches as well.\n let lastEndSourceSpan = ast.endSourceSpan;\n let endOfLastSourceSpan = ast.sourceSpan.end;\n if (connectedBlocks.length > 0) {\n const lastConnectedBlock = connectedBlocks[connectedBlocks.length - 1];\n lastEndSourceSpan = lastConnectedBlock.endSourceSpan;\n endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;\n }\n const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);\n const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);\n return {\n node,\n errors\n };\n}\nfunction parseConnectedBlocks(connectedBlocks, errors, visitor) {\n let placeholder = null;\n let loading = null;\n let error = null;\n for (const block of connectedBlocks) {\n try {\n if (!isConnectedDeferLoopBlock(block.name)) {\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized block \"@${block.name}\"`));\n break;\n }\n switch (block.name) {\n case 'placeholder':\n if (placeholder !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @placeholder block`));\n } else {\n placeholder = parsePlaceholderBlock(block, visitor);\n }\n break;\n case 'loading':\n if (loading !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @loading block`));\n } else {\n loading = parseLoadingBlock(block, visitor);\n }\n break;\n case 'error':\n if (error !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @error block`));\n } else {\n error = parseErrorBlock(block, visitor);\n }\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 if (minimumTime != null) {\n throw new Error(`@placeholder block can only have one \"minimum\" parameter`);\n }\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 @placeholder block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\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 if (afterTime != null) {\n throw new Error(`@loading block can only have one \"after\" parameter`);\n }\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 if (minimumTime != null) {\n throw new Error(`@loading block can only have one \"minimum\" parameter`);\n }\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 @loading block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\n}\nfunction parseErrorBlock(ast, visitor) {\n if (ast.parameters.length > 0) {\n throw new Error(`@error block cannot have parameters`);\n }\n return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\n}\nfunction parsePrimaryTriggers(params, bindingParser, errors, placeholder) {\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 parseWhenTrigger(param, bindingParser, triggers, errors);\n } else if (ON_PARAMETER_PATTERN.test(param.expression)) {\n parseOnTrigger(param, triggers, errors, placeholder);\n } else if (PREFETCH_WHEN_PATTERN.test(param.expression)) {\n parseWhenTrigger(param, bindingParser, prefetchTriggers, errors);\n } else if (PREFETCH_ON_PATTERN.test(param.expression)) {\n parseOnTrigger(param, prefetchTriggers, errors, placeholder);\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, 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 * Keeps track of the nodes that have been processed already when previous nodes were visited.\n * These are typically blocks connected to other blocks or text nodes between connected blocks.\n */\n this.processedNodes = new Set();\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 blocks 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, element.children);\n }\n let parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n const selector = preparsedElement.selectAttr;\n const attrs = element.attrs.map(attr => this.visitAttribute(attr));\n parsedElement = new Content(selector, attrs, children, 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, [\n /* no template attributes */\n ], 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], [\n /* no references */\n ], 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.processedNodes.has(text) ? null : 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 visitLetDeclaration(decl, context) {\n const value = this.bindingParser.parseBinding(decl.value, false, decl.valueSpan, decl.valueSpan.start.offset);\n if (value.errors.length === 0 && value.ast instanceof EmptyExpr$1) {\n this.reportError('@let declaration value cannot be empty', decl.valueSpan);\n }\n return new LetDeclaration$1(decl.name, value, decl.sourceSpan, decl.nameSpan, decl.valueSpan);\n }\n visitBlockParameter() {\n return null;\n }\n visitBlock(block, context) {\n const index = Array.isArray(context) ? context.indexOf(block) : -1;\n if (index === -1) {\n throw new Error('Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context');\n }\n // Connected blocks may have been processed as a part of the previous block.\n if (this.processedNodes.has(block)) {\n return null;\n }\n let result = null;\n switch (block.name) {\n case 'defer':\n result = createDeferredBlock(block, this.findConnectedBlocks(index, context, isConnectedDeferLoopBlock), this, this.bindingParser);\n break;\n case 'switch':\n result = createSwitchBlock(block, this, this.bindingParser);\n break;\n case 'for':\n result = createForLoop(block, this.findConnectedBlocks(index, context, isConnectedForLoopBlock), this, this.bindingParser);\n break;\n case 'if':\n result = createIfBlock(block, this.findConnectedBlocks(index, context, isConnectedIfLoopBlock), this, this.bindingParser);\n break;\n default:\n let errorMessage;\n if (isConnectedDeferLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @defer block.`;\n this.processedNodes.add(block);\n } else if (isConnectedForLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @for block.`;\n this.processedNodes.add(block);\n } else if (isConnectedIfLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @if or @else if block.`;\n this.processedNodes.add(block);\n } else {\n errorMessage = `Unrecognized block @${block.name}.`;\n }\n result = {\n node: new UnknownBlock(block.name, block.sourceSpan, block.nameSpan),\n errors: [new ParseError(block.sourceSpan, errorMessage)]\n };\n break;\n }\n this.errors.push(...result.errors);\n return result.node;\n }\n findConnectedBlocks(primaryBlockIndex, siblings, predicate) {\n const relatedBlocks = [];\n for (let i = primaryBlockIndex + 1; i < siblings.length; i++) {\n const node = siblings[i];\n // Skip over comments.\n if (node instanceof Comment) {\n continue;\n }\n // Ignore empty text nodes between blocks.\n if (node instanceof Text && node.value.trim().length === 0) {\n // Add the text node to the processed nodes since we don't want\n // it to be generated between the connected nodes.\n this.processedNodes.add(node);\n continue;\n }\n // Stop searching as soon as we hit a non-block node or a block that is unrelated.\n if (!(node instanceof Block) || !predicate(node.name)) {\n break;\n }\n relatedBlocks.push(node);\n this.processedNodes.add(node);\n }\n return relatedBlocks;\n }\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, 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, true, 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, true, 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, 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, /* 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 visitBlock(block, context) {\n const nodes = [\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 if (block.endSourceSpan !== null) {\n nodes.push(new Text$3(block.endSourceSpan.toString(), block.endSourceSpan));\n }\n return nodes;\n }\n visitBlockParameter(parameter, context) {\n return null;\n }\n visitLetDeclaration(decl, context) {\n return new Text$3(`@let ${decl.name} = ${decl.value};`, decl.sourceSpan);\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 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}\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\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 allowInvalidAssignmentEvents\n } = options;\n const bindingParser = makeBindingParser(interpolationConfig, allowInvalidAssignmentEvents);\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.enableBlockSyntax ?? true,\n tokenizeLet: options.enableLetSyntax ?? true\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 // We need to use the same `retainEmptyTokens` value for both parses to avoid\n // causing a mismatch when reusing source spans, even if the\n // `preserveSignificantWhitespace` behavior is different between the two\n // parses.\n const retainEmptyTokens = !(options.preserveSignificantWhitespace ?? true);\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, /* containerBlocks */undefined, options.preserveSignificantWhitespace, retainEmptyTokens);\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 // Always preserve significant whitespace here because this is used to generate the `goog.getMsg`\n // and `$localize` calls which should retain significant whitespace in order to render the\n // correct output. We let this diverge from the message IDs generated earlier which might not\n // have preserved significant whitespace.\n //\n // This should use `visitAllWithSiblings` to set `WhitespaceVisitor` context correctly, however\n // there is an existing bug where significant whitespace is not properly retained in the JS\n // output of leading/trailing whitespace for ICU messages due to the existing lack of context\\\n // in `WhitespaceVisitor`. Using `visitAllWithSiblings` here would fix that bug and retain the\n // whitespace, however it would also change the runtime representation which we don't want to do\n // right now.\n rootNodes = visitAll(new WhitespaceVisitor( /* preserveSignificantWhitespace */true, /* originalNodeMap */undefined, /* requireContext */false), 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, /* enableI18nLegacyMessageIdFormat */undefined, /* containerBlocks */undefined, /* preserveSignificantWhitespace */true, retainEmptyTokens), 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 });\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, allowInvalidAssignmentEvents = false) {\n return new BindingParser(new Parser(new Lexer()), interpolationConfig, elementRegistry, [], allowInvalidAssignmentEvents);\n}\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 // Note: host directives feature needs to be inserted before the\n // inheritance feature to ensure the correct execution order.\n if (meta.hostDirectives?.length) {\n features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));\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 (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 let allDeferrableDepsFn = null;\n if (meta.defer.mode === 1 /* DeferBlockDepsEmitMode.PerComponent */ && meta.defer.dependenciesFn !== null) {\n const fnName = `${templateTypeName}_DeferFn`;\n constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, undefined, StmtModifier.Final));\n allDeferrableDepsFn = variable(fnName);\n }\n // First the template is ingested into IR:\n const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn);\n // Then the IR is transformed to prepare it for cod egeneration.\n transform(tpl, CompilationJobKind.Tmpl);\n // Finally we emit the template function:\n const templateFn = emitTemplateFn(tpl, constantPool);\n if (tpl.contentSelectors !== null) {\n definitionMap.set('ngContentSelectors', tpl.contentSelectors);\n }\n definitionMap.set('decls', literal(tpl.root.decls));\n definitionMap.set('vars', literal(tpl.root.vars));\n if (tpl.consts.length > 0) {\n if (tpl.constsInitializers.length > 0) {\n definitionMap.set('consts', arrowFn([], [...tpl.constsInitializers, new ReturnStatement(literalArr(tpl.consts))]));\n } else {\n definitionMap.set('consts', literalArr(tpl.consts));\n }\n }\n definitionMap.set('template', templateFn);\n if (meta.declarationListEmitMode !== 3 /* DeclarationListEmitMode.RuntimeResolved */ && meta.declarations.length > 0) {\n definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));\n } else if (meta.declarationListEmitMode === 3 /* DeclarationListEmitMode.RuntimeResolved */) {\n const args = [meta.type.value];\n if (meta.rawImports) {\n args.push(meta.rawImports);\n }\n definitionMap.set('dependencies', importExpr(Identifiers.getComponentDepsFactory).callFn(args));\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 // Setting change detection flag\n if (meta.changeDetection !== null) {\n if (typeof meta.changeDetection === 'number' && meta.changeDetection !== ChangeDetectionStrategy.Default) {\n // changeDetection is resolved during analysis. Only set it if not the default.\n definitionMap.set('changeDetection', literal(meta.changeDetection));\n } else if (typeof meta.changeDetection === 'object') {\n // changeDetection is not resolved during analysis (e.g., we are in local compilation mode).\n // So place it as is.\n definitionMap.set('changeDetection', meta.changeDetection);\n }\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 arrowFn([], 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 arrowFn([], resolvedList);\n case 3 /* DeclarationListEmitMode.RuntimeResolved */:\n throw new Error(`Unsupported with an array of pre-resolved dependencies`);\n }\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 const values = [{\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 // TODO(legacy-partial-output-inputs): Consider always emitting this information,\n // or leaving it as is.\n if (value.isSignal) {\n values.push({\n key: 'isSignal',\n value: literal(value.isSignal),\n quoted: true\n });\n }\n return {\n key,\n value: literalMap(values),\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// 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 // The parser for host bindings treats class and style attributes specially -- they are\n // extracted into these separate fields. This is not the case for templates, so the compiler can\n // actually already handle these special attributes internally. Therefore, we just drop them\n // into the attributes map.\n if (hostBindingsMetadata.specialAttributes.styleAttr) {\n hostBindingsMetadata.attributes['style'] = literal(hostBindingsMetadata.specialAttributes.styleAttr);\n }\n if (hostBindingsMetadata.specialAttributes.classAttr) {\n hostBindingsMetadata.attributes['class'] = literal(hostBindingsMetadata.specialAttributes.classAttr);\n }\n const hostJob = ingestHostBinding({\n componentName: name,\n componentSelector: selector,\n properties: bindings,\n events: eventBindings,\n attributes: hostBindingsMetadata.attributes\n }, bindingParser, constantPool);\n transform(hostJob, CompilationJobKind.Host);\n definitionMap.set('hostAttrs', hostJob.root.attributes);\n const varCount = hostJob.root.vars;\n if (varCount !== null && varCount > 0) {\n definitionMap.set('hostVars', literal(varCount));\n }\n return emitHostBindingFunction(hostJob);\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}\n/**\n * Encapsulates a CSS stylesheet with emulated view encapsulation.\n * This allows a stylesheet to be used with an Angular component that\n * is using the `ViewEncapsulation.Emulated` mode.\n *\n * @param style The content of a CSS stylesheet.\n * @returns The encapsulated content for the style.\n */\nfunction encapsulateStyle(style) {\n const shadowCss = new ShadowCss();\n return shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR);\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 * Compiles the dependency resolver function for a defer block.\n */\nfunction compileDeferResolverFunction(meta) {\n const depExpressions = [];\n if (meta.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n for (const dep of meta.dependencies) {\n if (dep.isDeferrable) {\n // Callback function, e.g. `m () => m.MyCmp;`.\n const innerFn = arrowFn(\n // Default imports are always accessed through the `default` property.\n [new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(dep.isDefaultImport ? 'default' : dep.symbolName));\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = new DynamicImportExpr(dep.importPath).prop('then').callFn([innerFn]);\n depExpressions.push(importExpr);\n } else {\n // Non-deferrable symbol, just use a reference to the type. Note that it's important to\n // go through `typeReference`, rather than `symbolName` in order to preserve the\n // original reference within the source file.\n depExpressions.push(dep.typeReference);\n }\n }\n } else {\n for (const {\n symbolName,\n importPath,\n isDefaultImport\n } of meta.dependencies) {\n // Callback function, e.g. `m () => m.MyCmp;`.\n const innerFn = arrowFn([new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(isDefaultImport ? 'default' : symbolName));\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = new DynamicImportExpr(importPath).prop('then').callFn([innerFn]);\n depExpressions.push(importExpr);\n }\n }\n return arrowFn([], literalArr(depExpressions));\n}\n\n/**\n * Computes a difference between full list (first argument) and\n * list of items that should be excluded from the full list (second\n * argument).\n */\nfunction diff(fullList, itemsToExclude) {\n const exclude = new Set(itemsToExclude);\n return fullList.filter(item => !exclude.has(item));\n}\n/**\n * Given a template string and a set of available directive selectors,\n * computes a list of matching selectors and splits them into 2 buckets:\n * (1) eagerly used in a template and (2) directives used only in defer\n * blocks. Similarly, returns 2 lists of pipes (eager and deferrable).\n *\n * Note: deferrable directives selectors and pipes names used in `@defer`\n * blocks are **candidates** and API caller should make sure that:\n *\n * * A Component where a given template is defined is standalone\n * * Underlying dependency classes are also standalone\n * * Dependency class symbols are not eagerly used in a TS file\n * where a host component (that owns the template) is located\n */\nfunction findMatchingDirectivesAndPipes(template, directiveSelectors) {\n const matcher = new SelectorMatcher();\n for (const selector of directiveSelectors) {\n // Create a fake directive instance to account for the logic inside\n // of the `R3TargetBinder` class (which invokes the `hasBindingPropertyName`\n // function internally).\n const fakeDirective = {\n selector,\n exportAs: null,\n inputs: {\n hasBindingPropertyName() {\n return false;\n }\n },\n outputs: {\n hasBindingPropertyName() {\n return false;\n }\n }\n };\n matcher.addSelectables(CssSelector.parse(selector), [fakeDirective]);\n }\n const parsedTemplate = parseTemplate(template, '' /* templateUrl */);\n const binder = new R3TargetBinder(matcher);\n const bound = binder.bind({\n template: parsedTemplate.nodes\n });\n const eagerDirectiveSelectors = bound.getEagerlyUsedDirectives().map(dir => dir.selector);\n const allMatchedDirectiveSelectors = bound.getUsedDirectives().map(dir => dir.selector);\n const eagerPipes = bound.getEagerlyUsedPipes();\n return {\n directives: {\n regular: eagerDirectiveSelectors,\n deferCandidates: diff(allMatchedDirectiveSelectors, eagerDirectiveSelectors)\n },\n pipes: {\n regular: eagerPipes,\n deferCandidates: diff(bound.getUsedPipes(), eagerPipes)\n }\n };\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 scopedNodeEntities = extractScopedNodeEntities(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, scopedNodeEntities, 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, rootNode) {\n this.parentScope = parentScope;\n this.rootNode = rootNode;\n /**\n * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n */\n this.namedEntities = new Map();\n /**\n * Set of elements that belong to this scope.\n */\n this.elementsInScope = new Set();\n /**\n * Child `Scope`s for immediately nested `ScopedNode`s.\n */\n this.childScopes = new Map();\n this.isDeferred = parentScope !== null && parentScope.isDeferred ? true : rootNode instanceof DeferredBlock;\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 scoped node and populate the `Scope`.\n */\n ingest(nodeOrNodes) {\n if (nodeOrNodes instanceof Template) {\n // Variables on an <ng-template> are defined in the inner scope.\n nodeOrNodes.variables.forEach(node => this.visitVariable(node));\n // Process the nodes of the template.\n nodeOrNodes.children.forEach(node => node.visit(this));\n } else if (nodeOrNodes instanceof IfBlockBranch) {\n if (nodeOrNodes.expressionAlias !== null) {\n this.visitVariable(nodeOrNodes.expressionAlias);\n }\n nodeOrNodes.children.forEach(node => node.visit(this));\n } else if (nodeOrNodes instanceof ForLoopBlock) {\n this.visitVariable(nodeOrNodes.item);\n nodeOrNodes.contextVariables.forEach(v => this.visitVariable(v));\n nodeOrNodes.children.forEach(node => node.visit(this));\n } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {\n nodeOrNodes.children.forEach(node => node.visit(this));\n } else {\n // No overarching `Template` instance, so process the nodes directly.\n nodeOrNodes.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 this.elementsInScope.add(element);\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 this.ingestScopedNode(template);\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 this.ingestScopedNode(deferred);\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockError(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockLoading(block) {\n this.ingestScopedNode(block);\n }\n visitSwitchBlock(block) {\n block.cases.forEach(node => node.visit(this));\n }\n visitSwitchBlockCase(block) {\n this.ingestScopedNode(block);\n }\n visitForLoopBlock(block) {\n this.ingestScopedNode(block);\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n this.ingestScopedNode(block);\n }\n visitIfBlock(block) {\n block.branches.forEach(node => node.visit(this));\n }\n visitIfBlockBranch(block) {\n this.ingestScopedNode(block);\n }\n visitContent(content) {\n this.ingestScopedNode(content);\n }\n visitLetDeclaration(decl) {\n this.maybeDeclare(decl);\n }\n // Unused visitors.\n visitBoundAttribute(attr) {}\n visitBoundEvent(event) {}\n visitBoundText(text) {}\n visitText(text) {}\n visitTextAttribute(attr) {}\n visitIcu(icu) {}\n visitDeferredTrigger(trigger) {}\n visitUnknownBlock(block) {}\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 `ScopedNode`.\n *\n * This should always be defined.\n */\n getChildScope(node) {\n const res = this.childScopes.get(node);\n if (res === undefined) {\n throw new Error(`Assertion error: child scope for ${node} not found`);\n }\n return res;\n }\n ingestScopedNode(node) {\n const scope = new Scope(this, node);\n scope.ingest(node);\n this.childScopes.set(node, scope);\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);\n }\n visitTemplate(template) {\n this.visitElementOrTemplate(template);\n }\n visitElementOrTemplate(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 = createCssSelectorFromNode(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 const wasInDeferBlock = this.isInDeferBlock;\n this.isInDeferBlock = true;\n deferred.children.forEach(child => child.visit(this));\n this.isInDeferBlock = wasInDeferBlock;\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 visitSwitchBlock(block) {\n block.cases.forEach(node => node.visit(this));\n }\n visitSwitchBlockCase(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitForLoopBlock(block) {\n block.item.visit(this);\n block.contextVariables.forEach(v => v.visit(this));\n block.children.forEach(node => node.visit(this));\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n block.children.forEach(node => node.visit(this));\n }\n visitIfBlock(block) {\n block.branches.forEach(node => node.visit(this));\n }\n visitIfBlockBranch(block) {\n block.expressionAlias?.visit(this);\n block.children.forEach(node => node.visit(this));\n }\n visitContent(content) {\n content.children.forEach(child => child.visit(this));\n }\n // Unused visitors.\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 visitUnknownBlock(block) {}\n visitLetDeclaration(decl) {}\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, rootNode, 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.rootNode = rootNode;\n this.level = level;\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 = [];\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(nodeOrNodes) {\n if (nodeOrNodes 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 nodeOrNodes.variables.forEach(this.visitNode);\n nodeOrNodes.children.forEach(this.visitNode);\n // Set the nesting level.\n this.nestingLevel.set(nodeOrNodes, this.level);\n } else if (nodeOrNodes instanceof IfBlockBranch) {\n if (nodeOrNodes.expressionAlias !== null) {\n this.visitNode(nodeOrNodes.expressionAlias);\n }\n nodeOrNodes.children.forEach(this.visitNode);\n this.nestingLevel.set(nodeOrNodes, this.level);\n } else if (nodeOrNodes instanceof ForLoopBlock) {\n this.visitNode(nodeOrNodes.item);\n nodeOrNodes.contextVariables.forEach(v => this.visitNode(v));\n nodeOrNodes.trackBy.visit(this);\n nodeOrNodes.children.forEach(this.visitNode);\n this.nestingLevel.set(nodeOrNodes, this.level);\n } else if (nodeOrNodes instanceof DeferredBlock) {\n if (this.scope.rootNode !== nodeOrNodes) {\n throw new Error(`Assertion error: resolved incorrect scope for deferred block ${nodeOrNodes}`);\n }\n this.deferBlocks.push([nodeOrNodes, this.scope]);\n nodeOrNodes.children.forEach(node => node.visit(this));\n this.nestingLevel.set(nodeOrNodes, this.level);\n } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {\n nodeOrNodes.children.forEach(node => node.visit(this));\n this.nestingLevel.set(nodeOrNodes, this.level);\n } else {\n // Visit each node from the top-level template.\n nodeOrNodes.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 element.references.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 template.references.forEach(this.visitNode);\n // Next, recurse into the template.\n this.ingestScopedNode(template);\n }\n visitVariable(variable) {\n // Register the `Variable` as a symbol in the current `Template`.\n if (this.rootNode !== null) {\n this.symbols.set(variable, this.rootNode);\n }\n }\n visitReference(reference) {\n // Register the `Reference` as a symbol in the current `Template`.\n if (this.rootNode !== null) {\n this.symbols.set(reference, this.rootNode);\n }\n }\n // Unused template visitors\n visitText(text) {}\n visitTextAttribute(attribute) {}\n visitUnknownBlock(block) {}\n visitDeferredTrigger() {}\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.ingestScopedNode(deferred);\n deferred.triggers.when?.value.visit(this);\n deferred.prefetchTriggers.when?.value.visit(this);\n deferred.placeholder && this.visitNode(deferred.placeholder);\n deferred.loading && this.visitNode(deferred.loading);\n deferred.error && this.visitNode(deferred.error);\n }\n visitDeferredBlockPlaceholder(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockError(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockLoading(block) {\n this.ingestScopedNode(block);\n }\n visitSwitchBlock(block) {\n block.expression.visit(this);\n block.cases.forEach(this.visitNode);\n }\n visitSwitchBlockCase(block) {\n block.expression?.visit(this);\n this.ingestScopedNode(block);\n }\n visitForLoopBlock(block) {\n block.expression.visit(this);\n this.ingestScopedNode(block);\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n this.ingestScopedNode(block);\n }\n visitIfBlock(block) {\n block.branches.forEach(node => node.visit(this));\n }\n visitIfBlockBranch(block) {\n block.expression?.visit(this);\n this.ingestScopedNode(block);\n }\n visitContent(content) {\n this.ingestScopedNode(content);\n }\n visitBoundText(text) {\n text.value.visit(this);\n }\n visitLetDeclaration(decl) {\n decl.value.visit(this);\n if (this.rootNode !== null) {\n this.symbols.set(decl, this.rootNode);\n }\n }\n visitPipe(ast, context) {\n this.usedPipes.add(ast.name);\n if (!this.scope.isDeferred) {\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(ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }\n visitSafePropertyRead(ast, context) {\n this.maybeMap(ast, ast.name);\n return super.visitSafePropertyRead(ast, context);\n }\n visitPropertyWrite(ast, context) {\n this.maybeMap(ast, ast.name);\n return super.visitPropertyWrite(ast, context);\n }\n ingestScopedNode(node) {\n const childScope = this.scope.getChildScope(node);\n const binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);\n binder.ingest(node);\n }\n maybeMap(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 const target = this.scope.lookup(name);\n // It's not allowed to read template entities via `this`, however it previously worked by\n // accident (see #55115). Since `@let` declarations are new, we can fix it from the beginning,\n // whereas pre-existing template entities will be fixed in #55115.\n if (target instanceof LetDeclaration$1 && ast.receiver instanceof ThisReceiver) {\n return;\n }\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, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {\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.scopedNodeEntities = scopedNodeEntities;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferredBlocks = rawDeferred.map(current => current[0]);\n this.deferredScopes = new Map(rawDeferred);\n }\n getEntitiesInScope(node) {\n return this.scopedNodeEntities.get(node) ?? 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 getDefinitionNodeOfSymbol(symbol) {\n return this.symbols.get(symbol) || null;\n }\n getNestingLevel(node) {\n return this.nestingLevel.get(node) || 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 this.deferredBlocks;\n }\n getDeferredTriggerTarget(block, trigger) {\n // Only triggers that refer to DOM nodes can be resolved.\n if (!(trigger instanceof InteractionDeferredTrigger) && !(trigger instanceof ViewportDeferredTrigger) && !(trigger instanceof HoverDeferredTrigger)) {\n return null;\n }\n const name = trigger.reference;\n if (name === null) {\n let trigger = null;\n if (block.placeholder !== null) {\n for (const child of block.placeholder.children) {\n // Skip over comment nodes. Currently by default the template parser doesn't capture\n // comments, but we have a safeguard here just in case since it can be enabled.\n if (child instanceof Comment$1) {\n continue;\n }\n // We can only infer the trigger if there's one root element node. Any other\n // nodes at the root make it so that we can't infer the trigger anymore.\n if (trigger !== null) {\n return null;\n }\n if (child instanceof Element$1) {\n trigger = child;\n }\n }\n }\n return trigger;\n }\n const outsideRef = this.findEntityInScope(block, name);\n // First try to resolve the target in the scope of the main deferred block. Note that we\n // skip triggers defined inside the main block itself, because they might not exist yet.\n if (outsideRef instanceof Reference && this.getDefinitionNodeOfSymbol(outsideRef) !== block) {\n const target = this.getReferenceTarget(outsideRef);\n if (target !== null) {\n return this.referenceTargetToElement(target);\n }\n }\n // If the trigger couldn't be found in the main block, check the\n // placeholder block which is shown before the main block has loaded.\n if (block.placeholder !== null) {\n const refInPlaceholder = this.findEntityInScope(block.placeholder, name);\n const targetInPlaceholder = refInPlaceholder instanceof Reference ? this.getReferenceTarget(refInPlaceholder) : null;\n if (targetInPlaceholder !== null) {\n return this.referenceTargetToElement(targetInPlaceholder);\n }\n }\n return null;\n }\n isDeferred(element) {\n for (const block of this.deferredBlocks) {\n if (!this.deferredScopes.has(block)) {\n continue;\n }\n const stack = [this.deferredScopes.get(block)];\n while (stack.length > 0) {\n const current = stack.pop();\n if (current.elementsInScope.has(element)) {\n return true;\n }\n stack.push(...current.childScopes.values());\n }\n }\n return false;\n }\n /**\n * Finds an entity with a specific name in a scope.\n * @param rootNode Root node of the scope.\n * @param name Name of the entity.\n */\n findEntityInScope(rootNode, name) {\n const entities = this.getEntitiesInScope(rootNode);\n for (const entity of entities) {\n if (entity.name === name) {\n return entity;\n }\n }\n return null;\n }\n /** Coerces a `ReferenceTarget` to an `Element`, if possible. */\n referenceTargetToElement(target) {\n if (target instanceof Element$1) {\n return target;\n }\n if (target instanceof Template) {\n return null;\n }\n return this.referenceTargetToElement(target.node);\n }\n}\nfunction extractScopedNodeEntities(rootScope) {\n const entityMap = new Map();\n function extractScopeEntities(scope) {\n if (entityMap.has(scope.rootNode)) {\n return entityMap.get(scope.rootNode);\n }\n const currentEntities = scope.namedEntities;\n let entities;\n if (scope.parentScope !== null) {\n entities = new Map([...extractScopeEntities(scope.parentScope), ...currentEntities]);\n } else {\n entities = new Map(currentEntities);\n }\n entityMap.set(scope.rootNode, entities);\n return entities;\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\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 {}\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 // only needed for types in AOT\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 defer\n } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation, undefined);\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 defer,\n styles: [...facade.styles, ...template.styles],\n encapsulation: facade.encapsulation,\n interpolation,\n changeDetection: facade.changeDetection ?? null,\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 isSignal: facade.isSignal,\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 isSignal: !!declaration.isSignal\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 // For JIT, decorators are used to declare signal inputs. That is because of\n // a technical limitation where it's not possible to statically reflect class\n // members of a directive/component at runtime before instantiating the class.\n isSignal: !!ann.isSignal,\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 const hostDirectives = facade.hostDirectives?.length ? facade.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 }) : null;\n return {\n ...facade,\n typeArgumentCount: 0,\n typeSourceSpan: facade.typeSourceSpan,\n type: wrapReference(facade.type),\n deps: null,\n host: {\n ...extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host)\n },\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\n };\n}\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n const hostDirectives = declaration.hostDirectives?.length ? declaration.hostDirectives.map(dir => ({\n directive: wrapReference(dir.directive),\n isForwardReference: false,\n inputs: dir.inputs ? getHostDirectiveBindingMapping(dir.inputs) : null,\n outputs: dir.outputs ? getHostDirectiveBindingMapping(dir.outputs) : null\n })) : null;\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeSourceSpan,\n selector: declaration.selector ?? null,\n inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(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\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}\n/**\n * Parses a host directive mapping where each odd array key is the name of an input/output\n * and each even key is its public name, e.g. `['one', 'oneAlias', 'two', 'two']`.\n */\nfunction getHostDirectiveBindingMapping(array) {\n let result = null;\n for (let i = 1; i < array.length; i += 2) {\n result = result || {};\n result[array[i - 1]] = array[i];\n }\n return result;\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 defer\n } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation, decl.deferBlockDependencies);\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 defer,\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, deferBlockDependencies) {\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 });\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 const binder = new R3TargetBinder(new SelectorMatcher());\n const boundTarget = binder.bind({\n template: parsed.nodes\n });\n return {\n template: parsed,\n interpolation: interpolationConfig,\n defer: createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies)\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 createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies) {\n const deferredBlocks = boundTarget.getDeferBlocks();\n const blocks = new Map();\n for (let i = 0; i < deferredBlocks.length; i++) {\n const dependencyFn = deferBlockDependencies?.[i];\n blocks.set(deferredBlocks[i], dependencyFn ? new WrappedNodeExpr(dependencyFn) : null);\n }\n return {\n mode: 0 /* DeferBlockDepsEmitMode.PerBlock */,\n blocks\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 inputsPartialMetadataToInputMetadata(inputs) {\n return Object.keys(inputs).reduce((result, minifiedClassName) => {\n const value = inputs[minifiedClassName];\n // Handle legacy partial input output.\n if (typeof value === 'string' || Array.isArray(value)) {\n result[minifiedClassName] = parseLegacyInputPartialOutput(value);\n } else {\n result[minifiedClassName] = {\n bindingPropertyName: value.publicName,\n classPropertyName: minifiedClassName,\n transformFunction: value.transformFunction !== null ? new WrappedNodeExpr(value.transformFunction) : null,\n required: value.isRequired,\n isSignal: value.isSignal\n };\n }\n return result;\n }, {});\n}\n/**\n * Parses the legacy input partial output. For more details see `partial/directive.ts`.\n * TODO(legacy-partial-output-inputs): Remove in v18.\n */\nfunction parseLegacyInputPartialOutput(value) {\n if (typeof value === 'string') {\n return {\n bindingPropertyName: value,\n classPropertyName: value,\n transformFunction: null,\n required: false,\n // legacy partial output does not capture signal inputs.\n isSignal: false\n };\n }\n return {\n bindingPropertyName: value[0],\n classPropertyName: value[1],\n transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,\n required: false,\n // legacy partial output does not capture signal inputs.\n isSignal: false\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 // Signal inputs not supported for the inputs array.\n isSignal: 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 // Signal inputs not supported for the inputs array.\n isSignal: 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('18.2.10');\nclass CompilerConfig {\n constructor({\n defaultEncapsulation = ViewEncapsulation.Emulated,\n preserveWhitespaces,\n strictInjectionParameters\n } = {}) {\n this.defaultEncapsulation = defaultEncapsulation;\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, preserveSignificantWhitespace) {\n const visitor = new _Visitor(implicitTags, implicitAttrs, preserveSignificantWhitespace);\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, _preserveSignificantWhitespace = true) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._preserveSignificantWhitespace = _preserveSignificantWhitespace;\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 visitBlock(block, context) {\n visitAll(this, block.children, context);\n }\n visitBlockParameter(parameter, context) {}\n visitLetDeclaration(decl, 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, DEFAULT_CONTAINER_BLOCKS,\n // When dropping significant whitespace we need to retain whitespace tokens or\n // else we won't be able to reuse source spans because empty tokens would be\n // removed and cause a mismatch.\n !this._preserveSignificantWhitespace /* retainEmptyTokens */);\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$1 {\n constructor() {\n super(getXmlTagDefinition);\n }\n parse(source, url, options = {}) {\n // Blocks and let declarations aren't supported in an XML context.\n return super.parse(source, url, {\n ...options,\n tokenizeBlocks: false,\n tokenizeLet: 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 visitBlockPlaceholder(ph, context) {\n const ctype = `x-${ph.name.toLowerCase().replace(/[^a-z0-9]/g, '-')}`;\n const startTagPh = new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.startName,\n ctype,\n 'equiv-text': `@${ph.name}`\n });\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.closeName,\n ctype,\n 'equiv-text': `}`\n });\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\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 visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n visitLetDeclaration(decl, 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 visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n visitLetDeclaration(decl, 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, /* preservePlaceholders */true);\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 visitBlockPlaceholder(ph, context) {\n const tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equivStart: ph.startName,\n equivEnd: ph.closeName,\n type: 'other',\n dispStart: `@${ph.name}`,\n dispEnd: `}`\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 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 visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n visitLetDeclaration(decl, 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 visitBlock(block, context) {}\n visitBlockParameter(parameter, context) {}\n visitLetDeclaration(decl, 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, /* preservePlaceholders */true);\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 visitBlock(block, context) {}\n visitBlockParameter(block, context) {}\n visitLetDeclaration(decl, 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 visitBlock(block, context) {}\n visitBlockParameter(block, context) {}\n visitLetDeclaration(decl, 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 visitBlockPlaceholder(ph, context) {\n const params = ph.parameters.length === 0 ? '' : ` (${ph.parameters.join('; ')})`;\n const children = ph.children.map(c => c.visit(this)).join('');\n return `@${ph.name}${params} {${children}}`;\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( /* preservePlaceholders */true);\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, _preserveWhitespace = true) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._preserveWhitespace = _preserveWhitespace;\n this._messages = [];\n }\n updateFromTemplate(source, url, interpolationConfig) {\n const htmlParserResult = this._htmlParser.parse(source, url, {\n tokenizeExpansionForms: true,\n interpolationConfig\n });\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n // Trim unnecessary whitespace from extracted messages if requested. This\n // makes the messages more durable to trivial whitespace changes without\n // affected message IDs.\n const rootNodes = this._preserveWhitespace ? htmlParserResult.rootNodes : visitAllWithSiblings(new WhitespaceVisitor( /* preserveSignificantWhitespace */false), htmlParserResult.rootNodes);\n const i18nParserResult = extractMessages(rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs, /* preserveSignificantWhitespace */this._preserveWhitespace);\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 visitBlockPlaceholder(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 BlockPlaceholder(ph.name, ph.parameters, startName, closeName, children, 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 = {}));\nfunction compileClassMetadata(metadata) {\n const fnCall = internalCompileClassMetadata(metadata);\n return arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()]).callFn([]);\n}\n/** Compiles only the `setClassMetadata` call without any additional wrappers. */\nfunction internalCompileClassMetadata(metadata) {\n return importExpr(Identifiers.setClassMetadata).callFn([metadata.type, metadata.decorators, metadata.ctorParameters ?? literal(null), metadata.propDecorators ?? literal(null)]);\n}\n/**\n * Wraps the `setClassMetadata` function with extra logic that dynamically\n * loads dependencies from `@defer` blocks.\n *\n * Generates a call like this:\n * ```\n * setClassMetadataAsync(type, () => [\n * import('./cmp-a').then(m => m.CmpA);\n * import('./cmp-b').then(m => m.CmpB);\n * ], (CmpA, CmpB) => {\n * setClassMetadata(type, decorators, ctorParameters, propParameters);\n * });\n * ```\n *\n * Similar to the `setClassMetadata` call, it's wrapped into the `ngDevMode`\n * check to tree-shake away this code in production mode.\n */\nfunction compileComponentClassMetadata(metadata, dependencies) {\n if (dependencies === null || dependencies.length === 0) {\n // If there are no deferrable symbols - just generate a regular `setClassMetadata` call.\n return compileClassMetadata(metadata);\n }\n return internalCompileSetClassMetadataAsync(metadata, dependencies.map(dep => new FnParam(dep.symbolName, DYNAMIC_TYPE)), compileComponentMetadataAsyncResolver(dependencies));\n}\n/**\n * Identical to `compileComponentClassMetadata`. Used for the cases where we're unable to\n * analyze the deferred block dependencies, but we have a reference to the compiled\n * dependency resolver function that we can use as is.\n * @param metadata Class metadata for the internal `setClassMetadata` call.\n * @param deferResolver Expression representing the deferred dependency loading function.\n * @param deferredDependencyNames Names of the dependencies that are being loaded asynchronously.\n */\nfunction compileOpaqueAsyncClassMetadata(metadata, deferResolver, deferredDependencyNames) {\n return internalCompileSetClassMetadataAsync(metadata, deferredDependencyNames.map(name => new FnParam(name, DYNAMIC_TYPE)), deferResolver);\n}\n/**\n * Internal logic used to compile a `setClassMetadataAsync` call.\n * @param metadata Class metadata for the internal `setClassMetadata` call.\n * @param wrapperParams Parameters to be set on the callback that wraps `setClassMetata`.\n * @param dependencyResolverFn Function to resolve the deferred dependencies.\n */\nfunction internalCompileSetClassMetadataAsync(metadata, wrapperParams, dependencyResolverFn) {\n // Omit the wrapper since it'll be added around `setClassMetadataAsync` instead.\n const setClassMetadataCall = internalCompileClassMetadata(metadata);\n const setClassMetaWrapper = arrowFn(wrapperParams, [setClassMetadataCall.toStmt()]);\n const setClassMetaAsync = importExpr(Identifiers.setClassMetadataAsync).callFn([metadata.type, dependencyResolverFn, setClassMetaWrapper]);\n return arrowFn([], [devOnlyGuardedExpression(setClassMetaAsync).toStmt()]).callFn([]);\n}\n/**\n * Compiles the function that loads the dependencies for the\n * entire component in `setClassMetadataAsync`.\n */\nfunction compileComponentMetadataAsyncResolver(dependencies) {\n const dynamicImports = dependencies.map(({\n symbolName,\n importPath,\n isDefaultImport\n }) => {\n // e.g. `(m) => m.CmpA`\n const innerFn =\n // Default imports are always accessed through the `default` property.\n arrowFn([new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(isDefaultImport ? 'default' : symbolName));\n // e.g. `import('./cmp-a').then(...)`\n return new DynamicImportExpr(importPath).prop('then').callFn([innerFn]);\n });\n // e.g. `() => [ ... ];`\n return arrowFn([], literalArr(dynamicImports));\n}\n\n/**\n * Generate an ngDevMode guarded call to setClassDebugInfo with the debug info about the class\n * (e.g., the file name in which the class is defined)\n */\nfunction compileClassDebugInfo(debugInfo) {\n const debugInfoObject = {\n className: debugInfo.className\n };\n // Include file path and line number only if the file relative path is calculated successfully.\n if (debugInfo.filePath) {\n debugInfoObject.filePath = debugInfo.filePath;\n debugInfoObject.lineNumber = debugInfo.lineNumber;\n }\n // Include forbidOrphanRendering only if it's set to true (to reduce generated code)\n if (debugInfo.forbidOrphanRendering) {\n debugInfoObject.forbidOrphanRendering = literal(true);\n }\n const fnCall = importExpr(Identifiers.setClassDebugInfo).callFn([debugInfo.type, mapLiteral(debugInfoObject)]);\n const iife = arrowFn([], [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$5 = '12.0.0';\n/**\n * Minimum version at which deferred blocks are supported in the linker.\n */\nconst MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';\nfunction compileDeclareClassMetadata(metadata) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));\n definitionMap.set('version', literal('18.2.10'));\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}\nfunction compileComponentDeclareClassMetadata(metadata, dependencies) {\n if (dependencies === null || dependencies.length === 0) {\n return compileDeclareClassMetadata(metadata);\n }\n const definitionMap = new DefinitionMap();\n const callbackReturnDefinitionMap = new DefinitionMap();\n callbackReturnDefinitionMap.set('decorators', metadata.decorators);\n callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));\n callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));\n definitionMap.set('version', literal('18.2.10'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', metadata.type);\n definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));\n definitionMap.set('resolveMetadata', arrowFn(dependencies.map(dep => new FnParam(dep.symbolName, DYNAMIC_TYPE)), callbackReturnDefinitionMap.toLiteralMap()));\n return importExpr(Identifiers.declareClassMetadataAsync).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 * 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 minVersion = getMinimumVersionForPartialOutput(meta);\n definitionMap.set('minVersion', literal(minVersion));\n definitionMap.set('version', literal('18.2.10'));\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', needsNewInputPartialOutput(meta) ? createInputsPartialMetadata(meta.inputs) : legacyInputsPartialMetadata(meta.inputs));\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 * Determines the minimum linker version for the partial output\n * generated for this directive.\n *\n * Every time we make a breaking change to the declaration interface or partial-linker\n * behavior, we must update the minimum versions to prevent old partial-linkers from\n * incorrectly processing the declaration.\n *\n * NOTE: Do not include any prerelease in these versions as they are ignored.\n */\nfunction getMinimumVersionForPartialOutput(meta) {\n // We are starting with the oldest minimum version that can work for common\n // directive partial compilation output. As we discover usages of new features\n // that require a newer partial output emit, we bump the `minVersion`. Our goal\n // is to keep libraries as much compatible with older linker versions as possible.\n let minVersion = '14.0.0';\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 hasDecoratorTransformFunctions = Object.values(meta.inputs).some(input => input.transformFunction !== null);\n if (hasDecoratorTransformFunctions) {\n minVersion = '16.1.0';\n }\n // If there are input flags and we need the new emit, use the actual minimum version,\n // where this was introduced. i.e. in 17.1.0\n // TODO(legacy-partial-output-inputs): Remove in v18.\n if (needsNewInputPartialOutput(meta)) {\n minVersion = '17.1.0';\n }\n // If there are signal-based queries, partial output generates an extra field\n // that should be parsed by linkers. Ensure a proper minimum linker version.\n if (meta.queries.some(q => q.isSignal) || meta.viewQueries.some(q => q.isSignal)) {\n minVersion = '17.2.0';\n }\n return minVersion;\n}\n/**\n * Gets whether the given directive needs the new input partial output structure\n * that can hold additional metadata like `isRequired`, `isSignal` etc.\n */\nfunction needsNewInputPartialOutput(meta) {\n return Object.values(meta.inputs).some(input => input.isSignal);\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 if (query.isSignal) {\n meta.set('isSignal', 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 * Generates partial output metadata for inputs of a directive.\n *\n * The generated structure is expected to match `R3DeclareDirectiveFacade['inputs']`.\n */\nfunction createInputsPartialMetadata(inputs) {\n const keys = Object.getOwnPropertyNames(inputs);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map(declaredName => {\n const value = inputs[declaredName];\n return {\n key: declaredName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(declaredName),\n value: literalMap([{\n key: 'classPropertyName',\n quoted: false,\n value: asLiteral(value.classPropertyName)\n }, {\n key: 'publicName',\n quoted: false,\n value: asLiteral(value.bindingPropertyName)\n }, {\n key: 'isSignal',\n quoted: false,\n value: asLiteral(value.isSignal)\n }, {\n key: 'isRequired',\n quoted: false,\n value: asLiteral(value.required)\n }, {\n key: 'transformFunction',\n quoted: false,\n value: value.transformFunction ?? NULL_EXPR\n }])\n };\n }));\n}\n/**\n * Pre v18 legacy partial output for inputs.\n *\n * Previously, inputs did not capture metadata like `isSignal` in the partial compilation output.\n * To enable capturing such metadata, we restructured how input metadata is communicated in the\n * partial output. This would make libraries incompatible with older Angular FW versions where the\n * linker would not know how to handle this new \"format\". For this reason, if we know this metadata\n * does not need to be captured- we fall back to the old format. This is what this function\n * generates.\n *\n * See:\n * https://github.com/angular/angular/blob/d4b423690210872b5c32a322a6090beda30b05a3/packages/core/src/compiler/compiler_facade_interface.ts#L197-L199\n */\nfunction legacyInputsPartialMetadata(inputs) {\n // TODO(legacy-partial-output-inputs): Remove function in v18.\n const keys = Object.getOwnPropertyNames(inputs);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map(declaredName => {\n const value = inputs[declaredName];\n const publicName = value.bindingPropertyName;\n const differentDeclaringName = publicName !== declaredName;\n let result;\n if (differentDeclaringName || value.transformFunction !== null) {\n const values = [asLiteral(publicName), asLiteral(declaredName)];\n if (value.transformFunction !== null) {\n values.push(value.transformFunction);\n }\n result = literalArr(values);\n } else {\n result = asLiteral(publicName);\n }\n return {\n key: declaredName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(declaredName),\n value: result\n };\n }));\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 const blockVisitor = new BlockPresenceVisitor();\n visitAll$1(blockVisitor, template.nodes);\n definitionMap.set('template', getTemplateExpression(template, templateInfo));\n if (templateInfo.isInline) {\n definitionMap.set('isInline', literal(true));\n }\n // Set the minVersion to 17.0.0 if the component is using at least one block in its template.\n // We don't do this for templates without blocks, in order to preserve backwards compatibility.\n if (blockVisitor.hasBlocks) {\n definitionMap.set('minVersion', literal('17.0.0'));\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 !== null) {\n if (typeof meta.changeDetection === 'object') {\n throw new Error('Impossible state! Change detection flag is not resolved!');\n }\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 if (meta.defer.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n const resolvers = [];\n let hasResolvers = false;\n for (const deps of meta.defer.blocks.values()) {\n // Note: we need to push a `null` even if there are no dependencies, because matching of\n // defer resolver functions to defer blocks happens by index and not adding an array\n // entry for a block can throw off the blocks coming after it.\n if (deps === null) {\n resolvers.push(literal(null));\n } else {\n resolvers.push(deps);\n hasResolvers = true;\n }\n }\n // If *all* the resolvers are null, we can skip the field.\n if (hasResolvers) {\n definitionMap.set('deferBlockDependencies', literalArr(resolvers));\n }\n } else {\n throw new Error('Unsupported defer function emit mode in partial compilation');\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 if (meta.declarationListEmitMode === 3 /* DeclarationListEmitMode.RuntimeResolved */) {\n throw new Error(`Unsupported emit mode`);\n }\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}\nclass BlockPresenceVisitor extends RecursiveVisitor$1 {\n constructor() {\n super(...arguments);\n this.hasBlocks = false;\n }\n visitDeferredBlock() {\n this.hasBlocks = true;\n }\n visitDeferredBlockPlaceholder() {\n this.hasBlocks = true;\n }\n visitDeferredBlockLoading() {\n this.hasBlocks = true;\n }\n visitDeferredBlockError() {\n this.hasBlocks = true;\n }\n visitIfBlock() {\n this.hasBlocks = true;\n }\n visitIfBlockBranch() {\n this.hasBlocks = true;\n }\n visitForLoopBlock() {\n this.hasBlocks = true;\n }\n visitForLoopBlockEmpty() {\n this.hasBlocks = true;\n }\n visitSwitchBlock() {\n this.hasBlocks = true;\n }\n visitSwitchBlockCase() {\n this.hasBlocks = true;\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, 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, LetDeclaration, 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, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, 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, BlockNode as TmplAstBlockNode, 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, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, 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, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, 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","InputFlags","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","Type$1","Function","SecurityContext","MissingTranslationStrategy","parserSelectorToSimpleSelector","classes","elementName","parserSelectorToNegativeSelector","parserSelectorToR3Selector","positive","negative","parseSelectorToR3Selector","core","Object","freeze","__proto__","Type","textEncoder","digest$1","message","id","computeDigest","sha1","serializeNodes","nodes","meaning","decimalDigest","preservePlaceholders","computeDecimalDigest","visitor","_SerializerIgnoreExpVisitor","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","visitBlockPlaceholder","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","BigInt","asUintN","msg","msgFingerprint","end","getUint32","mix","remainder","getUint8","add32to64","low","high","count","bytes","endian","size","wordAt","byteAt","word","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","base","other","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","bitwiseOr","parens","BitwiseOr","bitwiseAnd","BitwiseAnd","or","Or","lower","Lower","lowerEquals","LowerEquals","bigger","Bigger","biggerEquals","BiggerEquals","isBlank","TYPED_NULL_EXPR","nullishCoalesce","NullishCoalesce","toStmt","ExpressionStatement","ReadVarExpr","isConstant","visitExpression","visitReadVarExpr","clone","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","DeclareFunctionStmt","visitFunctionExpr","p","ArrowFunctionExpr","body","Array","isArray","visitArrowFunctionExpr","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","arrowFn","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","_claimedNames","nextNameIndex","getConstLiteral","forceShared","isLongStringLiteral","GenericKeyFn","INSTANCE","keyOf","newValue","freshName","definition","usage","getSharedConstant","def","has","toSharedConstantDeclaration","getLiteralFactory","argumentsForKey","_getLiteralFactory","expressionForKey","getSharedFunctionReference","useUniqueName","isArrow","uniqueName","resultMap","literalFactory","literalFactoryArguments","filter","resultExpressions","parameters","isVariable","pureFunctionDeclaration","alwaysIncludeSuffix","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","deferWhen","deferOnIdle","deferOnImmediate","deferOnTimer","deferOnHover","deferOnInteraction","deferOnViewport","deferPrefetchWhen","deferPrefetchOnIdle","deferPrefetchOnImmediate","deferPrefetchOnTimer","deferPrefetchOnHover","deferPrefetchOnInteraction","deferPrefetchOnViewport","deferEnableTimerScheduling","repeater","repeaterCreate","repeaterTrackByIndex","repeaterTrackByIdentity","componentInstance","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","getComponentDepsFactory","defineComponent","declareComponent","setComponentScope","ComponentDeclaration","FactoryDeclaration","declareFactory","FactoryTarget","defineDirective","declareDirective","DirectiveDeclaration","InjectorDef","InjectorDeclaration","defineInjector","declareInjector","NgModuleDeclaration","ModuleWithProviders","defineNgModule","declareNgModule","setNgModuleScope","registerNgModuleType","PipeDeclaration","definePipe","declarePipe","declareClassMetadata","declareClassMetadataAsync","setClassMetadata","setClassMetadataAsync","setClassDebugInfo","queryRefresh","viewQuery","loadQuery","contentQuery","viewQuerySignal","contentQuerySignal","queryAdvance","twoWayProperty","twoWayBindingSet","twoWayListener","declareLet","storeLet","readContextLet","NgOnChangesFeature","InheritDefinitionFeature","CopyDefinitionFeature","StandaloneFeature","ProvidersFeature","HostDirectivesFeature","InputTransformsFeatureFeature","listener","getInheritedFactory","sanitizeHtml","sanitizeStyle","sanitizeResourceUrl","sanitizeScript","sanitizeUrl","sanitizeUrlOrResourceUrl","trustConstantHtml","trustConstantResourceUrl","validateIframeAttribute","InputSignalBrandWriteType","UnwrapDirectiveSignalInputs","unwrapWritableSignal","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","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","l","_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","shouldParenthesize","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","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","strings","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","keySpan","valueSpan","isLiteral","ParsedPropertyType","LITERAL_ATTR","isAnimation","ANIMATION","ParsedEventType","ParsedEvent","targetOrPhase","handlerSpan","ParsedVariable","BindingType","BoundElementProperty","securityContext","unit","TagContentType","splitNsName","fatal","colonIndex","isNgContainer","isNgContent","isNgTemplate","getNsPrefix","fullName","mergeNsAndName","localName","Comment$1","_visitor","Text$3","BoundText","visitBoundText","TextAttribute","visitTextAttribute","BoundAttribute","fromBoundElementProperty","visitBoundAttribute","BoundEvent","fromParsedEvent","event","Regular","Animation","visitBoundEvent","Element$1","attributes","inputs","outputs","references","startSourceSpan","endSourceSpan","visitElement","DeferredTrigger","prefetchSpan","whenOrOnSourceSpan","visitDeferredTrigger","BoundDeferredTrigger","whenSourceSpan","IdleDeferredTrigger","ImmediateDeferredTrigger","HoverDeferredTrigger","onSourceSpan","TimerDeferredTrigger","delay","InteractionDeferredTrigger","ViewportDeferredTrigger","BlockNode","DeferredBlockPlaceholder","minimumTime","visitDeferredBlockPlaceholder","DeferredBlockLoading","afterTime","visitDeferredBlockLoading","DeferredBlockError","visitDeferredBlockError","DeferredBlock","triggers","prefetchTriggers","loading","mainBlockSpan","definedTriggers","definedPrefetchTriggers","visitDeferredBlock","visitTriggers","visitAll$1","remainingBlocks","x","SwitchBlock","unknownBlocks","visitSwitchBlock","SwitchBlockCase","visitSwitchBlockCase","ForLoopBlock","trackBy","trackKeywordSpan","contextVariables","empty","visitForLoopBlock","ForLoopBlockEmpty","visitForLoopBlockEmpty","IfBlock","branches","visitIfBlock","IfBlockBranch","expressionAlias","visitIfBlockBranch","UnknownBlock","visitUnknownBlock","LetDeclaration$1","visitLetDeclaration","Template","templateAttrs","variables","visitTemplate","Content","visitContent","Variable","visitVariable","Reference","visitReference","Icu$1","vars","placeholders","RecursiveVisitor$1","deferred","block","blockItems","trigger","decl","newNode","Message","placeholderToMessage","serializeMessage","filePath","startLine","startCol","endLine","endCol","Text$2","Container","Icu","expressionPlaceholder","TagPlaceholder","Placeholder","IcuPlaceholder","BlockPlaceholder","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","visitDoctype","doctype","rootTag","dtd","serialize","Declaration","unescapedAttrs","escapeXml","Doctype","Tag","Text$1","unescapedValue","CR","ws","_ESCAPED_CHARS","_XMB_HANDLER","_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","startAsText","closeAsText","icuExpression","icuType","icuCases","icuAsText","exText","I18N_ATTR","I18N_ATTR_PREFIX","I18N_ICU_VAR_PREFIX","isI18nAttribute","startsWith","hasI18nAttrs","some","icuFromI18nMessage","placeholdersToParams","formatI18nPlaceholderNamesInMap","useCamelCase","_params","formatI18nPlaceholderName","chunks","postfix","shift","UNSAFE_OBJECT_KEY_NAME_REGEXP","TEMPORARY_NAME","CONTEXT_NAME","RENDER_FLAGS","temporaryAllocator","pushStatement","invalid","asLiteral","conditionallyCreateDirectiveBindingLiteral","forInputs","getOwnPropertyNames","declaredName","minifiedName","expressionValue","classPropertyName","bindingPropertyName","differentDeclaringName","hasDecoratorInputTransform","transformFunction","isSignal","SignalBased","HasDecoratorInputTransform","DefinitionMap","existing","find","toLiteralMap","createCssSelectorFromNode","getAttrsForDirectiveMatching","elementNameNoNs","nameNoNs","elOrTpl","attributesMap","Property","TwoWay","o","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","DEFAULT_CONTAINER_BLOCKS","Set","$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","isObjectLiteral","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","selectorScopeMode","Inline","declarations","exports","SideEffect","setNgModuleScopeCall","generateSetNgModuleScopeCall","schemas","createNgModuleType","compileNgModuleDeclarationExpression","Local","moduleType","includeImportTypes","publicDeclarationTypes","tupleTypeOf","tupleOfTypes","scopeMap","declarationsExpression","importsExpression","exportsExpression","bootstrapExpression","fnCall","guardedCall","iife","iifeCall","types","typeofTypes","compilePipeFromMetadata","metadata","definitionMapValues","pipeName","isStandalone","createPipeType","R3TemplateDependencyKind","animationKeywords","scopedAtRuleIdentifiers","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","add","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","atRule","_stripScopingSelectors","CssRule","_shadowDeepSelectors","_polyfillHostNoCombinatorRe","deepParts","shallowPart","otherParts","applyScope","_selectorNeedsScoping","_applySelectorScope","re","_makeScopeMatcher","lre","rre","_selectorReSuffix","_applySimpleSelectorScope","_polyfillHostRe","replaceBy","hnc","colon","isRe","attrName","_scopeSelectorPart","scopedP","includes","matches","safeContent","SafeSelector","scopedSelector","startIndex","sep","hasHost","shouldScope","scopedPart","restore","_colonHostContextRe","_polyfillHostContext","_colonHostRe","_escapeRegexMatches","keep","_content","pseudo","_ph","_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","OpKind","ExpressionKind","VariableFlags","SemanticVariableKind","CompatibilityMode","BindingKind","I18nParamResolutionTime","I18nExpressionFor","I18nParamValueFlags","Namespace","DeferTriggerKind","I18nContextKind","TemplateKind","ConsumesSlot","Symbol","DependsOnSlotContext","ConsumesVarsTrait","UsesVarOffset","TRAIT_CONSUMES_SLOT","numSlotsUsed","TRAIT_DEPENDS_ON_SLOT_CONTEXT","TRAIT_CONSUMES_VARS","hasConsumesSlotTrait","op","hasDependsOnSlotContextTrait","hasConsumesVarsTrait","hasUsesVarOffsetTrait","createStatementOp","NEW_OP","createVariableOp","xref","initializer","debugListId","prev","next","createInterpolateTextOp","interpolation","InterpolateText","Interpolation","i18nPlaceholders","createBindingOp","isTextAttribute","isStructuralTemplateAttribute","templateKind","i18nMessage","Binding","bindingKind","i18nContext","createPropertyOp","isAnimationTrigger","sanitizer","createTwoWayPropertyOp","TwoWayProperty","createStylePropOp","StyleProp","createClassPropOp","ClassProp","createStyleMapOp","StyleMap","createClassMapOp","ClassMap","createAttributeOp","namespace","Attribute","createAdvanceOp","Advance","createConditionalOp","conditions","processed","contextValue","createRepeaterOp","targetSlot","collection","Repeater","createDeferWhenOp","prefetch","DeferWhen","createI18nExpressionOp","i18nOwner","handle","icuPlaceholder","i18nPlaceholder","resolutionTime","I18nExpression","createI18nApplyOp","owner","I18nApply","createStoreLetOp","StoreLet","_a","_b","_c","_d","_e","_f","_g","_h","isIrExpression","ExpressionBase","LexicalReadExpr","LexicalRead","transformInternalExpressions","ReferenceExpr","StoreLetExpr","transform","transformExpressionsInExpression","ContextLetReferenceExpr","ContextLetReference","ContextExpr","Context","TrackContextExpr","TrackContext","NextContextExpr","NextContext","steps","GetCurrentViewExpr","GetCurrentView","RestoreViewExpr","RestoreView","ResetViewExpr","ResetView","TwoWayBindingSetExpr","TwoWayBindingSet","ReadVariableExpr","ReadVariable","PureFunctionExpr","varOffset","idx","VisitorContextFlag","InChildOperation","PureFunctionParameterExpr","PipeBindingExpr","PipeBinding","PipeBindingVariadicExpr","numArgs","PipeBindingVariadic","SafePropertyReadExpr","SafeKeyedReadExpr","SafeInvokeFunctionExpr","SafeInvokeFunction","SafeTernaryExpr","EmptyExpr","arguments","AssignTemporaryExpr","ReadTemporaryExpr","SlotLiteralExpr","slot","ConditionalCaseExpr","alias","ConditionalCase","ConstCollectedExpr","ConstCollected","visitExpressionsInOp","transformExpressionsInOp","transformExpressionsInInterpolation","HostProperty","transformExpressionsInStatement","Listener","TwoWayListener","innerOp","handlerOps","ExtractedAttribute","trustedValueFn","RepeaterCreate","track","trackByFn","Defer","loadingConfig","placeholderConfig","resolverFn","I18nMessage","postprocessingParams","ContainerEnd","ContainerStart","DeferOn","DisableBindings","Element","ElementEnd","ElementStart","EnableBindings","I18n","I18nContext","I18nEnd","I18nStart","IcuEnd","IcuStart","Projection","ProjectionDef","Text","I18nAttributes","DeclareLet","caseStatement","isStringLiteral","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","SlotHandle","elementContainerOpKinds","isElementOrContainerOp","createElementStartOp","wholeSourceSpan","localRefs","nonBindable","createTemplateOp","functionNameSuffix","decls","createRepeaterCreateOp","primaryView","emptyView","varNames","emptyTag","emptyI18nPlaceholder","emptyAttributes","HTML","usesComponentInstance","createElementEndOp","createDisableBindingsOp","createEnableBindingsOp","createTextOp","initialValue","createListenerOp","animationPhase","eventTarget","hostListener","handlerList","handlerFnName","consumesDollarEvent","isAnimationListener","createTwoWayListenerOp","createPipeOp","createNamespaceOp","active","createProjectionDefOp","createProjectionOp","fallbackView","projectionSlotIndex","createExtractedAttributeOp","createDeferOp","main","mainSlot","ownResolverFn","mainView","loadingView","loadingSlot","loadingMinimumTime","loadingAfterTime","placeholderView","placeholderSlot","placeholderMinimumTime","errorView","errorSlot","createDeferOnOp","createDeclareLetOp","createI18nMessageOp","i18nBlock","messagePlaceholder","needsPostprocessing","subMessages","createI18nStartOp","root","messageIndex","subTemplateIndex","createI18nEndOp","createIcuStartOp","createIcuEndOp","createIcuPlaceholderOp","expressionPlaceholders","createI18nContextOp","contextKind","Attr","createI18nAttributesOp","i18nAttributesConfig","createHostPropertyOp","CTX_REF","CompilationJobKind","CompilationJob","componentName","pool","compatibility","Both","nextXrefId","allocateXrefId","ComponentCompilationJob","relativeContextFilePath","i18nUseExternalIds","deferMeta","allDeferrableDepsFn","Tmpl","fnSuffix","views","contentSelectors","consts","constsInitializers","ViewCompilationUnit","allocateView","parent","units","addConst","newConst","initializers","CompilationUnit","create","update","fnName","listenerOp","job","aliases","HostBindingCompilationJob","Host","HostBindingCompilationUnit","deleteAnyCasts","removeAnys","applyI18nExpressions","i18nContexts","needsApplication","assignI18nSlotDependencies","updateOp","i18nExpressionsInProgress","state","createOp","blockXref","lastSlotConsumer","I18nText","opToRemove","createOpXrefMap","extractAttributes","extractAttributeOp","lookupElement$2","TemplateDefinitionBuilder","STYLE","extractedAttributeOp","NONE","extractable","ownerOp","lookupElement$1","specializeBindings","ClassName","StyleProperty","CHAINABLE","MAX_CHAIN_LENGTH","chain","chainOperationsInList","opList","instruction","collapseSingletonInterpolations","eligibleOpKind","generateConditionalExpressions","defaultCase","findIndex","cond","splice","tmp","conditionalCase","useTmp","caseExpressionTemporaryXref","BINARY_OPERATORS","namespaceForKey","namespacePrefixKey","NAMESPACES","SVG","Math","keyForNamespace","prefixWithNamespace","strippedTag","literalOrArrayLiteral","collectElementConsts","allElementAttributes","ElementAttributes","attrArray","serializeAttributes","getConstIndex","FLYWEIGHT_ARRAY","byKind","styles","bindings","propertyBindings","known","projectAs","isKnown","nameToValue","allowDuplicates","array","arrayFor","getAttributeNameLiterals","nameLiteral","parsedR3Selector","convertI18nBindings","i18nAttributesByElem","i18nAttributesForElem","Creation","I18nAttribute","resolveDeferDepsFns","fullPathName","createI18nContexts","attrContextByMessage","blockContextByI18nBlock","contextOp","RootI18n","rootContext","currentI18nOp","deduplicateTextBindings","seen","seenForElement","configureDeferInstructions","resolveDeferTargetNames","scopes","getScopeForView","scope","Scope$1","targets","resolveTrigger","deferOwnerView","Idle","Immediate","Timer","Hover","Interaction","Viewport","targetName","placeholderOp","targetXref","targetView","targetSlotViewSteps","step","defers","deferOp","REPLACEMENTS","IGNORED_OP_KINDS","collapseEmptyInstructions","opReplacements","startKind","mergedKind","prevOp","expandSafeReads","safeTransform","ternaryTransform","requiresTemporary","needsTemporaryInSafeAccess","temporariesIn","temporaries","eliminateTemporaryAssignments","tmps","read","safeTernaryWithTemporary","isSafeAccessExpression","isUnsafeAccessExpression","isAccessExpression","deepestSafeTernary","st","dst","ESCAPE$1","ELEMENT_MARKER","TEMPLATE_MARKER","TAG_CLOSE_MARKER","CONTEXT_MARKER","LIST_START_MARKER","LIST_END_MARKER","LIST_DELIMITER","extractI18nMessages","i18nMessagesByContext","i18nBlocks","i18nMessageOp","createI18nMessage","currentIcu","icuContext","rootI18nBlock","rootMessage","subMessage","formatIcuPlaceholder","formattedParams","formatParams","formattedPostprocessingParams","v","formatValue","flatMap","placeholderValues","serializedValues","formatParamValues","ElementTag","TemplateTag","elementValue","templateValue","OpenTag","CloseTag","tagMarker","closeMarker","generateAdvance","slotMap","slotContext","consumer","generateProjectionDefs","share","defExpr","generateVariables","recursivelyProcessView","parentScope","generateVariablesInScopeForView","viewContextVariable","letDeclarations","Identifier","local","targetId","isListener","scopeView","AlwaysInline","collectConstExpressions","STYLE_DOT","CLASS_DOT","STYLE_BANG","CLASS_BANG","BANG_IMPORTANT","parseHostStyleProperties","endsWith","isCssCustomProperty","hyphenate$1","parseProperty","overrideIndex","unitIndex","mapEntry","mapLiteral","IcuSerializerVisitor","formatPh","serializer","serializeIcuNode","NodeWithI18n","tokens","Expansion","switchValue","switchValueSourceSpan","visitExpansion","ExpansionCase","valueSourceSpan","expSourceSpan","visitExpansionCase","valueTokens","visitAttribute","Comment","visitComment","Block","visitBlock","BlockParameter","visitBlockParameter","LetDeclaration","astResult","RecursiveVisitor","visitChildren","cb","prototype","apply","NAMED_ENTITIES","NGSP_UNICODE","TokenError","errorMsg","tokenType","TokenizeResult","nonNormalizedIcuExpressions","tokenize","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","interpolationConfig","_leadingTriviaCodePoints","leadingTriviaChars","codePointAt","endPos","startPos","_cursor","EscapedCharacterCursor","PlainCharacterCursor","_preserveLineEndings","preserveLineEndings","_i18nNormalizeLineEndingsInICUs","i18nNormalizeLineEndingsInICUs","_tokenizeBlocks","tokenizeBlocks","_tokenizeLet","tokenizeLet","init","handleError","_processCarriageReturns","peek","_attemptCharCode","_consumeCdata","_consumeComment","_consumeDocType","_consumeTagClose","_consumeTagOpen","_attemptStr","_consumeLetDeclaration","_consumeBlockStart","_isInExpansionCase","_isInExpansionForm","_consumeBlockEnd","_tokenizeExpansionForm","_consumeWithInterpolation","_isTextEnd","_isTagStart","_beginToken","_endToken","_getBlockName","spacesInNameAllowed","nameCursor","_attemptCharCodeUntilFn","isBlockNameChar","getChars","startToken","_consumeBlockParameters","isNotWhitespace","isBlockParameterChar","inQuote","openParens","_getLetDeclarationName","_consumeLetDeclarationValue","endChar","getSpan","allowDigit","inner","isExpansionFormStart","_consumeExpansionFormStart","isExpansionCaseStart","_consumeExpansionCaseStart","_consumeExpansionCaseEnd","_consumeExpansionFormEnd","_createError","CursorError","cursor","_attemptCharCodeCaseInsensitive","compareCharCodeCaseInsensitive","_requireCharCode","chars","charsLeft","initialPosition","_attemptStrCaseInsensitive","_requireStr","predicate","_requireCharCodeUntilFn","diff","_attemptUntilChar","_readChar","fromCodePoint","_consumeEntity","textTokenType","isHex","codeStart","isDigitEntityEnd","entityType","HEX","DEC","strNum","parseInt","nameStart","isNamedEntityEnd","_consumeRawText","consumeEntities","endMarkerPredicate","tagCloseStart","foundEndMarker","contentStart","_consumePrefixAndName","nameOrPrefixStart","isPrefixEnd","isNameEnd","openTagToken","_consumeTagOpenStart","_consumeAttributeName","_consumeAttributeValue","_consumeTagOpenEnd","contentTokenType","getContentType","RAW_TEXT","_consumeRawTextWithTagClose","ESCAPABLE_RAW_TEXT","attrNameStart","prefixAndName","quoteChar","_consumeQuote","endPredicate","_readUntil","normalizedCondition","conditionToken","interpolationTokenType","endInterpolation","_consumeInterpolation","interpolationStart","prematureEndPredicate","expressionStart","inComment","_getProcessedChars","_isInExpansion","isInterpolation","code1","code2","toUpperCaseCharCode","srcTokens","dstTokens","lastDstToken","fileOrCursor","advanceState","updatePeek","leadingTriviaCodePoints","startLocation","locationFromCursor","endLocation","fullStartLocation","pos","currentChar","internalState","processEscapeSequence","digitStart","decodeHexDigits","octal","previous","hex","isNaN","TreeError","ParseTreeResult","rootNodes","Parser$1","tokenizeResult","parser","_TreeBuilder","build","_index","_containerStack","_advance","_peek","_consumeStartTag","_consumeEndTag","_closeVoidElement","_consumeText","_consumeExpansion","_consumeBlockOpen","_consumeBlockClose","_consumeIncompleteBlock","_consumeLet","_consumeIncompleteLet","leftoverContainer","_advanceIf","_startToken","endToken","_addToParent","expCase","_parseExpansionCase","_collectExpansionExpTokens","expansionCaseParser","expansionFormStack","lastOnStack","startSpan","_getContainer","ignoreFirstLf","decodeEntity","endSpan","startTagToken","_consumeAttr","_getElementFullName","_getClosestParentElement","selfClosing","tagDef","canSelfClose","parentEl","_pushContainer","isClosedByChild","_popContainer","endTagToken","errMsg","expectedName","expectedType","unexpectedCloseTagDetected","stackIndex","closedByParent","attrEnd","valueStartSpan","valueEnd","nextTokenType","valueToken","quoteToken","paramToken","nameString","parentElement","implicitNamespacePrefix","parentTagName","parentTagDefinition","preventNamespaceInheritance","stack","entity","PRESERVE_WS_ATTR_NAME","SKIP_WS_TRIM_TAGS","WS_CHARS","NO_WS_REGEXP","WS_REPLACE_REGEXP","hasPreserveWhitespacesAttr","replaceNgsp","WhitespaceVisitor","preserveSignificantWhitespace","originalNodeMap","requireContext","icuExpansionDepth","newElement","visitAllWithSiblings","isNotBlank","hasExpansionSibling","inIcuExpansion","createWhitespaceProcessedTextToken","firstToken","trimLeadingWhitespace","lastToken","trimTrailingWhitespace","processWhitespace","trimLeadingAndTrailingWhitespace","expansion","newExpansion","expansionCase","newExpansionCase","newBlock","parameter","_node","isFirstTokenInTag","transformTextToken","trimStart","isLastTokenInTag","trimEnd","maybeTrimmedStart","maybeTrimmed","removeWhitespaces","htmlAstWithErrors","TokenType","KEYWORDS","Lexer","scanner","_Scanner","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","isIdentifierStart","scanIdentifier","scanNumber","scanCharacter","scanString","scanPrivateIdentifier","scanOperator","scanQuestion","scanComplexOperator","one","twoCode","two","threeCode","three","isIdentifierPart","simple","hasSeparators","isExponentStart","isExponentSign","parseIntAutoRadix","parseFloat","marker","unescapedCode","unescape","position","SplitInterpolation","offsets","TemplateBindingParseResult","templateBindings","warnings","Parser","_lexer","parseAction","_checkNoInterpolation","sourceToLex","_stripComments","_ParseAST","parseChain","parseBinding","_parseBindingAst","checkSimpleExpression","checker","SimpleExpressionChecker","parseSimpleBinding","_reportError","parseTemplateBindings","templateKey","templateUrl","absoluteKeyOffset","absoluteValueOffset","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","serial","withContext","ret","consumeOptionalCharacter","peekKeywordLet","peekKeywordAs","expectCharacter","consumeOptionalOperator","expectOperator","prettyPrintToken","tok","expectIdentifierOrKeyword","_reportErrorForPrivateIdentifier","expectIdentifierOrKeywordOrString","parsePipe","errorIndex","artificialStart","artificialEnd","parseExpression","nameId","fullSpanEnd","parseConditional","parseLogicalOr","yes","no","parseLogicalAnd","parseNullishCoalescing","parseEquality","parseRelational","parseAdditive","parseMultiplicative","parsePrefix","parseCallChain","parsePrimary","parseAccessMember","parseCall","parseKeyedReadOrWrite","parseExpressionList","parseLiteralMap","literalValue","terminator","keyStart","literalMapKey","isShorthandInitialized","readReceiver","isSafe","Writable","argumentStart","parseCallArguments","positionals","expectTemplateBindingKey","operatorFound","parseDirectiveKeywordBindings","letBinding","parseLetBinding","binding","parseAsBinding","consumeStatementTerminator","getDirectiveBoundTarget","spanEnd","asBinding","spanStart","locationText","skip","extraMessage","errorMessage","offsetMap","consumedInOriginalTemplate","consumedInInput","tokenIndex","currentToken","decoded","lengthOfParts","sum","_SECURITY_SCHEMA","SECURITY_SCHEMA","registerContext","URL","RESOURCE_URL","specs","spec","IFRAME_SECURITY_SENSITIVE_ATTRS","isIframeSecuritySensitiveAttr","ElementSchemaRegistry","BOOLEAN","NUMBER","STRING","OBJECT","SCHEMA","_ATTR_TO_PROP","_PROP_TO_ATTR","inverted","propertyName","attributeName","DomElementSchemaRegistry","_schema","_eventSchema","encodedType","events","strType","strProperties","properties","typeNames","superName","superType","superEvent","hasProperty","propName","schemaMetas","schema","elementProperties","hasElement","isAttribute","getMappedPropName","getDefaultComponentElementName","validateProperty","validateAttribute","allKnownElementNames","allKnownAttributesOfElement","allKnownEventsOfElement","normalizeAnimationStyleProperty","normalizeAnimationStyleValue","camelCaseProp","userProvidedProp","strVal","_isPixelDimensionStyle","valAndSuffixMatch","HtmlTagDefinition","closedByChildren","contentType","PARSABLE_DATA","overrideType","default","DEFAULT_TAG_DEFINITION","TAG_DEFINITIONS","getHtmlTagDefinition","assign","svg","knownTagName","TAG_TO_PLACEHOLDER_NAMES","PlaceholderRegistry","_placeHolderNameCounts","_signatureToName","getStartTagPlaceholderName","signature","_hashTag","upperTag","baseName","_generateUniqueName","getCloseTagPlaceholderName","_hashClosingTag","getPlaceholderName","upperName","getUniquePlaceholder","getStartBlockPlaceholderName","_hashBlock","_toSnakeCase","getCloseBlockPlaceholderName","_hashClosingBlock","sort","_expParser","createI18nMessageFactory","containerBlocks","retainEmptyTokens","_I18nVisitor","visitNodeFn","toI18nMessage","noopVisitNodeFn","_html","_expressionParser","_containerBlocks","_retainEmptyTokens","isIcu","icuDepth","placeholderRegistry","placeholderToContent","i18nodes","startPhName","closePhName","_visitTextWithInterpolation","i18nIcuCases","i18nIcu","caze","expPh","phName","_icuCase","_context","_parameter","previousI18n","hasInterpolation","extractPlaceholderName","reusePreviousSourceSpans","assertSingleContainerMessage","assertEquivalentNodes","previousNodes","_CUSTOM_PH_EXP","I18nError","TRUSTED_TYPES_SINKS","isTrustedTypesSink","setI18nRefs","trimmedNode","i18nNode","originalNode","previousMessage","I18nMetaVisitor","keepI18nAttrs","enableI18nLegacyMessageIdFormat","hasI18nMeta","_errors","_generateI18nMessage","_parseMetadata","_setMessageId","_setLegacyIds","visitAllWithErrors","attrsMeta","trimmedNodes","currentMessage","parseI18nMeta","I18N_MEANING_SEPARATOR","I18N_ID_SEPARATOR","idIndex","descIndex","meaningAndDesc","i18nMetaToJSDoc","GOOG_GET_MSG","createGoogleGetMsgStatements","variable$1","closureVar","serializeI18nMessageForGetMsg","original_code","googGetMsgStmt","i18nAssignmentStmt","GetMsgSerializerVisitor","serializerVisitor","createLocalizeStatements","placeHolders","serializeI18nMessageForLocalize","getSourceSpan","localizedString$1","variableInitialization","LocalizeSerializerVisitor","pieces","createPlaceholderPiece","processMessagePieces","startNode","endNode","createEmptyMessagePart","NG_I18N_CLOSURE_MODE","TRANSLATION_VAR_PREFIX","I18N_ICU_MAPPING_PREFIX","ESCAPE","CLOSURE_TRANSLATION_VAR_PREFIX","getTranslationConstPrefix","extra","declareI18nVariable","collectI18nConsts","fileBasedI18nSuffix","extractedAttributesByI18nContext","i18nAttributesByElement","i18nExpressionsByElement","i18nValuesByContext","messageConstIndices","mainVar","collectMessage","i18nConst","attributesForMessage","elem","i18nExpressions","seenPropertyNames","i18nExpr","i18nAttributeConfig","i18nExprValue","msgIndex","messageOp","subMessagePlaceholders","subMessageId","subMessageVar","subMessageStatements","addSubMessageParams","i18nGenerateClosureVar","transformFn","fromEntries","extraTransformFnParams","getTranslationDeclStmts","paramsObject","createClosureModeGuard","messageId","useExternalIds","uniqueSuffix","convertI18nText","currentI18n","textNodeI18nBlocks","textNodeIcus","icuPlaceholderByText","icuPlaceholderOp","i18nOp","icuOp","contextId","Postproccessing","liftLocalRefs","serializeLocalRefs","constRefs","emitNamespaceChanges","activeNamespace","parenDepth","valueStart","propStart","currentProp","hyphenate","styleVal","parseExtractedStyles","Structural","parsedStyles","parsedClasses","parsedClass","nameFunctionsAndVariables","addNamesToView","animation","getVariableName","childView","normalizeStylePropName","stripImportant","compatPrefix","importantIndex","mergeNextContextExpressions","mergeNextContextsInOps","mergeSteps","tryToMerge","candidate","CONTAINER_TAG","generateNgContainerOps","updatedElementXrefs","lookupElement","disableBindings$1","generateNullishCoalesceExpressions","assignment","kindTest","kindWithInterpolationTest","basicListenerKindTest","nonInterpolationPropertyKindTest","CREATE_ORDERING","UPDATE_ORDERING","keepLast","UPDATE_HOST_ORDERING","handledOpKinds","orderOps","orderWithin","ordering","opsToOrder","firstTargetInGroup","currentTarget","reorder","groupIndex","group","removeContentSelectors","lookupInXrefMap","isSelectAttribute","createPipes","processPipeBindingsInView","slotHandle","addPipeToCreationBlock","afterTargetXref","createVariadicPipes","propagateI18nBlocks","propagateI18nBlocksToTemplates","propagateI18nBlocksForView","forView","wrapTemplateWithI18n","parentI18n","extractPureFunctions","constantDef","PureFunctionConstant","declName","keyExpr","fnParams","returnExpr","generatePureLiteralStructures","transformLiteralArray","transformLiteralMap","derivedEntries","nonConstantArgs","constIndex","localRefIndex","elementOrContainerBase","call","templateFnRef","handlerFn","eventTargetResolver","syntheticHost","namespaceMath","savedView","returnValue","selfSlot","primarySlot","dependencyResolverFn","enableTimerScheduling","deferTriggerToR3TriggerInstructionsMap","deferOn","instructions","instructionToCall","fallbackFnName","fallbackDecls","fallbackVars","viewFnName","trackByUsesComponentInstance","emptyViewFnName","emptyDecls","emptyVars","emptyConstIndex","PIPE_BINDINGS","pipeBind","interpolationArgs","collateInterpolationArgs","callVariadicInstruction","TEXT_INTERPOLATE_CONFIG","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","GLOBAL_TARGET_RESOLVERS","reify","reifyCreateOperations","reifyUpdateOperations","ensureNoIrForDebug","reifyIrExpression","listenerFn","reifyListenerHandler","timerScheduling","fallbackViewFnName","repeaterView","_unit","handlerStmts","removeEmptyBindings","removeI18nContexts","removeUnusedI18nAttributesOps","ownersWithI18nExpressions","resolveContexts","processLexicalScope$1","resolveDollarEvent","transformDollarEvent","resolveI18nElementPlaceholders","resolvePlaceholdersForView","pendingStructuralDirective","currentOps","pendingStructuralDirectiveCloses","recordElementStart","startOp","recordElementClose","delete","recordTemplateStart","recordTemplateClose","forSlot","emptySlot","structuralDirective","addParam","getSubTemplateIndexForTemplateTag","childOp","resolveI18nExpressionPlaceholders","subTemplateIndices","icuPlaceholders","expressionIndices","referenceIndex","ExpressionIndex","updatePlaceholder","resolveNames","processLexicalScope","localDefinitions","Alias","SavedView","sanitizerFns","SCRIPT","trustedValueFns","resolveSanitizers","getOnlySecurityContext","sanitizerFn","isIframe","isIframeElement","transformTwoWayBindingSet","saveAndRestoreView","needsRestoreView","handlerOp","addSaveRestoreViewOperationToListener","allocateSlots","slotCount","specializeStyleBindings","generateTemporaryVariables","generateTemporaries","opCount","generatedStatements","finalReads","flag","assigned","released","defs","assignName","names","generateTrackFns","usesComponentContext","optimizeTrackFns","isTrackByFunctionCall","rootView","arg0","arg1","generateTrackVariables","$index","$implicit","countVariables","varCount","varsUsedByOp","varsUsedByIrExpression","slots","isSingletonInterpolation","optimizeVariables","inlineAlwaysInlineVariables","optimizeVariablesInOpList","Fence","fencesForIrExpression","varOp","varDecls","varUsages","varRemoteUsages","opMap","collectOpInfo","countVariableUsages","contextIsUsed","opInfo","fences","ViewContextWrite","SideEffectful","stmtOp","uncountVariableUsages","ViewContextRead","toInline","isAlwaysInline","varInfo","targetOp","variablesUsed","allowConservativeInlining","tryInlineVariableInitializer","safeToInlinePastFences","varRemoteUsage","declFences","inlined","inliningAllowed","exprFences","wrapI18nIcus","addedI18nId","optimizeStoreLet","letUsedExternally","removeIllegalLetReferences","generateLocalLetReferences","phases","emitTemplateFn","tpl","rootFn","emitView","emitChildViews","viewFn","createStatements","updateStatements","createCond","maybeGenerateRfBlock","updateCond","emitHostBindingFunction","compatibilityMode","domSchema","NG_TEMPLATE_TAG_NAME","isI18nRootNode","isSingleI18nIcu","ingestComponent","constantPool","ingestNodes","ingestHostBinding","bindingParser","securityContexts","calcPossibleSecurityContexts","componentSelector","ingestHostProperty","ingestHostAttribute","ingestHostEvent","convertAst","attrBinding","eventBinding","makeListenerHandlerOps","ingestElement","ingestTemplate","ingestContent","ingestText","ingestBoundText","ingestIfBlock","ingestSwitchBlock","ingestDeferBlock","ingestIcu","ingestForBlock","ingestLetDeclaration","namespaceKey","ingestElementBindings","ingestReferences","i18nBlockId","endOp","tmpl","tagNameWithoutNamespace","namespacePrefix","isPlainTemplate","NgTemplate","templateOp","ingestTemplateBindings","asMessage","textXref","baseSourceSpan","ifBlock","firstXref","ifCase","cView","ingestControlFlowInsertionPoint","ifCaseI18nMeta","caseExpr","conditionalCaseExpr","switchBlock","switchCase","switchCaseI18nMeta","ingestDeferView","i18nMeta","secondaryView","deferBlock","mode","deferXref","deferOnOps","deferWhenOps","idle","deferOnOp","immediate","timer","hover","interaction","viewport","when","forBlock","indexName","countName","indexVarNames","getComputedForLoopVariableExpression","convertSourceSpan","emptyTagName","isThisReceiver","isImplicitReceiver","isSpecialNode","convertAstWithInterpolation","BINDING_KINDS","Style","i18nAttributeBindingNames","console","astOf","output","makeTwoWayListenerHandlerOps","createTemplateBinding","isTextBinding","bindingType","handlerExprs","handlerExpr","eventReference","twoWaySetExpr","assertIsArray","renderFlagCheckIfStmt","toQueryFlags","query","descendants","static","emitDistinctChangesOnly","getQueryPredicate","createQueryCreateCall","queryTypeFns","prependParams","queryCreateFn","signalBased","nonSignal","queryAdvancePlaceholder","collapseAdvanceStatements","advanceCollapseCount","flushAdvanceCount","unshift","createViewQueriesFunction","viewQueries","tempAllocator","queryDefinitionCall","temporary","getQueryList","refresh","updateDirective","viewQueryFnName","createContentQueriesFunction","queries","contentQueriesFnName","HtmlParser","PROPERTY_PARTS_SEPARATOR","ATTRIBUTE_PREFIX","CLASS_PREFIX","STYLE_PREFIX","TEMPLATE_ATTR_PREFIX$1","ANIMATE_PROP_PREFIX","BindingParser","_exprParser","_schemaRegistry","_allowInvalidAssignmentEvents","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","isPartOfAssignmentBinding","isAnimationProp","parsePropertyInterpolation","TWO_WAY","DEFAULT","isHostBinding","createBoundElementProperty","elementSelector","boundProp","skipValidation","mapPropertyName","boundPropertyName","_validatePropertyOrAttributeName","nsSeparatorIdx","ns","mappedPropName","isAssignmentEvent","_parseAnimationEvent","_parseRegularEvent","eventName","_parseAction","prevErrorCount","isValid","_isAllowedAssignmentEvent","isAttr","report","PipeCollector","pipes","registry","ctxs","elementNames","notElementNames","possibleElementNames","absoluteSpan","startDiff","endDiff","isStyleUrlResolvable","schemeMatch","URL_WITH_SCHEMA_REGEXP","NG_CONTENT_SELECT_ATTR","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","FOR_LOOP_EXPRESSION_PATTERN","FOR_LOOP_TRACK_PATTERN","CONDITIONAL_ALIAS_PATTERN","ELSE_IF_PATTERN","FOR_LOOP_LET_PATTERN","CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN","ALLOWED_FOR_LOOP_LET_VARIABLES","isConnectedForLoopBlock","isConnectedIfLoopBlock","createIfBlock","connectedBlocks","validateIfConnectedBlocks","mainBlockParams","parseConditionalBlockParameters","ifBlockStartSourceSpan","ifBlockEndSourceSpan","lastBranch","createForLoop","parseForLoopParameters","itemName","keywordSpan","createSwitchBlock","validateSwitchBlock","primaryExpression","parseBlockParameterToBinding","expressionParam","secondaryParams","stripOptionalParentheses","rawExpression","variableName","variableSpan","emptySpanAfterForBlockStart","letMatch","variablesSpan","parseLetParameter","trackMatch","loopItemName","expressionParts","keyLeadingWhitespace","keyName","valueLeadingWhitespace","implicit","hasElse","hasDefault","max","aliasMatch","variableStart","spaceRegex","TIME_PATTERN","SEPARATOR_PATTERN","COMMA_DELIMITED_SYNTAX","OnTriggerType","parseWhenTrigger","whenIndex","getPrefetchSpan","getTriggerParametersStart","parsed","trackTrigger","parseOnTrigger","onIndex","OnTriggerParser","unexpectedToken","isFollowedByOrLast","consumeTrigger","prevErrors","consumeParameters","min","triggerNameStartSpan","isFirstTrigger","prefetchSourceSpan","IDLE","createIdleTrigger","TIMER","createTimerTrigger","INTERACTION","createInteractionTrigger","IMMEDIATE","createImmediateTrigger","HOVER","createHoverTrigger","VIEWPORT","createViewportTrigger","commaDelimStack","tokenText","newStart","newEnd","allTriggers","parseDeferredTime","validateReferenceBasedTrigger","startPosition","hasFoundSeparator","time","PREFETCH_WHEN_PATTERN","PREFETCH_ON_PATTERN","MINIMUM_PARAMETER_PATTERN","AFTER_PARAMETER_PATTERN","WHEN_PARAMETER_PATTERN","ON_PARAMETER_PATTERN","isConnectedDeferLoopBlock","createDeferredBlock","parseConnectedBlocks","parsePrimaryTriggers","lastEndSourceSpan","endOfLastSourceSpan","lastConnectedBlock","sourceSpanWithConnectedBlocks","parsePlaceholderBlock","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","processedNodes","isI18nRootElement","reportError","preparsedElement","contents","textContents","isTemplateElement","parsedProperties","boundEvents","i18nAttrsMeta","templateParsedProperties","templateVariables","elementHasInlineTemplate","hasBinding","normalizedName","normalizeAttributeName","isTemplateBinding","parsedVariables","parseAttribute","NON_BINDABLE_VISITOR","flat","Infinity","parsedElement","bound","hoistedAttrs","formattedKey","findConnectedBlocks","primaryBlockIndex","siblings","relatedBlocks","i18nPropsMeta","bep","matchableAttributes","createKeySpan","normalizationAdjustment","keySpanStart","keySpanEnd","bindParts","parseVariable","parseReference","addEvents","parseAssignmentEvent","delims","valueNoNgsp","NonBindableVisitor","LEADING_TRIVIA_CHARS","parseTemplate","preserveWhitespaces","allowInvalidAssignmentEvents","makeBindingParser","htmlParser","parseResult","enableBlockSyntax","enableLetSyntax","alwaysAttemptHtmlToR3AstConversion","parsedTemplate","i18nMetaVisitor","i18nMetaResult","elementRegistry","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","baseDirectiveFields","createHostBindingsFunction","typeSourceSpan","exportAs","addFeatures","features","viewProviders","inputKeys","hostDirectives","createHostDirectivesFeatureArg","usesInheritance","fullInheritance","lifecycle","usesOnChanges","compileDirectiveFromMetadata","createDirectiveType","compileComponentFromMetadata","firstSelector","selectorAttributes","templateTypeName","dependenciesFn","templateFn","declarationListEmitMode","compileDeclarationList","rawImports","encapsulation","Emulated","styleValues","compileStyles","styleNodes","style","animations","changeDetection","Default","createComponentType","createBaseDirectiveTypeParams","stringArrayAsType","createHostDirectivesType","resolvedList","stringAsType","stringMapAsLiteralExpression","mapValues","selectorForType","getInputsTypeExpression","q","required","hostBindingsMetadata","eventBindings","listeners","specialAttributes","styleAttr","classAttr","hostJob","HOST_REG_EXP","parseHostBindings","verifyHostBindings","shadowCss","encapsulateStyle","hostMeta","directive","hasForwardRef","inputsLiteral","createHostDirectivesMappingArray","outputsLiteral","isForwardReference","compileDeferResolverFunction","depExpressions","dependencies","isDeferrable","innerFn","isDefaultImport","symbolName","importPath","typeReference","fullList","itemsToExclude","exclude","findMatchingDirectivesAndPipes","directiveSelectors","fakeDirective","hasBindingPropertyName","binder","R3TargetBinder","eagerDirectiveSelectors","getEagerlyUsedDirectives","dir","allMatchedDirectiveSelectors","getUsedDirectives","eagerPipes","getEagerlyUsedPipes","directives","regular","deferCandidates","getUsedPipes","directiveMatcher","Scope","scopedNodeEntities","extractScopedNodeEntities","eagerDirectives","DirectiveBinder","symbols","nestingLevel","usedPipes","deferBlocks","TemplateBinder","applyWithScope","R3BoundTarget","namedEntities","elementsInScope","childScopes","isDeferred","newRootScope","ingest","nodeOrNodes","ingestScopedNode","maybeDeclare","thing","lookup","getChildScope","isInDeferBlock","selectorMatcher","visitElementOrTemplate","_selector","dirTarget","isComponent","setAttributeBinding","ioType","wasInDeferBlock","visitBoundAttributeOrEvent","visitNode","maybeMap","childScope","exprTargets","rawDeferred","deferredBlocks","deferredScopes","getEntitiesInScope","getDirectivesOfNode","getReferenceTarget","getConsumerOfBinding","getExpressionTarget","getDefinitionNodeOfSymbol","symbol","getNestingLevel","dirs","getDeferBlocks","getDeferredTriggerTarget","outsideRef","findEntityInScope","referenceTargetToElement","refInPlaceholder","targetInPlaceholder","entities","rootScope","entityMap","extractScopeEntities","currentEntities","scopesToProcess","templateEntities","ResourceLoader","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","jitExpressionSourceMap","compileComponentFromMeta","compileComponentDeclaration","convertDeclareComponentFacadeToMetadata","compileFactory","factoryRes","convertR3DependencyMetadataArray","compileFactoryDeclaration","preStatements","convertToR3QueryMetadata","convertQueryPredicate","convertQueryDeclarationToMetadata","inputsFromMetadata","parseInputsArray","outputsFromMetadata","parseMappingStringArray","propMetadata","inputsFromType","outputsFromType","field","ann","isInput","isOutput","hostDirective","extractHostBindings","getHostDirectiveBindingMapping","inputsPartialMetadataToInputMetadata","convertHostDeclarationToMetadata","convertOpaqueValuesToExpressions","classAttribute","styleAttribute","deferBlockDependencies","innerDep","convertDirectiveDeclarationToMetadata","convertPipeDeclarationToMetadata","components","convertPipeMapToMetadata","err","boundTarget","createR3ComponentDeferMetadata","facades","isAttributeDep","rawToken","createR3DependencyMetadata","dependencyFn","hostPropertyName","isHostListener","ngMetadataName","minifiedClassName","parseLegacyInputPartialOutput","isRequired","parseMappingString","fieldName","publishFacade","global","ng","ɵcompilerFacade","VERSION","CompilerConfig","defaultEncapsulation","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","_preserveSignificantWhitespace","_init","Extract","_inI18nBlock","_messages","Merge","_translations","wrapper","translatedNode","icuCase","_mode","_mayBeAddBlockChildren","wasInIcu","_inIcu","_isInTranslatableSection","_addMessage","isOpening","_isOpeningComment","isClosing","_isClosingComment","_inI18nNode","warn","_blockStartDepth","_depth","_blockChildren","_blockMeaningAndDesc","_openTranslatableSection","_closeTranslatableSection","_translateMessage","wasInI18nNode","wasInImplicitNode","_inImplicitNode","childNodes","translatedChildNodes","i18nAttr","_getI18nAttr","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","priority","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","missingTranslation","createSerializer","_translationBundle","format","MessageBundle","_preserveWhitespace","updateFromTemplate","htmlParserResult","i18nParserResult","getMessages","filterSources","mapperVisitor","MapPlaceholderNames","msgList","src","transformedMessage","compileClassMetadata","internalCompileClassMetadata","decorators","ctorParameters","propDecorators","compileComponentClassMetadata","internalCompileSetClassMetadataAsync","compileComponentMetadataAsyncResolver","compileOpaqueAsyncClassMetadata","deferResolver","deferredDependencyNames","wrapperParams","setClassMetadataCall","setClassMetaWrapper","setClassMetaAsync","dynamicImports","compileClassDebugInfo","debugInfo","debugInfoObject","lineNumber","forbidOrphanRendering","MINIMUM_PARTIAL_LINKER_VERSION$5","MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION","compileDeclareClassMetadata","compileComponentDeclareClassMetadata","callbackReturnDefinitionMap","toOptionalLiteralArray","toOptionalLiteralMap","object","compileDependencies","compileDependency","depMeta","compileDeclareDirectiveFromMetadata","createDirectiveDefinitionMap","minVersion","getMinimumVersionForPartialOutput","needsNewInputPartialOutput","createInputsPartialMetadata","legacyInputsPartialMetadata","compileHostMetadata","compileQuery","createHostDirectives","hasDecoratorTransformFunctions","hostMetadata","compileDeclareComponentFromMetadata","additionalTemplateInfo","createComponentDefinitionMap","templateInfo","blockVisitor","BlockPresenceVisitor","getTemplateExpression","isInline","hasBlocks","compileUsedDependenciesMetadata","resolvers","hasResolvers","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","TmplAstBlockNode","TmplAstBoundAttribute","TmplAstBoundDeferredTrigger","TmplAstBoundEvent","TmplAstBoundText","TmplAstContent","TmplAstDeferredBlock","TmplAstDeferredBlockError","TmplAstDeferredBlockLoading","TmplAstDeferredBlockPlaceholder","TmplAstDeferredTrigger","TmplAstElement","TmplAstForLoopBlock","TmplAstForLoopBlockEmpty","TmplAstHoverDeferredTrigger","TmplAstIcu","TmplAstIdleDeferredTrigger","TmplAstIfBlock","TmplAstIfBlockBranch","TmplAstImmediateDeferredTrigger","TmplAstInteractionDeferredTrigger","TmplAstLetDeclaration","TmplAstRecursiveVisitor","TmplAstReference","TmplAstSwitchBlock","TmplAstSwitchBlockCase","TmplAstTemplate","TmplAstText","TmplAstTextAttribute","TmplAstTimerDeferredTrigger","TmplAstUnknownBlock","TmplAstVariable","TmplAstViewportDeferredTrigger","outputAst","tmplAstVisitAll"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/@angular/compiler/fesm2022/compiler.mjs"],"sourcesContent":["/**\n * @license Angular v18.2.10\n * (c) 2010-2024 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 &&\n !cssSel.element &&\n 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() &&\n this.classNames.length == 0 &&\n 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 =\n 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 =\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 = {}));\n/** Flags describing an input for a directive. */\nvar InputFlags;\n(function (InputFlags) {\n InputFlags[InputFlags[\"None\"] = 0] = \"None\";\n InputFlags[InputFlags[\"SignalBased\"] = 1] = \"SignalBased\";\n InputFlags[InputFlags[\"HasDecoratorInputTransform\"] = 2] = \"HasDecoratorInputTransform\";\n})(InputFlags || (InputFlags = {}));\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 */,\n selector.element,\n ...selector.attrs,\n ...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 get InputFlags () { return InputFlags; },\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 * 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, preservePlaceholders) {\n return message.id || computeDecimalDigest(message, preservePlaceholders);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message, preservePlaceholders) {\n const visitor = new _SerializerIgnoreExpVisitor(preservePlaceholders);\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\n .map((child) => child.visit(this))\n .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 visitBlockPlaceholder(ph, context) {\n return `<ph block name=\"${ph.startName}\">${ph.children\n .map((child) => child.visit(this))\n .join(', ')}</ph name=\"${ph.closeName}\">`;\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 expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreExpVisitor extends _SerializerVisitor {\n constructor(preservePlaceholders) {\n super();\n this.preservePlaceholders = preservePlaceholders;\n }\n visitPlaceholder(ph, context) {\n // Do not take the expression into account when `preservePlaceholders` is disabled.\n return this.preservePlaceholders\n ? super.visitPlaceholder(ph, context)\n : `<ph name=\"${ph.name}\"/>`;\n }\n visitIcu(icu) {\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 (BigInt.asUintN(32, BigInt(hi)) << BigInt(32)) | BigInt.asUintN(32, BigInt(lo));\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n // Rotate the 64-bit message fingerprint one bit to the left and then add the meaning\n // fingerprint.\n msgFingerprint =\n BigInt.asUintN(64, msgFingerprint << BigInt(1)) |\n ((msgFingerprint >> BigInt(63)) & BigInt(1));\n msgFingerprint += fingerprint(meaning);\n }\n return BigInt.asUintN(63, msgFingerprint).toString();\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}\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// 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}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\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//// 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[\"BitwiseOr\"] = 11] = \"BitwiseOr\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 12] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 13] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 14] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 15] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 16] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 17] = \"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 bitwiseOr(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);\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 &&\n this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) &&\n 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 &&\n this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name &&\n 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 &&\n this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args) &&\n 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 &&\n 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 &&\n 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 ?? 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 &&\n this.value.name === e.value.name &&\n this.value.moduleName === e.value.moduleName &&\n 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 &&\n this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) &&\n 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 || e instanceof DeclareFunctionStmt) &&\n 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 ArrowFunctionExpr extends Expression {\n // Note that `body: Expression` represents `() => expr` whereas\n // `body: Statement[]` represents `() => { expr }`.\n constructor(params, body, type, sourceSpan) {\n super(type, sourceSpan);\n this.params = params;\n this.body = body;\n }\n isEquivalent(e) {\n if (!(e instanceof ArrowFunctionExpr) || !areAllEquivalent(this.params, e.params)) {\n return false;\n }\n if (this.body instanceof Expression && e.body instanceof Expression) {\n return this.body.isEquivalent(e.body);\n }\n if (Array.isArray(this.body) && Array.isArray(e.body)) {\n return areAllEquivalent(this.body, e.body);\n }\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitArrowFunctionExpr(this, context);\n }\n clone() {\n // TODO: Should we deep clone statements?\n return new ArrowFunctionExpr(this.params.map((p) => p.clone()), Array.isArray(this.body) ? this.body : this.body.clone(), this.type, this.sourceSpan);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareVarStmt(name, this, INFERRED_TYPE, modifiers, this.sourceSpan);\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 &&\n 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 &&\n this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) &&\n 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 &&\n 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 &&\n 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 &&\n 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 &&\n 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 visitArrowFunctionExpr(ast, context) {\n if (Array.isArray(ast.body)) {\n this.visitAllStatements(ast.body, context);\n }\n else {\n this.visitExpression(ast.body, context);\n }\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 arrowFn(params, body, type, sourceSpan) {\n return new ArrowFunctionExpr(params, body, type, sourceSpan);\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 ArrowFunctionExpr: ArrowFunctionExpr,\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 arrowFn: arrowFn,\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 /**\n * Constant pool also tracks claimed names from {@link uniqueName}.\n * This is useful to avoid collisions if variables are intended to be\n * named a certain way- but may conflict. We wouldn't want to always suffix\n * them with unique numbers.\n */\n this._claimedNames = 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 // TODO: useUniqueName(false) is necessary for naming compatibility with\n // TemplateDefinitionBuilder, but should be removed once Template Pipeline is the default.\n getSharedFunctionReference(fn, prefix, useUniqueName = true) {\n const isArrow = fn instanceof ArrowFunctionExpr;\n for (const current of this.statements) {\n // Arrow functions are saved as variables so we check if the\n // value of the variable is the same as the arrow function.\n if (isArrow && current instanceof DeclareVarStmt && current.value?.isEquivalent(fn)) {\n return variable(current.name);\n }\n // Function declarations are saved as function statements\n // so we compare them directly to the passed-in function.\n if (!isArrow &&\n current instanceof DeclareFunctionStmt &&\n fn instanceof FunctionExpr &&\n fn.isEquivalent(current)) {\n return variable(current.name);\n }\n }\n // Otherwise declare the function.\n const name = useUniqueName ? this.uniqueName(prefix) : prefix;\n this.statements.push(fn instanceof FunctionExpr\n ? fn.toDeclStmt(name, StmtModifier.Final)\n : new DeclareVarStmt(name, fn, INFERRED_TYPE, StmtModifier.Final, fn.sourceSpan));\n return variable(name);\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\n .filter(isVariable)\n .map((e) => new FnParam(e.name, DYNAMIC_TYPE));\n const pureFunctionDeclaration = arrowFn(parameters, 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 in the context of this pool.\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(name, alwaysIncludeSuffix = true) {\n const count = this._claimedNames.get(name) ?? 0;\n const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;\n this._claimedNames.set(name, count + 1);\n return result;\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 &&\n 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 = {\n name: 'ɵɵsyntheticHostProperty',\n moduleName: CORE,\n }; }\n static { this.syntheticHostListener = {\n name: 'ɵɵsyntheticHostListener',\n moduleName: CORE,\n }; }\n static { this.attribute = { name: 'ɵɵattribute', moduleName: CORE }; }\n static { this.attributeInterpolate1 = {\n name: 'ɵɵattributeInterpolate1',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate2 = {\n name: 'ɵɵattributeInterpolate2',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate3 = {\n name: 'ɵɵattributeInterpolate3',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate4 = {\n name: 'ɵɵattributeInterpolate4',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate5 = {\n name: 'ɵɵattributeInterpolate5',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate6 = {\n name: 'ɵɵattributeInterpolate6',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate7 = {\n name: 'ɵɵattributeInterpolate7',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolate8 = {\n name: 'ɵɵattributeInterpolate8',\n moduleName: CORE,\n }; }\n static { this.attributeInterpolateV = {\n name: 'ɵɵattributeInterpolateV',\n moduleName: CORE,\n }; }\n static { this.classProp = { name: 'ɵɵclassProp', moduleName: CORE }; }\n static { this.elementContainerStart = {\n name: 'ɵɵelementContainerStart',\n moduleName: CORE,\n }; }\n static { this.elementContainerEnd = {\n name: 'ɵɵelementContainerEnd',\n moduleName: CORE,\n }; }\n static { this.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE }; }\n static { this.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE }; }\n static { this.styleMapInterpolate1 = {\n name: 'ɵɵstyleMapInterpolate1',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate2 = {\n name: 'ɵɵstyleMapInterpolate2',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate3 = {\n name: 'ɵɵstyleMapInterpolate3',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate4 = {\n name: 'ɵɵstyleMapInterpolate4',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate5 = {\n name: 'ɵɵstyleMapInterpolate5',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate6 = {\n name: 'ɵɵstyleMapInterpolate6',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate7 = {\n name: 'ɵɵstyleMapInterpolate7',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolate8 = {\n name: 'ɵɵstyleMapInterpolate8',\n moduleName: CORE,\n }; }\n static { this.styleMapInterpolateV = {\n name: 'ɵɵstyleMapInterpolateV',\n moduleName: CORE,\n }; }\n static { this.classMap = { name: 'ɵɵclassMap', moduleName: CORE }; }\n static { this.classMapInterpolate1 = {\n name: 'ɵɵclassMapInterpolate1',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate2 = {\n name: 'ɵɵclassMapInterpolate2',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate3 = {\n name: 'ɵɵclassMapInterpolate3',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate4 = {\n name: 'ɵɵclassMapInterpolate4',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate5 = {\n name: 'ɵɵclassMapInterpolate5',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate6 = {\n name: 'ɵɵclassMapInterpolate6',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate7 = {\n name: 'ɵɵclassMapInterpolate7',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolate8 = {\n name: 'ɵɵclassMapInterpolate8',\n moduleName: CORE,\n }; }\n static { this.classMapInterpolateV = {\n name: 'ɵɵclassMapInterpolateV',\n moduleName: CORE,\n }; }\n static { this.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE }; }\n static { this.stylePropInterpolate1 = {\n name: 'ɵɵstylePropInterpolate1',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate2 = {\n name: 'ɵɵstylePropInterpolate2',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate3 = {\n name: 'ɵɵstylePropInterpolate3',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate4 = {\n name: 'ɵɵstylePropInterpolate4',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate5 = {\n name: 'ɵɵstylePropInterpolate5',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate6 = {\n name: 'ɵɵstylePropInterpolate6',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate7 = {\n name: 'ɵɵstylePropInterpolate7',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolate8 = {\n name: 'ɵɵstylePropInterpolate8',\n moduleName: CORE,\n }; }\n static { this.stylePropInterpolateV = {\n name: 'ɵɵstylePropInterpolateV',\n moduleName: CORE,\n }; }\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.deferWhen = { name: 'ɵɵdeferWhen', moduleName: CORE }; }\n static { this.deferOnIdle = { name: 'ɵɵdeferOnIdle', moduleName: CORE }; }\n static { this.deferOnImmediate = { name: 'ɵɵdeferOnImmediate', moduleName: CORE }; }\n static { this.deferOnTimer = { name: 'ɵɵdeferOnTimer', moduleName: CORE }; }\n static { this.deferOnHover = { name: 'ɵɵdeferOnHover', moduleName: CORE }; }\n static { this.deferOnInteraction = { name: 'ɵɵdeferOnInteraction', moduleName: CORE }; }\n static { this.deferOnViewport = { name: 'ɵɵdeferOnViewport', moduleName: CORE }; }\n static { this.deferPrefetchWhen = { name: 'ɵɵdeferPrefetchWhen', moduleName: CORE }; }\n static { this.deferPrefetchOnIdle = {\n name: 'ɵɵdeferPrefetchOnIdle',\n moduleName: CORE,\n }; }\n static { this.deferPrefetchOnImmediate = {\n name: 'ɵɵdeferPrefetchOnImmediate',\n moduleName: CORE,\n }; }\n static { this.deferPrefetchOnTimer = {\n name: 'ɵɵdeferPrefetchOnTimer',\n moduleName: CORE,\n }; }\n static { this.deferPrefetchOnHover = {\n name: 'ɵɵdeferPrefetchOnHover',\n moduleName: CORE,\n }; }\n static { this.deferPrefetchOnInteraction = {\n name: 'ɵɵdeferPrefetchOnInteraction',\n moduleName: CORE,\n }; }\n static { this.deferPrefetchOnViewport = {\n name: 'ɵɵdeferPrefetchOnViewport',\n moduleName: CORE,\n }; }\n static { this.deferEnableTimerScheduling = {\n name: 'ɵɵdeferEnableTimerScheduling',\n moduleName: CORE,\n }; }\n static { this.conditional = { name: 'ɵɵconditional', moduleName: CORE }; }\n static { this.repeater = { name: 'ɵɵrepeater', moduleName: CORE }; }\n static { this.repeaterCreate = { name: 'ɵɵrepeaterCreate', moduleName: CORE }; }\n static { this.repeaterTrackByIndex = {\n name: 'ɵɵrepeaterTrackByIndex',\n moduleName: CORE,\n }; }\n static { this.repeaterTrackByIdentity = {\n name: 'ɵɵrepeaterTrackByIdentity',\n moduleName: CORE,\n }; }\n static { this.componentInstance = { name: 'ɵɵcomponentInstance', 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 = {\n name: 'ɵɵpropertyInterpolate',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate1 = {\n name: 'ɵɵpropertyInterpolate1',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate2 = {\n name: 'ɵɵpropertyInterpolate2',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate3 = {\n name: 'ɵɵpropertyInterpolate3',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate4 = {\n name: 'ɵɵpropertyInterpolate4',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate5 = {\n name: 'ɵɵpropertyInterpolate5',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate6 = {\n name: 'ɵɵpropertyInterpolate6',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate7 = {\n name: 'ɵɵpropertyInterpolate7',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolate8 = {\n name: 'ɵɵpropertyInterpolate8',\n moduleName: CORE,\n }; }\n static { this.propertyInterpolateV = {\n name: 'ɵɵpropertyInterpolateV',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵtemplateRefExtractor',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵInjectableDeclaration',\n moduleName: CORE,\n }; }\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.getComponentDepsFactory = {\n name: 'ɵɵgetComponentDepsFactory',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵInjectorDeclaration',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵregisterNgModuleType',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵngDeclareClassMetadata',\n moduleName: CORE,\n }; }\n static { this.declareClassMetadataAsync = {\n name: 'ɵɵngDeclareClassMetadataAsync',\n moduleName: CORE,\n }; }\n static { this.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE }; }\n static { this.setClassMetadataAsync = {\n name: 'ɵsetClassMetadataAsync',\n moduleName: CORE,\n }; }\n static { this.setClassDebugInfo = { name: 'ɵsetClassDebugInfo', 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 // Signal queries\n static { this.viewQuerySignal = { name: 'ɵɵviewQuerySignal', moduleName: CORE }; }\n static { this.contentQuerySignal = { name: 'ɵɵcontentQuerySignal', moduleName: CORE }; }\n static { this.queryAdvance = { name: 'ɵɵqueryAdvance', moduleName: CORE }; }\n // Two-way bindings\n static { this.twoWayProperty = { name: 'ɵɵtwoWayProperty', moduleName: CORE }; }\n static { this.twoWayBindingSet = { name: 'ɵɵtwoWayBindingSet', moduleName: CORE }; }\n static { this.twoWayListener = { name: 'ɵɵtwoWayListener', moduleName: CORE }; }\n static { this.declareLet = { name: 'ɵɵdeclareLet', moduleName: CORE }; }\n static { this.storeLet = { name: 'ɵɵstoreLet', moduleName: CORE }; }\n static { this.readContextLet = { name: 'ɵɵreadContextLet', moduleName: CORE }; }\n static { this.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE }; }\n static { this.InheritDefinitionFeature = {\n name: 'ɵɵInheritDefinitionFeature',\n moduleName: CORE,\n }; }\n static { this.CopyDefinitionFeature = {\n name: 'ɵɵCopyDefinitionFeature',\n moduleName: CORE,\n }; }\n static { this.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE }; }\n static { this.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE }; }\n static { this.HostDirectivesFeature = {\n name: 'ɵɵHostDirectivesFeature',\n moduleName: CORE,\n }; }\n static { this.InputTransformsFeatureFeature = {\n name: 'ɵɵInputTransformsFeature',\n moduleName: CORE,\n }; }\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 = {\n name: 'ɵɵsanitizeResourceUrl',\n moduleName: CORE,\n }; }\n static { this.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE }; }\n static { this.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE }; }\n static { this.sanitizeUrlOrResourceUrl = {\n name: 'ɵɵsanitizeUrlOrResourceUrl',\n moduleName: CORE,\n }; }\n static { this.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE }; }\n static { this.trustConstantResourceUrl = {\n name: 'ɵɵtrustConstantResourceUrl',\n moduleName: CORE,\n }; }\n static { this.validateIframeAttribute = {\n name: 'ɵɵvalidateIframeAttribute',\n moduleName: CORE,\n }; }\n // type-checking\n static { this.InputSignalBrandWriteType = { name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE', moduleName: CORE }; }\n static { this.UnwrapDirectiveSignalInputs = { name: 'ɵUnwrapDirectiveSignalInputs', moduleName: CORE }; }\n static { this.unwrapWritableSignal = { name: 'ɵunwrapWritableSignal', 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 += 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\n ? '//' + 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\n .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 const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;\n if (shouldParenthesize) {\n ctx.print(expr.fn, '(');\n }\n expr.fn.visitExpression(this, ctx);\n if (shouldParenthesize) {\n ctx.print(expr.fn, ')');\n }\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.BitwiseOr:\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, \n /* 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 ? arrowFn([], 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([arrowFn([], 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('__ngFactoryType__');\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('__ngConditionalFactory__');\n body.push(r.set(NULL_EXPR).toDeclStmt());\n const ctorStmt = ctorExpr !== null\n ? 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 ? InstantiateExpr : 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.name, 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 = arrowFn([], [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, [\n typeWithParameters(meta.type.type, meta.typeArgumentCount),\n ctorDepsType,\n ]));\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 */ |\n (dep.self ? 2 /* InjectFlags.Self */ : 0) |\n (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) |\n (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\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[\"TWO_WAY\"] = 3] = \"TWO_WAY\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nvar ParsedEventType;\n(function (ParsedEventType) {\n // DOM or Directive event\n ParsedEventType[ParsedEventType[\"Regular\"] = 0] = \"Regular\";\n // Animation specific event\n ParsedEventType[ParsedEventType[\"Animation\"] = 1] = \"Animation\";\n // Event side of a two-way binding (e.g. `[(property)]=\"expression\"`).\n ParsedEventType[ParsedEventType[\"TwoWay\"] = 2] = \"TwoWay\";\n})(ParsedEventType || (ParsedEventType = {}));\nclass ParsedEvent {\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}\nvar BindingType;\n(function (BindingType) {\n // A regular binding to a property (e.g. `[property]=\"expression\"`).\n BindingType[BindingType[\"Property\"] = 0] = \"Property\";\n // A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n BindingType[BindingType[\"Attribute\"] = 1] = \"Attribute\";\n // A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n BindingType[BindingType[\"Class\"] = 2] = \"Class\";\n // A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n BindingType[BindingType[\"Style\"] = 3] = \"Style\";\n // A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n BindingType[BindingType[\"Animation\"] = 4] = \"Animation\";\n // Property side of a two-way binding (e.g. `[(property)]=\"expression\"`).\n BindingType[BindingType[\"TwoWay\"] = 5] = \"TwoWay\";\n})(BindingType || (BindingType = {}));\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\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, fatal = true) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const colonIndex = elementName.indexOf(':', 1);\n if (colonIndex === -1) {\n if (fatal) {\n throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n }\n else {\n return [null, elementName];\n }\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 * 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 === ParsedEventType.Regular ? event.targetOrPhase : null;\n const phase = event.type === 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(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan) {\n this.nameSpan = nameSpan;\n this.sourceSpan = sourceSpan;\n this.prefetchSpan = prefetchSpan;\n this.whenOrOnSourceSpan = whenOrOnSourceSpan;\n }\n visit(visitor) {\n return visitor.visitDeferredTrigger(this);\n }\n}\nclass BoundDeferredTrigger extends DeferredTrigger {\n constructor(value, sourceSpan, prefetchSpan, whenSourceSpan) {\n // BoundDeferredTrigger is for 'when' triggers. These aren't really \"triggers\" and don't have a\n // nameSpan. Trigger names are the built in event triggers like hover, interaction, etc.\n super(/** nameSpan */ null, sourceSpan, prefetchSpan, whenSourceSpan);\n this.value = value;\n }\n}\nclass IdleDeferredTrigger extends DeferredTrigger {\n}\nclass ImmediateDeferredTrigger extends DeferredTrigger {\n}\nclass HoverDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass TimerDeferredTrigger extends DeferredTrigger {\n constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.delay = delay;\n }\n}\nclass InteractionDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass ViewportDeferredTrigger extends DeferredTrigger {\n constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n this.reference = reference;\n }\n}\nclass BlockNode {\n constructor(nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {\n this.nameSpan = nameSpan;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n}\nclass DeferredBlockPlaceholder extends BlockNode {\n constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.minimumTime = minimumTime;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockPlaceholder(this);\n }\n}\nclass DeferredBlockLoading extends BlockNode {\n constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.afterTime = afterTime;\n this.minimumTime = minimumTime;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockLoading(this);\n }\n}\nclass DeferredBlockError extends BlockNode {\n constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitDeferredBlockError(this);\n }\n}\nclass DeferredBlock extends BlockNode {\n constructor(children, triggers, prefetchTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.placeholder = placeholder;\n this.loading = loading;\n this.error = error;\n this.mainBlockSpan = mainBlockSpan;\n this.i18n = i18n;\n this.triggers = triggers;\n this.prefetchTriggers = prefetchTriggers;\n // We cache the keys since we know that they won't change and we\n // don't want to enumarate them every time we're traversing the AST.\n this.definedTriggers = Object.keys(triggers);\n this.definedPrefetchTriggers = Object.keys(prefetchTriggers);\n }\n visit(visitor) {\n return visitor.visitDeferredBlock(this);\n }\n visitAll(visitor) {\n this.visitTriggers(this.definedTriggers, this.triggers, visitor);\n this.visitTriggers(this.definedPrefetchTriggers, this.prefetchTriggers, visitor);\n visitAll$1(visitor, this.children);\n const remainingBlocks = [this.placeholder, this.loading, this.error].filter((x) => x !== null);\n visitAll$1(visitor, remainingBlocks);\n }\n visitTriggers(keys, triggers, visitor) {\n visitAll$1(visitor, keys.map((k) => triggers[k]));\n }\n}\nclass SwitchBlock extends BlockNode {\n constructor(expression, cases, \n /**\n * These blocks are only captured to allow for autocompletion in the language service. They\n * aren't meant to be processed in any other way.\n */\n unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.cases = cases;\n this.unknownBlocks = unknownBlocks;\n }\n visit(visitor) {\n return visitor.visitSwitchBlock(this);\n }\n}\nclass SwitchBlockCase extends BlockNode {\n constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitSwitchBlockCase(this);\n }\n}\nclass ForLoopBlock extends BlockNode {\n constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.item = item;\n this.expression = expression;\n this.trackBy = trackBy;\n this.trackKeywordSpan = trackKeywordSpan;\n this.contextVariables = contextVariables;\n this.children = children;\n this.empty = empty;\n this.mainBlockSpan = mainBlockSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitForLoopBlock(this);\n }\n}\nclass ForLoopBlockEmpty extends BlockNode {\n constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.children = children;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitForLoopBlockEmpty(this);\n }\n}\nclass IfBlock extends BlockNode {\n constructor(branches, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.branches = branches;\n }\n visit(visitor) {\n return visitor.visitIfBlock(this);\n }\n}\nclass IfBlockBranch extends BlockNode {\n constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {\n super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);\n this.expression = expression;\n this.children = children;\n this.expressionAlias = expressionAlias;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIfBlockBranch(this);\n }\n}\nclass UnknownBlock {\n constructor(name, sourceSpan, nameSpan) {\n this.name = name;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n }\n visit(visitor) {\n return visitor.visitUnknownBlock(this);\n }\n}\nclass LetDeclaration$1 {\n constructor(name, value, sourceSpan, nameSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitLetDeclaration(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, children, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.children = children;\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 deferred.visitAll(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 visitSwitchBlock(block) {\n visitAll$1(this, block.cases);\n }\n visitSwitchBlockCase(block) {\n visitAll$1(this, block.children);\n }\n visitForLoopBlock(block) {\n const blockItems = [block.item, ...block.contextVariables, ...block.children];\n block.empty && blockItems.push(block.empty);\n visitAll$1(this, blockItems);\n }\n visitForLoopBlockEmpty(block) {\n visitAll$1(this, block.children);\n }\n visitIfBlock(block) {\n visitAll$1(this, block.branches);\n }\n visitIfBlockBranch(block) {\n const blockItems = block.children;\n block.expressionAlias && blockItems.push(block.expressionAlias);\n visitAll$1(this, blockItems);\n }\n visitContent(content) {\n visitAll$1(this, content.children);\n }\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 visitUnknownBlock(block) { }\n visitLetDeclaration(decl) { }\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 {\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 }\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}\nclass BlockPlaceholder {\n constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {\n this.name = name;\n this.parameters = parameters;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitBlockPlaceholder(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 visitBlockPlaceholder(ph, context) {\n const children = ph.children.map((n) => n.visit(this, context));\n return new BlockPlaceholder(ph.name, ph.parameters, ph.startName, ph.closeName, children, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\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 visitBlockPlaceholder(ph, context) {\n ph.children.forEach((child) => child.visit(this));\n }\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 visitBlockPlaceholder(ph) {\n const children = ph.children.map((child) => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\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)\n ? 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 visitBlockPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitBlockPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\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)\n .map((name) => `${name}=\"${attrs[name]}\"`)\n .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, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [/</g, '<'],\n [/>/g, '>'],\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\n/**\n * Defines the `handler` value on the serialized XMB, indicating that Angular\n * generated the bundle. This is useful for analytics in Translation Console.\n *\n * NOTE: Keep in sync with\n * packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.ts.\n */\nconst _XMB_HANDLER = 'angular';\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 constructor(preservePlaceholders = true) {\n super();\n this.preservePlaceholders = preservePlaceholders;\n }\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n const rootNode = new Tag(_MESSAGES_TAG);\n rootNode.attrs['handler'] = _XMB_HANDLER;\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, {}, [\n new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`),\n ]));\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, this.preservePlaceholders);\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 }, [\n startEx,\n startTagAsText,\n ]);\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 }, [\n closeEx,\n closeTagAsText,\n ]);\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 visitBlockPlaceholder(ph, context) {\n const startAsText = new Text$1(`@${ph.name}`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startAsText]);\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, startAsText]);\n const closeAsText = new Text$1(`}`);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeAsText]);\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, closeAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\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)\n .map((value) => value + ' {...}')\n .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, preservePlaceholders) {\n return decimalDigest(message, preservePlaceholders);\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/** 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_';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some((attr) => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\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}\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/**\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 * not work in some cases when object keys are mangled by a 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/**\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(pushStatement, name) {\n let temp = null;\n return () => {\n if (!temp) {\n pushStatement(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}\n/**\n * Serializes inputs and outputs for `defineDirective` and `defineComponent`.\n *\n * This will attempt to generate optimized data structures to minimize memory or\n * file size of fully compiled applications.\n */\nfunction conditionallyCreateDirectiveBindingLiteral(map, forInputs) {\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 const differentDeclaringName = publicName !== declaredName;\n const hasDecoratorInputTransform = value.transformFunction !== null;\n let flags = InputFlags.None;\n // Build up input flags\n if (value.isSignal) {\n flags |= InputFlags.SignalBased;\n }\n if (hasDecoratorInputTransform) {\n flags |= InputFlags.HasDecoratorInputTransform;\n }\n // Inputs, compared to outputs, will track their declared name (for `ngOnChanges`), support\n // decorator input transform functions, or store flag information if there is any.\n if (forInputs &&\n (differentDeclaringName || hasDecoratorInputTransform || flags !== InputFlags.None)) {\n const result = [literal(flags), asLiteral(publicName)];\n if (differentDeclaringName || hasDecoratorInputTransform) {\n result.push(asLiteral(declaredName));\n if (hasDecoratorInputTransform) {\n result.push(value.transformFunction);\n }\n }\n expressionValue = literalArr(result);\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 * 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 const existing = this.values.find((value) => value.key === key);\n if (existing) {\n existing.value = value;\n }\n else {\n this.values.push({ key: key, value, quoted: false });\n }\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Creates a `CssSelector` from an AST node.\n */\nfunction createCssSelectorFromNode(node) {\n const elementName = node instanceof Element$1 ? node.name : 'ng-template';\n const attributes = getAttrsForDirectiveMatching(node);\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 * 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 === BindingType.Property || i.type === BindingType.TwoWay) {\n attributesMap[i.name] = '';\n }\n });\n elOrTpl.outputs.forEach((o) => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\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 = { statements: [], expression: arrowFn([], 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 }\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, [\n typeWithParameters(meta.type.type, meta.typeArgumentCount),\n ]));\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 const t = new FnParam('__ngFactoryType__', DYNAMIC_TYPE);\n return arrowFn([t], type.prop('ɵfac').callFn([variable(t.name)]));\n}\n\nconst UNUSABLE_INTERPOLATION_REGEXPS = [\n /@/, // control flow reserved symbol\n /^\\s*$/, // empty\n /[<>]/, // html tag\n /^[{}]$/, // i18n expansion\n /&(#|[a-z])/i, // character reference,\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('{{', '}}');\nconst DEFAULT_CONTAINER_BLOCKS = new Set(['switch']);\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\n .substring(0, offset - 1)\n .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\n ? `${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 visitArrowFunctionExpr(ast, ctx) {\n ctx.print(ast, '(');\n this._visitParams(ast.params, ctx);\n ctx.print(ast, ') =>');\n if (Array.isArray(ast.body)) {\n ctx.println(ast, `{`);\n ctx.incIndent();\n this.visitAllStatements(ast.body, ctx);\n ctx.decIndent();\n ctx.print(ast, `}`);\n }\n else {\n const isObjectLiteral = ast.body instanceof LiteralMapExpr;\n if (isObjectLiteral) {\n ctx.print(ast, '(');\n }\n ast.body.visitExpression(this, ctx);\n if (isObjectLiteral) {\n ctx.print(ast, ')');\n }\n }\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 const trustedTypes = _global['trustedTypes'];\n policy = null;\n if (trustedTypes) {\n try {\n policy = 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 = [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({ 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)\n .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. In local compilation mode (i.e., for\n // `R3NgModuleMetadataKind.LOCAL`) we assign the bootstrap field using the runtime\n // `ɵɵsetNgModuleScope`.\n if (meta.kind === R3NgModuleMetadataKind.Global && meta.bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\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)\n .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\n ? 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 (meta.kind === R3NgModuleMetadataKind.Local && meta.bootstrapExpression) {\n scopeMap.set('bootstrap', meta.bootstrapExpression);\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(/* 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}\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)\n .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\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',\n 'initial',\n 'revert',\n 'unset',\n // animation-direction\n 'alternate',\n 'alternate-reverse',\n 'normal',\n 'reverse',\n // animation-fill-mode\n 'backwards',\n 'both',\n 'forwards',\n 'none',\n // animation-play-state\n 'paused',\n 'running',\n // animation-timing-function\n 'ease',\n 'ease-in',\n 'ease-in-out',\n 'ease-out',\n 'linear',\n 'step-start',\n 'step-end',\n // `steps()` function\n 'end',\n 'jump-both',\n 'jump-end',\n 'jump-none',\n 'jump-start',\n 'start',\n]);\n/**\n * The following array contains all of the CSS at-rule identifiers which are scoped.\n */\nconst scopedAtRuleIdentifiers = [\n '@media',\n '@supports',\n '@document',\n '@layer',\n '@container',\n '@scope',\n '@starting-style',\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 * captures how many (if any) leading whitespaces are present or a comma\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 sensitive 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\n .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] ?? '')\n .trim()\n .split(',')\n .map((m) => m.trim())\n .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 (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {\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\n .replace(_shadowDeepSelectors, ' ')\n .replace(_polyfillHostNoCombinatorRe, ' ');\n return new CssRule(selector, rule.content);\n });\n }\n _scopeSelector(selector, scopeSelector, hostSelector) {\n return selector\n .split(/ ?, ?/)\n .map((part) => part.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 p;\n }\n if (p.includes(_polyfillHostNoCombinator)) {\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.includes(_polyfillHostNoCombinator);\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 // Do not trim the selector, as otherwise this will break sourcemaps\n // when they are defined on multiple lines\n // Example:\n // div,\n // p { color: red}\n const part = selector.slice(startIndex, res.index);\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(/__esc-ph-(\\d+)__/) && selector[res.index + 1]?.match(/[a-fA-F\\d]/)) {\n continue;\n }\n shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator);\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.includes(_polyfillHostNoCombinator);\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\n .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 // Escaped characters have a specific placeholder so they can be detected separately.\n selector = selector.replace(/(\\\\.)/g, (_, keep) => {\n const replaceBy = `__esc-ph-${this.index}__`;\n this.placeholders.push(keep);\n this.index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, 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(/__(?:ph|esc-ph)-(\\d+)__/g, (_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 = [\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 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\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 op to conditionally render a template.\n */\n OpKind[OpKind[\"Conditional\"] = 11] = \"Conditional\";\n /**\n * An operation to re-enable binding, after it was previously disabled.\n */\n OpKind[OpKind[\"EnableBindings\"] = 12] = \"EnableBindings\";\n /**\n * An operation to render a text node.\n */\n OpKind[OpKind[\"Text\"] = 13] = \"Text\";\n /**\n * An operation declaring an event listener for an element.\n */\n OpKind[OpKind[\"Listener\"] = 14] = \"Listener\";\n /**\n * An operation to interpolate text into a text node.\n */\n OpKind[OpKind[\"InterpolateText\"] = 15] = \"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\"] = 16] = \"Binding\";\n /**\n * An operation to bind an expression to a property of an element.\n */\n OpKind[OpKind[\"Property\"] = 17] = \"Property\";\n /**\n * An operation to bind an expression to a style property of an element.\n */\n OpKind[OpKind[\"StyleProp\"] = 18] = \"StyleProp\";\n /**\n * An operation to bind an expression to a class property of an element.\n */\n OpKind[OpKind[\"ClassProp\"] = 19] = \"ClassProp\";\n /**\n * An operation to bind an expression to the styles of an element.\n */\n OpKind[OpKind[\"StyleMap\"] = 20] = \"StyleMap\";\n /**\n * An operation to bind an expression to the classes of an element.\n */\n OpKind[OpKind[\"ClassMap\"] = 21] = \"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\"] = 22] = \"Advance\";\n /**\n * An operation to instantiate a pipe.\n */\n OpKind[OpKind[\"Pipe\"] = 23] = \"Pipe\";\n /**\n * An operation to associate an attribute with an element.\n */\n OpKind[OpKind[\"Attribute\"] = 24] = \"Attribute\";\n /**\n * An attribute that has been extracted for inclusion in the consts array.\n */\n OpKind[OpKind[\"ExtractedAttribute\"] = 25] = \"ExtractedAttribute\";\n /**\n * An operation that configures a `@defer` block.\n */\n OpKind[OpKind[\"Defer\"] = 26] = \"Defer\";\n /**\n * An operation that controls when a `@defer` loads.\n */\n OpKind[OpKind[\"DeferOn\"] = 27] = \"DeferOn\";\n /**\n * An operation that controls when a `@defer` loads, using a custom expression as the condition.\n */\n OpKind[OpKind[\"DeferWhen\"] = 28] = \"DeferWhen\";\n /**\n * An i18n message that has been extracted for inclusion in the consts array.\n */\n OpKind[OpKind[\"I18nMessage\"] = 29] = \"I18nMessage\";\n /**\n * A host binding property.\n */\n OpKind[OpKind[\"HostProperty\"] = 30] = \"HostProperty\";\n /**\n * A namespace change, which causes the subsequent elements to be processed as either HTML or SVG.\n */\n OpKind[OpKind[\"Namespace\"] = 31] = \"Namespace\";\n /**\n * Configure a content projeciton definition for the view.\n */\n OpKind[OpKind[\"ProjectionDef\"] = 32] = \"ProjectionDef\";\n /**\n * Create a content projection slot.\n */\n OpKind[OpKind[\"Projection\"] = 33] = \"Projection\";\n /**\n * Create a repeater creation instruction op.\n */\n OpKind[OpKind[\"RepeaterCreate\"] = 34] = \"RepeaterCreate\";\n /**\n * An update up for a repeater.\n */\n OpKind[OpKind[\"Repeater\"] = 35] = \"Repeater\";\n /**\n * An operation to bind an expression to the property side of a two-way binding.\n */\n OpKind[OpKind[\"TwoWayProperty\"] = 36] = \"TwoWayProperty\";\n /**\n * An operation declaring the event side of a two-way binding.\n */\n OpKind[OpKind[\"TwoWayListener\"] = 37] = \"TwoWayListener\";\n /**\n * A creation-time operation that initializes the slot for a `@let` declaration.\n */\n OpKind[OpKind[\"DeclareLet\"] = 38] = \"DeclareLet\";\n /**\n * An update-time operation that stores the current value of a `@let` declaration.\n */\n OpKind[OpKind[\"StoreLet\"] = 39] = \"StoreLet\";\n /**\n * The start of an i18n block.\n */\n OpKind[OpKind[\"I18nStart\"] = 40] = \"I18nStart\";\n /**\n * A self-closing i18n on a single element.\n */\n OpKind[OpKind[\"I18n\"] = 41] = \"I18n\";\n /**\n * The end of an i18n block.\n */\n OpKind[OpKind[\"I18nEnd\"] = 42] = \"I18nEnd\";\n /**\n * An expression in an i18n message.\n */\n OpKind[OpKind[\"I18nExpression\"] = 43] = \"I18nExpression\";\n /**\n * An instruction that applies a set of i18n expressions.\n */\n OpKind[OpKind[\"I18nApply\"] = 44] = \"I18nApply\";\n /**\n * An instruction to create an ICU expression.\n */\n OpKind[OpKind[\"IcuStart\"] = 45] = \"IcuStart\";\n /**\n * An instruction to update an ICU expression.\n */\n OpKind[OpKind[\"IcuEnd\"] = 46] = \"IcuEnd\";\n /**\n * An instruction representing a placeholder in an ICU expression.\n */\n OpKind[OpKind[\"IcuPlaceholder\"] = 47] = \"IcuPlaceholder\";\n /**\n * An i18n context containing information needed to generate an i18n message.\n */\n OpKind[OpKind[\"I18nContext\"] = 48] = \"I18nContext\";\n /**\n * A creation op that corresponds to i18n attributes on an element.\n */\n OpKind[OpKind[\"I18nAttributes\"] = 49] = \"I18nAttributes\";\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 * A reference to the view context, for use inside a track function.\n */\n ExpressionKind[ExpressionKind[\"TrackContext\"] = 2] = \"TrackContext\";\n /**\n * Read of a variable declared in a `VariableOp`.\n */\n ExpressionKind[ExpressionKind[\"ReadVariable\"] = 3] = \"ReadVariable\";\n /**\n * Runtime operation to navigate to the next view context in the view hierarchy.\n */\n ExpressionKind[ExpressionKind[\"NextContext\"] = 4] = \"NextContext\";\n /**\n * Runtime operation to retrieve the value of a local reference.\n */\n ExpressionKind[ExpressionKind[\"Reference\"] = 5] = \"Reference\";\n /**\n * A call storing the value of a `@let` declaration.\n */\n ExpressionKind[ExpressionKind[\"StoreLet\"] = 6] = \"StoreLet\";\n /**\n * A reference to a `@let` declaration read from the context view.\n */\n ExpressionKind[ExpressionKind[\"ContextLetReference\"] = 7] = \"ContextLetReference\";\n /**\n * Runtime operation to snapshot the current view context.\n */\n ExpressionKind[ExpressionKind[\"GetCurrentView\"] = 8] = \"GetCurrentView\";\n /**\n * Runtime operation to restore a snapshotted view.\n */\n ExpressionKind[ExpressionKind[\"RestoreView\"] = 9] = \"RestoreView\";\n /**\n * Runtime operation to reset the current view context after `RestoreView`.\n */\n ExpressionKind[ExpressionKind[\"ResetView\"] = 10] = \"ResetView\";\n /**\n * Defines and calls a function with change-detected arguments.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionExpr\"] = 11] = \"PureFunctionExpr\";\n /**\n * Indicates a positional parameter to a pure function definition.\n */\n ExpressionKind[ExpressionKind[\"PureFunctionParameterExpr\"] = 12] = \"PureFunctionParameterExpr\";\n /**\n * Binding to a pipe transformation.\n */\n ExpressionKind[ExpressionKind[\"PipeBinding\"] = 13] = \"PipeBinding\";\n /**\n * Binding to a pipe transformation with a variable number of arguments.\n */\n ExpressionKind[ExpressionKind[\"PipeBindingVariadic\"] = 14] = \"PipeBindingVariadic\";\n /*\n * A safe property read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafePropertyRead\"] = 15] = \"SafePropertyRead\";\n /**\n * A safe keyed read requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeKeyedRead\"] = 16] = \"SafeKeyedRead\";\n /**\n * A safe function call requiring expansion into a null check.\n */\n ExpressionKind[ExpressionKind[\"SafeInvokeFunction\"] = 17] = \"SafeInvokeFunction\";\n /**\n * An intermediate expression that will be expanded from a safe read into an explicit ternary.\n */\n ExpressionKind[ExpressionKind[\"SafeTernaryExpr\"] = 18] = \"SafeTernaryExpr\";\n /**\n * An empty expression that will be stipped before generating the final output.\n */\n ExpressionKind[ExpressionKind[\"EmptyExpr\"] = 19] = \"EmptyExpr\";\n /*\n * An assignment to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"AssignTemporaryExpr\"] = 20] = \"AssignTemporaryExpr\";\n /**\n * A reference to a temporary variable.\n */\n ExpressionKind[ExpressionKind[\"ReadTemporaryExpr\"] = 21] = \"ReadTemporaryExpr\";\n /**\n * An expression that will cause a literal slot index to be emitted.\n */\n ExpressionKind[ExpressionKind[\"SlotLiteralExpr\"] = 22] = \"SlotLiteralExpr\";\n /**\n * A test expression for a conditional op.\n */\n ExpressionKind[ExpressionKind[\"ConditionalCase\"] = 23] = \"ConditionalCase\";\n /**\n * An expression that will be automatically extracted to the component const array.\n */\n ExpressionKind[ExpressionKind[\"ConstCollected\"] = 24] = \"ConstCollected\";\n /**\n * Operation that sets the value of a two-way binding.\n */\n ExpressionKind[ExpressionKind[\"TwoWayBindingSet\"] = 25] = \"TwoWayBindingSet\";\n})(ExpressionKind || (ExpressionKind = {}));\nvar VariableFlags;\n(function (VariableFlags) {\n VariableFlags[VariableFlags[\"None\"] = 0] = \"None\";\n /**\n * Always inline this variable, regardless of the number of times it's used.\n * An `AlwaysInline` variable may not depend on context, because doing so may cause side effects\n * that are illegal when multi-inlined. (The optimizer will enforce this constraint.)\n */\n VariableFlags[VariableFlags[\"AlwaysInline\"] = 1] = \"AlwaysInline\";\n})(VariableFlags || (VariableFlags = {}));\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 /**\n * An alias generated by a special embedded view type (e.g. a `@for` block).\n */\n SemanticVariableKind[SemanticVariableKind[\"Alias\"] = 3] = \"Alias\";\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\n * of 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 * 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 * Animation property bindings.\n */\n BindingKind[BindingKind[\"Animation\"] = 6] = \"Animation\";\n /**\n * Property side of a two-way binding.\n */\n BindingKind[BindingKind[\"TwoWayProperty\"] = 7] = \"TwoWayProperty\";\n})(BindingKind || (BindingKind = {}));\n/**\n * Enumeration of possible times i18n params can be resolved.\n */\nvar I18nParamResolutionTime;\n(function (I18nParamResolutionTime) {\n /**\n * Param is resolved at message creation time. Most params should be resolved at message creation\n * time. However, ICU params need to be handled in post-processing.\n */\n I18nParamResolutionTime[I18nParamResolutionTime[\"Creation\"] = 0] = \"Creation\";\n /**\n * Param is resolved during post-processing. This should be used for params whose value comes from\n * an ICU.\n */\n I18nParamResolutionTime[I18nParamResolutionTime[\"Postproccessing\"] = 1] = \"Postproccessing\";\n})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));\n/**\n * The contexts in which an i18n expression can be used.\n */\nvar I18nExpressionFor;\n(function (I18nExpressionFor) {\n /**\n * This expression is used as a value (i.e. inside an i18n block).\n */\n I18nExpressionFor[I18nExpressionFor[\"I18nText\"] = 0] = \"I18nText\";\n /**\n * This expression is used in a binding.\n */\n I18nExpressionFor[I18nExpressionFor[\"I18nAttribute\"] = 1] = \"I18nAttribute\";\n})(I18nExpressionFor || (I18nExpressionFor = {}));\n/**\n * Flags that describe what an i18n param value. These determine how the value is serialized into\n * the final map.\n */\nvar I18nParamValueFlags;\n(function (I18nParamValueFlags) {\n I18nParamValueFlags[I18nParamValueFlags[\"None\"] = 0] = \"None\";\n /**\n * This value represents an element tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"ElementTag\"] = 1] = \"ElementTag\";\n /**\n * This value represents a template tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"TemplateTag\"] = 2] = \"TemplateTag\";\n /**\n * This value represents the opening of a tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"OpenTag\"] = 4] = \"OpenTag\";\n /**\n * This value represents the closing of a tag.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"CloseTag\"] = 8] = \"CloseTag\";\n /**\n * This value represents an i18n expression index.\n */\n I18nParamValueFlags[I18nParamValueFlags[\"ExpressionIndex\"] = 16] = \"ExpressionIndex\";\n})(I18nParamValueFlags || (I18nParamValueFlags = {}));\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 = {}));\n/**\n * The type of a `@defer` trigger, for use in the ir.\n */\nvar DeferTriggerKind;\n(function (DeferTriggerKind) {\n DeferTriggerKind[DeferTriggerKind[\"Idle\"] = 0] = \"Idle\";\n DeferTriggerKind[DeferTriggerKind[\"Immediate\"] = 1] = \"Immediate\";\n DeferTriggerKind[DeferTriggerKind[\"Timer\"] = 2] = \"Timer\";\n DeferTriggerKind[DeferTriggerKind[\"Hover\"] = 3] = \"Hover\";\n DeferTriggerKind[DeferTriggerKind[\"Interaction\"] = 4] = \"Interaction\";\n DeferTriggerKind[DeferTriggerKind[\"Viewport\"] = 5] = \"Viewport\";\n})(DeferTriggerKind || (DeferTriggerKind = {}));\n/**\n * Kinds of i18n contexts. They can be created because of root i18n blocks, or ICUs.\n */\nvar I18nContextKind;\n(function (I18nContextKind) {\n I18nContextKind[I18nContextKind[\"RootI18n\"] = 0] = \"RootI18n\";\n I18nContextKind[I18nContextKind[\"Icu\"] = 1] = \"Icu\";\n I18nContextKind[I18nContextKind[\"Attr\"] = 2] = \"Attr\";\n})(I18nContextKind || (I18nContextKind = {}));\nvar TemplateKind;\n(function (TemplateKind) {\n TemplateKind[TemplateKind[\"NgTemplate\"] = 0] = \"NgTemplate\";\n TemplateKind[TemplateKind[\"Structural\"] = 1] = \"Structural\";\n TemplateKind[TemplateKind[\"Block\"] = 2] = \"Block\";\n})(TemplateKind || (TemplateKind = {}));\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 `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 numSlotsUsed: 1,\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 * Test whether an operation implements `ConsumesSlotOpTrait`.\n */\nfunction hasConsumesSlotTrait(op) {\n return op[ConsumesSlot] === true;\n}\nfunction hasDependsOnSlotContextTrait(value) {\n return value[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}\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, flags) {\n return {\n kind: OpKind.Variable,\n xref,\n variable,\n initializer,\n flags,\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, i18nPlaceholders) {\n this.strings = strings;\n this.expressions = expressions;\n this.i18nPlaceholders = i18nPlaceholders;\n if (i18nPlaceholders.length !== 0 && i18nPlaceholders.length !== expressions.length) {\n throw new Error(`Expected ${expressions.length} placeholders to match interpolation expression count, but got ${i18nPlaceholders.length}`);\n }\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, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Binding,\n bindingKind: kind,\n target,\n name,\n expression,\n unit,\n securityContext,\n isTextAttribute,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext: null,\n i18nMessage,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Create a `PropertyOp`.\n */\nfunction createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Property,\n target,\n name,\n expression,\n isAnimationTrigger,\n securityContext,\n sanitizer: null,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext,\n i18nMessage,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n/**\n * Create a `TwoWayPropertyOp`.\n */\nfunction createTwoWayPropertyOp(target, name, expression, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.TwoWayProperty,\n target,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext,\n i18nMessage,\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, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n return {\n kind: OpKind.Attribute,\n target,\n namespace,\n name,\n expression,\n securityContext,\n sanitizer: null,\n isTextAttribute,\n isStructuralTemplateAttribute,\n templateKind,\n i18nContext: null,\n i18nMessage,\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/**\n * Create a conditional op, which will display an embedded view according to a condtion.\n */\nfunction createConditionalOp(target, test, conditions, sourceSpan) {\n return {\n kind: OpKind.Conditional,\n target,\n test,\n conditions,\n processed: null,\n sourceSpan,\n contextValue: null,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n };\n}\nfunction createRepeaterOp(repeaterCreate, targetSlot, collection, sourceSpan) {\n return {\n kind: OpKind.Repeater,\n target: repeaterCreate,\n targetSlot,\n collection,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n };\n}\nfunction createDeferWhenOp(target, expr, prefetch, sourceSpan) {\n return {\n kind: OpKind.DeferWhen,\n target,\n expr,\n prefetch,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n };\n}\n/**\n * Create an i18n expression op.\n */\nfunction createI18nExpressionOp(context, target, i18nOwner, handle, expression, icuPlaceholder, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {\n return {\n kind: OpKind.I18nExpression,\n context,\n target,\n i18nOwner,\n handle,\n expression,\n icuPlaceholder,\n i18nPlaceholder,\n resolutionTime,\n usage,\n name,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_VARS,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n };\n}\n/**\n * Creates an op to apply i18n expression ops.\n */\nfunction createI18nApplyOp(owner, handle, sourceSpan) {\n return {\n kind: OpKind.I18nApply,\n owner,\n handle,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Creates a `StoreLetOp`.\n */\nfunction createStoreLetOp(target, declaredName, value, sourceSpan) {\n return {\n kind: OpKind.StoreLet,\n target,\n declaredName,\n value,\n sourceSpan,\n ...TRAIT_DEPENDS_ON_SLOT_CONTEXT,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n\nvar _a, _b, _c, _d, _e, _f, _g, _h;\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(other) {\n // We assume that the lexical reads are in the same context, which must be true for parent\n // expressions to be equivalent.\n // TODO: is this generally safe?\n return this.name === other.name;\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 constructor(target, targetSlot, offset) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.offset = offset;\n this.kind = ExpressionKind.Reference;\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 return new ReferenceExpr(this.target, this.targetSlot, this.offset);\n }\n}\nclass StoreLetExpr extends ExpressionBase {\n static { _a = ConsumesVarsTrait, _b = DependsOnSlotContext; }\n constructor(target, value, sourceSpan) {\n super();\n this.target = target;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.kind = ExpressionKind.StoreLet;\n this[_a] = true;\n this[_b] = true;\n }\n visitExpression() { }\n isEquivalent(e) {\n return (e instanceof StoreLetExpr && e.target === this.target && e.value.isEquivalent(this.value));\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.value = transformExpressionsInExpression(this.value, transform, flags);\n }\n clone() {\n return new StoreLetExpr(this.target, this.value, this.sourceSpan);\n }\n}\nclass ContextLetReferenceExpr extends ExpressionBase {\n constructor(target, targetSlot) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.kind = ExpressionKind.ContextLetReference;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof ContextLetReferenceExpr && e.target === this.target;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n return new ContextLetReferenceExpr(this.target, this.targetSlot);\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 * A reference to the current view context inside a track function.\n */\nclass TrackContextExpr extends ExpressionBase {\n constructor(view) {\n super();\n this.view = view;\n this.kind = ExpressionKind.TrackContext;\n }\n visitExpression() { }\n isEquivalent(e) {\n return e instanceof TrackContextExpr && e.view === this.view;\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions() { }\n clone() {\n return new TrackContextExpr(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}\nclass TwoWayBindingSetExpr extends ExpressionBase {\n constructor(target, value) {\n super();\n this.target = target;\n this.value = value;\n this.kind = ExpressionKind.TwoWayBindingSet;\n }\n visitExpression(visitor, context) {\n this.target.visitExpression(visitor, context);\n this.value.visitExpression(visitor, context);\n }\n isEquivalent(other) {\n return this.target.isEquivalent(other.target) && this.value.isEquivalent(other.value);\n }\n isConstant() {\n return false;\n }\n transformInternalExpressions(transform, flags) {\n this.target = transformExpressionsInExpression(this.target, transform, flags);\n this.value = transformExpressionsInExpression(this.value, transform, flags);\n }\n clone() {\n return new TwoWayBindingSetExpr(this.target, this.value);\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 { _c = ConsumesVarsTrait, _d = UsesVarOffset; }\n constructor(expression, args) {\n super();\n this.kind = ExpressionKind.PureFunctionExpr;\n this[_c] = true;\n this[_d] = 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 &&\n this.body !== null &&\n 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 { _e = ConsumesVarsTrait, _f = UsesVarOffset; }\n constructor(target, targetSlot, name, args) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\n this.name = name;\n this.args = args;\n this.kind = ExpressionKind.PipeBinding;\n this[_e] = true;\n this[_f] = true;\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.targetSlot, this.name, this.args.map((a) => a.clone()));\n r.varOffset = this.varOffset;\n return r;\n }\n}\nclass PipeBindingVariadicExpr extends ExpressionBase {\n static { _g = ConsumesVarsTrait, _h = UsesVarOffset; }\n constructor(target, targetSlot, name, args, numArgs) {\n super();\n this.target = target;\n this.targetSlot = targetSlot;\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.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.targetSlot, this.name, this.args.clone(), this.numArgs);\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, sourceSpan) {\n super(sourceSpan);\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(), this.sourceSpan);\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 SlotLiteralExpr extends ExpressionBase {\n constructor(slot) {\n super();\n this.slot = slot;\n this.kind = ExpressionKind.SlotLiteralExpr;\n }\n visitExpression(visitor, context) { }\n isEquivalent(e) {\n return e instanceof SlotLiteralExpr && e.slot === this.slot;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new SlotLiteralExpr(this.slot);\n }\n transformInternalExpressions() { }\n}\nclass ConditionalCaseExpr extends ExpressionBase {\n /**\n * Create an expression for one branch of a conditional.\n * @param expr The expression to be tested for this case. Might be null, as in an `else` case.\n * @param target The Xref of the view to be displayed if this condition is true.\n */\n constructor(expr, target, targetSlot, alias = null) {\n super();\n this.expr = expr;\n this.target = target;\n this.targetSlot = targetSlot;\n this.alias = alias;\n this.kind = ExpressionKind.ConditionalCase;\n }\n visitExpression(visitor, context) {\n if (this.expr !== null) {\n this.expr.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof ConditionalCaseExpr && e.expr === this.expr;\n }\n isConstant() {\n return true;\n }\n clone() {\n return new ConditionalCaseExpr(this.expr, this.target, this.targetSlot);\n }\n transformInternalExpressions(transform, flags) {\n if (this.expr !== null) {\n this.expr = transformExpressionsInExpression(this.expr, transform, flags);\n }\n }\n}\nclass ConstCollectedExpr extends ExpressionBase {\n constructor(expr) {\n super();\n this.expr = expr;\n this.kind = ExpressionKind.ConstCollected;\n }\n transformInternalExpressions(transform, flags) {\n this.expr = transform(this.expr, flags);\n }\n visitExpression(visitor, context) {\n this.expr.visitExpression(visitor, context);\n }\n isEquivalent(e) {\n if (!(e instanceof ConstCollectedExpr)) {\n return false;\n }\n return this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n clone() {\n return new ConstCollectedExpr(this.expr);\n }\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 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.HostProperty:\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.TwoWayProperty:\n op.expression = transformExpressionsInExpression(op.expression, transform, flags);\n op.sanitizer =\n op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags);\n break;\n case OpKind.I18nExpression:\n op.expression = transformExpressionsInExpression(op.expression, 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.Conditional:\n for (const condition of op.conditions) {\n if (condition.expr === null) {\n // This is a default case.\n continue;\n }\n condition.expr = transformExpressionsInExpression(condition.expr, transform, flags);\n }\n if (op.processed !== null) {\n op.processed = transformExpressionsInExpression(op.processed, transform, flags);\n }\n if (op.contextValue !== null) {\n op.contextValue = transformExpressionsInExpression(op.contextValue, transform, flags);\n }\n break;\n case OpKind.Listener:\n case OpKind.TwoWayListener:\n for (const innerOp of op.handlerOps) {\n transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);\n }\n break;\n case OpKind.ExtractedAttribute:\n op.expression =\n op.expression && transformExpressionsInExpression(op.expression, transform, flags);\n op.trustedValueFn =\n op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform, flags);\n break;\n case OpKind.RepeaterCreate:\n op.track = transformExpressionsInExpression(op.track, transform, flags);\n if (op.trackByFn !== null) {\n op.trackByFn = transformExpressionsInExpression(op.trackByFn, transform, flags);\n }\n break;\n case OpKind.Repeater:\n op.collection = transformExpressionsInExpression(op.collection, transform, flags);\n break;\n case OpKind.Defer:\n if (op.loadingConfig !== null) {\n op.loadingConfig = transformExpressionsInExpression(op.loadingConfig, transform, flags);\n }\n if (op.placeholderConfig !== null) {\n op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform, flags);\n }\n if (op.resolverFn !== null) {\n op.resolverFn = transformExpressionsInExpression(op.resolverFn, transform, flags);\n }\n break;\n case OpKind.I18nMessage:\n for (const [placeholder, expr] of op.params) {\n op.params.set(placeholder, transformExpressionsInExpression(expr, transform, flags));\n }\n for (const [placeholder, expr] of op.postprocessingParams) {\n op.postprocessingParams.set(placeholder, transformExpressionsInExpression(expr, transform, flags));\n }\n break;\n case OpKind.DeferWhen:\n op.expr = transformExpressionsInExpression(op.expr, transform, flags);\n break;\n case OpKind.StoreLet:\n op.value = transformExpressionsInExpression(op.value, transform, flags);\n break;\n case OpKind.Advance:\n case OpKind.Container:\n case OpKind.ContainerEnd:\n case OpKind.ContainerStart:\n case OpKind.DeferOn:\n case OpKind.DisableBindings:\n case OpKind.Element:\n case OpKind.ElementEnd:\n case OpKind.ElementStart:\n case OpKind.EnableBindings:\n case OpKind.I18n:\n case OpKind.I18nApply:\n case OpKind.I18nContext:\n case OpKind.I18nEnd:\n case OpKind.I18nStart:\n case OpKind.IcuEnd:\n case OpKind.IcuStart:\n case OpKind.Namespace:\n case OpKind.Pipe:\n case OpKind.Projection:\n case OpKind.ProjectionDef:\n case OpKind.Template:\n case OpKind.Text:\n case OpKind.I18nAttributes:\n case OpKind.IcuPlaceholder:\n case OpKind.DeclareLet:\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 UnaryOperatorExpr) {\n expr.expr = transformExpressionsInExpression(expr.expr, 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 = 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 TypeofExpr) {\n expr.expr = transformExpressionsInExpression(expr.expr, transform, flags);\n }\n else if (expr instanceof WriteVarExpr) {\n expr.value = transformExpressionsInExpression(expr.value, transform, flags);\n }\n else if (expr instanceof LocalizedString) {\n for (let i = 0; i < expr.expressions.length; i++) {\n expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform, flags);\n }\n }\n else if (expr instanceof NotExpr) {\n expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);\n }\n else if (expr instanceof TaggedTemplateExpr) {\n expr.tag = transformExpressionsInExpression(expr.tag, transform, flags);\n expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform, flags));\n }\n else if (expr instanceof ArrowFunctionExpr) {\n if (Array.isArray(expr.body)) {\n for (let i = 0; i < expr.body.length; i++) {\n transformExpressionsInStatement(expr.body[i], transform, flags);\n }\n }\n else {\n expr.body = transformExpressionsInExpression(expr.body, transform, flags);\n }\n }\n else if (expr instanceof WrappedNodeExpr) {\n // TODO: Do we need to transform any TS nodes nested inside of this expression?\n }\n else if (expr instanceof ReadVarExpr ||\n 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 if (stmt instanceof IfStmt) {\n stmt.condition = transformExpressionsInExpression(stmt.condition, transform, flags);\n for (const caseStatement of stmt.trueCase) {\n transformExpressionsInStatement(caseStatement, transform, flags);\n }\n for (const caseStatement of stmt.falseCase) {\n transformExpressionsInStatement(caseStatement, transform, flags);\n }\n }\n else {\n throw new Error(`Unhandled statement kind: ${stmt.constructor.name}`);\n }\n}\n/**\n * Checks whether the given expression is a string literal.\n */\nfunction isStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string';\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 if (Array.isArray(op)) {\n for (const o of op) {\n this.push(o);\n }\n return;\n }\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 = oldPrev;\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 if (Array.isArray(op)) {\n for (const o of op) {\n this.insertBefore(o, target);\n }\n return;\n }\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\nclass SlotHandle {\n constructor() {\n this.slot = null;\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,\n OpKind.ElementStart,\n OpKind.Container,\n OpKind.ContainerStart,\n OpKind.Template,\n OpKind.RepeaterCreate,\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, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.ElementStart,\n xref,\n tag,\n handle: new SlotHandle(),\n attributes: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n i18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create a `TemplateOp`.\n */\nfunction createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.Template,\n xref,\n templateKind,\n attributes: null,\n tag,\n handle: new SlotHandle(),\n functionNameSuffix,\n decls: null,\n vars: null,\n localRefs: [],\n nonBindable: false,\n namespace,\n i18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\nfunction createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, emptyTag, i18nPlaceholder, emptyI18nPlaceholder, startSourceSpan, wholeSourceSpan) {\n return {\n kind: OpKind.RepeaterCreate,\n attributes: null,\n xref: primaryView,\n handle: new SlotHandle(),\n emptyView,\n track,\n trackByFn: null,\n tag,\n emptyTag,\n emptyAttributes: null,\n functionNameSuffix: 'For',\n namespace: Namespace.HTML,\n nonBindable: false,\n localRefs: [],\n decls: null,\n vars: null,\n varNames,\n usesComponentInstance: false,\n i18nPlaceholder,\n emptyI18nPlaceholder,\n startSourceSpan,\n wholeSourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n ...TRAIT_CONSUMES_VARS,\n numSlotsUsed: emptyView === null ? 2 : 3,\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, icuPlaceholder, sourceSpan) {\n return {\n kind: OpKind.Text,\n xref,\n handle: new SlotHandle(),\n initialValue,\n icuPlaceholder,\n sourceSpan,\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create a `ListenerOp`. Host bindings reuse all the listener logic.\n */\nfunction createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {\n const handlerList = new OpList();\n handlerList.push(handlerOps);\n return {\n kind: OpKind.Listener,\n target,\n targetSlot,\n tag,\n hostListener,\n name,\n handlerOps: handlerList,\n handlerFnName: null,\n consumesDollarEvent: false,\n isAnimationListener: animationPhase !== null,\n animationPhase,\n eventTarget,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Create a `TwoWayListenerOp`.\n */\nfunction createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {\n const handlerList = new OpList();\n handlerList.push(handlerOps);\n return {\n kind: OpKind.TwoWayListener,\n target,\n targetSlot,\n tag,\n name,\n handlerOps: handlerList,\n handlerFnName: null,\n sourceSpan,\n ...NEW_OP,\n };\n}\nfunction createPipeOp(xref, slot, name) {\n return {\n kind: OpKind.Pipe,\n xref,\n handle: slot,\n name,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n };\n}\nfunction createNamespaceOp(namespace) {\n return {\n kind: OpKind.Namespace,\n active: namespace,\n ...NEW_OP,\n };\n}\nfunction createProjectionDefOp(def) {\n return {\n kind: OpKind.ProjectionDef,\n def,\n ...NEW_OP,\n };\n}\nfunction createProjectionOp(xref, selector, i18nPlaceholder, fallbackView, sourceSpan) {\n return {\n kind: OpKind.Projection,\n xref,\n handle: new SlotHandle(),\n selector,\n i18nPlaceholder,\n fallbackView,\n projectionSlotIndex: 0,\n attributes: null,\n localRefs: [],\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n numSlotsUsed: fallbackView === null ? 1 : 2,\n };\n}\n/**\n * Create an `ExtractedAttributeOp`.\n */\nfunction createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {\n return {\n kind: OpKind.ExtractedAttribute,\n target,\n bindingKind,\n namespace,\n name,\n expression,\n i18nContext,\n i18nMessage,\n securityContext,\n trustedValueFn: null,\n ...NEW_OP,\n };\n}\nfunction createDeferOp(xref, main, mainSlot, ownResolverFn, resolverFn, sourceSpan) {\n return {\n kind: OpKind.Defer,\n xref,\n handle: new SlotHandle(),\n mainView: main,\n mainSlot,\n loadingView: null,\n loadingSlot: null,\n loadingConfig: null,\n loadingMinimumTime: null,\n loadingAfterTime: null,\n placeholderView: null,\n placeholderSlot: null,\n placeholderConfig: null,\n placeholderMinimumTime: null,\n errorView: null,\n errorSlot: null,\n ownResolverFn,\n resolverFn,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n numSlotsUsed: 2,\n };\n}\nfunction createDeferOnOp(defer, trigger, prefetch, sourceSpan) {\n return {\n kind: OpKind.DeferOn,\n defer,\n trigger,\n prefetch,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Creates a `DeclareLetOp`.\n */\nfunction createDeclareLetOp(xref, declaredName, sourceSpan) {\n return {\n kind: OpKind.DeclareLet,\n xref,\n declaredName,\n sourceSpan,\n handle: new SlotHandle(),\n ...TRAIT_CONSUMES_SLOT,\n ...NEW_OP,\n };\n}\n/**\n * Create an `ExtractedMessageOp`.\n */\nfunction createI18nMessageOp(xref, i18nContext, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {\n return {\n kind: OpKind.I18nMessage,\n xref,\n i18nContext,\n i18nBlock,\n message,\n messagePlaceholder,\n params,\n postprocessingParams,\n needsPostprocessing,\n subMessages: [],\n ...NEW_OP,\n };\n}\n/**\n * Create an `I18nStartOp`.\n */\nfunction createI18nStartOp(xref, message, root, sourceSpan) {\n return {\n kind: OpKind.I18nStart,\n xref,\n handle: new SlotHandle(),\n root: root ?? xref,\n message,\n messageIndex: null,\n subTemplateIndex: null,\n context: null,\n sourceSpan,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n };\n}\n/**\n * Create an `I18nEndOp`.\n */\nfunction createI18nEndOp(xref, sourceSpan) {\n return {\n kind: OpKind.I18nEnd,\n xref,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Creates an ICU start op.\n */\nfunction createIcuStartOp(xref, message, messagePlaceholder, sourceSpan) {\n return {\n kind: OpKind.IcuStart,\n xref,\n message,\n messagePlaceholder,\n context: null,\n sourceSpan,\n ...NEW_OP,\n };\n}\n/**\n * Creates an ICU end op.\n */\nfunction createIcuEndOp(xref) {\n return {\n kind: OpKind.IcuEnd,\n xref,\n ...NEW_OP,\n };\n}\n/**\n * Creates an ICU placeholder op.\n */\nfunction createIcuPlaceholderOp(xref, name, strings) {\n return {\n kind: OpKind.IcuPlaceholder,\n xref,\n name,\n strings,\n expressionPlaceholders: [],\n ...NEW_OP,\n };\n}\nfunction createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {\n if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {\n throw new Error('AssertionError: i18nBlock must be provided for non-attribute contexts.');\n }\n return {\n kind: OpKind.I18nContext,\n contextKind,\n xref,\n i18nBlock,\n message,\n sourceSpan,\n params: new Map(),\n postprocessingParams: new Map(),\n ...NEW_OP,\n };\n}\nfunction createI18nAttributesOp(xref, handle, target) {\n return {\n kind: OpKind.I18nAttributes,\n xref,\n handle,\n target,\n i18nAttributesConfig: null,\n ...NEW_OP,\n ...TRAIT_CONSUMES_SLOT,\n };\n}\n\nfunction createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {\n return {\n kind: OpKind.HostProperty,\n name,\n expression,\n isAnimationTrigger,\n i18nContext,\n securityContext,\n sanitizer: null,\n sourceSpan,\n ...TRAIT_CONSUMES_VARS,\n ...NEW_OP,\n };\n}\n\n/**\n * When referenced in the template's context parameters, this indicates a reference to the entire\n * context object, rather than a specific parameter.\n */\nconst CTX_REF = 'CTX_REF_MARKER';\n\nvar CompilationJobKind;\n(function (CompilationJobKind) {\n CompilationJobKind[CompilationJobKind[\"Tmpl\"] = 0] = \"Tmpl\";\n CompilationJobKind[CompilationJobKind[\"Host\"] = 1] = \"Host\";\n CompilationJobKind[CompilationJobKind[\"Both\"] = 2] = \"Both\";\n})(CompilationJobKind || (CompilationJobKind = {}));\n/**\n * An entire ongoing compilation, which will result in one or more template functions when complete.\n * Contains one or more corresponding compilation units.\n */\nclass CompilationJob {\n constructor(componentName, pool, compatibility) {\n this.componentName = componentName;\n this.pool = pool;\n this.compatibility = compatibility;\n this.kind = CompilationJobKind.Both;\n /**\n * Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.\n */\n this.nextXrefId = 0;\n }\n /**\n * Generate a new unique `ir.XrefId` in this job.\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 extends CompilationJob {\n constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) {\n super(componentName, pool, compatibility);\n this.relativeContextFilePath = relativeContextFilePath;\n this.i18nUseExternalIds = i18nUseExternalIds;\n this.deferMeta = deferMeta;\n this.allDeferrableDepsFn = allDeferrableDepsFn;\n this.kind = CompilationJobKind.Tmpl;\n this.fnSuffix = 'Template';\n this.views = new Map();\n /**\n * Causes ngContentSelectors to be emitted, for content projection slots in the view. Possibly a\n * reference into the constant pool.\n */\n this.contentSelectors = null;\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 /**\n * Initialization statements needed to set up the consts.\n */\n this.constsInitializers = [];\n this.root = new ViewCompilationUnit(this, this.allocateXrefId(), null);\n this.views.set(this.root.xref, this.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 get units() {\n return this.views.values();\n }\n /**\n * Add a constant `o.Expression` to the compilation and return its index in the `consts` array.\n */\n addConst(newConst, initializers) {\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 if (initializers) {\n this.constsInitializers.push(...initializers);\n }\n return idx;\n }\n}\n/**\n * A compilation unit is compiled into a template function. Some example units are views and host\n * 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 || op.kind === OpKind.TwoWayListener) {\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}\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 * Set of aliases available within this view. An alias is a variable whose provided expression is\n * inlined at every location it is used. It may also depend on context variables, by name.\n */\n this.aliases = new Set();\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}\n/**\n * Compilation-in-progress of a host binding, which contains a single unit for that host binding.\n */\nclass HostBindingCompilationJob extends CompilationJob {\n constructor(componentName, pool, compatibility) {\n super(componentName, pool, compatibility);\n this.kind = CompilationJobKind.Host;\n this.fnSuffix = 'HostBindings';\n this.root = new HostBindingCompilationUnit(this);\n }\n get units() {\n return [this.root];\n }\n}\nclass HostBindingCompilationUnit extends CompilationUnit {\n constructor(job) {\n super(0);\n this.job = job;\n /**\n * Much like an element can have attributes, so can a host binding function.\n */\n this.attributes = null;\n }\n}\n\n/**\n * Find any function calls to `$any`, excluding `this.$any`, and delete them, since they have no\n * runtime effects.\n */\nfunction deleteAnyCasts(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, removeAnys, VisitorContextFlag.None);\n }\n }\n}\nfunction removeAnys(e) {\n if (e instanceof InvokeFunctionExpr &&\n 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 * Adds apply operations after i18n expressions.\n */\nfunction applyI18nExpressions(job) {\n const i18nContexts = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nContext) {\n i18nContexts.set(op.xref, op);\n }\n }\n }\n for (const unit of job.units) {\n for (const op of unit.update) {\n // Only add apply after expressions that are not followed by more expressions.\n if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {\n // TODO: what should be the source span for the apply op?\n OpList.insertAfter(createI18nApplyOp(op.i18nOwner, op.handle, null), op);\n }\n }\n }\n}\n/**\n * Checks whether the given expression op needs to be followed with an apply op.\n */\nfunction needsApplication(i18nContexts, op) {\n // If the next op is not another expression, we need to apply.\n if (op.next?.kind !== OpKind.I18nExpression) {\n return true;\n }\n const context = i18nContexts.get(op.context);\n const nextContext = i18nContexts.get(op.next.context);\n if (context === undefined) {\n throw new Error(\"AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context\");\n }\n if (nextContext === undefined) {\n throw new Error(\"AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context\");\n }\n // If the next op is an expression targeting a different i18n block (or different element, in the\n // case of i18n attributes), we need to apply.\n // First, handle the case of i18n blocks.\n if (context.i18nBlock !== null) {\n // This is a block context. Compare the blocks.\n if (context.i18nBlock !== nextContext.i18nBlock) {\n return true;\n }\n return false;\n }\n // Second, handle the case of i18n attributes.\n if (op.i18nOwner !== op.next.i18nOwner) {\n return true;\n }\n return false;\n}\n\n/**\n * Updates i18n expression ops to target the last slot in their owning i18n block, and moves them\n * after the last update instruction that depends on that slot.\n */\nfunction assignI18nSlotDependencies(job) {\n for (const unit of job.units) {\n // The first update op.\n let updateOp = unit.update.head;\n // I18n expressions currently being moved during the iteration.\n let i18nExpressionsInProgress = [];\n // Non-null while we are iterating through an i18nStart/i18nEnd pair\n let state = null;\n for (const createOp of unit.create) {\n if (createOp.kind === OpKind.I18nStart) {\n state = {\n blockXref: createOp.xref,\n lastSlotConsumer: createOp.xref,\n };\n }\n else if (createOp.kind === OpKind.I18nEnd) {\n for (const op of i18nExpressionsInProgress) {\n op.target = state.lastSlotConsumer;\n OpList.insertBefore(op, updateOp);\n }\n i18nExpressionsInProgress.length = 0;\n state = null;\n }\n if (hasConsumesSlotTrait(createOp)) {\n if (state !== null) {\n state.lastSlotConsumer = createOp.xref;\n }\n while (true) {\n if (updateOp.next === null) {\n break;\n }\n if (state !== null &&\n updateOp.kind === OpKind.I18nExpression &&\n updateOp.usage === I18nExpressionFor.I18nText &&\n updateOp.i18nOwner === state.blockXref) {\n const opToRemove = updateOp;\n updateOp = updateOp.next;\n OpList.remove(opToRemove);\n i18nExpressionsInProgress.push(opToRemove);\n continue;\n }\n if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {\n break;\n }\n updateOp = updateOp.next;\n }\n }\n }\n }\n}\n\n/**\n * Gets a map of all elements in the given view by their xref id.\n */\nfunction createOpXrefMap(unit) {\n const map = new Map();\n for (const op of unit.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n map.set(op.xref, op);\n // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here,\n // because the slot consumer trait currently only supports one slot per consumer and we\n // need two. This should be revisited when making the refactors mentioned in:\n // https://github.com/angular/angular/pull/53620#discussion_r1430918822\n if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) {\n map.set(op.emptyView, op);\n }\n }\n return map;\n}\n\n/**\n * Find all extractable attribute and binding ops, and create ExtractedAttributeOps for them.\n * In cases where no instruction needs to be generated for the attribute or binding, it is removed.\n */\nfunction extractAttributes(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Attribute:\n extractAttributeOp(unit, op, elements);\n break;\n case OpKind.Property:\n if (!op.isAnimationTrigger) {\n let bindingKind;\n if (op.i18nMessage !== null && op.templateKind === null) {\n // If the binding has an i18n context, it is an i18n attribute, and should have that\n // kind in the consts array.\n bindingKind = BindingKind.I18n;\n }\n else if (op.isStructuralTemplateAttribute) {\n bindingKind = BindingKind.Template;\n }\n else {\n bindingKind = BindingKind.Property;\n }\n OpList.insertBefore(\n // Deliberately null i18nMessage value\n createExtractedAttributeOp(op.target, bindingKind, null, op.name, \n /* expression */ null, \n /* i18nContext */ null, \n /* i18nMessage */ null, op.securityContext), lookupElement$2(elements, op.target));\n }\n break;\n case OpKind.TwoWayProperty:\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.TwoWayProperty, null, op.name, \n /* expression */ null, \n /* i18nContext */ null, \n /* i18nMessage */ null, op.securityContext), lookupElement$2(elements, op.target));\n break;\n case OpKind.StyleProp:\n case OpKind.ClassProp:\n // TODO: Can style or class bindings be i18n attributes?\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 if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n op.expression instanceof EmptyExpr) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, \n /* expression */ null, \n /* i18nContext */ null, \n /* i18nMessage */ null, SecurityContext.STYLE), lookupElement$2(elements, op.target));\n }\n break;\n case OpKind.Listener:\n if (!op.isAnimationListener) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, \n /* expression */ null, \n /* i18nContext */ null, \n /* i18nMessage */ null, SecurityContext.NONE);\n if (job.kind === CompilationJobKind.Host) {\n if (job.compatibility) {\n // TemplateDefinitionBuilder does not extract listener bindings to the const array\n // (which is honestly pretty inconsistent).\n break;\n }\n // This attribute will apply to the enclosing host binding compilation unit, so order\n // doesn't matter.\n unit.create.push(extractedAttributeOp);\n }\n else {\n OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));\n }\n }\n break;\n case OpKind.TwoWayListener:\n // Two-way listeners aren't supported in host bindings.\n if (job.kind !== CompilationJobKind.Host) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, \n /* expression */ null, \n /* i18nContext */ null, \n /* i18nMessage */ null, SecurityContext.NONE);\n OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));\n }\n break;\n }\n }\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 * Extracts an attribute binding.\n */\nfunction extractAttributeOp(unit, op, elements) {\n if (op.expression instanceof Interpolation) {\n return;\n }\n let extractable = op.isTextAttribute || op.expression.isConstant();\n if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // TemplateDefinitionBuilder only extracts text attributes. It does not extract attriibute\n // bindings, even if they are constants.\n extractable &&= op.isTextAttribute;\n }\n if (extractable) {\n const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);\n if (unit.job.kind === CompilationJobKind.Host) {\n // This attribute will apply to the enclosing host binding compilation unit, so order doesn't\n // matter.\n unit.create.push(extractedAttributeOp);\n }\n else {\n const ownerOp = lookupElement$2(elements, op.target);\n OpList.insertBefore(extractedAttributeOp, ownerOp);\n }\n OpList.remove(op);\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 specializeBindings(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 const [namespace, name] = splitNsName(op.name);\n OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));\n }\n break;\n case BindingKind.Property:\n case BindingKind.Animation:\n if (job.kind === CompilationJobKind.Host) {\n OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));\n }\n else {\n OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));\n }\n break;\n case BindingKind.TwoWayProperty:\n if (!(op.expression instanceof Expression)) {\n // We shouldn't be able to hit this code path since interpolations in two-way bindings\n // result in a parser error. We assert here so that downstream we can assume that\n // the value is always an expression.\n throw new Error(`Expected value of two-way property binding \"${op.name}\" to be an expression`);\n }\n OpList.replace(op, createTwoWayPropertyOp(op.target, op.name, op.expression, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));\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.attribute,\n Identifiers.classProp,\n Identifiers.element,\n Identifiers.elementContainer,\n Identifiers.elementContainerEnd,\n Identifiers.elementContainerStart,\n Identifiers.elementEnd,\n Identifiers.elementStart,\n Identifiers.hostProperty,\n Identifiers.i18nExp,\n Identifiers.listener,\n Identifiers.listener,\n Identifiers.property,\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.syntheticHostListener,\n Identifiers.syntheticHostProperty,\n Identifiers.templateCreate,\n Identifiers.twoWayProperty,\n Identifiers.twoWayListener,\n Identifiers.declareLet,\n]);\n/**\n * Chaining results in repeated call expressions, causing a deep AST of receiver expressions. To prevent running out of\n * stack depth the maximum number of chained instructions is limited to this threshold, which has been selected\n * arbitrarily.\n */\nconst MAX_CHAIN_LENGTH = 256;\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 chain(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 && chain.length < MAX_CHAIN_LENGTH) {\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 chain.length++;\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 length: 1,\n };\n }\n }\n}\n\n/**\n * Attribute interpolations of the form `[attr.foo]=\"{{foo}}\"\"` should be \"collapsed\" into a plain\n * attribute instruction, instead of an `attributeInterpolate` instruction.\n *\n * (We cannot do this for singleton property interpolations, because `propertyInterpolate`\n * stringifies its expression.)\n *\n * The reification step is also capable of performing this transformation, but doing it early in the\n * pipeline allows other phases to accurately know what instruction will be emitted.\n */\nfunction collapseSingletonInterpolations(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n const eligibleOpKind = op.kind === OpKind.Attribute;\n if (eligibleOpKind &&\n op.expression instanceof Interpolation &&\n op.expression.strings.length === 2 &&\n op.expression.strings.every((s) => s === '')) {\n op.expression = op.expression.expressions[0];\n }\n }\n }\n}\n\n/**\n * Collapse the various conditions of conditional ops (if, switch) into a single test expression.\n */\nfunction generateConditionalExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind !== OpKind.Conditional) {\n continue;\n }\n let test;\n // Any case with a `null` condition is `default`. If one exists, default to it instead.\n const defaultCase = op.conditions.findIndex((cond) => cond.expr === null);\n if (defaultCase >= 0) {\n const slot = op.conditions.splice(defaultCase, 1)[0].targetSlot;\n test = new SlotLiteralExpr(slot);\n }\n else {\n // By default, a switch evaluates to `-1`, causing no template to be displayed.\n test = literal(-1);\n }\n // Switch expressions assign their main test to a temporary, to avoid re-executing it.\n let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());\n // For each remaining condition, test whether the temporary satifies the check. (If no temp is\n // present, just check each expression directly.)\n for (let i = op.conditions.length - 1; i >= 0; i--) {\n let conditionalCase = op.conditions[i];\n if (conditionalCase.expr === null) {\n continue;\n }\n if (tmp !== null) {\n const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);\n conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);\n }\n else if (conditionalCase.alias !== null) {\n const caseExpressionTemporaryXref = job.allocateXrefId();\n conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);\n op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);\n }\n test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.targetSlot), test);\n }\n // Save the resulting aggregate Joost-expression.\n op.processed = test;\n // Clear the original conditions array, since we no longer need it, and don't want it to\n // affect subsequent phases (e.g. pipe creation).\n op.conditions = [];\n }\n }\n}\n\nconst BINARY_OPERATORS = new Map([\n ['&&', BinaryOperator.And],\n ['>', BinaryOperator.Bigger],\n ['>=', BinaryOperator.BiggerEquals],\n ['|', BinaryOperator.BitwiseOr],\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]);\nfunction namespaceForKey(namespacePrefixKey) {\n const NAMESPACES = new Map([\n ['svg', Namespace.SVG],\n ['math', Namespace.Math],\n ]);\n if (namespacePrefixKey === null) {\n return Namespace.HTML;\n }\n return NAMESPACES.get(namespacePrefixKey) ?? Namespace.HTML;\n}\nfunction keyForNamespace(namespace) {\n const NAMESPACES = new Map([\n ['svg', Namespace.SVG],\n ['math', Namespace.Math],\n ]);\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}\nfunction literalOrArrayLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(literalOrArrayLiteral));\n }\n return literal(value);\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 collectElementConsts(job) {\n // Collect all extracted attributes.\n const allElementAttributes = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute) {\n const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);\n allElementAttributes.set(op.target, attributes);\n attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);\n OpList.remove(op);\n }\n }\n }\n // Serialize the extracted attributes into the const array.\n if (job instanceof ComponentCompilationJob) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n // TODO: Simplify and combine these cases.\n if (op.kind == OpKind.Projection) {\n const attributes = allElementAttributes.get(op.xref);\n if (attributes !== undefined) {\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n op.attributes = attrArray;\n }\n }\n }\n else if (isElementOrContainerOp(op)) {\n op.attributes = getConstIndex(job, allElementAttributes, op.xref);\n // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here,\n // because the slot consumer trait currently only supports one slot per consumer and we\n // need two. This should be revisited when making the refactors mentioned in:\n // https://github.com/angular/angular/pull/53620#discussion_r1430918822\n if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) {\n op.emptyAttributes = getConstIndex(job, allElementAttributes, op.emptyView);\n }\n }\n }\n }\n }\n else if (job instanceof HostBindingCompilationJob) {\n // TODO: If the host binding case further diverges, we may want to split it into its own\n // phase.\n for (const [xref, attributes] of allElementAttributes.entries()) {\n if (xref !== job.root.xref) {\n throw new Error(`An attribute would be const collected into the host binding's template function, but is not associated with the root xref.`);\n }\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n job.root.attributes = attrArray;\n }\n }\n }\n}\nfunction getConstIndex(job, allElementAttributes, xref) {\n const attributes = allElementAttributes.get(xref);\n if (attributes !== undefined) {\n const attrArray = serializeAttributes(attributes);\n if (attrArray.entries.length > 0) {\n return job.addConst(attrArray);\n }\n }\n return null;\n}\n/**\n * Shared instance of an empty array to avoid unnecessary array allocations.\n */\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 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.propertyBindings ?? 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 constructor(compatibility) {\n this.compatibility = compatibility;\n this.known = new Map();\n this.byKind = new Map();\n this.propertyBindings = null;\n this.projectAs = null;\n }\n isKnown(kind, name) {\n const nameToValue = this.known.get(kind) ?? new Set();\n this.known.set(kind, nameToValue);\n if (nameToValue.has(name)) {\n return true;\n }\n nameToValue.add(name);\n return false;\n }\n add(kind, name, value, namespace, trustedValueFn) {\n // TemplateDefinitionBuilder puts duplicate attribute, class, and style values into the consts\n // array. This seems inefficient, we can probably keep just the first one or the last value\n // (whichever actually gets applied when multiple values are listed for the same attribute).\n const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n (kind === BindingKind.Attribute ||\n kind === BindingKind.ClassName ||\n kind === BindingKind.StyleProperty);\n if (!allowDuplicates && this.isKnown(kind, name)) {\n return;\n }\n // TODO: Can this be its own phase\n if (name === 'ngProjectAs') {\n if (value === null ||\n !(value instanceof LiteralExpr) ||\n value.value == null ||\n typeof value.value?.toString() !== 'string') {\n throw Error('ngProjectAs must have a string literal value');\n }\n this.projectAs = value.value.toString();\n // TODO: TemplateDefinitionBuilder allows `ngProjectAs` to also be assigned as a literal\n // attribute. Is this sane?\n }\n const array = this.arrayFor(kind);\n array.push(...getAttributeNameLiterals(namespace, name));\n if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {\n if (value === null) {\n throw Error('Attribute, i18n attribute, & style element attributes must have a value');\n }\n if (trustedValueFn !== null) {\n if (!isStringLiteral(value)) {\n throw Error('AssertionError: extracted attribute value should be string literal');\n }\n array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), undefined, value.sourceSpan));\n }\n else {\n array.push(value);\n }\n }\n }\n arrayFor(kind) {\n if (kind === BindingKind.Property || kind === BindingKind.TwoWayProperty) {\n this.propertyBindings ??= [];\n return this.propertyBindings;\n }\n else {\n if (!this.byKind.has(kind)) {\n this.byKind.set(kind, []);\n }\n return this.byKind.get(kind);\n }\n }\n}\n/**\n * Gets an array of literal expressions representing the attribute's namespaced name.\n */\nfunction getAttributeNameLiterals(namespace, name) {\n const nameLiteral = literal(name);\n if (namespace) {\n return [literal(0 /* core.AttributeMarker.NamespaceURI */), literal(namespace), nameLiteral];\n }\n return [nameLiteral];\n}\n/**\n * Serializes an ElementAttributes object into an array expression.\n */\nfunction serializeAttributes({ attributes, bindings, classes, i18n, projectAs, styles, template, }) {\n const attrArray = [...attributes];\n if (projectAs !== null) {\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(projectAs)[0];\n attrArray.push(literal(5 /* core.AttributeMarker.ProjectAs */), literalOrArrayLiteral(parsedR3Selector));\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\n/**\n * Some binding instructions in the update block may actually correspond to i18n bindings. In that\n * case, they should be replaced with i18nExp instructions for the dynamic portions.\n */\nfunction convertI18nBindings(job) {\n const i18nAttributesByElem = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nAttributes) {\n i18nAttributesByElem.set(op.target, op);\n }\n }\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n if (op.i18nContext === null) {\n continue;\n }\n if (!(op.expression instanceof Interpolation)) {\n continue;\n }\n const i18nAttributesForElem = i18nAttributesByElem.get(op.target);\n if (i18nAttributesForElem === undefined) {\n throw new Error('AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction');\n }\n if (i18nAttributesForElem.target !== op.target) {\n throw new Error('AssertionError: Expected i18nAttributes target element to match binding target element');\n }\n const ops = [];\n for (let i = 0; i < op.expression.expressions.length; i++) {\n const expr = op.expression.expressions[i];\n if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {\n throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);\n }\n ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, null, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));\n }\n OpList.replaceWithMany(op, ops);\n break;\n }\n }\n }\n}\n\n/**\n * Resolve the dependency function of a deferred block.\n */\nfunction resolveDeferDepsFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Defer) {\n if (op.resolverFn !== null) {\n continue;\n }\n if (op.ownResolverFn !== null) {\n if (op.handle.slot === null) {\n throw new Error('AssertionError: slot must be assigned before extracting defer deps functions');\n }\n const fullPathName = unit.fnName?.replace('_Template', '');\n op.resolverFn = job.pool.getSharedFunctionReference(op.ownResolverFn, `${fullPathName}_Defer_${op.handle.slot}_DepsFn`, \n /* Don't use unique names for TDB compatibility */ false);\n }\n }\n }\n }\n}\n\n/**\n * Create one helper context op per i18n block (including generate descending blocks).\n *\n * Also, if an ICU exists inside an i18n block that also contains other localizable content (such as\n * string), create an additional helper context op for the ICU.\n *\n * These context ops are later used for generating i18n messages. (Although we generate at least one\n * context op per nested view, we will collect them up the tree later, to generate a top-level\n * message.)\n */\nfunction createI18nContexts(job) {\n // Create i18n context ops for i18n attrs.\n const attrContextByMessage = new Map();\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Binding:\n case OpKind.Property:\n case OpKind.Attribute:\n case OpKind.ExtractedAttribute:\n if (op.i18nMessage === null) {\n continue;\n }\n if (!attrContextByMessage.has(op.i18nMessage)) {\n const i18nContext = createI18nContextOp(I18nContextKind.Attr, job.allocateXrefId(), null, op.i18nMessage, null);\n unit.create.push(i18nContext);\n attrContextByMessage.set(op.i18nMessage, i18nContext.xref);\n }\n op.i18nContext = attrContextByMessage.get(op.i18nMessage);\n break;\n }\n }\n }\n // Create i18n context ops for root i18n blocks.\n const blockContextByI18nBlock = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (op.xref === op.root) {\n const contextOp = createI18nContextOp(I18nContextKind.RootI18n, job.allocateXrefId(), op.xref, op.message, null);\n unit.create.push(contextOp);\n op.context = contextOp.xref;\n blockContextByI18nBlock.set(op.xref, contextOp);\n }\n break;\n }\n }\n }\n // Assign i18n contexts for child i18n blocks. These don't need their own conext, instead they\n // should inherit from their root i18n block.\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nStart && op.xref !== op.root) {\n const rootContext = blockContextByI18nBlock.get(op.root);\n if (rootContext === undefined) {\n throw Error('AssertionError: Root i18n block i18n context should have been created.');\n }\n op.context = rootContext.xref;\n blockContextByI18nBlock.set(op.xref, rootContext);\n }\n }\n }\n // Create or assign i18n contexts for ICUs.\n let currentI18nOp = null;\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n currentI18nOp = op;\n break;\n case OpKind.I18nEnd:\n currentI18nOp = null;\n break;\n case OpKind.IcuStart:\n if (currentI18nOp === null) {\n throw Error('AssertionError: Unexpected ICU outside of an i18n block.');\n }\n if (op.message.id !== currentI18nOp.message.id) {\n // This ICU is a sub-message inside its parent i18n block message. We need to give it\n // its own context.\n const contextOp = createI18nContextOp(I18nContextKind.Icu, job.allocateXrefId(), currentI18nOp.root, op.message, null);\n unit.create.push(contextOp);\n op.context = contextOp.xref;\n }\n else {\n // This ICU is the only translatable content in its parent i18n block. We need to\n // convert the parent's context into an ICU context.\n op.context = currentI18nOp.context;\n blockContextByI18nBlock.get(currentI18nOp.xref).contextKind = I18nContextKind.Icu;\n }\n break;\n }\n }\n }\n}\n\n/**\n * Deduplicate text bindings, e.g. <div class=\"cls1\" class=\"cls2\">\n */\nfunction deduplicateTextBindings(job) {\n const seen = new Map();\n for (const unit of job.units) {\n for (const op of unit.update.reversed()) {\n if (op.kind === OpKind.Binding && op.isTextAttribute) {\n const seenForElement = seen.get(op.target) || new Set();\n if (seenForElement.has(op.name)) {\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // For most duplicated attributes, TemplateDefinitionBuilder lists all of the values in\n // the consts array. However, for style and class attributes it only keeps the last one.\n // We replicate that behavior here since it has actual consequences for apps with\n // duplicate class or style attrs.\n if (op.name === 'style' || op.name === 'class') {\n OpList.remove(op);\n }\n }\n else {\n // TODO: Determine the correct behavior. It would probably make sense to merge multiple\n // style and class attributes. Alternatively we could just throw an error, as HTML\n // doesn't permit duplicate attributes.\n }\n }\n seenForElement.add(op.name);\n seen.set(op.target, seenForElement);\n }\n }\n }\n}\n\n/**\n * Defer instructions take a configuration array, which should be collected into the component\n * consts. This phase finds the config options, and creates the corresponding const array.\n */\nfunction configureDeferInstructions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.Defer) {\n continue;\n }\n if (op.placeholderMinimumTime !== null) {\n op.placeholderConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.placeholderMinimumTime]));\n }\n if (op.loadingMinimumTime !== null || op.loadingAfterTime !== null) {\n op.loadingConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.loadingMinimumTime, op.loadingAfterTime]));\n }\n }\n }\n}\n\n/**\n * Some `defer` conditions can reference other elements in the template, using their local reference\n * names. However, the semantics are quite different from the normal local reference system: in\n * particular, we need to look at local reference names in enclosing views. This phase resolves\n * all such references to actual xrefs.\n */\nfunction resolveDeferTargetNames(job) {\n const scopes = new Map();\n function getScopeForView(view) {\n if (scopes.has(view.xref)) {\n return scopes.get(view.xref);\n }\n const scope = new Scope$1();\n for (const op of view.create) {\n // add everything that can be referenced.\n if (!isElementOrContainerOp(op) || op.localRefs === null) {\n continue;\n }\n if (!Array.isArray(op.localRefs)) {\n throw new Error('LocalRefs were already processed, but were needed to resolve defer targets.');\n }\n for (const ref of op.localRefs) {\n if (ref.target !== '') {\n continue;\n }\n scope.targets.set(ref.name, { xref: op.xref, slot: op.handle });\n }\n }\n scopes.set(view.xref, scope);\n return scope;\n }\n function resolveTrigger(deferOwnerView, op, placeholderView) {\n switch (op.trigger.kind) {\n case DeferTriggerKind.Idle:\n case DeferTriggerKind.Immediate:\n case DeferTriggerKind.Timer:\n return;\n case DeferTriggerKind.Hover:\n case DeferTriggerKind.Interaction:\n case DeferTriggerKind.Viewport:\n if (op.trigger.targetName === null) {\n // A `null` target name indicates we should default to the first element in the\n // placeholder block.\n if (placeholderView === null) {\n throw new Error('defer on trigger with no target name must have a placeholder block');\n }\n const placeholder = job.views.get(placeholderView);\n if (placeholder == undefined) {\n throw new Error('AssertionError: could not find placeholder view for defer on trigger');\n }\n for (const placeholderOp of placeholder.create) {\n if (hasConsumesSlotTrait(placeholderOp) &&\n (isElementOrContainerOp(placeholderOp) ||\n placeholderOp.kind === OpKind.Projection)) {\n op.trigger.targetXref = placeholderOp.xref;\n op.trigger.targetView = placeholderView;\n op.trigger.targetSlotViewSteps = -1;\n op.trigger.targetSlot = placeholderOp.handle;\n return;\n }\n }\n return;\n }\n let view = placeholderView !== null ? job.views.get(placeholderView) : deferOwnerView;\n let step = placeholderView !== null ? -1 : 0;\n while (view !== null) {\n const scope = getScopeForView(view);\n if (scope.targets.has(op.trigger.targetName)) {\n const { xref, slot } = scope.targets.get(op.trigger.targetName);\n op.trigger.targetXref = xref;\n op.trigger.targetView = view.xref;\n op.trigger.targetSlotViewSteps = step;\n op.trigger.targetSlot = slot;\n return;\n }\n view = view.parent !== null ? job.views.get(view.parent) : null;\n step++;\n }\n break;\n default:\n throw new Error(`Trigger kind ${op.trigger.kind} not handled`);\n }\n }\n // Find the defer ops, and assign the data about their targets.\n for (const unit of job.units) {\n const defers = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.Defer:\n defers.set(op.xref, op);\n break;\n case OpKind.DeferOn:\n const deferOp = defers.get(op.defer);\n resolveTrigger(unit, op, deferOp.placeholderView);\n break;\n }\n }\n }\n}\nclass Scope$1 {\n constructor() {\n this.targets = new Map();\n }\n}\n\nconst REPLACEMENTS = new Map([\n [OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],\n [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],\n [OpKind.I18nEnd, [OpKind.I18nStart, OpKind.I18n]],\n]);\n/**\n * Op kinds that should not prevent merging of start/end ops.\n */\nconst IGNORED_OP_KINDS = new Set([OpKind.Pipe]);\n/**\n * Replace sequences of mergable instructions (e.g. `ElementStart` and `ElementEnd`) with a\n * consolidated instruction (e.g. `Element`).\n */\nfunction collapseEmptyInstructions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n // Find end ops that may be able to be merged.\n const opReplacements = REPLACEMENTS.get(op.kind);\n if (opReplacements === undefined) {\n continue;\n }\n const [startKind, mergedKind] = opReplacements;\n // Locate the previous (non-ignored) op.\n let prevOp = op.prev;\n while (prevOp !== null && IGNORED_OP_KINDS.has(prevOp.kind)) {\n prevOp = prevOp.prev;\n }\n // If the previous op is the corresponding start op, we can megre.\n if (prevOp !== null && prevOp.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 prevOp.kind = mergedKind;\n // Remove the end instruction.\n OpList.remove(op);\n }\n }\n }\n}\n\n/**\n * Safe read expressions such as `a?.b` have different semantics in Angular templates as\n * compared to JavaScript. In particular, they default to `null` instead of `undefined`. This phase\n * finds all unresolved safe read expressions, and converts them into the appropriate output AST\n * reads, guarded by null checks. We generate temporaries as needed, to avoid re-evaluating the same\n * sub-expression multiple times.\n */\nfunction expandSafeReads(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,\n LiteralArrayExpr,\n LiteralMapExpr,\n 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 ||\n e instanceof LiteralArrayExpr ||\n e instanceof LiteralMapExpr ||\n 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 ||\n e instanceof SafeKeyedReadExpr ||\n 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 }\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 * The escape sequence used indicate message param values.\n */\nconst ESCAPE$1 = '\\uFFFD';\n/**\n * Marker used to indicate an element tag.\n */\nconst ELEMENT_MARKER = '#';\n/**\n * Marker used to indicate a template tag.\n */\nconst TEMPLATE_MARKER = '*';\n/**\n * Marker used to indicate closing of an element or template tag.\n */\nconst TAG_CLOSE_MARKER = '/';\n/**\n * Marker used to indicate the sub-template context.\n */\nconst CONTEXT_MARKER = ':';\n/**\n * Marker used to indicate the start of a list of values.\n */\nconst LIST_START_MARKER = '[';\n/**\n * Marker used to indicate the end of a list of values.\n */\nconst LIST_END_MARKER = ']';\n/**\n * Delimiter used to separate multiple values in a list.\n */\nconst LIST_DELIMITER = '|';\n/**\n * Formats the param maps on extracted message ops into a maps of `Expression` objects that can be\n * used in the final output.\n */\nfunction extractI18nMessages(job) {\n // Create an i18n message for each context.\n // TODO: Merge the context op with the message op since they're 1:1 anyways.\n const i18nMessagesByContext = new Map();\n const i18nBlocks = new Map();\n const i18nContexts = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n const i18nMessageOp = createI18nMessage(job, op);\n unit.create.push(i18nMessageOp);\n i18nMessagesByContext.set(op.xref, i18nMessageOp);\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.I18nStart:\n i18nBlocks.set(op.xref, op);\n break;\n }\n }\n }\n // Associate sub-messages for ICUs with their root message. At this point we can also remove the\n // ICU start/end ops, as they are no longer needed.\n let currentIcu = null;\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.IcuStart:\n currentIcu = op;\n OpList.remove(op);\n // Skip any contexts not associated with an ICU.\n const icuContext = i18nContexts.get(op.context);\n if (icuContext.contextKind !== I18nContextKind.Icu) {\n continue;\n }\n // Skip ICUs that share a context with their i18n message. These represent root-level\n // ICUs, not sub-messages.\n const i18nBlock = i18nBlocks.get(icuContext.i18nBlock);\n if (i18nBlock.context === icuContext.xref) {\n continue;\n }\n // Find the root message and push this ICUs message as a sub-message.\n const rootI18nBlock = i18nBlocks.get(i18nBlock.root);\n const rootMessage = i18nMessagesByContext.get(rootI18nBlock.context);\n if (rootMessage === undefined) {\n throw Error('AssertionError: ICU sub-message should belong to a root message.');\n }\n const subMessage = i18nMessagesByContext.get(icuContext.xref);\n subMessage.messagePlaceholder = op.messagePlaceholder;\n rootMessage.subMessages.push(subMessage.xref);\n break;\n case OpKind.IcuEnd:\n currentIcu = null;\n OpList.remove(op);\n break;\n case OpKind.IcuPlaceholder:\n // Add ICU placeholders to the message, then remove the ICU placeholder ops.\n if (currentIcu === null || currentIcu.context == null) {\n throw Error('AssertionError: Unexpected ICU placeholder outside of i18n context');\n }\n const msg = i18nMessagesByContext.get(currentIcu.context);\n msg.postprocessingParams.set(op.name, literal(formatIcuPlaceholder(op)));\n OpList.remove(op);\n break;\n }\n }\n }\n}\n/**\n * Create an i18n message op from an i18n context op.\n */\nfunction createI18nMessage(job, context, messagePlaceholder) {\n let formattedParams = formatParams(context.params);\n const formattedPostprocessingParams = formatParams(context.postprocessingParams);\n let needsPostprocessing = [...context.params.values()].some((v) => v.length > 1);\n return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder ?? null, formattedParams, formattedPostprocessingParams, needsPostprocessing);\n}\n/**\n * Formats an ICU placeholder into a single string with expression placeholders.\n */\nfunction formatIcuPlaceholder(op) {\n if (op.strings.length !== op.expressionPlaceholders.length + 1) {\n throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);\n }\n const values = op.expressionPlaceholders.map(formatValue);\n return op.strings.flatMap((str, i) => [str, values[i] || '']).join('');\n}\n/**\n * Formats a map of `I18nParamValue[]` values into a map of `Expression` values.\n */\nfunction formatParams(params) {\n const formattedParams = new Map();\n for (const [placeholder, placeholderValues] of params) {\n const serializedValues = formatParamValues(placeholderValues);\n if (serializedValues !== null) {\n formattedParams.set(placeholder, literal(serializedValues));\n }\n }\n return formattedParams;\n}\n/**\n * Formats an `I18nParamValue[]` into a string (or null for empty array).\n */\nfunction formatParamValues(values) {\n if (values.length === 0) {\n return null;\n }\n const serializedValues = values.map((value) => formatValue(value));\n return serializedValues.length === 1\n ? serializedValues[0]\n : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;\n}\n/**\n * Formats a single `I18nParamValue` into a string\n */\nfunction formatValue(value) {\n // Element tags with a structural directive use a special form that concatenates the element and\n // template values.\n if (value.flags & I18nParamValueFlags.ElementTag &&\n value.flags & I18nParamValueFlags.TemplateTag) {\n if (typeof value.value !== 'object') {\n throw Error('AssertionError: Expected i18n param value to have an element and template slot');\n }\n const elementValue = formatValue({\n ...value,\n value: value.value.element,\n flags: value.flags & ~I18nParamValueFlags.TemplateTag,\n });\n const templateValue = formatValue({\n ...value,\n value: value.value.template,\n flags: value.flags & ~I18nParamValueFlags.ElementTag,\n });\n // TODO(mmalerba): This is likely a bug in TemplateDefinitionBuilder, we should not need to\n // record the template value twice. For now I'm re-implementing the behavior here to keep the\n // output consistent with TemplateDefinitionBuilder.\n if (value.flags & I18nParamValueFlags.OpenTag &&\n value.flags & I18nParamValueFlags.CloseTag) {\n return `${templateValue}${elementValue}${templateValue}`;\n }\n // To match the TemplateDefinitionBuilder output, flip the order depending on whether the\n // values represent a closing or opening tag (or both).\n // TODO(mmalerba): Figure out if this makes a difference in terms of either functionality,\n // or the resulting message ID. If not, we can remove the special-casing in the future.\n return value.flags & I18nParamValueFlags.CloseTag\n ? `${elementValue}${templateValue}`\n : `${templateValue}${elementValue}`;\n }\n // Self-closing tags use a special form that concatenates the start and close tag values.\n if (value.flags & I18nParamValueFlags.OpenTag &&\n value.flags & I18nParamValueFlags.CloseTag) {\n return `${formatValue({ ...value, flags: value.flags & ~I18nParamValueFlags.CloseTag })}${formatValue({ ...value, flags: value.flags & ~I18nParamValueFlags.OpenTag })}`;\n }\n // If there are no special flags, just return the raw value.\n if (value.flags === I18nParamValueFlags.None) {\n return `${value.value}`;\n }\n // Encode the remaining flags as part of the value.\n let tagMarker = '';\n let closeMarker = '';\n if (value.flags & I18nParamValueFlags.ElementTag) {\n tagMarker = ELEMENT_MARKER;\n }\n else if (value.flags & I18nParamValueFlags.TemplateTag) {\n tagMarker = TEMPLATE_MARKER;\n }\n if (tagMarker !== '') {\n closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : '';\n }\n const context = value.subTemplateIndex === null ? '' : `${CONTEXT_MARKER}${value.subTemplateIndex}`;\n return `${ESCAPE$1}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE$1}`;\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 generateAdvance(job) {\n for (const unit of job.units) {\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 unit.create) {\n if (!hasConsumesSlotTrait(op)) {\n continue;\n }\n else if (op.handle.slot === null) {\n throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);\n }\n slotMap.set(op.xref, op.handle.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 unit.update) {\n let consumer = null;\n if (hasDependsOnSlotContextTrait(op)) {\n consumer = op;\n }\n else {\n visitExpressionsInOp(op, (expr) => {\n if (consumer === null && hasDependsOnSlotContextTrait(expr)) {\n consumer = expr;\n }\n });\n }\n if (consumer === null) {\n continue;\n }\n if (!slotMap.has(consumer.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 target ${consumer.target}`);\n }\n const slot = slotMap.get(consumer.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, consumer.sourceSpan), op);\n slotContext = slot;\n }\n }\n }\n}\n\n/**\n * Locate projection slots, populate the each component's `ngContentSelectors` literal field,\n * populate `project` arguments, and generate the required `projectionDef` instruction for the job's\n * root view.\n */\nfunction generateProjectionDefs(job) {\n // TODO: Why does TemplateDefinitionBuilder force a shared constant?\n const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;\n // Collect all selectors from this component, and its nested views. Also, assign each projection a\n // unique ascending projection slot index.\n const selectors = [];\n let projectionSlotIndex = 0;\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Projection) {\n selectors.push(op.selector);\n op.projectionSlotIndex = projectionSlotIndex++;\n }\n }\n }\n if (selectors.length > 0) {\n // Create the projectionDef array. If we only found a single wildcard selector, then we use the\n // default behavior with no arguments instead.\n let defExpr = null;\n if (selectors.length > 1 || selectors[0] !== '*') {\n const def = selectors.map((s) => (s === '*' ? s : parseSelectorToR3Selector(s)));\n defExpr = job.pool.getConstLiteral(literalOrArrayLiteral(def), share);\n }\n // Create the ngContentSelectors constant.\n job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral(selectors), share);\n // The projection def instruction goes at the beginning of the root view, before any\n // `projection` instructions.\n job.root.create.prepend([createProjectionDefOp(defExpr)]);\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 generateVariables(job) {\n recursivelyProcessView(job.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.Projection:\n if (op.fallbackView !== null) {\n recursivelyProcessView(view.job.views.get(op.fallbackView), scope);\n }\n break;\n case OpKind.RepeaterCreate:\n // Descend into child embedded views.\n recursivelyProcessView(view.job.views.get(op.xref), scope);\n if (op.emptyView) {\n recursivelyProcessView(view.job.views.get(op.emptyView), scope);\n }\n break;\n case OpKind.Listener:\n case OpKind.TwoWayListener:\n // Prepend variables to listener handler functions.\n op.handlerOps.prepend(generateVariablesInScopeForView(view, scope, true));\n break;\n }\n }\n view.update.prepend(generateVariablesInScopeForView(view, scope, false));\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 aliases: view.aliases,\n references: [],\n letDeclarations: [],\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 local: false,\n });\n }\n for (const op of view.create) {\n switch (op.kind) {\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 targetSlot: op.handle,\n offset,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.localRefs[offset].name,\n local: false,\n },\n });\n }\n break;\n case OpKind.DeclareLet:\n scope.letDeclarations.push({\n targetId: op.xref,\n targetSlot: op.handle,\n variable: {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.declaredName,\n local: false,\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, isListener) {\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(), VariableFlags.None));\n }\n // Add variables for all context variables available in this scope's view.\n const scopeView = view.job.views.get(scope.view);\n for (const [name, value] of scopeView.contextVariables) {\n const context = new ContextExpr(scope.view);\n // We either read the context, or, if the variable is CTX_REF, use the context directly.\n const variable = value === CTX_REF ? context : new ReadPropExpr(context, value);\n // Add the variable declaration.\n newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), variable, VariableFlags.None));\n }\n for (const alias of scopeView.aliases) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), alias, alias.expression.clone(), VariableFlags.AlwaysInline));\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.targetSlot, ref.offset), VariableFlags.None));\n }\n if (scope.view !== view.xref || isListener) {\n for (const decl of scope.letDeclarations) {\n newOps.push(createVariableOp(view.job.allocateXrefId(), decl.variable, new ContextLetReferenceExpr(decl.targetId, decl.targetSlot), VariableFlags.None));\n }\n }\n if (scope.parent !== null) {\n // Recursively add variables from the parent scope.\n newOps.push(...generateVariablesInScopeForView(view, scope.parent, false));\n }\n return newOps;\n}\n\n/**\n * `ir.ConstCollectedExpr` may be present in any IR expression. This means that expression needs to\n * be lifted into the component const array, and replaced with a reference to the const array at its\n *\n * usage site. This phase walks the IR and performs this transformation.\n */\nfunction collectConstExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n transformExpressionsInOp(op, (expr) => {\n if (!(expr instanceof ConstCollectedExpr)) {\n return expr;\n }\n return literal(job.addConst(expr.expr));\n }, VisitorContextFlag.None);\n }\n }\n}\n\nconst STYLE_DOT = 'style.';\nconst CLASS_DOT = 'class.';\nconst STYLE_BANG = 'style!';\nconst CLASS_BANG = 'class!';\nconst BANG_IMPORTANT = '!important';\n/**\n * Host bindings are compiled using a different parser entrypoint, and are parsed quite differently\n * as a result. Therefore, we need to do some extra parsing for host style properties, as compared\n * to non-host style properties.\n * TODO: Unify host bindings and non-host bindings in the parser.\n */\nfunction parseHostStyleProperties(job) {\n for (const op of job.root.update) {\n if (!(op.kind === OpKind.Binding && op.bindingKind === BindingKind.Property)) {\n continue;\n }\n if (op.name.endsWith(BANG_IMPORTANT)) {\n // Delete any `!important` suffixes from the binding name.\n op.name = op.name.substring(0, op.name.length - BANG_IMPORTANT.length);\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(op.name)) {\n op.name = hyphenate$1(op.name);\n }\n const { property, suffix } = parseProperty(op.name);\n op.name = property;\n op.unit = suffix;\n }\n else if (op.name.startsWith(STYLE_BANG)) {\n op.bindingKind = BindingKind.StyleProperty;\n op.name = 'style';\n }\n else if (op.name.startsWith(CLASS_DOT)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty(op.name.substring(CLASS_DOT.length)).property;\n }\n else if (op.name.startsWith(CLASS_BANG)) {\n op.bindingKind = BindingKind.ClassName;\n op.name = parseProperty(op.name.substring(CLASS_BANG.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(name) {\n return name.startsWith('--');\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}\nfunction parseProperty(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\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\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 visitBlockPlaceholder(ph) {\n return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\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\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 Block extends NodeWithI18n {\n constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n) {\n super(sourceSpan, i18n);\n this.name = name;\n this.parameters = parameters;\n this.children = children;\n this.nameSpan = nameSpan;\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}\nclass LetDeclaration {\n constructor(name, value, sourceSpan, nameSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.nameSpan = nameSpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor, context) {\n return visitor.visitLetDeclaration(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 visitBlock(block, context) {\n this.visitChildren(context, (visit) => {\n visit(block.parameters);\n visit(block.children);\n });\n }\n visitBlockParameter(ast, context) { }\n visitLetDeclaration(decl, 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\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 || {\n endPos: _file.content.length,\n startPos: 0,\n startLine: 0,\n startCol: 0,\n };\n this._cursor = options.escapedString\n ? 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 ?? true;\n this._tokenizeLet = options.tokenizeLet ?? true;\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._tokenizeLet &&\n // Use `peek` instead of `attempCharCode` since we\n // don't want to advance in case it's not `@let`.\n this._cursor.peek() === $AT &&\n !this._inInterpolation &&\n this._attemptStr('@let')) {\n this._consumeLetDeclaration(start);\n }\n else if (this._tokenizeBlocks && this._attemptCharCode($AT)) {\n this._consumeBlockStart(start);\n }\n else if (this._tokenizeBlocks &&\n !this._inInterpolation &&\n !this._isInExpansionCase() &&\n !this._isInExpansionForm() &&\n this._attemptCharCode($RBRACE)) {\n this._consumeBlockEnd(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(33 /* TokenType.EOF */);\n this._endToken([]);\n }\n _getBlockName() {\n // This allows us to capture up something like `@else if`, but not `@ if`.\n let spacesInNameAllowed = false;\n const nameCursor = this._cursor.clone();\n this._attemptCharCodeUntilFn((code) => {\n if (isWhitespace(code)) {\n return !spacesInNameAllowed;\n }\n if (isBlockNameChar(code)) {\n spacesInNameAllowed = true;\n return false;\n }\n return true;\n });\n return this._cursor.getChars(nameCursor).trim();\n }\n _consumeBlockStart(start) {\n this._beginToken(24 /* TokenType.BLOCK_OPEN_START */, start);\n const startToken = this._endToken([this._getBlockName()]);\n if (this._cursor.peek() === $LPAREN) {\n // Advance past the opening paren.\n this._cursor.advance();\n // Capture the parameters.\n this._consumeBlockParameters();\n // Allow spaces before the closing paren.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($RPAREN)) {\n // Allow spaces after the paren.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n else {\n startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */;\n return;\n }\n }\n if (this._attemptCharCode($LBRACE)) {\n this._beginToken(25 /* TokenType.BLOCK_OPEN_END */);\n this._endToken([]);\n }\n else {\n startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */;\n }\n }\n _consumeBlockEnd(start) {\n this._beginToken(26 /* TokenType.BLOCK_CLOSE */, start);\n this._endToken([]);\n }\n _consumeBlockParameters() {\n // Trim the whitespace until the first parameter.\n this._attemptCharCodeUntilFn(isBlockParameterChar);\n while (this._cursor.peek() !== $RPAREN && this._cursor.peek() !== $EOF) {\n this._beginToken(27 /* TokenType.BLOCK_PARAMETER */);\n const start = this._cursor.clone();\n let inQuote = null;\n let openParens = 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 === $LPAREN && inQuote === null) {\n openParens++;\n }\n else if (char === $RPAREN && inQuote === null) {\n if (openParens === 0) {\n break;\n }\n else if (openParens > 0) {\n openParens--;\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 _consumeLetDeclaration(start) {\n this._beginToken(29 /* TokenType.LET_START */, start);\n // Require at least one white space after the `@let`.\n if (isWhitespace(this._cursor.peek())) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n else {\n const token = this._endToken([this._cursor.getChars(start)]);\n token.type = 32 /* TokenType.INCOMPLETE_LET */;\n return;\n }\n const startToken = this._endToken([this._getLetDeclarationName()]);\n // Skip over white space before the equals character.\n this._attemptCharCodeUntilFn(isNotWhitespace);\n // Expect an equals sign.\n if (!this._attemptCharCode($EQ)) {\n startToken.type = 32 /* TokenType.INCOMPLETE_LET */;\n return;\n }\n // Skip spaces after the equals.\n this._attemptCharCodeUntilFn((code) => isNotWhitespace(code) && !isNewLine(code));\n this._consumeLetDeclarationValue();\n // Terminate the `@let` with a semicolon.\n const endChar = this._cursor.peek();\n if (endChar === $SEMICOLON) {\n this._beginToken(31 /* TokenType.LET_END */);\n this._endToken([]);\n this._cursor.advance();\n }\n else {\n startToken.type = 32 /* TokenType.INCOMPLETE_LET */;\n startToken.sourceSpan = this._cursor.getSpan(start);\n }\n }\n _getLetDeclarationName() {\n const nameCursor = this._cursor.clone();\n let allowDigit = false;\n this._attemptCharCodeUntilFn((code) => {\n if (isAsciiLetter(code) ||\n code === $$ ||\n code === $_ ||\n // `@let` names can't start with a digit, but digits are valid anywhere else in the name.\n (allowDigit && isDigit(code))) {\n allowDigit = true;\n return false;\n }\n return true;\n });\n return this._cursor.getChars(nameCursor).trim();\n }\n _consumeLetDeclarationValue() {\n const start = this._cursor.clone();\n this._beginToken(30 /* TokenType.LET_VALUE */, start);\n while (this._cursor.peek() !== $EOF) {\n const char = this._cursor.peek();\n // `@let` declarations terminate with a semicolon.\n if (char === $SEMICOLON) {\n break;\n }\n // If we hit a quote, skip over its content since we don't care what's inside.\n if (isQuote(char)) {\n this._cursor.advance();\n this._attemptCharCodeUntilFn((inner) => {\n if (inner === $BACKSLASH) {\n this._cursor.advance();\n return false;\n }\n return inner === char;\n });\n }\n this._cursor.advance();\n }\n this._endToken([this._cursor.getChars(start)]);\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 &&\n this._cursor.peek() !== $GT &&\n this._cursor.peek() !== $LT &&\n 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)\n ? 2 /* TokenType.TAG_OPEN_END_VOID */\n : 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._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 if (this._tokenizeBlocks &&\n !this._inInterpolation &&\n !this._isInExpansion() &&\n (this._cursor.peek() === $AT || this._cursor.peek() === $RBRACE)) {\n return true;\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) ||\n ($A <= code && code <= $Z) ||\n code === $SLASH ||\n code === $BANG) {\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 _isInExpansion() {\n return this._isInExpansionCase() || this._isInExpansionForm();\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) ||\n code === $GT ||\n code === $LT ||\n code === $SLASH ||\n code === $SQ ||\n code === $DQ ||\n code === $EQ ||\n code === $EOF);\n}\nfunction isPrefixEnd(code) {\n return ((code < $a || $z < code) &&\n (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 &&\n 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$1 {\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 !== 33 /* 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 */ ||\n 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 === 24 /* TokenType.BLOCK_OPEN_START */) {\n this._closeVoidElement();\n this._consumeBlockOpen(this._advance());\n }\n else if (this._peek.type === 26 /* TokenType.BLOCK_CLOSE */) {\n this._closeVoidElement();\n this._consumeBlockClose(this._advance());\n }\n else if (this._peek.type === 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */) {\n this._closeVoidElement();\n this._consumeIncompleteBlock(this._advance());\n }\n else if (this._peek.type === 29 /* TokenType.LET_START */) {\n this._closeVoidElement();\n this._consumeLet(this._advance());\n }\n else if (this._peek.type === 32 /* TokenType.INCOMPLETE_LET */) {\n this._closeVoidElement();\n this._consumeIncompleteLet(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n for (const leftoverContainer of this._containerStack) {\n // Unlike HTML elements, blocks aren't closed implicitly by the end of the file.\n if (leftoverContainer instanceof Block) {\n this.errors.push(TreeError.create(leftoverContainer.name, leftoverContainer.sourceSpan, `Unclosed block \"${leftoverContainer.name}\"`));\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: 33 /* 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 === 33 /* 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 if (parent != null &&\n 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 */ ||\n 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(expectedName, expectedType, endSourceSpan) {\n let unexpectedCloseTagDetected = false;\n for (let stackIndex = this._containerStack.length - 1; stackIndex >= 0; stackIndex--) {\n const node = this._containerStack[stackIndex];\n if ((node.name === expectedName || expectedName === null) && 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 and most elements are not self closing.\n if (node instanceof Block ||\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 &&\n 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 _consumeBlockOpen(token) {\n const parameters = [];\n while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\n }\n if (this._peek.type === 25 /* TokenType.BLOCK_OPEN_END */) {\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, token.sourceSpan, startSpan);\n this._pushContainer(block, false);\n }\n _consumeBlockClose(token) {\n if (!this._popContainer(null, Block, token.sourceSpan)) {\n this.errors.push(TreeError.create(null, token.sourceSpan, `Unexpected closing block. The block may have been closed earlier. ` +\n `If you meant to write the } character, you should use the \"}\" ` +\n `HTML entity instead.`));\n }\n }\n _consumeIncompleteBlock(token) {\n const parameters = [];\n while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) {\n const paramToken = this._advance();\n parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));\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, token.sourceSpan, startSpan);\n this._pushContainer(block, false);\n // Incomplete blocks don't have children so we close them immediately and report an error.\n this._popContainer(null, Block, null);\n this.errors.push(TreeError.create(token.parts[0], span, `Incomplete block \"${token.parts[0]}\". If you meant to write the @ character, ` +\n `you should use the \"@\" HTML entity instead.`));\n }\n _consumeLet(startToken) {\n const name = startToken.parts[0];\n let valueToken;\n let endToken;\n if (this._peek.type !== 30 /* TokenType.LET_VALUE */) {\n this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Invalid @let declaration \"${name}\". Declaration must have a value.`));\n return;\n }\n else {\n valueToken = this._advance();\n }\n // Type cast is necessary here since TS narrowed the type of `peek` above.\n if (this._peek.type !== 31 /* TokenType.LET_END */) {\n this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Unterminated @let declaration \"${name}\". Declaration must be terminated with a semicolon.`));\n return;\n }\n else {\n endToken = this._advance();\n }\n const end = endToken.sourceSpan.fullStart;\n const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);\n // The start token usually captures the `@let`. Construct a name span by\n // offsetting the start by the length of any text before the name.\n const startOffset = startToken.sourceSpan.toString().lastIndexOf(name);\n const nameStart = startToken.sourceSpan.start.moveBy(startOffset);\n const nameSpan = new ParseSourceSpan(nameStart, startToken.sourceSpan.end);\n const node = new LetDeclaration(name, valueToken.parts[0], span, nameSpan, valueToken.sourceSpan);\n this._addToParent(node);\n }\n _consumeIncompleteLet(token) {\n // Incomplete `@let` declaration may end up with an empty name.\n const name = token.parts[0] ?? '';\n const nameString = name ? ` \"${name}\"` : '';\n // If there's at least a name, we can salvage an AST node that can be used for completions.\n if (name.length > 0) {\n const startOffset = token.sourceSpan.toString().lastIndexOf(name);\n const nameStart = token.sourceSpan.start.moveBy(startOffset);\n const nameSpan = new ParseSourceSpan(nameStart, token.sourceSpan.end);\n const valueSpan = new ParseSourceSpan(token.sourceSpan.start, token.sourceSpan.start.moveBy(0));\n const node = new LetDeclaration(name, '', token.sourceSpan, nameSpan, valueSpan);\n this._addToParent(node);\n }\n this.errors.push(TreeError.create(token.parts[0], token.sourceSpan, `Incomplete @let declaration${nameString}. ` +\n `@let declarations must be written as \\`@let <name> = <value>;\\``));\n }\n _getContainer() {\n return this._containerStack.length > 0\n ? 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 {\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\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 *\n * If `originalNodeMap` is provided, the transformed nodes will be mapped back to their original\n * inputs. Any output nodes not in the map were not transformed. This supports correlating and\n * porting information between the trimmed nodes and original nodes (such as `i18n` properties)\n * such that trimming whitespace does not does not drop required information from the node.\n */\nclass WhitespaceVisitor {\n constructor(preserveSignificantWhitespace, originalNodeMap, requireContext = true) {\n this.preserveSignificantWhitespace = preserveSignificantWhitespace;\n this.originalNodeMap = originalNodeMap;\n this.requireContext = requireContext;\n // How many ICU expansions which are currently being visited. ICUs can be nested, so this\n // tracks the current depth of nesting. If this depth is greater than 0, then this visitor is\n // currently processing content inside an ICU expansion.\n this.icuExpansionDepth = 0;\n }\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 const newElement = new Element(element.name, visitAllWithSiblings(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n this.originalNodeMap?.set(newElement, element);\n return newElement;\n }\n const newElement = new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n this.originalNodeMap?.set(newElement, element);\n return newElement;\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 // Do not trim whitespace within ICU expansions when preserving significant whitespace.\n // Historically, ICU whitespace was never trimmed and this is really a bug. However fixing it\n // would change message IDs which we can't easily do. Instead we only trim ICU whitespace within\n // ICU expansions when not preserving significant whitespace, which is the new behavior where it\n // most matters.\n const inIcuExpansion = this.icuExpansionDepth > 0;\n if (inIcuExpansion && this.preserveSignificantWhitespace)\n return text;\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 // Fully trim message when significant whitespace is not preserved.\n if (!this.preserveSignificantWhitespace && tokens.length > 0) {\n // The first token should only call `.trimStart()` and the last token\n // should only call `.trimEnd()`, but there might be only one token which\n // needs to call both.\n const firstToken = tokens[0];\n tokens.splice(0, 1, trimLeadingWhitespace(firstToken, context));\n const lastToken = tokens[tokens.length - 1]; // Could be the same as the first token.\n tokens.splice(tokens.length - 1, 1, trimTrailingWhitespace(lastToken, context));\n }\n // Process the whitespace of the value of this Text node. Also trim the leading/trailing\n // whitespace when we don't need to preserve significant whitespace.\n const processed = processWhitespace(text.value);\n const value = this.preserveSignificantWhitespace\n ? processed\n : trimLeadingAndTrailingWhitespace(processed, context);\n const result = new Text(value, text.sourceSpan, tokens, text.i18n);\n this.originalNodeMap?.set(result, text);\n return result;\n }\n return null;\n }\n visitComment(comment, context) {\n return comment;\n }\n visitExpansion(expansion, context) {\n this.icuExpansionDepth++;\n let newExpansion;\n try {\n newExpansion = new Expansion(expansion.switchValue, expansion.type, visitAllWithSiblings(this, expansion.cases), expansion.sourceSpan, expansion.switchValueSourceSpan, expansion.i18n);\n }\n finally {\n this.icuExpansionDepth--;\n }\n this.originalNodeMap?.set(newExpansion, expansion);\n return newExpansion;\n }\n visitExpansionCase(expansionCase, context) {\n const newExpansionCase = new ExpansionCase(expansionCase.value, visitAllWithSiblings(this, expansionCase.expression), expansionCase.sourceSpan, expansionCase.valueSourceSpan, expansionCase.expSourceSpan);\n this.originalNodeMap?.set(newExpansionCase, expansionCase);\n return newExpansionCase;\n }\n visitBlock(block, context) {\n const newBlock = new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);\n this.originalNodeMap?.set(newBlock, block);\n return newBlock;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n visitLetDeclaration(decl, context) {\n return decl;\n }\n visit(_node, context) {\n // `visitAllWithSiblings` provides context necessary for ICU messages to be handled correctly.\n // Prefer that over calling `html.visitAll` directly on this visitor.\n if (this.requireContext && !context) {\n throw new Error(`WhitespaceVisitor requires context. Visit via \\`visitAllWithSiblings\\` to get this context.`);\n }\n return false;\n }\n}\nfunction trimLeadingWhitespace(token, context) {\n if (token.type !== 5 /* TokenType.TEXT */)\n return token;\n const isFirstTokenInTag = !context?.prev;\n if (!isFirstTokenInTag)\n return token;\n return transformTextToken(token, (text) => text.trimStart());\n}\nfunction trimTrailingWhitespace(token, context) {\n if (token.type !== 5 /* TokenType.TEXT */)\n return token;\n const isLastTokenInTag = !context?.next;\n if (!isLastTokenInTag)\n return token;\n return transformTextToken(token, (text) => text.trimEnd());\n}\nfunction trimLeadingAndTrailingWhitespace(text, context) {\n const isFirstTokenInTag = !context?.prev;\n const isLastTokenInTag = !context?.next;\n const maybeTrimmedStart = isFirstTokenInTag ? text.trimStart() : text;\n const maybeTrimmed = isLastTokenInTag ? maybeTrimmedStart.trimEnd() : maybeTrimmedStart;\n return maybeTrimmed;\n}\nfunction createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {\n return { type, parts: [processWhitespace(parts[0])], sourceSpan };\n}\nfunction transformTextToken({ type, parts, sourceSpan }, transform) {\n // `TextToken` only ever has one part as defined in its type, so we just transform the first element.\n return { type, parts: [transform(parts[0])], sourceSpan };\n}\nfunction processWhitespace(text) {\n return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\nfunction removeWhitespaces(htmlAstWithErrors, preserveSignificantWhitespace) {\n return new ParseTreeResult(visitAllWithSiblings(new WhitespaceVisitor(preserveSignificantWhitespace), 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\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)\n ? 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\n ? 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) ||\n ($A <= code && code <= $Z) ||\n code == $_ ||\n 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 == $_ || 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 {\n constructor(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n parseAction(input, 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 const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1 /* ParseFlags.Action */, 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 { 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]).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\n ? getIndexMapForOriginalTemplate(interpolatedTokens)\n : 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)) &&\n (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)) { } // 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 const literalMapKey = { key, quoted };\n keys.push(literalMapKey);\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 literalMapKey.isShorthandInitialized = true;\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.consumeOptionalOperator('=')) {\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.consumeOptionalOperator('=')) {\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 = 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\n ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan)\n : new Call(span, sourceSpan, receiver, args, argumentSpan);\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\n ? 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\n ? `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 !n.isCharacter($SEMICOLON) &&\n !n.isOperator('|') &&\n (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\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, [\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([\n 'sandbox',\n 'allow',\n 'allowfullscreen',\n 'referrerpolicy',\n 'csp',\n 'fetchpriority',\n]);\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\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,!inert,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 ':math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*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,*scrollend,*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 ':math:math^:math:|',\n ':math:maction^:math:|',\n ':math:menclose^:math:|',\n ':math:merror^:math:|',\n ':math:mfenced^:math:|',\n ':math:mfrac^:math:|',\n ':math:mi^:math:|',\n ':math:mmultiscripts^:math:|',\n ':math:mn^:math:|',\n ':math:mo^:math:|',\n ':math:mover^:math:|',\n ':math:mpadded^:math:|',\n ':math:mphantom^:math:|',\n ':math:mroot^:math:|',\n ':math:mrow^:math:|',\n ':math:ms^:math:|',\n ':math:mspace^:math:|',\n ':math:msqrt^:math:|',\n ':math:mstyle^:math:|',\n ':math:msub^:math:|',\n ':math:msubsup^:math:|',\n ':math:msup^:math:|',\n ':math:mtable^:math:|',\n ':math:mtd^:math:|',\n ':math:mtext^:math:|',\n ':math:mtr^:math:|',\n ':math:munder^:math:|',\n ':math:munderover^:math:|',\n ':math:semantics^:math:|',\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 = Object.assign(Object.create(null), {\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',\n 'article',\n 'aside',\n 'blockquote',\n 'div',\n 'dl',\n 'fieldset',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'main',\n 'nav',\n 'ol',\n 'p',\n 'pre',\n 'section',\n 'table',\n '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({\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({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),\n 'rp': new HtmlTagDefinition({\n closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n closedByParent: true,\n }),\n 'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),\n 'option': new HtmlTagDefinition({\n closedByChildren: ['option', 'optgroup'],\n closedByParent: true,\n }),\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: {\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[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()] ?? DEFAULT_TAG_DEFINITION);\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 getStartBlockPlaceholderName(name, parameters) {\n const signature = this._hashBlock(name, parameters);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);\n this._signatureToName[signature] = placeholder;\n return placeholder;\n }\n getCloseBlockPlaceholderName(name) {\n const signature = this._hashClosingBlock(name);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);\n this._signatureToName[signature] = placeholder;\n return placeholder;\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)\n .sort()\n .map((name) => ` ${name}=${attrs[name]}`)\n .join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }\n _hashClosingTag(tag) {\n return this._hashTag(`/${tag}`, {}, false);\n }\n _hashBlock(name, parameters) {\n const params = parameters.length === 0 ? '' : ` (${parameters.sort().join('; ')})`;\n return `@${name}${params} {}`;\n }\n _hashClosingBlock(name) {\n return this._hashBlock(`close_${name}`, []);\n }\n _toSnakeCase(name) {\n return name.toUpperCase().replace(/[^A-Z0-9]/g, '_');\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(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig, containerBlocks, retainEmptyTokens) {\n const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks, retainEmptyTokens);\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, _containerBlocks, _retainEmptyTokens) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n this._containerBlocks = _containerBlocks;\n this._retainEmptyTokens = _retainEmptyTokens;\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 visitBlock(block, context) {\n const children = visitAll(this, block.children, context);\n if (this._containerBlocks.has(block.name)) {\n return new Container(children, block.sourceSpan);\n }\n const parameters = block.parameters.map((param) => param.expression);\n const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);\n const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);\n context.placeholderToContent[startPhName] = {\n text: block.startSourceSpan.toString(),\n sourceSpan: block.startSourceSpan,\n };\n context.placeholderToContent[closePhName] = {\n text: block.endSourceSpan ? block.endSourceSpan.toString() : '}',\n sourceSpan: block.endSourceSpan ?? block.sourceSpan,\n };\n const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);\n return context.visitNodeFn(block, node);\n }\n visitBlockParameter(_parameter, _context) {\n throw new Error('Unreachable code');\n }\n visitLetDeclaration(decl, context) {\n return null;\n }\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 // Try to merge text tokens with previous tokens. We do this even for all tokens\n // when `retainEmptyTokens == true` because whitespace tokens may have non-zero\n // length, but will be trimmed by `WhitespaceVisitor` in one extraction pass and\n // be considered \"empty\" there. Therefore a whitespace token with\n // `retainEmptyTokens === true` should be treated like an empty token and either\n // retained or merged into the previous node. Since extraction does two passes with\n // different trimming behavior, the second pass needs to have identical node count\n // to reuse source spans, so we need this check to get the same answer when both\n // trimming and not trimming.\n if (token.parts[0].length > 0 || this._retainEmptyTokens) {\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 else {\n // Retain empty tokens to avoid breaking dropping entire nodes such that source\n // spans should not be reusable across multiple parses of a template. We *should*\n // do this all the time, however we need to maintain backwards compatibility\n // with existing message IDs so we can't do it by default and should only enable\n // this when removing significant whitespace.\n if (this._retainEmptyTokens) {\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(`\nThe number of i18n message children changed between first and second pass.\n\nFirst pass (${previousNodes.length} tokens):\n${previousNodes.map((node) => `\"${node.sourceSpan.toString()}\"`).join('\\n')}\n\nSecond pass (${nodes.length} tokens):\n${nodes.map((node) => `\"${node.sourceSpan.toString()}\"`).join('\\n')}\n `.trim());\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\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) || TRUSTED_TYPES_SINKS.has('*|' + propName));\n}\n\nconst setI18nRefs = (originalNodeMap) => {\n return (trimmedNode, i18nNode) => {\n // We need to set i18n properties on the original, untrimmed AST nodes. The i18n nodes needs to\n // use the trimmed content for message IDs to make messages more stable to whitespace changes.\n // But we don't want to actually trim the content, so we can't use the trimmed HTML AST for\n // general code gen. Instead we map the trimmed HTML AST back to the original AST and then\n // attach the i18n nodes so we get trimmed i18n nodes on the original (untrimmed) HTML AST.\n const originalNode = originalNodeMap.get(trimmedNode) ?? trimmedNode;\n if (originalNode instanceof NodeWithI18n) {\n if (i18nNode instanceof IcuPlaceholder && originalNode.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 = originalNode.i18n;\n }\n originalNode.i18n = i18nNode;\n }\n return i18nNode;\n };\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, containerBlocks = DEFAULT_CONTAINER_BLOCKS, preserveSignificantWhitespace = true, \n // When dropping significant whitespace we need to retain empty tokens or\n // else we won't be able to reuse source spans because empty tokens would be\n // removed and cause a mismatch. Unfortunately this still needs to be\n // configurable and sometimes needs to be set independently in order to make\n // sure the number of nodes don't change between parses, even when\n // `preserveSignificantWhitespace` changes.\n retainEmptyTokens = !preserveSignificantWhitespace) {\n this.interpolationConfig = interpolationConfig;\n this.keepI18nAttrs = keepI18nAttrs;\n this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;\n this.containerBlocks = containerBlocks;\n this.preserveSignificantWhitespace = preserveSignificantWhitespace;\n this.retainEmptyTokens = retainEmptyTokens;\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, this.containerBlocks, this.retainEmptyTokens);\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 // Generate a new AST with whitespace trimmed, but also generate a map\n // to correlate each new node to its original so we can apply i18n\n // information to the original node based on the trimmed content.\n //\n // `WhitespaceVisitor` removes *insignificant* whitespace as well as\n // significant whitespace. Enabling this visitor should be conditional\n // on `preserveWhitespace` rather than `preserveSignificantWhitespace`,\n // however this would be a breaking change for existing behavior where\n // `preserveWhitespace` was not respected correctly when generating\n // message IDs. This is really a bug but one we need to keep to maintain\n // backwards compatibility.\n const originalNodeMap = new Map();\n const trimmedNodes = this.preserveSignificantWhitespace\n ? element.children\n : visitAllWithSiblings(new WhitespaceVisitor(false /* preserveSignificantWhitespace */, originalNodeMap), element.children);\n message = this._generateI18nMessage(trimmedNodes, i18n, setI18nRefs(originalNodeMap));\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 visitBlock(block, context) {\n visitAll(this, block.children, context);\n return block;\n }\n visitBlockParameter(parameter, context) {\n return parameter;\n }\n visitLetDeclaration(decl, context) {\n return decl;\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'\n ? parseI18nMeta(meta)\n : meta instanceof Message\n ? 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 =\n (meta instanceof Message && meta.id) ||\n decimalDigest(message, /* preservePlaceholders */ this.preserveSignificantWhitespace);\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 = [\n computeDigest(message),\n computeDecimalDigest(message, \n /* preservePlaceholders */ this.preserveSignificantWhitespace),\n ];\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\n ? meta\n : meta instanceof IcuPlaceholder\n ? 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] =\n 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).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\n .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 visitBlockPlaceholder(ph) {\n return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\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 visitBlockPlaceholder(ph) {\n this.pieces.push(this.createPlaceholderPiece(ph.startName, ph.startSourceSpan ?? ph.sourceSpan));\n ph.children.forEach((child) => child.visit(this));\n this.pieces.push(this.createPlaceholderPiece(ph.closeName, ph.endSourceSpan ?? 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/** 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 * 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/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/**\n * The escape sequence used for message param values.\n */\nconst ESCAPE = '\\uFFFD';\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\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 * Lifts i18n properties into the consts array.\n * TODO: Can we use `ConstCollectedExpr`?\n * TODO: The way the various attributes are linked together is very complex. Perhaps we could\n * simplify the process, maybe by combining the context and message ops?\n */\nfunction collectI18nConsts(job) {\n const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_').toUpperCase() + '_';\n // Step One: Build up various lookup maps we need to collect all the consts.\n // Context Xref -> Extracted Attribute Ops\n const extractedAttributesByI18nContext = new Map();\n // Element/ElementStart Xref -> I18n Attributes config op\n const i18nAttributesByElement = new Map();\n // Element/ElementStart Xref -> All I18n Expression ops for attrs on that target\n const i18nExpressionsByElement = new Map();\n // I18n Message Xref -> I18n Message Op (TODO: use a central op map)\n const messages = new Map();\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {\n const attributes = extractedAttributesByI18nContext.get(op.i18nContext) ?? [];\n attributes.push(op);\n extractedAttributesByI18nContext.set(op.i18nContext, attributes);\n }\n else if (op.kind === OpKind.I18nAttributes) {\n i18nAttributesByElement.set(op.target, op);\n }\n else if (op.kind === OpKind.I18nExpression &&\n op.usage === I18nExpressionFor.I18nAttribute) {\n const expressions = i18nExpressionsByElement.get(op.target) ?? [];\n expressions.push(op);\n i18nExpressionsByElement.set(op.target, expressions);\n }\n else if (op.kind === OpKind.I18nMessage) {\n messages.set(op.xref, op);\n }\n }\n }\n // Step Two: Serialize the extracted i18n messages for root i18n blocks and i18n attributes into\n // the const array.\n //\n // Also, each i18n message will have a variable expression that can refer to its\n // value. Store these expressions in the appropriate place:\n // 1. For normal i18n content, it also goes in the const array. We save the const index to use\n // later.\n // 2. For extracted attributes, it becomes the value of the extracted attribute instruction.\n // 3. For i18n bindings, it will go in a separate const array instruction below; for now, we just\n // save it.\n const i18nValuesByContext = new Map();\n const messageConstIndices = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nMessage) {\n if (op.messagePlaceholder === null) {\n const { mainVar, statements } = collectMessage(job, fileBasedI18nSuffix, messages, op);\n if (op.i18nBlock !== null) {\n // This is a regular i18n message with a corresponding i18n block. Collect it into the\n // const array.\n const i18nConst = job.addConst(mainVar, statements);\n messageConstIndices.set(op.i18nBlock, i18nConst);\n }\n else {\n // This is an i18n attribute. Extract the initializers into the const pool.\n job.constsInitializers.push(...statements);\n // Save the i18n variable value for later.\n i18nValuesByContext.set(op.i18nContext, mainVar);\n // This i18n message may correspond to an individual extracted attribute. If so, The\n // value of that attribute is updated to read the extracted i18n variable.\n const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);\n if (attributesForMessage !== undefined) {\n for (const attr of attributesForMessage) {\n attr.expression = mainVar.clone();\n }\n }\n }\n }\n OpList.remove(op);\n }\n }\n }\n // Step Three: Serialize I18nAttributes configurations into the const array. Each I18nAttributes\n // instruction has a config array, which contains k-v pairs describing each binding name, and the\n // i18n variable that provides the value.\n for (const unit of job.units) {\n for (const elem of unit.create) {\n if (isElementOrContainerOp(elem)) {\n const i18nAttributes = i18nAttributesByElement.get(elem.xref);\n if (i18nAttributes === undefined) {\n // This element is not associated with an i18n attributes configuration instruction.\n continue;\n }\n let i18nExpressions = i18nExpressionsByElement.get(elem.xref);\n if (i18nExpressions === undefined) {\n // Unused i18nAttributes should have already been removed.\n // TODO: Should the removal of those dead instructions be merged with this phase?\n throw new Error('AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction');\n }\n // Find expressions for all the unique property names, removing duplicates.\n const seenPropertyNames = new Set();\n i18nExpressions = i18nExpressions.filter((i18nExpr) => {\n const seen = seenPropertyNames.has(i18nExpr.name);\n seenPropertyNames.add(i18nExpr.name);\n return !seen;\n });\n const i18nAttributeConfig = i18nExpressions.flatMap((i18nExpr) => {\n const i18nExprValue = i18nValuesByContext.get(i18nExpr.context);\n if (i18nExprValue === undefined) {\n throw new Error(\"AssertionError: Could not find i18n expression's value\");\n }\n return [literal(i18nExpr.name), i18nExprValue];\n });\n i18nAttributes.i18nAttributesConfig = job.addConst(new LiteralArrayExpr(i18nAttributeConfig));\n }\n }\n }\n // Step Four: Propagate the extracted const index into i18n ops that messages were extracted from.\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.I18nStart) {\n const msgIndex = messageConstIndices.get(op.root);\n if (msgIndex === undefined) {\n throw new Error('AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?');\n }\n op.messageIndex = msgIndex;\n }\n }\n }\n}\n/**\n * Collects the given message into a set of statements that can be added to the const array.\n * This will recursively collect any sub-messages referenced from the parent message as well.\n */\nfunction collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {\n // Recursively collect any sub-messages, record each sub-message's main variable under its\n // placeholder so that we can add them to the params for the parent message. It is possible\n // that multiple sub-messages will share the same placeholder, so we need to track an array of\n // variables for each placeholder.\n const statements = [];\n const subMessagePlaceholders = new Map();\n for (const subMessageId of messageOp.subMessages) {\n const subMessage = messages.get(subMessageId);\n const { mainVar: subMessageVar, statements: subMessageStatements } = collectMessage(job, fileBasedI18nSuffix, messages, subMessage);\n statements.push(...subMessageStatements);\n const subMessages = subMessagePlaceholders.get(subMessage.messagePlaceholder) ?? [];\n subMessages.push(subMessageVar);\n subMessagePlaceholders.set(subMessage.messagePlaceholder, subMessages);\n }\n addSubMessageParams(messageOp, subMessagePlaceholders);\n // Sort the params for consistency with TemaplateDefinitionBuilder output.\n messageOp.params = new Map([...messageOp.params.entries()].sort());\n const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX));\n // Closure Compiler requires const names to start with `MSG_` but disallows any other\n // const to start with `MSG_`. We define a variable starting with `MSG_` just for the\n // `goog.getMsg` call\n const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);\n let transformFn = undefined;\n // If nescessary, add a post-processing step and resolve any placeholder params that are\n // set in post-processing.\n if (messageOp.needsPostprocessing || messageOp.postprocessingParams.size > 0) {\n // Sort the post-processing params for consistency with TemaplateDefinitionBuilder output.\n const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());\n const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, \n /* useCamelCase */ false);\n const extraTransformFnParams = [];\n if (messageOp.postprocessingParams.size > 0) {\n extraTransformFnParams.push(mapLiteral(formattedPostprocessingParams, /* quoted */ true));\n }\n transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);\n }\n // Add the message's statements\n statements.push(...getTranslationDeclStmts(messageOp.message, mainVar, closureVar, messageOp.params, transformFn));\n return { mainVar, statements };\n}\n/**\n * Adds the given subMessage placeholders to the given message op.\n *\n * If a placeholder only corresponds to a single sub-message variable, we just set that variable\n * as the param value. However, if the placeholder corresponds to multiple sub-message\n * variables, we need to add a special placeholder value that is handled by the post-processing\n * step. We then add the array of variables as a post-processing param.\n */\nfunction addSubMessageParams(messageOp, subMessagePlaceholders) {\n for (const [placeholder, subMessages] of subMessagePlaceholders) {\n if (subMessages.length === 1) {\n messageOp.params.set(placeholder, subMessages[0]);\n }\n else {\n messageOp.params.set(placeholder, literal(`${ESCAPE}${I18N_ICU_MAPPING_PREFIX}${placeholder}${ESCAPE}`));\n messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));\n }\n }\n}\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\n * (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 paramsObject = Object.fromEntries(params);\n const statements = [\n declareI18nVariable(variable),\n ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, paramsObject), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(paramsObject, /* 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 * Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n */\nfunction i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExternalIds) {\n let name;\n const suffix = fileBasedI18nSuffix;\n if (useExternalIds) {\n const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n const uniqueSuffix = pool.uniqueName(suffix);\n name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n }\n else {\n const prefix = getTranslationConstPrefix(suffix);\n name = pool.uniqueName(prefix);\n }\n return variable(name);\n}\n\n/**\n * Removes text nodes within i18n blocks since they are already hardcoded into the i18n message.\n * Also, replaces interpolations on these text nodes with i18n expressions of the non-text portions,\n * which will be applied later.\n */\nfunction convertI18nText(job) {\n for (const unit of job.units) {\n // Remove all text nodes within i18n blocks, their content is already captured in the i18n\n // message.\n let currentI18n = null;\n let currentIcu = null;\n const textNodeI18nBlocks = new Map();\n const textNodeIcus = new Map();\n const icuPlaceholderByText = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (op.context === null) {\n throw Error('I18n op should have its context set.');\n }\n currentI18n = op;\n break;\n case OpKind.I18nEnd:\n currentI18n = null;\n break;\n case OpKind.IcuStart:\n if (op.context === null) {\n throw Error('Icu op should have its context set.');\n }\n currentIcu = op;\n break;\n case OpKind.IcuEnd:\n currentIcu = null;\n break;\n case OpKind.Text:\n if (currentI18n !== null) {\n textNodeI18nBlocks.set(op.xref, currentI18n);\n textNodeIcus.set(op.xref, currentIcu);\n if (op.icuPlaceholder !== null) {\n // Create an op to represent the ICU placeholder. Initially set its static text to the\n // value of the text op, though this may be overwritten later if this text op is a\n // placeholder for an interpolation.\n const icuPlaceholderOp = createIcuPlaceholderOp(job.allocateXrefId(), op.icuPlaceholder, [op.initialValue]);\n OpList.replace(op, icuPlaceholderOp);\n icuPlaceholderByText.set(op.xref, icuPlaceholderOp);\n }\n else {\n // Otherwise just remove the text op, since its value is already accounted for in the\n // translated message.\n OpList.remove(op);\n }\n }\n break;\n }\n }\n // Update any interpolations to the removed text, and instead represent them as a series of i18n\n // expressions that we then apply.\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.InterpolateText:\n if (!textNodeI18nBlocks.has(op.target)) {\n continue;\n }\n const i18nOp = textNodeI18nBlocks.get(op.target);\n const icuOp = textNodeIcus.get(op.target);\n const icuPlaceholder = icuPlaceholderByText.get(op.target);\n const contextId = icuOp ? icuOp.context : i18nOp.context;\n const resolutionTime = icuOp\n ? I18nParamResolutionTime.Postproccessing\n : I18nParamResolutionTime.Creation;\n const ops = [];\n for (let i = 0; i < op.interpolation.expressions.length; i++) {\n const expr = op.interpolation.expressions[i];\n // For now, this i18nExpression depends on the slot context of the enclosing i18n block.\n // Later, we will modify this, and advance to a different point.\n ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, icuPlaceholder?.xref ?? null, op.interpolation.i18nPlaceholders[i] ?? null, resolutionTime, I18nExpressionFor.I18nText, '', expr.sourceSpan ?? op.sourceSpan));\n }\n OpList.replaceWithMany(op, ops);\n // If this interpolation is part of an ICU placeholder, add the strings and expressions to\n // the placeholder.\n if (icuPlaceholder !== undefined) {\n icuPlaceholder.strings = op.interpolation.strings;\n }\n break;\n }\n }\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 liftLocalRefs(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\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 still`);\n }\n op.numSlotsUsed += op.localRefs.length;\n if (op.localRefs.length > 0) {\n const localRefs = serializeLocalRefs(op.localRefs);\n op.localRefs = job.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 emitNamespaceChanges(job) {\n for (const unit of job.units) {\n let activeNamespace = Namespace.HTML;\n for (const op of unit.create) {\n if (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\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 // TODO: Do not hyphenate CSS custom property names like: `--intentionallyCamelCase`\n currentProp = hyphenate(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(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 * Parses extracted style and class attributes into separate ExtractedAttributeOps per style or\n * class property.\n */\nfunction parseExtractedStyles(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 elements.set(op.xref, op);\n }\n }\n }\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute &&\n op.bindingKind === BindingKind.Attribute &&\n isStringLiteral(op.expression)) {\n const target = elements.get(op.target);\n if (target !== undefined &&\n target.kind === OpKind.Template &&\n target.templateKind === TemplateKind.Structural) {\n // TemplateDefinitionBuilder will not apply class and style bindings to structural\n // directives; instead, it will leave them as attributes.\n // (It's not clear what that would mean, anyway -- classes and styles on a structural\n // element should probably be a parse error.)\n // TODO: We may be able to remove this once Template Pipeline is the default.\n continue;\n }\n if (op.name === 'style') {\n const parsedStyles = parse(op.expression.value);\n for (let i = 0; i < parsedStyles.length - 1; i += 2) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);\n }\n OpList.remove(op);\n }\n else if (op.name === 'class') {\n const parsedClasses = op.expression.value.trim().split(/\\s+/g);\n for (const parsedClass of parsedClasses) {\n OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);\n }\n OpList.remove(op);\n }\n }\n }\n }\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 nameFunctionsAndVariables(job) {\n addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);\n}\nfunction addNamesToView(unit, baseName, state, compatibility) {\n if (unit.fnName === null) {\n // Ensure unique names for view units. This is necessary because there might be multiple\n // components with same names in the context of the same pool. Only add the suffix\n // if really needed.\n unit.fnName = unit.job.pool.uniqueName(sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`), \n /* alwaysIncludeSuffix */ false);\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 case OpKind.HostProperty:\n if (op.isAnimationTrigger) {\n op.name = '@' + op.name;\n }\n break;\n case OpKind.Listener:\n if (op.handlerFnName !== null) {\n break;\n }\n if (!op.hostListener && op.targetSlot.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n let animation = '';\n if (op.isAnimationListener) {\n op.name = `@${op.name}.${op.animationPhase}`;\n animation = 'animation';\n }\n if (op.hostListener) {\n op.handlerFnName = `${baseName}_${animation}${op.name}_HostBindingHandler`;\n }\n else {\n op.handlerFnName = `${unit.fnName}_${op.tag.replace('-', '_')}_${animation}${op.name}_${op.targetSlot.slot}_listener`;\n }\n op.handlerFnName = sanitizeIdentifier(op.handlerFnName);\n break;\n case OpKind.TwoWayListener:\n if (op.handlerFnName !== null) {\n break;\n }\n if (op.targetSlot.slot === null) {\n throw new Error(`Expected a slot to be assigned`);\n }\n op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${op.tag.replace('-', '_')}_${op.name}_${op.targetSlot.slot}_listener`);\n break;\n case OpKind.Variable:\n varNames.set(op.xref, getVariableName(unit, op.variable, state));\n break;\n case OpKind.RepeaterCreate:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (op.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n if (op.emptyView !== null) {\n const emptyView = unit.job.views.get(op.emptyView);\n // Repeater empty view function is at slot +2 (metadata is in the first slot).\n addNamesToView(emptyView, `${baseName}_${op.functionNameSuffix}Empty_${op.handle.slot + 2}`, state, compatibility);\n }\n // Repeater primary view function is at slot +1 (metadata is in the first slot).\n addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);\n break;\n case OpKind.Projection:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (op.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n if (op.fallbackView !== null) {\n const fallbackView = unit.job.views.get(op.fallbackView);\n addNamesToView(fallbackView, `${baseName}_ProjectionFallback_${op.handle.slot}`, state, compatibility);\n }\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.handle.slot === null) {\n throw new Error(`Expected slot to be assigned`);\n }\n const suffix = op.functionNameSuffix.length === 0 ? '' : `_${op.functionNameSuffix}`;\n addNamesToView(childView, `${baseName}${suffix}_${op.handle.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(unit, 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 if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n // TODO: Prefix increment and `_r` are for compatibility with the old naming scheme.\n // This has the potential to cause collisions when `ctx` is the identifier, so we need a\n // special check for that as well.\n const compatPrefix = variable.identifier === 'ctx' ? 'i' : '';\n variable.name = `${variable.identifier}_${compatPrefix}r${++state.index}`;\n }\n else {\n variable.name = `${variable.identifier}_i${state.index++}`;\n }\n break;\n default:\n // TODO: Prefix increment for compatibility only.\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(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 mergeNextContextExpressions(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n mergeNextContextsInOps(op.handlerOps);\n }\n }\n mergeNextContextsInOps(unit.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 ||\n !(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 case ExpressionKind.ContextLetReference:\n // Can't merge past a dependency on the context.\n tryToMerge = false;\n break;\n }\n return;\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 generateNgContainerOps(job) {\n for (const unit of job.units) {\n const updatedElementXrefs = new Set();\n for (const op of unit.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 * 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 disableBindings$1(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 unit of job.units) {\n for (const op of unit.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\n/**\n * Nullish coalescing expressions such as `a ?? b` have different semantics in Angular templates as\n * compared to JavaScript. In particular, they default to `null` instead of `undefined`. Therefore,\n * we replace them with ternary expressions, assigning temporaries as needed to avoid re-evaluating\n * the same sub-expression multiple times.\n */\nfunction generateNullishCoalesceExpressions(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 kindTest(kind) {\n return (op) => op.kind === kind;\n}\nfunction kindWithInterpolationTest(kind, interpolation) {\n return (op) => {\n return op.kind === kind && interpolation === op.expression instanceof Interpolation;\n };\n}\nfunction basicListenerKindTest(op) {\n return ((op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener)) ||\n op.kind === OpKind.TwoWayListener);\n}\nfunction nonInterpolationPropertyKindTest(op) {\n return ((op.kind === OpKind.Property || op.kind === OpKind.TwoWayProperty) &&\n !(op.expression instanceof Interpolation));\n}\n/**\n * Defines the groups based on `OpKind` that ops will be divided into, for the various create\n * op kinds. Ops will be collected into groups, then optionally transformed, before recombining\n * the groups in the order defined here.\n */\nconst CREATE_ORDERING = [\n { test: (op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener },\n { test: basicListenerKindTest },\n];\n/**\n * Defines the groups based on `OpKind` that ops will be divided into, for the various update\n * op kinds.\n */\nconst UPDATE_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 { test: kindWithInterpolationTest(OpKind.Attribute, true) },\n { test: kindWithInterpolationTest(OpKind.Property, true) },\n { test: nonInterpolationPropertyKindTest },\n { test: kindWithInterpolationTest(OpKind.Attribute, false) },\n];\n/**\n * Host bindings have their own update ordering.\n */\nconst UPDATE_HOST_ORDERING = [\n { test: kindWithInterpolationTest(OpKind.HostProperty, true) },\n { test: kindWithInterpolationTest(OpKind.HostProperty, false) },\n { test: kindTest(OpKind.Attribute) },\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/**\n * The set of all op kinds we handle in the reordering phase.\n */\nconst handledOpKinds = new Set([\n OpKind.Listener,\n OpKind.TwoWayListener,\n OpKind.StyleMap,\n OpKind.ClassMap,\n OpKind.StyleProp,\n OpKind.ClassProp,\n OpKind.Property,\n OpKind.TwoWayProperty,\n OpKind.HostProperty,\n OpKind.Attribute,\n]);\n/**\n * Many type of operations have ordering constraints that must be respected. For example, a\n * `ClassMap` instruction must be ordered after a `StyleMap` instruction, in order to have\n * predictable semantics that match TemplateDefinitionBuilder and don't break applications.\n */\nfunction orderOps(job) {\n for (const unit of job.units) {\n // First, we pull out ops that need to be ordered. Then, when we encounter an op that shouldn't\n // be reordered, put the ones we've pulled so far back in the correct order. Finally, if we\n // still have ops pulled at the end, put them back in the correct order.\n // Create mode:\n orderWithin(unit.create, CREATE_ORDERING);\n // Update mode:\n const ordering = unit.job.kind === CompilationJobKind.Host ? UPDATE_HOST_ORDERING : UPDATE_ORDERING;\n orderWithin(unit.update, ordering);\n }\n}\n/**\n * Order all the ops within the specified group.\n */\nfunction orderWithin(opList, ordering) {\n let opsToOrder = [];\n // Only reorder ops that target the same xref; do not mix ops that target different xrefs.\n let firstTargetInGroup = null;\n for (const op of opList) {\n const currentTarget = hasDependsOnSlotContextTrait(op) ? op.target : null;\n if (!handledOpKinds.has(op.kind) ||\n (currentTarget !== firstTargetInGroup &&\n firstTargetInGroup !== null &&\n currentTarget !== null)) {\n OpList.insertBefore(reorder(opsToOrder, ordering), op);\n opsToOrder = [];\n firstTargetInGroup = null;\n }\n if (handledOpKinds.has(op.kind)) {\n opsToOrder.push(op);\n OpList.remove(op);\n firstTargetInGroup = currentTarget ?? firstTargetInGroup;\n }\n }\n opList.push(reorder(opsToOrder, ordering));\n}\n/**\n * Reorders the given list of ops according to the ordering defined by `ORDERING`.\n */\nfunction reorder(ops, ordering) {\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\n/**\n * Attributes of `ng-content` named 'select' are specifically removed, because they control which\n * content matches as a property of the `projection`, and are not a plain attribute.\n */\nfunction removeContentSelectors(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n for (const op of unit.ops()) {\n switch (op.kind) {\n case OpKind.Binding:\n const target = lookupInXrefMap(elements, op.target);\n if (isSelectAttribute(op.name) && target.kind === OpKind.Projection) {\n OpList.remove(op);\n }\n break;\n }\n }\n }\n}\nfunction isSelectAttribute(name) {\n return name.toLowerCase() === 'select';\n}\n/**\n * Looks up an element in the given map by xref ID.\n */\nfunction lookupInXrefMap(map, xref) {\n const el = map.get(xref);\n if (el === undefined) {\n throw new Error('All attributes should have an slottable target.');\n }\n return el;\n}\n\n/**\n * This phase generates pipe creation instructions. We do this based on the pipe bindings found in\n * the update block, in the order we see them.\n *\n * When not in compatibility mode, we can simply group all these creation instructions together, to\n * maximize chaining opportunities.\n */\nfunction createPipes(job) {\n for (const unit of job.units) {\n processPipeBindingsInView(unit);\n }\n}\nfunction processPipeBindingsInView(unit) {\n for (const updateOp of unit.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 (unit.job.compatibility) {\n // TODO: We can delete this cast and check once compatibility mode is removed.\n const slotHandle = updateOp.target;\n if (slotHandle == undefined) {\n throw new Error(`AssertionError: expected slot handle to be assigned for pipe creation`);\n }\n addPipeToCreationBlock(unit, updateOp.target, expr);\n }\n else {\n // When not in compatibility mode, we just add the pipe to the end of the create block. This\n // is not only simpler and faster, but allows more chaining opportunities for other\n // instructions.\n unit.create.push(createPipeOp(expr.target, expr.targetSlot, expr.name));\n }\n });\n }\n}\nfunction addPipeToCreationBlock(unit, 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 = unit.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.targetSlot, 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\n/**\n * Pipes that accept more than 4 arguments are variadic, and are handled with a different runtime\n * instruction.\n */\nfunction createVariadicPipes(job) {\n for (const unit of job.units) {\n for (const op of unit.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.targetSlot, expr.name, literalArr(expr.args), expr.args.length);\n }, VisitorContextFlag.None);\n }\n }\n}\n\n/**\n * Propagate i18n blocks down through child templates that act as placeholders in the root i18n\n * message. Specifically, perform an in-order traversal of all the views, and add i18nStart/i18nEnd\n * op pairs into descending views. Also, assign an increasing sub-template index to each\n * descending view.\n */\nfunction propagateI18nBlocks(job) {\n propagateI18nBlocksToTemplates(job.root, 0);\n}\n/**\n * Propagates i18n ops in the given view through to any child views recursively.\n */\nfunction propagateI18nBlocksToTemplates(unit, subTemplateIndex) {\n let i18nBlock = null;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n op.subTemplateIndex = subTemplateIndex === 0 ? null : subTemplateIndex;\n i18nBlock = op;\n break;\n case OpKind.I18nEnd:\n // When we exit a root-level i18n block, reset the sub-template index counter.\n if (i18nBlock.subTemplateIndex === null) {\n subTemplateIndex = 0;\n }\n i18nBlock = null;\n break;\n case OpKind.Template:\n subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);\n break;\n case OpKind.RepeaterCreate:\n // Propagate i18n blocks to the @for template.\n const forView = unit.job.views.get(op.xref);\n subTemplateIndex = propagateI18nBlocksForView(forView, i18nBlock, op.i18nPlaceholder, subTemplateIndex);\n // Then if there's an @empty template, propagate the i18n blocks for it as well.\n if (op.emptyView !== null) {\n subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);\n }\n break;\n }\n }\n return subTemplateIndex;\n}\n/**\n * Propagate i18n blocks for a view.\n */\nfunction propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {\n // We found an <ng-template> inside an i18n block; increment the sub-template counter and\n // wrap the template's view in a child i18n block.\n if (i18nPlaceholder !== undefined) {\n if (i18nBlock === null) {\n throw Error('Expected template with i18n placeholder to be in an i18n block.');\n }\n subTemplateIndex++;\n wrapTemplateWithI18n(view, i18nBlock);\n }\n // Continue traversing inside the template's view.\n return propagateI18nBlocksToTemplates(view, subTemplateIndex);\n}\n/**\n * Wraps a template view with i18n start and end ops.\n */\nfunction wrapTemplateWithI18n(unit, parentI18n) {\n // Only add i18n ops if they have not already been propagated to this template.\n if (unit.create.head.next?.kind !== OpKind.I18nStart) {\n const id = unit.job.allocateXrefId();\n OpList.insertAfter(\n // Nested ng-template i18n start/end ops should not receive source spans.\n createI18nStartOp(id, parentI18n.message, parentI18n.root, null), unit.create.head);\n OpList.insertBefore(createI18nEndOp(id, null), unit.create.tail);\n }\n}\n\nfunction extractPureFunctions(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 // TODO: Use the new pool method `getSharedFunctionReference`\n toSharedConstantDeclaration(declName, keyExpr) {\n const fnParams = [];\n for (let idx = 0; idx < this.numArgs; idx++) {\n fnParams.push(new FnParam('a' + 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('a' + expr.index);\n }, VisitorContextFlag.None);\n return new DeclareVarStmt(declName, new ArrowFunctionExpr(fnParams, returnExpr), undefined, StmtModifier.Final);\n }\n}\n\nfunction generatePureLiteralStructures(job) {\n for (const unit of job.units) {\n for (const op of unit.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, \n /* tag */ null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainer(slot, constIndex, localRefIndex, sourceSpan) {\n return elementOrContainerBase(Identifiers.elementContainer, slot, \n /* tag */ null, constIndex, localRefIndex, sourceSpan);\n}\nfunction elementContainerEnd() {\n return call(Identifiers.elementContainerEnd, [], null);\n}\nfunction template(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {\n const args = [\n literal(slot),\n templateFnRef,\n literal(decls),\n literal(vars),\n literal(tag),\n literal(constIndex),\n ];\n if (localRefs !== null) {\n args.push(literal(localRefs));\n args.push(importExpr(Identifiers.templateRefExtractor));\n }\n while (args[args.length - 1].isEquivalent(NULL_EXPR)) {\n args.pop();\n }\n return call(Identifiers.templateCreate, args, sourceSpan);\n}\nfunction disableBindings() {\n return call(Identifiers.disableBindings, [], null);\n}\nfunction enableBindings() {\n return call(Identifiers.enableBindings, [], null);\n}\nfunction listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {\n const args = [literal(name), handlerFn];\n if (eventTargetResolver !== null) {\n args.push(literal(false)); // `useCapture` flag, defaults to `false`\n args.push(importExpr(eventTargetResolver));\n }\n return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);\n}\nfunction twoWayBindingSet(target, value) {\n return importExpr(Identifiers.twoWayBindingSet).callFn([target, value]);\n}\nfunction twoWayListener(name, handlerFn, sourceSpan) {\n return call(Identifiers.twoWayListener, [literal(name), handlerFn], sourceSpan);\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, delta > 1 ? [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 defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeholderSlot, errorSlot, loadingConfig, placeholderConfig, enableTimerScheduling, sourceSpan) {\n const args = [\n literal(selfSlot),\n literal(primarySlot),\n dependencyResolverFn ?? literal(null),\n literal(loadingSlot),\n literal(placeholderSlot),\n literal(errorSlot),\n loadingConfig ?? literal(null),\n placeholderConfig ?? literal(null),\n enableTimerScheduling ? importExpr(Identifiers.deferEnableTimerScheduling) : literal(null),\n ];\n let expr;\n while ((expr = args[args.length - 1]) !== null &&\n expr instanceof LiteralExpr &&\n expr.value === null) {\n args.pop();\n }\n return call(Identifiers.defer, args, sourceSpan);\n}\nconst deferTriggerToR3TriggerInstructionsMap = new Map([\n [DeferTriggerKind.Idle, [Identifiers.deferOnIdle, Identifiers.deferPrefetchOnIdle]],\n [\n DeferTriggerKind.Immediate,\n [Identifiers.deferOnImmediate, Identifiers.deferPrefetchOnImmediate],\n ],\n [DeferTriggerKind.Timer, [Identifiers.deferOnTimer, Identifiers.deferPrefetchOnTimer]],\n [DeferTriggerKind.Hover, [Identifiers.deferOnHover, Identifiers.deferPrefetchOnHover]],\n [\n DeferTriggerKind.Interaction,\n [Identifiers.deferOnInteraction, Identifiers.deferPrefetchOnInteraction],\n ],\n [\n DeferTriggerKind.Viewport,\n [Identifiers.deferOnViewport, Identifiers.deferPrefetchOnViewport],\n ],\n]);\nfunction deferOn(trigger, args, prefetch, sourceSpan) {\n const instructions = deferTriggerToR3TriggerInstructionsMap.get(trigger);\n if (instructions === undefined) {\n throw new Error(`Unable to determine instruction for trigger ${trigger}`);\n }\n const instructionToCall = prefetch ? instructions[1] : instructions[0];\n return call(instructionToCall, args.map((a) => literal(a)), sourceSpan);\n}\nfunction projectionDef(def) {\n return call(Identifiers.projectionDef, def ? [def] : [], null);\n}\nfunction projection(slot, projectionSlotIndex, attributes, fallbackFnName, fallbackDecls, fallbackVars, sourceSpan) {\n const args = [literal(slot)];\n if (projectionSlotIndex !== 0 || attributes !== null || fallbackFnName !== null) {\n args.push(literal(projectionSlotIndex));\n if (attributes !== null) {\n args.push(attributes);\n }\n if (fallbackFnName !== null) {\n if (attributes === null) {\n args.push(literal(null));\n }\n args.push(variable(fallbackFnName), literal(fallbackDecls), literal(fallbackVars));\n }\n }\n return call(Identifiers.projection, args, sourceSpan);\n}\nfunction i18nStart(slot, constIndex, subTemplateIndex, sourceSpan) {\n const args = [literal(slot), literal(constIndex)];\n if (subTemplateIndex !== null) {\n args.push(literal(subTemplateIndex));\n }\n return call(Identifiers.i18nStart, args, sourceSpan);\n}\nfunction repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByFn, trackByUsesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, emptyTag, emptyConstIndex, sourceSpan) {\n const args = [\n literal(slot),\n variable(viewFnName),\n literal(decls),\n literal(vars),\n literal(tag),\n literal(constIndex),\n trackByFn,\n ];\n if (trackByUsesComponentInstance || emptyViewFnName !== null) {\n args.push(literal(trackByUsesComponentInstance));\n if (emptyViewFnName !== null) {\n args.push(variable(emptyViewFnName), literal(emptyDecls), literal(emptyVars));\n if (emptyTag !== null || emptyConstIndex !== null) {\n args.push(literal(emptyTag));\n }\n if (emptyConstIndex !== null) {\n args.push(literal(emptyConstIndex));\n }\n }\n }\n return call(Identifiers.repeaterCreate, args, sourceSpan);\n}\nfunction repeater(collection, sourceSpan) {\n return call(Identifiers.repeater, [collection], sourceSpan);\n}\nfunction deferWhen(prefetch, expr, sourceSpan) {\n return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);\n}\nfunction declareLet(slot, sourceSpan) {\n return call(Identifiers.declareLet, [literal(slot)], sourceSpan);\n}\nfunction storeLet(value, sourceSpan) {\n return importExpr(Identifiers.storeLet).callFn([value], sourceSpan);\n}\nfunction readContextLet(slot) {\n return importExpr(Identifiers.readContextLet).callFn([literal(slot)]);\n}\nfunction i18n(slot, constIndex, subTemplateIndex, sourceSpan) {\n const args = [literal(slot), literal(constIndex)];\n if (subTemplateIndex) {\n args.push(literal(subTemplateIndex));\n }\n return call(Identifiers.i18n, args, sourceSpan);\n}\nfunction i18nEnd(endSourceSpan) {\n return call(Identifiers.i18nEnd, [], endSourceSpan);\n}\nfunction i18nAttributes(slot, i18nAttributesConfig) {\n const args = [literal(slot), literal(i18nAttributesConfig)];\n return call(Identifiers.i18nAttributes, args, null);\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 twoWayProperty(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.twoWayProperty, args, sourceSpan);\n}\nfunction attribute(name, expression, sanitizer, namespace) {\n const args = [literal(name), expression];\n if (sanitizer !== null || namespace !== null) {\n args.push(sanitizer ?? literal(null));\n }\n if (namespace !== null) {\n args.push(literal(namespace));\n }\n return call(Identifiers.attribute, args, null);\n}\nfunction styleProp(name, expression, unit, sourceSpan) {\n const args = [literal(name), expression];\n if (unit !== null) {\n args.push(literal(unit));\n }\n return call(Identifiers.styleProp, args, sourceSpan);\n}\nfunction classProp(name, expression, sourceSpan) {\n return call(Identifiers.classProp, [literal(name), expression], sourceSpan);\n}\nfunction styleMap(expression, sourceSpan) {\n return call(Identifiers.styleMap, [expression], sourceSpan);\n}\nfunction classMap(expression, sourceSpan) {\n return call(Identifiers.classMap, [expression], sourceSpan);\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([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 const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction i18nExp(expr, sourceSpan) {\n return call(Identifiers.i18nExp, [expr], sourceSpan);\n}\nfunction i18nApply(slot, sourceSpan) {\n return call(Identifiers.i18nApply, [literal(slot)], 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, sourceSpan) {\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, sourceSpan);\n}\nfunction stylePropInterpolate(name, strings, expressions, unit, sourceSpan) {\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, sourceSpan);\n}\nfunction styleMapInterpolate(strings, expressions, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(STYLE_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction classMapInterpolate(strings, expressions, sourceSpan) {\n const interpolationArgs = collateInterpolationArgs(strings, expressions);\n return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);\n}\nfunction hostProperty(name, expression, sanitizer, sourceSpan) {\n const args = [literal(name), expression];\n if (sanitizer !== null) {\n args.push(sanitizer);\n }\n return call(Identifiers.hostProperty, args, sourceSpan);\n}\nfunction syntheticHostProperty(name, expression, sourceSpan) {\n return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);\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 }\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}\nfunction conditional(condition, contextValue, sourceSpan) {\n const args = [condition];\n if (contextValue !== null) {\n args.push(contextValue);\n }\n return call(Identifiers.conditional, args, 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).toStmt());\n}\n\n/**\n * Map of target resolvers for event listeners.\n */\nconst GLOBAL_TARGET_RESOLVERS = new Map([\n ['window', Identifiers.resolveWindow],\n ['document', Identifiers.resolveDocument],\n ['body', Identifiers.resolveBody],\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 reify(job) {\n for (const unit of job.units) {\n reifyCreateOperations(unit, unit.create);\n reifyUpdateOperations(unit, unit.update);\n }\n}\n/**\n * This function can be used a sanity check -- it walks every expression in the const pool, and\n * every expression reachable from an op, and makes sure that there are no IR expressions\n * left. This is nice to use for debugging mysterious failures where an IR expression cannot be\n * output from the output AST code.\n */\nfunction ensureNoIrForDebug(job) {\n for (const stmt of job.pool.statements) {\n transformExpressionsInStatement(stmt, (expr) => {\n if (isIrExpression(expr)) {\n throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, (expr) => {\n if (isIrExpression(expr)) {\n throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);\n }\n });\n }\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.handle.slot, op.initialValue, op.sourceSpan));\n break;\n case OpKind.ElementStart:\n OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));\n break;\n case OpKind.Element:\n OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));\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.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));\n break;\n case OpKind.Container:\n OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));\n break;\n case OpKind.ContainerEnd:\n OpList.replace(op, elementContainerEnd());\n break;\n case OpKind.I18nStart:\n OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));\n break;\n case OpKind.I18nEnd:\n OpList.replace(op, i18nEnd(op.sourceSpan));\n break;\n case OpKind.I18n:\n OpList.replace(op, i18n(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));\n break;\n case OpKind.I18nAttributes:\n if (op.i18nAttributesConfig === null) {\n throw new Error(`AssertionError: i18nAttributesConfig was not set`);\n }\n OpList.replace(op, i18nAttributes(op.handle.slot, op.i18nAttributesConfig));\n break;\n case OpKind.Template:\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n if (Array.isArray(op.localRefs)) {\n throw new Error(`AssertionError: local refs array should have been extracted into a constant`);\n }\n const childView = unit.job.views.get(op.xref);\n OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));\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.handle.slot, op.name));\n break;\n case OpKind.DeclareLet:\n OpList.replace(op, declareLet(op.handle.slot, op.sourceSpan));\n break;\n case OpKind.Listener:\n const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);\n const eventTargetResolver = op.eventTarget\n ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget)\n : null;\n if (eventTargetResolver === undefined) {\n throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);\n }\n OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));\n break;\n case OpKind.TwoWayListener:\n OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));\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.Defer:\n const timerScheduling = !!op.loadingMinimumTime || !!op.loadingAfterTime || !!op.placeholderMinimumTime;\n OpList.replace(op, defer(op.handle.slot, op.mainSlot.slot, op.resolverFn, op.loadingSlot?.slot ?? null, op.placeholderSlot?.slot ?? null, op.errorSlot?.slot ?? null, op.loadingConfig, op.placeholderConfig, timerScheduling, op.sourceSpan));\n break;\n case OpKind.DeferOn:\n let args = [];\n switch (op.trigger.kind) {\n case DeferTriggerKind.Idle:\n case DeferTriggerKind.Immediate:\n break;\n case DeferTriggerKind.Timer:\n args = [op.trigger.delay];\n break;\n case DeferTriggerKind.Interaction:\n case DeferTriggerKind.Hover:\n case DeferTriggerKind.Viewport:\n if (op.trigger.targetSlot?.slot == null || op.trigger.targetSlotViewSteps === null) {\n throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${op.trigger.kind}`);\n }\n args = [op.trigger.targetSlot.slot];\n if (op.trigger.targetSlotViewSteps !== 0) {\n args.push(op.trigger.targetSlotViewSteps);\n }\n break;\n default:\n throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${op.trigger.kind}`);\n }\n OpList.replace(op, deferOn(op.trigger.kind, args, op.prefetch, op.sourceSpan));\n break;\n case OpKind.ProjectionDef:\n OpList.replace(op, projectionDef(op.def));\n break;\n case OpKind.Projection:\n if (op.handle.slot === null) {\n throw new Error('No slot was assigned for project instruction');\n }\n let fallbackViewFnName = null;\n let fallbackDecls = null;\n let fallbackVars = null;\n if (op.fallbackView !== null) {\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const fallbackView = unit.job.views.get(op.fallbackView);\n if (fallbackView === undefined) {\n throw new Error('AssertionError: projection had fallback view xref, but fallback view was not found');\n }\n if (fallbackView.fnName === null ||\n fallbackView.decls === null ||\n fallbackView.vars === null) {\n throw new Error(`AssertionError: expected projection fallback view to have been named and counted`);\n }\n fallbackViewFnName = fallbackView.fnName;\n fallbackDecls = fallbackView.decls;\n fallbackVars = fallbackView.vars;\n }\n OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, fallbackViewFnName, fallbackDecls, fallbackVars, op.sourceSpan));\n break;\n case OpKind.RepeaterCreate:\n if (op.handle.slot === null) {\n throw new Error('No slot was assigned for repeater instruction');\n }\n if (!(unit instanceof ViewCompilationUnit)) {\n throw new Error(`AssertionError: must be compiling a component`);\n }\n const repeaterView = unit.job.views.get(op.xref);\n if (repeaterView.fnName === null) {\n throw new Error(`AssertionError: expected repeater primary view to have been named`);\n }\n let emptyViewFnName = null;\n let emptyDecls = null;\n let emptyVars = null;\n if (op.emptyView !== null) {\n const emptyView = unit.job.views.get(op.emptyView);\n if (emptyView === undefined) {\n throw new Error('AssertionError: repeater had empty view xref, but empty view was not found');\n }\n if (emptyView.fnName === null || emptyView.decls === null || emptyView.vars === null) {\n throw new Error(`AssertionError: expected repeater empty view to have been named and counted`);\n }\n emptyViewFnName = emptyView.fnName;\n emptyDecls = emptyView.decls;\n emptyVars = emptyView.vars;\n }\n OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.emptyTag, op.emptyAttributes, op.wholeSourceSpan));\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.TwoWayProperty:\n OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));\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, op.sourceSpan));\n }\n else {\n OpList.replace(op, styleProp(op.name, op.expression, op.unit, op.sourceSpan));\n }\n break;\n case OpKind.ClassProp:\n OpList.replace(op, classProp(op.name, op.expression, op.sourceSpan));\n break;\n case OpKind.StyleMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, styleMapInterpolate(op.expression.strings, op.expression.expressions, op.sourceSpan));\n }\n else {\n OpList.replace(op, styleMap(op.expression, op.sourceSpan));\n }\n break;\n case OpKind.ClassMap:\n if (op.expression instanceof Interpolation) {\n OpList.replace(op, classMapInterpolate(op.expression.strings, op.expression.expressions, op.sourceSpan));\n }\n else {\n OpList.replace(op, classMap(op.expression, op.sourceSpan));\n }\n break;\n case OpKind.I18nExpression:\n OpList.replace(op, i18nExp(op.expression, op.sourceSpan));\n break;\n case OpKind.I18nApply:\n OpList.replace(op, i18nApply(op.handle.slot, op.sourceSpan));\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, op.sourceSpan));\n }\n else {\n OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));\n }\n break;\n case OpKind.HostProperty:\n if (op.expression instanceof Interpolation) {\n throw new Error('not yet handled');\n }\n else {\n if (op.isAnimationTrigger) {\n OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));\n }\n else {\n OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));\n }\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.Conditional:\n if (op.processed === null) {\n throw new Error(`Conditional test was not set.`);\n }\n OpList.replace(op, conditional(op.processed, op.contextValue, op.sourceSpan));\n break;\n case OpKind.Repeater:\n OpList.replace(op, repeater(op.collection, op.sourceSpan));\n break;\n case OpKind.DeferWhen:\n OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));\n break;\n case OpKind.StoreLet:\n throw new Error(`AssertionError: unexpected storeLet ${op.declaredName}`);\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.targetSlot.slot + 1 + expr.offset);\n case ExpressionKind.LexicalRead:\n throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);\n case ExpressionKind.TwoWayBindingSet:\n throw new Error(`AssertionError: unresolved TwoWayBindingSet`);\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.targetSlot.slot, expr.varOffset, expr.args);\n case ExpressionKind.PipeBindingVariadic:\n return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);\n case ExpressionKind.SlotLiteralExpr:\n return literal(expr.slot.slot);\n case ExpressionKind.ContextLetReference:\n return readContextLet(expr.targetSlot.slot);\n case ExpressionKind.StoreLet:\n return storeLet(expr.value, expr.sourceSpan);\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\n/**\n * Binding with no content can be safely deleted.\n */\nfunction removeEmptyBindings(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 * Remove the i18n context ops after they are no longer needed, and null out references to them to\n * be safe.\n */\nfunction removeI18nContexts(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n OpList.remove(op);\n break;\n case OpKind.I18nStart:\n op.context = null;\n break;\n }\n }\n }\n}\n\n/**\n * i18nAttributes ops will be generated for each i18n attribute. However, not all i18n attribues\n * will contain dynamic content, and so some of these i18nAttributes ops may be unnecessary.\n */\nfunction removeUnusedI18nAttributesOps(job) {\n for (const unit of job.units) {\n const ownersWithI18nExpressions = new Set();\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.I18nExpression:\n ownersWithI18nExpressions.add(op.i18nOwner);\n }\n }\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nAttributes:\n if (ownersWithI18nExpressions.has(op.xref)) {\n continue;\n }\n OpList.remove(op);\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 resolveContexts(job) {\n for (const unit of job.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 case OpKind.TwoWayListener:\n processLexicalScope$1(view, op.handlerOps);\n break;\n }\n }\n if (view === view.job.root) {\n // Prefer `ctx` of the root view to any variables which happen to contain the root context.\n scope.set(view.xref, variable('ctx'));\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 resolveDollarEvent(job) {\n for (const unit of job.units) {\n transformDollarEvent(unit.create);\n transformDollarEvent(unit.update);\n }\n}\nfunction transformDollarEvent(ops) {\n for (const op of ops) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n transformExpressionsInOp(op, (expr) => {\n if (expr instanceof LexicalReadExpr && expr.name === '$event') {\n // Two-way listeners always consume `$event` so they omit this field.\n if (op.kind === OpKind.Listener) {\n op.consumesDollarEvent = true;\n }\n return new ReadVarExpr(expr.name);\n }\n return expr;\n }, VisitorContextFlag.InChildOperation);\n }\n }\n}\n\n/**\n * Resolve the element placeholders in i18n messages.\n */\nfunction resolveI18nElementPlaceholders(job) {\n // Record all of the element and i18n context ops for use later.\n const i18nContexts = new Map();\n const elements = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nContext:\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.ElementStart:\n elements.set(op.xref, op);\n break;\n }\n }\n }\n resolvePlaceholdersForView(job, job.root, i18nContexts, elements);\n}\n/**\n * Recursively resolves element and template tag placeholders in the given view.\n */\nfunction resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingStructuralDirective) {\n // Track the current i18n op and corresponding i18n context op as we step through the creation\n // IR.\n let currentOps = null;\n let pendingStructuralDirectiveCloses = new Map();\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n if (!op.context) {\n throw Error('Could not find i18n context for i18n op');\n }\n currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };\n break;\n case OpKind.I18nEnd:\n currentOps = null;\n break;\n case OpKind.ElementStart:\n // For elements with i18n placeholders, record its slot value in the params map under the\n // corresponding tag start placeholder.\n if (op.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n // If there is a separate close tag placeholder for this element, save the pending\n // structural directive so we can pass it to the closing tag as well.\n if (pendingStructuralDirective && op.i18nPlaceholder.closeName) {\n pendingStructuralDirectiveCloses.set(op.xref, pendingStructuralDirective);\n }\n // Clear out the pending structural directive now that its been accounted for.\n pendingStructuralDirective = undefined;\n }\n break;\n case OpKind.ElementEnd:\n // For elements with i18n placeholders, record its slot value in the params map under the\n // corresponding tag close placeholder.\n const startOp = elements.get(op.xref);\n if (startOp && startOp.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('AssertionError: i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementClose(startOp, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirectiveCloses.get(op.xref));\n // Clear out the pending structural directive close that was accounted for.\n pendingStructuralDirectiveCloses.delete(op.xref);\n }\n break;\n case OpKind.Projection:\n // For content projections with i18n placeholders, record its slot value in the params map\n // under the corresponding tag start and close placeholders.\n if (op.i18nPlaceholder !== undefined) {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n // Clear out the pending structural directive now that its been accounted for.\n pendingStructuralDirective = undefined;\n }\n break;\n case OpKind.Template:\n const view = job.views.get(op.xref);\n if (op.i18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, view, i18nContexts, elements);\n }\n else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n if (op.templateKind === TemplateKind.Structural) {\n // If this is a structural directive template, don't record anything yet. Instead pass\n // the current template as a pending structural directive to be recorded when we find\n // the element, content, or template it belongs to. This allows us to create combined\n // values that represent, e.g. the start of a template and element at the same time.\n resolvePlaceholdersForView(job, view, i18nContexts, elements, op);\n }\n else {\n // If this is some other kind of template, we can record its start, recurse into its\n // view, and then record its end.\n recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, view, i18nContexts, elements);\n recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n }\n break;\n case OpKind.RepeaterCreate:\n if (pendingStructuralDirective !== undefined) {\n throw Error('AssertionError: Unexpected structural directive associated with @for block');\n }\n // RepeaterCreate has 3 slots: the first is for the op itself, the second is for the @for\n // template and the (optional) third is for the @empty template.\n const forSlot = op.handle.slot + 1;\n const forView = job.views.get(op.xref);\n // First record all of the placeholders for the @for template.\n if (op.i18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, forView, i18nContexts, elements);\n }\n else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, forView, i18nContexts, elements);\n recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n // Then if there's an @empty template, add its placeholders as well.\n if (op.emptyView !== null) {\n // RepeaterCreate has 3 slots: the first is for the op itself, the second is for the @for\n // template and the (optional) third is for the @empty template.\n const emptySlot = op.handle.slot + 2;\n const emptyView = job.views.get(op.emptyView);\n if (op.emptyI18nPlaceholder === undefined) {\n // If there is no i18n placeholder, just recurse into the view in case it contains i18n\n // blocks.\n resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);\n }\n else {\n if (currentOps === null) {\n throw Error('i18n tag placeholder should only occur inside an i18n block');\n }\n recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);\n recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);\n pendingStructuralDirective = undefined;\n }\n }\n break;\n }\n }\n}\n/**\n * Records an i18n param value for the start of an element.\n */\nfunction recordElementStart(op, i18nContext, i18nBlock, structuralDirective) {\n const { startName, closeName } = op.i18nPlaceholder;\n let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;\n let value = op.handle.slot;\n // If the element is associated with a structural directive, start it as well.\n if (structuralDirective !== undefined) {\n flags |= I18nParamValueFlags.TemplateTag;\n value = { element: value, template: structuralDirective.handle.slot };\n }\n // For self-closing tags, there is no close tag placeholder. Instead, the start tag\n // placeholder accounts for the start and close of the element.\n if (!closeName) {\n flags |= I18nParamValueFlags.CloseTag;\n }\n addParam(i18nContext.params, startName, value, i18nBlock.subTemplateIndex, flags);\n}\n/**\n * Records an i18n param value for the closing of an element.\n */\nfunction recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {\n const { closeName } = op.i18nPlaceholder;\n // Self-closing tags don't have a closing tag placeholder, instead the element closing is\n // recorded via an additional flag on the element start value.\n if (closeName) {\n let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag;\n let value = op.handle.slot;\n // If the element is associated with a structural directive, close it as well.\n if (structuralDirective !== undefined) {\n flags |= I18nParamValueFlags.TemplateTag;\n value = { element: value, template: structuralDirective.handle.slot };\n }\n addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);\n }\n}\n/**\n * Records an i18n param value for the start of a template.\n */\nfunction recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {\n let { startName, closeName } = i18nPlaceholder;\n let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;\n // For self-closing tags, there is no close tag placeholder. Instead, the start tag\n // placeholder accounts for the start and close of the element.\n if (!closeName) {\n flags |= I18nParamValueFlags.CloseTag;\n }\n // If the template is associated with a structural directive, record the structural directive's\n // start first. Since this template must be in the structural directive's view, we can just\n // directly use the current i18n block's sub-template index.\n if (structuralDirective !== undefined) {\n addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);\n }\n // Record the start of the template. For the sub-template index, pass the index for the template's\n // view, rather than the current i18n block's index.\n addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);\n}\n/**\n * Records an i18n param value for the closing of a template.\n */\nfunction recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {\n const { closeName } = i18nPlaceholder;\n const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;\n // Self-closing tags don't have a closing tag placeholder, instead the template's closing is\n // recorded via an additional flag on the template start value.\n if (closeName) {\n // Record the closing of the template. For the sub-template index, pass the index for the\n // template's view, rather than the current i18n block's index.\n addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);\n // If the template is associated with a structural directive, record the structural directive's\n // closing after. Since this template must be in the structural directive's view, we can just\n // directly use the current i18n block's sub-template index.\n if (structuralDirective !== undefined) {\n addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);\n }\n }\n}\n/**\n * Get the subTemplateIndex for the given template op. For template ops, use the subTemplateIndex of\n * the child i18n block inside the template.\n */\nfunction getSubTemplateIndexForTemplateTag(job, i18nOp, view) {\n for (const childOp of view.create) {\n if (childOp.kind === OpKind.I18nStart) {\n return childOp.subTemplateIndex;\n }\n }\n return i18nOp.subTemplateIndex;\n}\n/**\n * Add a param value to the given params map.\n */\nfunction addParam(params, placeholder, value, subTemplateIndex, flags) {\n const values = params.get(placeholder) ?? [];\n values.push({ value, subTemplateIndex, flags });\n params.set(placeholder, values);\n}\n\n/**\n * Resolve the i18n expression placeholders in i18n messages.\n */\nfunction resolveI18nExpressionPlaceholders(job) {\n // Record all of the i18n context ops, and the sub-template index for each i18n op.\n const subTemplateIndices = new Map();\n const i18nContexts = new Map();\n const icuPlaceholders = new Map();\n for (const unit of job.units) {\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n subTemplateIndices.set(op.xref, op.subTemplateIndex);\n break;\n case OpKind.I18nContext:\n i18nContexts.set(op.xref, op);\n break;\n case OpKind.IcuPlaceholder:\n icuPlaceholders.set(op.xref, op);\n break;\n }\n }\n }\n // Keep track of the next available expression index for each i18n message.\n const expressionIndices = new Map();\n // Keep track of a reference index for each expression.\n // We use different references for normal i18n expressio and attribute i18n expressions. This is\n // because child i18n blocks in templates don't get their own context, since they're rolled into\n // the translated message of the parent, but they may target a different slot.\n const referenceIndex = (op) => op.usage === I18nExpressionFor.I18nText ? op.i18nOwner : op.context;\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind === OpKind.I18nExpression) {\n const index = expressionIndices.get(referenceIndex(op)) || 0;\n const subTemplateIndex = subTemplateIndices.get(op.i18nOwner) ?? null;\n const value = {\n value: index,\n subTemplateIndex: subTemplateIndex,\n flags: I18nParamValueFlags.ExpressionIndex,\n };\n updatePlaceholder(op, value, i18nContexts, icuPlaceholders);\n expressionIndices.set(referenceIndex(op), index + 1);\n }\n }\n }\n}\nfunction updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {\n if (op.i18nPlaceholder !== null) {\n const i18nContext = i18nContexts.get(op.context);\n const params = op.resolutionTime === I18nParamResolutionTime.Creation\n ? i18nContext.params\n : i18nContext.postprocessingParams;\n const values = params.get(op.i18nPlaceholder) || [];\n values.push(value);\n params.set(op.i18nPlaceholder, values);\n }\n if (op.icuPlaceholder !== null) {\n const icuPlaceholderOp = icuPlaceholders.get(op.icuPlaceholder);\n icuPlaceholderOp?.expressionPlaceholders.push(value);\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 resolveNames(job) {\n for (const unit of job.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 // Symbols defined within the current scope. They take precedence over ones defined outside.\n const localDefinitions = 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 if (op.variable.local) {\n if (localDefinitions.has(op.variable.identifier)) {\n continue;\n }\n localDefinitions.set(op.variable.identifier, op.xref);\n }\n else if (scope.has(op.variable.identifier)) {\n continue;\n }\n scope.set(op.variable.identifier, op.xref);\n break;\n case SemanticVariableKind.Alias:\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 case OpKind.TwoWayListener:\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 || op.kind === OpKind.TwoWayListener) {\n // Listeners were already processed above with their own scopes.\n continue;\n }\n transformExpressionsInOp(op, (expr) => {\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 (localDefinitions.has(expr.name)) {\n return new ReadVariableExpr(localDefinitions.get(expr.name));\n }\n else 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 * Map of security contexts to their sanitizer function.\n */\nconst sanitizerFns = new Map([\n [SecurityContext.HTML, Identifiers.sanitizeHtml],\n [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],\n [SecurityContext.SCRIPT, Identifiers.sanitizeScript],\n [SecurityContext.STYLE, Identifiers.sanitizeStyle],\n [SecurityContext.URL, Identifiers.sanitizeUrl],\n]);\n/**\n * Map of security contexts to their trusted value function.\n */\nconst trustedValueFns = new Map([\n [SecurityContext.HTML, Identifiers.trustConstantHtml],\n [SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl],\n]);\n/**\n * Resolves sanitization functions for ops that need them.\n */\nfunction resolveSanitizers(job) {\n for (const unit of job.units) {\n const elements = createOpXrefMap(unit);\n // For normal element bindings we create trusted values for security sensitive constant\n // attributes. However, for host bindings we skip this step (this matches what\n // TemplateDefinitionBuilder does).\n // TODO: Is the TDB behavior correct here?\n if (job.kind !== CompilationJobKind.Host) {\n for (const op of unit.create) {\n if (op.kind === OpKind.ExtractedAttribute) {\n const trustedValueFn = trustedValueFns.get(getOnlySecurityContext(op.securityContext)) ?? null;\n op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;\n }\n }\n }\n for (const op of unit.update) {\n switch (op.kind) {\n case OpKind.Property:\n case OpKind.Attribute:\n case OpKind.HostProperty:\n let sanitizerFn = null;\n if (Array.isArray(op.securityContext) &&\n op.securityContext.length === 2 &&\n op.securityContext.indexOf(SecurityContext.URL) > -1 &&\n op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n // When the host element isn't known, some URL attributes (such as \"src\" and \"href\") may\n // be part of multiple different security contexts. In this case we use special\n // sanitization function and select the actual sanitizer at runtime based on a tag name\n // that is provided while invoking sanitization function.\n sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;\n }\n else {\n sanitizerFn = sanitizerFns.get(getOnlySecurityContext(op.securityContext)) ?? null;\n }\n op.sanitizer = sanitizerFn !== null ? importExpr(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 let isIframe = false;\n if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {\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, we just assume it is and append a\n // validation function, which is invoked at runtime and would have access to the\n // underlying DOM element to check if it's an <iframe> and if so - run extra checks.\n isIframe = true;\n }\n else {\n // For a normal binding we can just check if the element its on is an iframe.\n const ownerOp = elements.get(op.target);\n if (ownerOp === undefined || !isElementOrContainerOp(ownerOp)) {\n throw Error('Property should have an element-like owner');\n }\n isIframe = isIframeElement(ownerOp);\n }\n if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {\n op.sanitizer = importExpr(Identifiers.validateIframeAttribute);\n }\n }\n break;\n }\n }\n }\n}\n/**\n * Checks whether the given op represents an iframe element.\n */\nfunction isIframeElement(op) {\n return op.kind === OpKind.ElementStart && op.tag?.toLowerCase() === 'iframe';\n}\n/**\n * Asserts that there is only a single security context and returns it.\n */\nfunction getOnlySecurityContext(securityContext) {\n if (Array.isArray(securityContext)) {\n if (securityContext.length > 1) {\n // TODO: What should we do here? TDB just took the first one, but this feels like something we\n // would want to know about and create a special case for like we did for Url/ResourceUrl. My\n // guess is that, outside of the Url/ResourceUrl case, this never actually happens. If there\n // do turn out to be other cases, throwing an error until we can address it feels safer.\n throw Error(`AssertionError: Ambiguous security context`);\n }\n return securityContext[0] || SecurityContext.NONE;\n }\n return securityContext;\n}\n\n/**\n * Transforms a `TwoWayBindingSet` expression into an expression that either\n * sets a value through the `twoWayBindingSet` instruction or falls back to setting\n * the value directly. E.g. the expression `TwoWayBindingSet(target, value)` becomes:\n * `ng.twoWayBindingSet(target, value) || (target = value)`.\n */\nfunction transformTwoWayBindingSet(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind === OpKind.TwoWayListener) {\n transformExpressionsInOp(op, (expr) => {\n if (!(expr instanceof TwoWayBindingSetExpr)) {\n return expr;\n }\n const { target, value } = expr;\n if (target instanceof ReadPropExpr || target instanceof ReadKeyExpr) {\n return twoWayBindingSet(target, value).or(target.set(value));\n }\n // ASSUMPTION: here we're assuming that `ReadVariableExpr` will be a reference\n // to a local template variable. This appears to be the case at the time of writing.\n // If the expression is targeting a variable read, we only emit the `twoWayBindingSet`\n // since the fallback would be attempting to write into a constant. Invalid usages will be\n // flagged during template type checking.\n if (target instanceof ReadVariableExpr) {\n return twoWayBindingSet(target, value);\n }\n throw new Error(`Unsupported expression in two-way action binding.`);\n }, VisitorContextFlag.InChildOperation);\n }\n }\n }\n}\n\n/**\n * When inside of a listener, we may need access to one or more enclosing views. Therefore, each\n * view should save the current view, and each listener must have the ability to restore the\n * appropriate view. We eagerly generate all save view variables; they will be optimized away later.\n */\nfunction saveAndRestoreView(job) {\n for (const unit of job.units) {\n unit.create.prepend([\n createVariableOp(unit.job.allocateXrefId(), {\n kind: SemanticVariableKind.SavedView,\n name: null,\n view: unit.xref,\n }, new GetCurrentViewExpr(), VariableFlags.None),\n ]);\n for (const op of unit.create) {\n if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {\n continue;\n }\n // Embedded views always need the save/restore view operation.\n let needsRestoreView = unit !== job.root;\n if (!needsRestoreView) {\n for (const handlerOp of op.handlerOps) {\n visitExpressionsInOp(handlerOp, (expr) => {\n if (expr instanceof ReferenceExpr || expr instanceof ContextLetReferenceExpr) {\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(unit, op);\n }\n }\n }\n}\nfunction addSaveRestoreViewOperationToListener(unit, op) {\n op.handlerOps.prepend([\n createVariableOp(unit.job.allocateXrefId(), {\n kind: SemanticVariableKind.Context,\n name: null,\n view: unit.xref,\n }, new RestoreViewExpr(unit.xref), VariableFlags.None),\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 allocateSlots(job) {\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 unit of job.units) {\n // Slot indices start at 0 for each view (and are not unique between views).\n let slotCount = 0;\n for (const op of unit.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.handle.slot = slotCount;\n // And track its assigned slot in the `slotMap`.\n slotMap.set(op.xref, op.handle.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 unit.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 unit of job.units) {\n for (const op of unit.ops()) {\n if (op.kind === OpKind.Template || op.kind === OpKind.RepeaterCreate) {\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 = job.views.get(op.xref);\n op.decls = childView.decls;\n // TODO: currently we handle the decls for the RepeaterCreate empty template in the reify\n // phase. We should handle that here instead.\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 specializeStyleBindings(job) {\n for (const unit of job.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 generateTemporaryVariables(job) {\n for (const unit of job.units) {\n unit.create.prepend(generateTemporaries(unit.create));\n unit.update.prepend(generateTemporaries(unit.update));\n }\n}\nfunction generateTemporaries(ops) {\n let opCount = 0;\n let generatedStatements = [];\n // For each op, search for any variables that are assigned or read. For each variable, generate a\n // name and produce a `DeclareVarStmt` to the beginning of the block.\n for (const op of ops) {\n // Identify the final time each temp var is read.\n const finalReads = new Map();\n visitExpressionsInOp(op, (expr, flag) => {\n if (flag & VisitorContextFlag.InChildOperation) {\n return;\n }\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, flag) => {\n if (flag & VisitorContextFlag.InChildOperation) {\n return;\n }\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())).map((name) => createStatementOp(new DeclareVarStmt(name))));\n opCount++;\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n op.handlerOps.prepend(generateTemporaries(op.handlerOps));\n }\n }\n return generatedStatements;\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 * Generate track functions that need to be extracted to the constant pool. This entails wrapping\n * them in an arrow (or traditional) function, replacing context reads with `this.`, and storing\n * them in the constant pool.\n *\n * Note that, if a track function was previously optimized, it will not need to be extracted, and\n * this phase is a no-op.\n */\nfunction generateTrackFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n if (op.trackByFn !== null) {\n // The final track function was already set, probably because it was optimized.\n continue;\n }\n // Find all component context reads.\n let usesComponentContext = false;\n op.track = transformExpressionsInExpression(op.track, (expr) => {\n if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {\n throw new Error(`Illegal State: Pipes are not allowed in this context`);\n }\n if (expr instanceof TrackContextExpr) {\n usesComponentContext = true;\n return variable('this');\n }\n return expr;\n }, VisitorContextFlag.None);\n let fn;\n const fnParams = [new FnParam('$index'), new FnParam('$item')];\n if (usesComponentContext) {\n fn = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);\n }\n else {\n fn = arrowFn(fnParams, op.track);\n }\n op.trackByFn = job.pool.getSharedFunctionReference(fn, '_forTrack');\n }\n }\n}\n\n/**\n * `track` functions in `for` repeaters can sometimes be \"optimized,\" i.e. transformed into inline\n * expressions, in lieu of an external function call. For example, tracking by `$index` can be be\n * optimized into an inline `trackByIndex` reference. This phase checks track expressions for\n * optimizable cases.\n */\nfunction optimizeTrackFns(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n if (op.track instanceof ReadVarExpr && op.track.name === '$index') {\n // Top-level access of `$index` uses the built in `repeaterTrackByIndex`.\n op.trackByFn = importExpr(Identifiers.repeaterTrackByIndex);\n }\n else if (op.track instanceof ReadVarExpr && op.track.name === '$item') {\n // Top-level access of the item uses the built in `repeaterTrackByIdentity`.\n op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);\n }\n else if (isTrackByFunctionCall(job.root.xref, op.track)) {\n // Mark the function as using the component instance to play it safe\n // since the method might be using `this` internally (see #53628).\n op.usesComponentInstance = true;\n // Top-level method calls in the form of `fn($index, item)` can be passed in directly.\n if (op.track.receiver.receiver.view === unit.xref) {\n // TODO: this may be wrong\n op.trackByFn = op.track.receiver;\n }\n else {\n // This is a plain method call, but not in the component's root view.\n // We need to get the component instance, and then call the method on it.\n op.trackByFn = importExpr(Identifiers.componentInstance)\n .callFn([])\n .prop(op.track.receiver.name);\n // Because the context is not avaiable (without a special function), we don't want to\n // try to resolve it later. Let's get rid of it by overwriting the original track\n // expression (which won't be used anyway).\n op.track = op.trackByFn;\n }\n }\n else {\n // The track function could not be optimized.\n // Replace context reads with a special IR expression, since context reads in a track\n // function are emitted specially.\n op.track = transformExpressionsInExpression(op.track, (expr) => {\n if (expr instanceof ContextExpr) {\n op.usesComponentInstance = true;\n return new TrackContextExpr(expr.view);\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n }\n }\n}\nfunction isTrackByFunctionCall(rootView, expr) {\n if (!(expr instanceof InvokeFunctionExpr) || expr.args.length === 0 || expr.args.length > 2) {\n return false;\n }\n if (!(expr.receiver instanceof ReadPropExpr && expr.receiver.receiver instanceof ContextExpr) ||\n expr.receiver.receiver.view !== rootView) {\n return false;\n }\n const [arg0, arg1] = expr.args;\n if (!(arg0 instanceof ReadVarExpr) || arg0.name !== '$index') {\n return false;\n }\n else if (expr.args.length === 1) {\n return true;\n }\n if (!(arg1 instanceof ReadVarExpr) || arg1.name !== '$item') {\n return false;\n }\n return true;\n}\n\n/**\n * Inside the `track` expression on a `for` repeater, the `$index` and `$item` variables are\n * ambiently available. In this phase, we find those variable usages, and replace them with the\n * appropriate output read.\n */\nfunction generateTrackVariables(job) {\n for (const unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n op.track = transformExpressionsInExpression(op.track, (expr) => {\n if (expr instanceof LexicalReadExpr) {\n if (op.varNames.$index.has(expr.name)) {\n return variable('$index');\n }\n else if (expr.name === op.varNames.$implicit) {\n return variable('$item');\n }\n // TODO: handle prohibited context variables (emit as globals?)\n }\n return expr;\n }, VisitorContextFlag.None);\n }\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 countVariables(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 // Count variables on top-level ops first. Don't explore nested expressions just yet.\n for (const op of unit.ops()) {\n if (hasConsumesVarsTrait(op)) {\n varCount += varsUsedByOp(op);\n }\n }\n // Count variables on expressions inside ops. We do this later because some of these expressions\n // might be conditional (e.g. `pipeBinding` inside of a ternary), and we don't want to interfere\n // with indices for top-level binding slots (e.g. `property`).\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, (expr) => {\n if (!isIrExpression(expr)) {\n return;\n }\n // TemplateDefinitionBuilder assigns variable offsets for everything but pure functions\n // first, and then assigns offsets to pure functions lazily. We emulate that behavior by\n // assigning offsets in two passes instead of one, only in compatibility mode.\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder &&\n expr instanceof PureFunctionExpr) {\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 // Compatibility mode pass for pure function offsets (as explained above).\n if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, (expr) => {\n if (!isIrExpression(expr) || !(expr instanceof PureFunctionExpr)) {\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 }\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 unit of job.units) {\n for (const op of unit.create) {\n if (op.kind !== OpKind.Template && op.kind !== OpKind.RepeaterCreate) {\n continue;\n }\n const childView = job.views.get(op.xref);\n op.vars = childView.vars;\n // TODO: currently we handle the vars for the RepeaterCreate empty template in the reify\n // phase. We should handle that here instead.\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 && !isSingletonInterpolation(op.expression)) {\n slots += op.expression.expressions.length;\n }\n return slots;\n case OpKind.TwoWayProperty:\n // Two-way properties can only have expressions so they only need one variable slot.\n return 1;\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 case OpKind.I18nExpression:\n case OpKind.Conditional:\n case OpKind.DeferWhen:\n case OpKind.StoreLet:\n return 1;\n case OpKind.RepeaterCreate:\n // Repeaters may require an extra variable binding slot, if they have an empty view, for the\n // empty block tracking.\n // TODO: It's a bit odd to have a create mode instruction consume variable slots. Maybe we can\n // find a way to use the Repeater update op instead.\n return op.emptyView ? 1 : 0;\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 case ExpressionKind.StoreLet:\n return 1;\n default:\n throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${expr.constructor.name}`);\n }\n}\nfunction isSingletonInterpolation(expr) {\n if (expr.expressions.length !== 1 || expr.strings.length !== 2) {\n return false;\n }\n if (expr.strings[0] !== '' || expr.strings[1] !== '') {\n return false;\n }\n return true;\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 optimizeVariables(job) {\n for (const unit of job.units) {\n inlineAlwaysInlineVariables(unit.create);\n inlineAlwaysInlineVariables(unit.update);\n for (const op of unit.create) {\n if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {\n inlineAlwaysInlineVariables(op.handlerOps);\n }\n }\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 || op.kind === OpKind.TwoWayListener) {\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\"] = 2] = \"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 = {}));\nfunction inlineAlwaysInlineVariables(ops) {\n const vars = new Map();\n for (const op of ops) {\n if (op.kind === OpKind.Variable && op.flags & VariableFlags.AlwaysInline) {\n visitExpressionsInOp(op, (expr) => {\n if (isIrExpression(expr) && fencesForIrExpression(expr) !== Fence.None) {\n throw new Error(`AssertionError: A context-sensitive variable was marked AlwaysInline`);\n }\n });\n vars.set(op.xref, op);\n }\n transformExpressionsInOp(op, (expr) => {\n if (expr instanceof ReadVariableExpr && vars.has(expr.xref)) {\n const varOp = vars.get(expr.xref);\n // Inline by cloning, because we might inline into multiple places.\n return varOp.initializer.clone();\n }\n return expr;\n }, VisitorContextFlag.None);\n }\n for (const op of vars.values()) {\n OpList.remove(op);\n }\n}\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 const decl = varDecls.get(id);\n // We can inline variables that:\n // - are used exactly once, and\n // - are not used remotely\n // OR\n // - are marked for always inlining\n const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);\n if (count !== 1 || isAlwaysInline) {\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 const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);\n if (isAlwaysInline) {\n throw new Error(`AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.`);\n }\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.ViewContextRead | Fence.ViewContextWrite;\n case ExpressionKind.RestoreView:\n return Fence.ViewContextRead | Fence.ViewContextWrite | Fence.SideEffectful;\n case ExpressionKind.StoreLet:\n return Fence.SideEffectful;\n case ExpressionKind.Reference:\n case ExpressionKind.ContextLetReference:\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 &&\n 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 if (decl.initializer instanceof ReadVarExpr && decl.initializer.name === 'ctx') {\n // Although TemplateDefinitionBuilder is cautious about inlining, we still want to do so\n // when the variable is the context, to imitate its behavior with aliases in control flow\n // blocks. This quirky behavior will become dead code once compatibility mode is no longer\n // supported.\n return true;\n }\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 * Wraps ICUs that do not already belong to an i18n block in a new i18n block.\n */\nfunction wrapI18nIcus(job) {\n for (const unit of job.units) {\n let currentI18nOp = null;\n let addedI18nId = null;\n for (const op of unit.create) {\n switch (op.kind) {\n case OpKind.I18nStart:\n currentI18nOp = op;\n break;\n case OpKind.I18nEnd:\n currentI18nOp = null;\n break;\n case OpKind.IcuStart:\n if (currentI18nOp === null) {\n addedI18nId = job.allocateXrefId();\n // ICU i18n start/end ops should not receive source spans.\n OpList.insertBefore(createI18nStartOp(addedI18nId, op.message, undefined, null), op);\n }\n break;\n case OpKind.IcuEnd:\n if (addedI18nId !== null) {\n OpList.insertAfter(createI18nEndOp(addedI18nId, null), op);\n addedI18nId = null;\n }\n break;\n }\n }\n }\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes any `storeLet` calls that aren't referenced outside of the current view.\n */\nfunction optimizeStoreLet(job) {\n const letUsedExternally = new Set();\n // Since `@let` declarations can be referenced in child views, both in\n // the creation block (via listeners) and in the update block, we have\n // to look through all the ops to find the references.\n for (const unit of job.units) {\n for (const op of unit.ops()) {\n visitExpressionsInOp(op, (expr) => {\n if (expr instanceof ContextLetReferenceExpr) {\n letUsedExternally.add(expr.target);\n }\n });\n }\n }\n // TODO(crisbeto): potentially remove the unused calls completely, pending discussion.\n for (const unit of job.units) {\n for (const op of unit.update) {\n transformExpressionsInOp(op, (expression) => expression instanceof StoreLetExpr && !letUsedExternally.has(expression.target)\n ? expression.value\n : expression, VisitorContextFlag.None);\n }\n }\n}\n\n/**\n * It's not allowed to access a `@let` declaration before it has been defined. This is enforced\n * already via template type checking, however it can trip some of the assertions in the pipeline.\n * E.g. the naming phase can fail because we resolved the variable here, but the variable doesn't\n * exist anymore because the optimization phase removed it since it's invalid. To avoid surfacing\n * confusing errors to users in the case where template type checking isn't running (e.g. in JIT\n * mode) this phase detects illegal forward references and replaces them with `undefined`.\n * Eventually users will see the proper error from the template type checker.\n */\nfunction removeIllegalLetReferences(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.Variable ||\n op.variable.kind !== SemanticVariableKind.Identifier ||\n !(op.initializer instanceof StoreLetExpr)) {\n continue;\n }\n const name = op.variable.identifier;\n let current = op;\n while (current && current.kind !== OpKind.ListEnd) {\n transformExpressionsInOp(current, (expr) => expr instanceof LexicalReadExpr && expr.name === name ? literal(undefined) : expr, VisitorContextFlag.None);\n current = current.prev;\n }\n }\n }\n}\n\n/**\n * Replaces the `storeLet` ops with variables that can be\n * used to reference the value within the same view.\n */\nfunction generateLocalLetReferences(job) {\n for (const unit of job.units) {\n for (const op of unit.update) {\n if (op.kind !== OpKind.StoreLet) {\n continue;\n }\n const variable = {\n kind: SemanticVariableKind.Identifier,\n name: null,\n identifier: op.declaredName,\n local: true,\n };\n OpList.replace(op, createVariableOp(job.allocateXrefId(), variable, new StoreLetExpr(op.target, op.value, op.sourceSpan), VariableFlags.None));\n }\n }\n}\n\n/**\n *\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst phases = [\n { kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },\n { kind: CompilationJobKind.Host, fn: parseHostStyleProperties },\n { kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },\n { kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },\n { kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },\n { kind: CompilationJobKind.Both, fn: deduplicateTextBindings },\n { kind: CompilationJobKind.Both, fn: specializeStyleBindings },\n { kind: CompilationJobKind.Both, fn: specializeBindings },\n { kind: CompilationJobKind.Both, fn: extractAttributes },\n { kind: CompilationJobKind.Tmpl, fn: createI18nContexts },\n { kind: CompilationJobKind.Both, fn: parseExtractedStyles },\n { kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },\n { kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },\n { kind: CompilationJobKind.Both, fn: orderOps },\n { kind: CompilationJobKind.Tmpl, fn: generateConditionalExpressions },\n { kind: CompilationJobKind.Tmpl, fn: createPipes },\n { kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },\n { kind: CompilationJobKind.Tmpl, fn: convertI18nText },\n { kind: CompilationJobKind.Tmpl, fn: convertI18nBindings },\n { kind: CompilationJobKind.Tmpl, fn: removeUnusedI18nAttributesOps },\n { kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },\n { kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },\n { kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },\n { kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },\n { kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },\n { kind: CompilationJobKind.Tmpl, fn: generateLocalLetReferences },\n { kind: CompilationJobKind.Tmpl, fn: generateVariables },\n { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },\n { kind: CompilationJobKind.Both, fn: deleteAnyCasts },\n { kind: CompilationJobKind.Both, fn: resolveDollarEvent },\n { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },\n { kind: CompilationJobKind.Tmpl, fn: removeIllegalLetReferences },\n { kind: CompilationJobKind.Both, fn: resolveNames },\n { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },\n { kind: CompilationJobKind.Tmpl, fn: transformTwoWayBindingSet },\n { kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },\n { kind: CompilationJobKind.Both, fn: resolveContexts },\n { kind: CompilationJobKind.Both, fn: resolveSanitizers },\n { kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },\n { kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },\n { kind: CompilationJobKind.Both, fn: expandSafeReads },\n { kind: CompilationJobKind.Both, fn: generateTemporaryVariables },\n { kind: CompilationJobKind.Both, fn: optimizeVariables },\n { kind: CompilationJobKind.Both, fn: optimizeStoreLet },\n { kind: CompilationJobKind.Tmpl, fn: allocateSlots },\n { kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },\n { kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },\n { kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },\n { kind: CompilationJobKind.Tmpl, fn: generateTrackFns },\n { kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },\n { kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },\n { kind: CompilationJobKind.Both, fn: collectElementConsts },\n { kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },\n { kind: CompilationJobKind.Both, fn: countVariables },\n { kind: CompilationJobKind.Tmpl, fn: generateAdvance },\n { kind: CompilationJobKind.Both, fn: nameFunctionsAndVariables },\n { kind: CompilationJobKind.Tmpl, fn: resolveDeferDepsFns },\n { kind: CompilationJobKind.Tmpl, fn: mergeNextContextExpressions },\n { kind: CompilationJobKind.Tmpl, fn: generateNgContainerOps },\n { kind: CompilationJobKind.Tmpl, fn: collapseEmptyInstructions },\n { kind: CompilationJobKind.Tmpl, fn: disableBindings$1 },\n { kind: CompilationJobKind.Both, fn: extractPureFunctions },\n { kind: CompilationJobKind.Both, fn: reify },\n { kind: CompilationJobKind.Both, fn: chain },\n];\n/**\n * Run all transformation phases in the correct order against a compilation job. After this\n * processing, the compilation should be in a state where it can be emitted.\n */\nfunction transform(job, kind) {\n for (const phase of phases) {\n if (phase.kind === kind || phase.kind === CompilationJobKind.Both) {\n // The type of `Phase` above ensures it is impossible to call a phase that doesn't support the\n // job kind.\n phase.fn(job);\n }\n }\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 unit of parent.job.units) {\n if (unit.parent !== parent.xref) {\n continue;\n }\n // Child views are emitted depth-first.\n emitChildViews(unit, pool);\n const viewFn = emitView(unit);\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], \n /* type */ undefined, \n /* 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.root.fnName === null) {\n throw new Error(`AssertionError: host binding function is unnamed`);\n }\n const createStatements = [];\n for (const op of job.root.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.root.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], \n /* type */ undefined, \n /* sourceSpan */ undefined, job.root.fnName);\n}\n\nconst compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;\n// Schema containing DOM elements and their properties.\nconst domSchema = new DomElementSchemaRegistry();\n// Tag name of the `ng-template` element.\nconst NG_TEMPLATE_TAG_NAME = 'ng-template';\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}\n/**\n * Process a template AST and convert it into a `ComponentCompilation` in the intermediate\n * representation.\n * TODO: Refactor more of the ingestion code into phases.\n */\nfunction ingestComponent(componentName, template, constantPool, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) {\n const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn);\n ingestNodes(job.root, template);\n return job;\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 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 if (property.isAnimation) {\n bindingKind = BindingKind.Animation;\n }\n const securityContexts = bindingParser\n .calcPossibleSecurityContexts(input.componentSelector, property.name, bindingKind === BindingKind.Attribute)\n .filter((context) => context !== SecurityContext.NONE);\n ingestHostProperty(job, property, bindingKind, securityContexts);\n }\n for (const [name, expr] of Object.entries(input.attributes) ?? []) {\n const securityContexts = bindingParser\n .calcPossibleSecurityContexts(input.componentSelector, name, true)\n .filter((context) => context !== SecurityContext.NONE);\n ingestHostAttribute(job, name, expr, securityContexts);\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, bindingKind, securityContexts) {\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, property.sourceSpan)), []);\n }\n else {\n expression = convertAst(ast, job, property.sourceSpan);\n }\n job.root.update.push(createBindingOp(job.root.xref, bindingKind, property.name, expression, null, securityContexts, false, false, null, \n /* TODO: How do Host bindings handle i18n attrs? */ null, property.sourceSpan));\n}\nfunction ingestHostAttribute(job, name, value, securityContexts) {\n const attrBinding = createBindingOp(job.root.xref, BindingKind.Attribute, name, value, null, securityContexts, \n /* Host attributes should always be extracted to const hostAttrs, even if they are not\n *strictly* text literals */\n true, false, null, \n /* TODO */ null, \n /** TODO: May be null? */ value.sourceSpan);\n job.root.update.push(attrBinding);\n}\nfunction ingestHostEvent(job, event) {\n const [phase, target] = event.type !== ParsedEventType.Animation\n ? [null, event.targetOrPhase]\n : [event.targetOrPhase, null];\n const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);\n job.root.create.push(eventBinding);\n}\n/**\n * Ingest the nodes of a template AST into the given `ViewCompilation`.\n */\nfunction ingestNodes(unit, template) {\n for (const node of template) {\n if (node instanceof Element$1) {\n ingestElement(unit, node);\n }\n else if (node instanceof Template) {\n ingestTemplate(unit, node);\n }\n else if (node instanceof Content) {\n ingestContent(unit, node);\n }\n else if (node instanceof Text$3) {\n ingestText(unit, node, null);\n }\n else if (node instanceof BoundText) {\n ingestBoundText(unit, node, null);\n }\n else if (node instanceof IfBlock) {\n ingestIfBlock(unit, node);\n }\n else if (node instanceof SwitchBlock) {\n ingestSwitchBlock(unit, node);\n }\n else if (node instanceof DeferredBlock) {\n ingestDeferBlock(unit, node);\n }\n else if (node instanceof Icu$1) {\n ingestIcu(unit, node);\n }\n else if (node instanceof ForLoopBlock) {\n ingestForBlock(unit, node);\n }\n else if (node instanceof LetDeclaration$1) {\n ingestLetDeclaration(unit, 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(unit, element) {\n if (element.i18n !== undefined &&\n !(element.i18n instanceof Message || element.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for element: ${element.i18n.constructor.name}`);\n }\n const id = unit.job.allocateXrefId();\n const [namespaceKey, elementName] = splitNsName(element.name);\n const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element.i18n instanceof TagPlaceholder ? element.i18n : undefined, element.startSourceSpan, element.sourceSpan);\n unit.create.push(startOp);\n ingestElementBindings(unit, startOp, element);\n ingestReferences(startOp, element);\n // Start i18n, if needed, goes after the element create and bindings, but before the nodes\n let i18nBlockId = null;\n if (element.i18n instanceof Message) {\n i18nBlockId = unit.job.allocateXrefId();\n unit.create.push(createI18nStartOp(i18nBlockId, element.i18n, undefined, element.startSourceSpan));\n }\n ingestNodes(unit, element.children);\n // The source span for the end op is typically the element closing tag. However, if no closing tag\n // exists, such as in `<input>`, we use the start source span instead. Usually the start and end\n // instructions will be collapsed into one `element` instruction, negating the purpose of this\n // fallback, but in cases when it is not collapsed (such as an input with a binding), we still\n // want to map the end instruction to the main element.\n const endOp = createElementEndOp(id, element.endSourceSpan ?? element.startSourceSpan);\n unit.create.push(endOp);\n // If there is an i18n message associated with this element, insert i18n start and end ops.\n if (i18nBlockId !== null) {\n OpList.insertBefore(createI18nEndOp(i18nBlockId, element.endSourceSpan ?? element.startSourceSpan), endOp);\n }\n}\n/**\n * Ingest an `ng-template` node from the AST into the given `ViewCompilation`.\n */\nfunction ingestTemplate(unit, tmpl) {\n if (tmpl.i18n !== undefined &&\n !(tmpl.i18n instanceof Message || tmpl.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for template: ${tmpl.i18n.constructor.name}`);\n }\n const childView = unit.job.allocateView(unit.xref);\n let tagNameWithoutNamespace = tmpl.tagName;\n let namespacePrefix = '';\n if (tmpl.tagName) {\n [namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);\n }\n const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : undefined;\n const namespace = namespaceForKey(namespacePrefix);\n const functionNameSuffix = tagNameWithoutNamespace === null ? '' : prefixWithNamespace(tagNameWithoutNamespace, namespace);\n const templateKind = isPlainTemplate(tmpl)\n ? TemplateKind.NgTemplate\n : TemplateKind.Structural;\n const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan, tmpl.sourceSpan);\n unit.create.push(templateOp);\n ingestTemplateBindings(unit, templateOp, tmpl, templateKind);\n ingestReferences(templateOp, tmpl);\n ingestNodes(childView, tmpl.children);\n for (const { name, value } of tmpl.variables) {\n childView.contextVariables.set(name, value !== '' ? value : '$implicit');\n }\n // If this is a plain template and there is an i18n message associated with it, insert i18n start\n // and end ops. For structural directive templates, the i18n ops will be added when ingesting the\n // element/template the directive is placed on.\n if (templateKind === TemplateKind.NgTemplate && tmpl.i18n instanceof Message) {\n const id = unit.job.allocateXrefId();\n OpList.insertAfter(createI18nStartOp(id, tmpl.i18n, undefined, tmpl.startSourceSpan), childView.create.head);\n OpList.insertBefore(createI18nEndOp(id, tmpl.endSourceSpan ?? tmpl.startSourceSpan), childView.create.tail);\n }\n}\n/**\n * Ingest a content node from the AST into the given `ViewCompilation`.\n */\nfunction ingestContent(unit, content) {\n if (content.i18n !== undefined && !(content.i18n instanceof TagPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);\n }\n let fallbackView = null;\n // Don't capture default content that's only made up of empty text nodes and comments.\n // Note that we process the default content before the projection in order to match the\n // insertion order at runtime.\n if (content.children.some((child) => !(child instanceof Comment$1) &&\n (!(child instanceof Text$3) || child.value.trim().length > 0))) {\n fallbackView = unit.job.allocateView(unit.xref);\n ingestNodes(fallbackView, content.children);\n }\n const id = unit.job.allocateXrefId();\n const op = createProjectionOp(id, content.selector, content.i18n, fallbackView?.xref ?? null, content.sourceSpan);\n for (const attr of content.attributes) {\n const securityContext = domSchema.securityContext(content.name, attr.name, true);\n unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n }\n unit.create.push(op);\n}\n/**\n * Ingest a literal text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestText(unit, text, icuPlaceholder) {\n unit.create.push(createTextOp(unit.job.allocateXrefId(), text.value, icuPlaceholder, text.sourceSpan));\n}\n/**\n * Ingest an interpolated text node from the AST into the given `ViewCompilation`.\n */\nfunction ingestBoundText(unit, text, icuPlaceholder) {\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 if (text.i18n !== undefined && !(text.i18n instanceof Container)) {\n throw Error(`Unhandled i18n metadata type for text interpolation: ${text.i18n?.constructor.name}`);\n }\n const i18nPlaceholders = text.i18n instanceof Container\n ? text.i18n.children\n .filter((node) => node instanceof Placeholder)\n .map((placeholder) => placeholder.name)\n : [];\n if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {\n throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);\n }\n const textXref = unit.job.allocateXrefId();\n unit.create.push(createTextOp(textXref, '', icuPlaceholder, text.sourceSpan));\n // TemplateDefinitionBuilder does not generate source maps for sub-expressions inside an\n // interpolation. We copy that behavior in compatibility mode.\n // TODO: is it actually correct to generate these extra maps in modern mode?\n const baseSourceSpan = unit.job.compatibility ? null : text.sourceSpan;\n unit.update.push(createInterpolateTextOp(textXref, new Interpolation(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text.sourceSpan));\n}\n/**\n * Ingest an `@if` block into the given `ViewCompilation`.\n */\nfunction ingestIfBlock(unit, ifBlock) {\n let firstXref = null;\n let conditions = [];\n for (let i = 0; i < ifBlock.branches.length; i++) {\n const ifCase = ifBlock.branches[i];\n const cView = unit.job.allocateView(unit.xref);\n const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);\n if (ifCase.expressionAlias !== null) {\n cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);\n }\n let ifCaseI18nMeta = undefined;\n if (ifCase.i18n !== undefined) {\n if (!(ifCase.i18n instanceof BlockPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for if block: ${ifCase.i18n?.constructor.name}`);\n }\n ifCaseI18nMeta = ifCase.i18n;\n }\n const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, 'Conditional', Namespace.HTML, ifCaseI18nMeta, ifCase.startSourceSpan, ifCase.sourceSpan);\n unit.create.push(templateOp);\n if (firstXref === null) {\n firstXref = cView.xref;\n }\n const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;\n const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle, ifCase.expressionAlias);\n conditions.push(conditionalCaseExpr);\n ingestNodes(cView, ifCase.children);\n }\n unit.update.push(createConditionalOp(firstXref, null, conditions, ifBlock.sourceSpan));\n}\n/**\n * Ingest an `@switch` block into the given `ViewCompilation`.\n */\nfunction ingestSwitchBlock(unit, switchBlock) {\n // Don't ingest empty switches since they won't render anything.\n if (switchBlock.cases.length === 0) {\n return;\n }\n let firstXref = null;\n let conditions = [];\n for (const switchCase of switchBlock.cases) {\n const cView = unit.job.allocateView(unit.xref);\n const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCase);\n let switchCaseI18nMeta = undefined;\n if (switchCase.i18n !== undefined) {\n if (!(switchCase.i18n instanceof BlockPlaceholder)) {\n throw Error(`Unhandled i18n metadata type for switch block: ${switchCase.i18n?.constructor.name}`);\n }\n switchCaseI18nMeta = switchCase.i18n;\n }\n const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, 'Case', Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);\n unit.create.push(templateOp);\n if (firstXref === null) {\n firstXref = cView.xref;\n }\n const caseExpr = switchCase.expression\n ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan)\n : null;\n const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle);\n conditions.push(conditionalCaseExpr);\n ingestNodes(cView, switchCase.children);\n }\n unit.update.push(createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan));\n}\nfunction ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {\n if (i18nMeta !== undefined && !(i18nMeta instanceof BlockPlaceholder)) {\n throw Error('Unhandled i18n metadata type for defer block');\n }\n if (children === undefined) {\n return null;\n }\n const secondaryView = unit.job.allocateView(unit.xref);\n ingestNodes(secondaryView, children);\n const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan, sourceSpan);\n unit.create.push(templateOp);\n return templateOp;\n}\nfunction ingestDeferBlock(unit, deferBlock) {\n let ownResolverFn = null;\n if (unit.job.deferMeta.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n if (!unit.job.deferMeta.blocks.has(deferBlock)) {\n throw new Error(`AssertionError: unable to find a dependency function for this deferred block`);\n }\n ownResolverFn = unit.job.deferMeta.blocks.get(deferBlock) ?? null;\n }\n // Generate the defer main view and all secondary views.\n const main = ingestDeferView(unit, '', deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);\n const loading = ingestDeferView(unit, 'Loading', deferBlock.loading?.i18n, deferBlock.loading?.children, deferBlock.loading?.sourceSpan);\n const placeholder = ingestDeferView(unit, 'Placeholder', deferBlock.placeholder?.i18n, deferBlock.placeholder?.children, deferBlock.placeholder?.sourceSpan);\n const error = ingestDeferView(unit, 'Error', deferBlock.error?.i18n, deferBlock.error?.children, deferBlock.error?.sourceSpan);\n // Create the main defer op, and ops for all secondary views.\n const deferXref = unit.job.allocateXrefId();\n const deferOp = createDeferOp(deferXref, main.xref, main.handle, ownResolverFn, unit.job.allDeferrableDepsFn, deferBlock.sourceSpan);\n deferOp.placeholderView = placeholder?.xref ?? null;\n deferOp.placeholderSlot = placeholder?.handle ?? null;\n deferOp.loadingSlot = loading?.handle ?? null;\n deferOp.errorSlot = error?.handle ?? null;\n deferOp.placeholderMinimumTime = deferBlock.placeholder?.minimumTime ?? null;\n deferOp.loadingMinimumTime = deferBlock.loading?.minimumTime ?? null;\n deferOp.loadingAfterTime = deferBlock.loading?.afterTime ?? null;\n unit.create.push(deferOp);\n // Configure all defer `on` conditions.\n // TODO: refactor prefetch triggers to use a separate op type, with a shared superclass. This will\n // make it easier to refactor prefetch behavior in the future.\n let prefetch = false;\n let deferOnOps = [];\n let deferWhenOps = [];\n for (const triggers of [deferBlock.triggers, deferBlock.prefetchTriggers]) {\n if (triggers.idle !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, prefetch, triggers.idle.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.immediate !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, prefetch, triggers.immediate.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.timer !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, prefetch, triggers.timer.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.hover !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Hover,\n targetName: triggers.hover.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null,\n }, prefetch, triggers.hover.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.interaction !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Interaction,\n targetName: triggers.interaction.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null,\n }, prefetch, triggers.interaction.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.viewport !== undefined) {\n const deferOnOp = createDeferOnOp(deferXref, {\n kind: DeferTriggerKind.Viewport,\n targetName: triggers.viewport.reference,\n targetXref: null,\n targetSlot: null,\n targetView: null,\n targetSlotViewSteps: null,\n }, prefetch, triggers.viewport.sourceSpan);\n deferOnOps.push(deferOnOp);\n }\n if (triggers.when !== undefined) {\n if (triggers.when.value instanceof Interpolation$1) {\n // TemplateDefinitionBuilder supports this case, but it's very strange to me. What would it\n // even mean?\n throw new Error(`Unexpected interpolation in defer block when trigger`);\n }\n const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);\n deferWhenOps.push(deferOnOp);\n }\n // If no (non-prefetching) defer triggers were provided, default to `idle`.\n if (deferOnOps.length === 0 && deferWhenOps.length === 0) {\n deferOnOps.push(createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, false, null));\n }\n prefetch = true;\n }\n unit.create.push(deferOnOps);\n unit.update.push(deferWhenOps);\n}\nfunction ingestIcu(unit, icu) {\n if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {\n const xref = unit.job.allocateXrefId();\n unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));\n for (const [placeholder, text] of Object.entries({ ...icu.vars, ...icu.placeholders })) {\n if (text instanceof BoundText) {\n ingestBoundText(unit, text, placeholder);\n }\n else {\n ingestText(unit, text, placeholder);\n }\n }\n unit.create.push(createIcuEndOp(xref));\n }\n else {\n throw Error(`Unhandled i18n metadata type for ICU: ${icu.i18n?.constructor.name}`);\n }\n}\n/**\n * Ingest an `@for` block into the given `ViewCompilation`.\n */\nfunction ingestForBlock(unit, forBlock) {\n const repeaterView = unit.job.allocateView(unit.xref);\n // We copy TemplateDefinitionBuilder's scheme of creating names for `$count` and `$index`\n // that are suffixed with special information, to disambiguate which level of nested loop\n // the below aliases refer to.\n // TODO: We should refactor Template Pipeline's variable phases to gracefully handle\n // shadowing, and arbitrarily many levels of variables depending on each other.\n const indexName = `ɵ$index_${repeaterView.xref}`;\n const countName = `ɵ$count_${repeaterView.xref}`;\n const indexVarNames = new Set();\n // Set all the context variables and aliases available in the repeater.\n repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);\n for (const variable of forBlock.contextVariables) {\n if (variable.value === '$index') {\n indexVarNames.add(variable.name);\n }\n if (variable.name === '$index') {\n repeaterView.contextVariables.set('$index', variable.value).set(indexName, variable.value);\n }\n else if (variable.name === '$count') {\n repeaterView.contextVariables.set('$count', variable.value).set(countName, variable.value);\n }\n else {\n repeaterView.aliases.add({\n kind: SemanticVariableKind.Alias,\n name: null,\n identifier: variable.name,\n expression: getComputedForLoopVariableExpression(variable, indexName, countName),\n });\n }\n }\n const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);\n const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);\n ingestNodes(repeaterView, forBlock.children);\n let emptyView = null;\n let emptyTagName = null;\n if (forBlock.empty !== null) {\n emptyView = unit.job.allocateView(unit.xref);\n ingestNodes(emptyView, forBlock.empty.children);\n emptyTagName = ingestControlFlowInsertionPoint(unit, emptyView.xref, forBlock.empty);\n }\n const varNames = {\n $index: indexVarNames,\n $implicit: forBlock.item.name,\n };\n if (forBlock.i18n !== undefined && !(forBlock.i18n instanceof BlockPlaceholder)) {\n throw Error('AssertionError: Unhandled i18n metadata type or @for');\n }\n if (forBlock.empty?.i18n !== undefined &&\n !(forBlock.empty.i18n instanceof BlockPlaceholder)) {\n throw Error('AssertionError: Unhandled i18n metadata type or @empty');\n }\n const i18nPlaceholder = forBlock.i18n;\n const emptyI18nPlaceholder = forBlock.empty?.i18n;\n const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);\n const repeaterCreate = createRepeaterCreateOp(repeaterView.xref, emptyView?.xref ?? null, tagName, track, varNames, emptyTagName, i18nPlaceholder, emptyI18nPlaceholder, forBlock.startSourceSpan, forBlock.sourceSpan);\n unit.create.push(repeaterCreate);\n const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));\n const repeater = createRepeaterOp(repeaterCreate.xref, repeaterCreate.handle, expression, forBlock.sourceSpan);\n unit.update.push(repeater);\n}\n/**\n * Gets an expression that represents a variable in an `@for` loop.\n * @param variable AST representing the variable.\n * @param indexName Loop-specific name for `$index`.\n * @param countName Loop-specific name for `$count`.\n */\nfunction getComputedForLoopVariableExpression(variable, indexName, countName) {\n switch (variable.value) {\n case '$index':\n return new LexicalReadExpr(indexName);\n case '$count':\n return new LexicalReadExpr(countName);\n case '$first':\n return new LexicalReadExpr(indexName).identical(literal(0));\n case '$last':\n return new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)));\n case '$even':\n return new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0));\n case '$odd':\n return new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0));\n default:\n throw new Error(`AssertionError: unknown @for loop variable ${variable.value}`);\n }\n}\nfunction ingestLetDeclaration(unit, node) {\n const target = unit.job.allocateXrefId();\n unit.create.push(createDeclareLetOp(target, node.name, node.sourceSpan));\n unit.update.push(createStoreLetOp(target, node.name, convertAst(node.value, unit.job, node.valueSpan), node.sourceSpan));\n}\n/**\n * Convert a template AST expression into an output AST expression.\n */\nfunction convertAst(ast, job, baseSourceSpan) {\n if (ast instanceof ASTWithSource) {\n return convertAst(ast.ast, job, baseSourceSpan);\n }\n else if (ast instanceof PropertyRead) {\n const isThisReceiver = ast.receiver instanceof ThisReceiver;\n // Whether this is an implicit receiver, *excluding* explicit reads of `this`.\n const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver);\n // Whether the name of the read is a node that should be never retain its explicit this\n // receiver.\n const isSpecialNode = ast.name === '$any' || ast.name === '$event';\n // TODO: The most sensible condition here would be simply `isImplicitReceiver`, to convert only\n // actual implicit `this` reads, and not explicit ones. However, TemplateDefinitionBuilder (and\n // the Typecheck block!) both have the same bug, in which they also consider explicit `this`\n // reads to be implicit. This causes problems when the explicit `this` read is inside a\n // template with a context that also provides the variable name being read:\n // ```\n // <ng-template let-a>{{this.a}}</ng-template>\n // ```\n // The whole point of the explicit `this` was to access the class property, but TDB and the\n // current TCB treat the read as implicit, and give you the context property instead!\n //\n // For now, we emulate this old behavior by aggressively converting explicit reads to to\n // implicit reads, except for the special cases that TDB and the current TCB protect. However,\n // it would be an improvement to fix this.\n //\n // See also the corresponding comment for the TCB, in `type_check_block.ts`.\n if (isImplicitReceiver || (isThisReceiver && !isSpecialNode)) {\n return new LexicalReadExpr(ast.name);\n }\n else {\n return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));\n }\n }\n else if (ast instanceof PropertyWrite) {\n if (ast.receiver instanceof ImplicitReceiver) {\n return new WritePropExpr(\n // TODO: Is it correct to always use the root context in place of the implicit receiver?\n new ContextExpr(job.root.xref), ast.name, convertAst(ast.value, job, baseSourceSpan), null, convertSourceSpan(ast.span, baseSourceSpan));\n }\n return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof KeyedWrite) {\n return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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, job, baseSourceSpan), ast.args.map((arg) => convertAst(arg, job, baseSourceSpan)), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n }\n else if (ast instanceof LiteralPrimitive) {\n return literal(ast.value, undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof Unary) {\n switch (ast.operator) {\n case '+':\n return new UnaryOperatorExpr(UnaryOperator.Plus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n case '-':\n return new UnaryOperatorExpr(UnaryOperator.Minus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n default:\n throw new Error(`AssertionError: unknown unary operator ${ast.operator}`);\n }\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, job, baseSourceSpan), convertAst(ast.right, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof ThisReceiver) {\n // TODO: should context expressions have source maps?\n return new ContextExpr(job.root.xref);\n }\n else if (ast instanceof KeyedRead) {\n return new ReadKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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 // TODO: should literals have source maps, or do we just map the whole surrounding\n // expression?\n return new LiteralMapEntry(key.key, convertAst(value, job, baseSourceSpan), key.quoted);\n });\n return new LiteralMapExpr(entries, undefined, convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof LiteralArray) {\n // TODO: should literals have source maps, or do we just map the whole surrounding expression?\n return new LiteralArrayExpr(ast.expressions.map((expr) => convertAst(expr, job, baseSourceSpan)));\n }\n else if (ast instanceof Conditional) {\n return new ConditionalExpr(convertAst(ast.condition, job, baseSourceSpan), convertAst(ast.trueExp, job, baseSourceSpan), convertAst(ast.falseExp, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));\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, job, baseSourceSpan);\n }\n else if (ast instanceof BindingPipe) {\n // TODO: pipes should probably have source maps; figure out details.\n return new PipeBindingExpr(job.allocateXrefId(), new SlotHandle(), ast.name, [\n convertAst(ast.exp, job, baseSourceSpan),\n ...ast.args.map((arg) => convertAst(arg, job, baseSourceSpan)),\n ]);\n }\n else if (ast instanceof SafeKeyedRead) {\n return new SafeKeyedReadExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof SafePropertyRead) {\n // TODO: source span\n return new SafePropertyReadExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name);\n }\n else if (ast instanceof SafeCall) {\n // TODO: source span\n return new SafeInvokeFunctionExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.args.map((a) => convertAst(a, job, baseSourceSpan)));\n }\n else if (ast instanceof EmptyExpr$1) {\n return new EmptyExpr(convertSourceSpan(ast.span, baseSourceSpan));\n }\n else if (ast instanceof PrefixNot) {\n return not(convertAst(ast.expression, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));\n }\n else {\n throw new Error(`Unhandled expression type \"${ast.constructor.name}\" in file \"${baseSourceSpan?.start.file.url}\"`);\n }\n}\nfunction convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {\n let expression;\n if (value instanceof Interpolation$1) {\n expression = new Interpolation(value.strings, value.expressions.map((e) => convertAst(e, job, sourceSpan ?? null)), Object.keys(asMessage(i18nMeta)?.placeholders ?? {}));\n }\n else if (value instanceof AST) {\n expression = convertAst(value, job, sourceSpan ?? null);\n }\n else {\n expression = literal(value);\n }\n return expression;\n}\n// TODO: Can we populate Template binding kinds in ingest?\nconst BINDING_KINDS = new Map([\n [BindingType.Property, BindingKind.Property],\n [BindingType.TwoWay, BindingKind.TwoWayProperty],\n [BindingType.Attribute, BindingKind.Attribute],\n [BindingType.Class, BindingKind.ClassName],\n [BindingType.Style, BindingKind.StyleProperty],\n [BindingType.Animation, BindingKind.Animation],\n]);\n/**\n * Checks whether the given template is a plain ng-template (as opposed to another kind of template\n * such as a structural directive template or control flow template). This is checked based on the\n * tagName. We can expect that only plain ng-templates will come through with a tagName of\n * 'ng-template'.\n *\n * Here are some of the cases we expect:\n *\n * | Angular HTML | Template tagName |\n * | ---------------------------------- | ------------------ |\n * | `<ng-template>` | 'ng-template' |\n * | `<div *ngIf=\"true\">` | 'div' |\n * | `<svg><ng-template>` | 'svg:ng-template' |\n * | `@if (true) {` | 'Conditional' |\n * | `<ng-template *ngIf>` (plain) | 'ng-template' |\n * | `<ng-template *ngIf>` (structural) | null |\n */\nfunction isPlainTemplate(tmpl) {\n return splitNsName(tmpl.tagName ?? '')[1] === NG_TEMPLATE_TAG_NAME;\n}\n/**\n * Ensures that the i18nMeta, if provided, is an i18n.Message.\n */\nfunction asMessage(i18nMeta) {\n if (i18nMeta == null) {\n return null;\n }\n if (!(i18nMeta instanceof Message)) {\n throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);\n }\n return i18nMeta;\n}\n/**\n * Process all of the bindings on an element in the template AST and convert them to their IR\n * representation.\n */\nfunction ingestElementBindings(unit, op, element) {\n let bindings = new Array();\n let i18nAttributeBindingNames = new Set();\n for (const attr of element.attributes) {\n // Attribute literal bindings, such as `attr.foo=\"bar\"`.\n const securityContext = domSchema.securityContext(element.name, attr.name, true);\n bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n if (attr.i18n) {\n i18nAttributeBindingNames.add(attr.name);\n }\n }\n for (const input of element.inputs) {\n if (i18nAttributeBindingNames.has(input.name)) {\n console.error(`On component ${unit.job.componentName}, the binding ${input.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`);\n }\n // All dynamic bindings (both attribute and property bindings).\n bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, asMessage(input.i18n) ?? null, input.sourceSpan));\n }\n unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));\n unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));\n for (const output of element.outputs) {\n if (output.type === ParsedEventType.Animation && output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n if (output.type === ParsedEventType.TwoWay) {\n unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));\n }\n else {\n unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));\n }\n }\n // If any of the bindings on this element have an i18n message, then an i18n attrs configuration\n // op is also required.\n if (bindings.some((b) => b?.i18nMessage) !== null) {\n unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));\n }\n}\n/**\n * Process all of the bindings on a template in the template AST and convert them to their IR\n * representation.\n */\nfunction ingestTemplateBindings(unit, op, template, templateKind) {\n let bindings = new Array();\n for (const attr of template.templateAttrs) {\n if (attr instanceof TextAttribute) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n bindings.push(createTemplateBinding(unit, op.xref, BindingType.Attribute, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n }\n else {\n bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n }\n }\n for (const attr of template.attributes) {\n // Attribute literal bindings, such as `attr.foo=\"bar\"`.\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n bindings.push(createTemplateBinding(unit, op.xref, BindingType.Attribute, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));\n }\n for (const input of template.inputs) {\n // Dynamic bindings (both attribute and property bindings).\n bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));\n }\n unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));\n unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));\n for (const output of template.outputs) {\n if (output.type === ParsedEventType.Animation && output.phase === null) {\n throw Error('Animation listener should have a phase');\n }\n if (templateKind === TemplateKind.NgTemplate) {\n if (output.type === ParsedEventType.TwoWay) {\n unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));\n }\n else {\n unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));\n }\n }\n if (templateKind === TemplateKind.Structural &&\n output.type !== ParsedEventType.Animation) {\n // Animation bindings are excluded from the structural template's const array.\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);\n unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));\n }\n }\n // TODO: Perhaps we could do this in a phase? (It likely wouldn't change the slot indices.)\n if (bindings.some((b) => b?.i18nMessage) !== null) {\n unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));\n }\n}\n/**\n * Helper to ingest an individual binding on a template, either an explicit `ng-template`, or an\n * implicit template created via structural directive.\n *\n * Bindings on templates are *extremely* tricky. I have tried to isolate all of the confusing edge\n * cases into this function, and to comment it well to document the behavior.\n *\n * Some of this behavior is intuitively incorrect, and we should consider changing it in the future.\n *\n * @param view The compilation unit for the view containing the template.\n * @param xref The xref of the template op.\n * @param type The binding type, according to the parser. This is fairly reasonable, e.g. both\n * dynamic and static attributes have e.BindingType.Attribute.\n * @param name The binding's name.\n * @param value The bindings's value, which will either be an input AST expression, or a string\n * literal. Note that the input AST expression may or may not be const -- it will only be a\n * string literal if the parser considered it a text binding.\n * @param unit If the binding has a unit (e.g. `px` for style bindings), then this is the unit.\n * @param securityContext The security context of the binding.\n * @param isStructuralTemplateAttribute Whether this binding actually applies to the structural\n * ng-template. For example, an `ngFor` would actually apply to the structural template. (Most\n * bindings on structural elements target the inner element, not the template.)\n * @param templateKind Whether this is an explicit `ng-template` or an implicit template created by\n * a structural directive. This should never be a block template.\n * @param i18nMessage The i18n metadata for the binding, if any.\n * @param sourceSpan The source span of the binding.\n * @returns An IR binding op, or null if the binding should be skipped.\n */\nfunction createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {\n const isTextBinding = typeof value === 'string';\n // If this is a structural template, then several kinds of bindings should not result in an\n // update instruction.\n if (templateKind === TemplateKind.Structural) {\n if (!isStructuralTemplateAttribute) {\n switch (type) {\n case BindingType.Property:\n case BindingType.Class:\n case BindingType.Style:\n // Because this binding doesn't really target the ng-template, it must be a binding on an\n // inner node of a structural template. We can't skip it entirely, because we still need\n // it on the ng-template's consts (e.g. for the purposes of directive matching). However,\n // we should not generate an update instruction for it.\n return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);\n case BindingType.TwoWay:\n return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);\n }\n }\n if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.Animation)) {\n // Again, this binding doesn't really target the ng-template; it actually targets the element\n // inside the structural template. In the case of non-text attribute or animation bindings,\n // the binding doesn't even show up on the ng-template const array, so we just skip it\n // entirely.\n return null;\n }\n }\n let bindingType = BINDING_KINDS.get(type);\n if (templateKind === TemplateKind.NgTemplate) {\n // We know we are dealing with bindings directly on an explicit ng-template.\n // Static attribute bindings should be collected into the const array as k/v pairs. Property\n // bindings should result in a `property` instruction, and `AttributeMarker.Bindings` const\n // entries.\n //\n // The difficulty is with dynamic attribute, style, and class bindings. These don't really make\n // sense on an `ng-template` and should probably be parser errors. However,\n // TemplateDefinitionBuilder generates `property` instructions for them, and so we do that as\n // well.\n //\n // Note that we do have a slight behavior difference with TemplateDefinitionBuilder: although\n // TDB emits `property` instructions for dynamic attributes, styles, and classes, only styles\n // and classes also get const collected into the `AttributeMarker.Bindings` field. Dynamic\n // attribute bindings are missing from the consts entirely. We choose to emit them into the\n // consts field anyway, to avoid creating special cases for something so arcane and nonsensical.\n if (type === BindingType.Class ||\n type === BindingType.Style ||\n (type === BindingType.Attribute && !isTextBinding)) {\n // TODO: These cases should be parse errors.\n bindingType = BindingKind.Property;\n }\n }\n return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);\n}\nfunction makeListenerHandlerOps(unit, handler, handlerSpan) {\n handler = astOf(handler);\n const handlerOps = new Array();\n let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];\n if (handlerExprs.length === 0) {\n throw new Error('Expected listener to have non-empty expression list.');\n }\n const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, handlerSpan));\n const returnExpr = expressions.pop();\n handlerOps.push(...expressions.map((e) => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));\n handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));\n return handlerOps;\n}\nfunction makeTwoWayListenerHandlerOps(unit, handler, handlerSpan) {\n handler = astOf(handler);\n const handlerOps = new Array();\n if (handler instanceof Chain) {\n if (handler.expressions.length === 1) {\n handler = handler.expressions[0];\n }\n else {\n // This is validated during parsing already, but we do it here just in case.\n throw new Error('Expected two-way listener to have a single expression.');\n }\n }\n const handlerExpr = convertAst(handler, unit.job, handlerSpan);\n const eventReference = new LexicalReadExpr('$event');\n const twoWaySetExpr = new TwoWayBindingSetExpr(handlerExpr, eventReference);\n handlerOps.push(createStatementOp(new ExpressionStatement(twoWaySetExpr)));\n handlerOps.push(createStatementOp(new ReturnStatement(eventReference)));\n return handlerOps;\n}\nfunction astOf(ast) {\n return ast instanceof ASTWithSource ? ast.ast : ast;\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/**\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 * @param baseSourceSpan a span corresponding to the base of the expression tree.\n * @returns a `ParseSourceSpan` for the given span or null if no `baseSourceSpan` was provided.\n */\nfunction convertSourceSpan(span, baseSourceSpan) {\n if (baseSourceSpan === null) {\n return null;\n }\n const start = baseSourceSpan.start.moveBy(span.start);\n const end = baseSourceSpan.start.moveBy(span.end);\n const fullStart = baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n}\n/**\n * With the directive-based control flow users were able to conditionally project content using\n * the `*` syntax. E.g. `<div *ngIf=\"expr\" projectMe></div>` will be projected into\n * `<ng-content select=\"[projectMe]\"/>`, because the attributes and tag name from the `div` are\n * copied to the template via the template creation instruction. With `@if` and `@for` that is\n * not the case, because the conditional is placed *around* elements, rather than *on* them.\n * The result is that content projection won't work in the same way if a user converts from\n * `*ngIf` to `@if`.\n *\n * This function aims to cover the most common case by doing the same copying when a control flow\n * node has *one and only one* root element or template node.\n *\n * This approach comes with some caveats:\n * 1. As soon as any other node is added to the root, the copying behavior won't work anymore.\n * A diagnostic will be added to flag cases like this and to explain how to work around it.\n * 2. If `preserveWhitespaces` is enabled, it's very likely that indentation will break this\n * workaround, because it'll include an additional text node as the first child. We can work\n * around it here, but in a discussion it was decided not to, because the user explicitly opted\n * into preserving the whitespace and we would have to drop it from the generated code.\n * The diagnostic mentioned point #1 will flag such cases to users.\n *\n * @returns Tag name to be used for the control flow template.\n */\nfunction ingestControlFlowInsertionPoint(unit, xref, node) {\n let root = null;\n for (const child of node.children) {\n // Skip over comment nodes.\n if (child instanceof Comment$1) {\n continue;\n }\n // We can only infer the tag name/attributes if there's a single root node.\n if (root !== null) {\n return null;\n }\n // Root nodes can only elements or templates with a tag name (e.g. `<div *foo></div>`).\n if (child instanceof Element$1 || (child instanceof Template && child.tagName !== null)) {\n root = child;\n }\n }\n // If we've found a single root node, its tag name and attributes can be\n // copied to the surrounding template to be used for content projection.\n if (root !== null) {\n // Collect the static attributes for content projection purposes.\n for (const attr of root.attributes) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));\n }\n // Also collect the inputs since they participate in content projection as well.\n // Note that TDB used to collect the outputs as well, but it wasn't passing them into\n // the template instruction. Here we just don't collect them.\n for (const attr of root.inputs) {\n if (attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {\n const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);\n unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));\n }\n }\n const tagName = root instanceof Element$1 ? root.name : root.tagName;\n // Don't pass along `ng-template` tag name since it enables directive matching.\n return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;\n }\n return null;\n}\n\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\n/**\n * Translates query flags into `TQueryFlags` type in\n * 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 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}\nfunction createQueryCreateCall(query, constantPool, queryTypeFns, prependParams) {\n const parameters = [];\n if (prependParams !== undefined) {\n parameters.push(...prependParams);\n }\n if (query.isSignal) {\n parameters.push(new ReadPropExpr(variable(CONTEXT_NAME), query.propertyName));\n }\n parameters.push(getQueryPredicate(query, constantPool), literal(toQueryFlags(query)));\n if (query.read) {\n parameters.push(query.read);\n }\n const queryCreateFn = query.isSignal ? queryTypeFns.signalBased : queryTypeFns.nonSignal;\n return importExpr(queryCreateFn).callFn(parameters);\n}\nconst queryAdvancePlaceholder = Symbol('queryAdvancePlaceholder');\n/**\n * Collapses query advance placeholders in a list of statements.\n *\n * This allows for less generated code because multiple sibling query advance\n * statements can be collapsed into a single call with the count as argument.\n *\n * e.g.\n *\n * ```ts\n * bla();\n * queryAdvance();\n * queryAdvance();\n * bla();\n * ```\n *\n * --> will turn into\n *\n * ```\n * bla();\n * queryAdvance(2);\n * bla();\n * ```\n */\nfunction collapseAdvanceStatements(statements) {\n const result = [];\n let advanceCollapseCount = 0;\n const flushAdvanceCount = () => {\n if (advanceCollapseCount > 0) {\n result.unshift(importExpr(Identifiers.queryAdvance)\n .callFn(advanceCollapseCount === 1 ? [] : [literal(advanceCollapseCount)])\n .toStmt());\n advanceCollapseCount = 0;\n }\n };\n // Iterate through statements in reverse and collapse advance placeholders.\n for (let i = statements.length - 1; i >= 0; i--) {\n const st = statements[i];\n if (st === queryAdvancePlaceholder) {\n advanceCollapseCount++;\n }\n else {\n flushAdvanceCount();\n result.unshift(st);\n }\n }\n flushAdvanceCount();\n return result;\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);\n viewQueries.forEach((query) => {\n // creation call, e.g. r3.viewQuery(somePredicate, true) or\n // r3.viewQuerySignal(ctx.prop, somePredicate, true);\n const queryDefinitionCall = createQueryCreateCall(query, constantPool, {\n signalBased: Identifiers.viewQuerySignal,\n nonSignal: Identifiers.viewQuery,\n });\n createStatements.push(queryDefinitionCall.toStmt());\n // Signal queries update lazily and we just advance the index.\n if (query.isSignal) {\n updateStatements.push(queryAdvancePlaceholder);\n return;\n }\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 */, collapseAdvanceStatements(updateStatements)),\n ], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Define and update any content queries\nfunction createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null) or\n // r3.contentQuerySignal(dirIndex, propName, somePredicate, <flags>, <read>).\n createStatements.push(createQueryCreateCall(query, constantPool, { nonSignal: Identifiers.contentQuery, signalBased: Identifiers.contentQuerySignal }, \n /* prependParams */ [variable('dirIndex')]).toStmt());\n // Signal queries update lazily and we just advance the index.\n if (query.isSignal) {\n updateStatements.push(queryAdvancePlaceholder);\n continue;\n }\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),\n new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null),\n ], [\n renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),\n renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, collapseAdvanceStatements(updateStatements)),\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}\n\nclass HtmlParser extends Parser$1 {\n constructor() {\n super(getHtmlTagDefinition);\n }\n parse(source, url, options) {\n return super.parse(source, url, options);\n }\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, _allowInvalidAssignmentEvents = false) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n this._allowInvalidAssignmentEvents = _allowInvalidAssignmentEvents;\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, false, 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, \n /* 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\n ? moveParseSourceSpan(sourceSpan, binding.value.span)\n : 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, false, 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, isPartOfAssignmentBinding, 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), isPartOfAssignmentBinding, 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, false, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n }\n _parsePropertyAst(name, ast, isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : 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, 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 = BindingType.Attribute;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 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 = 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 =\n boundProp.type === ParsedPropertyType.TWO_WAY ? BindingType.TwoWay : 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, 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, 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, handlerSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 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 prevErrorCount = this.errors.length;\n const ast = this._parseAction(expression, handlerSpan);\n const isValid = this.errors.length === prevErrorCount;\n targetMatchableAttrs.push([name, ast.source]);\n // Don't try to validate assignment events if there were other\n // parsing errors to avoid adding more noise to the error logs.\n if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {\n this._reportError('Unsupported expression in a two-way binding', sourceSpan);\n }\n targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : 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, 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, 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\n ? this._schemaRegistry.validateAttribute(propName)\n : this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n }\n /**\n * Returns whether a parsed AST is allowed to be used within the event side of a two-way binding.\n * @param ast Parsed AST to be checked.\n */\n _isAllowedAssignmentEvent(ast) {\n if (ast instanceof ASTWithSource) {\n return this._isAllowedAssignmentEvent(ast.ast);\n }\n if (ast instanceof NonNullAssert) {\n return this._isAllowedAssignmentEvent(ast.expression);\n }\n if (ast instanceof PropertyRead || ast instanceof KeyedRead) {\n return true;\n }\n // TODO(crisbeto): this logic is only here to support the automated migration away\n // from invalid bindings. It should be removed once the migration is deleted.\n if (!this._allowInvalidAssignmentEvents) {\n return false;\n }\n if (ast instanceof Binary) {\n return ((ast.operation === '&&' || ast.operation === '||' || ast.operation === '??') &&\n (ast.right instanceof PropertyRead || ast.right instanceof KeyedRead));\n }\n return ast instanceof Conditional || ast instanceof PrefixNot;\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\n .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 = '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) {\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 the expression in a for loop block. */\nconst FOR_LOOP_EXPRESSION_PATTERN = /^\\s*([0-9A-Za-z_$]*)\\s+of\\s+([\\S\\s]*)/;\n/** Pattern for the tracking expression in a for loop block. */\nconst FOR_LOOP_TRACK_PATTERN = /^track\\s+([\\S\\s]*)/;\n/** Pattern for the `as` expression in a conditional block. */\nconst CONDITIONAL_ALIAS_PATTERN = /^(as\\s)+(.*)/;\n/** Pattern used to identify an `else if` block. */\nconst ELSE_IF_PATTERN = /^else[^\\S\\r\\n]+if/;\n/** Pattern used to identify a `let` parameter. */\nconst FOR_LOOP_LET_PATTERN = /^let\\s+([\\S\\s]*)/;\n/**\n * Pattern to group a string into leading whitespace, non whitespace, and trailing whitespace.\n * Useful for getting the variable name span when a span can contain leading and trailing space.\n */\nconst CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN = /(\\s*)(\\S+)(\\s*)/;\n/** Names of variables that are allowed to be used in the `let` expression of a `for` loop. */\nconst ALLOWED_FOR_LOOP_LET_VARIABLES = new Set([\n '$index',\n '$first',\n '$last',\n '$even',\n '$odd',\n '$count',\n]);\n/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to a `for` block.\n */\nfunction isConnectedForLoopBlock(name) {\n return name === 'empty';\n}\n/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to an `if` block.\n */\nfunction isConnectedIfLoopBlock(name) {\n return name === 'else' || ELSE_IF_PATTERN.test(name);\n}\n/** Creates an `if` loop block from an HTML AST node. */\nfunction createIfBlock(ast, connectedBlocks, visitor, bindingParser) {\n const errors = validateIfConnectedBlocks(connectedBlocks);\n const branches = [];\n const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);\n if (mainBlockParams !== null) {\n branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));\n }\n for (const block of connectedBlocks) {\n if (ELSE_IF_PATTERN.test(block.name)) {\n const params = parseConditionalBlockParameters(block, errors, bindingParser);\n if (params !== null) {\n const children = visitAll(visitor, block.children, block.children);\n branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));\n }\n }\n else if (block.name === 'else') {\n const children = visitAll(visitor, block.children, block.children);\n branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));\n }\n }\n // The outer IfBlock should have a span that encapsulates all branches.\n const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;\n const ifBlockEndSourceSpan = branches.length > 0 ? branches[branches.length - 1].endSourceSpan : ast.endSourceSpan;\n let wholeSourceSpan = ast.sourceSpan;\n const lastBranch = branches[branches.length - 1];\n if (lastBranch !== undefined) {\n wholeSourceSpan = new ParseSourceSpan(ifBlockStartSourceSpan.start, lastBranch.sourceSpan.end);\n }\n return {\n node: new IfBlock(branches, wholeSourceSpan, ast.startSourceSpan, ifBlockEndSourceSpan, ast.nameSpan),\n errors,\n };\n}\n/** Creates a `for` loop block from an HTML AST node. */\nfunction createForLoop(ast, connectedBlocks, visitor, bindingParser) {\n const errors = [];\n const params = parseForLoopParameters(ast, errors, bindingParser);\n let node = null;\n let empty = null;\n for (const block of connectedBlocks) {\n if (block.name === 'empty') {\n if (empty !== null) {\n errors.push(new ParseError(block.sourceSpan, '@for loop can only have one @empty block'));\n }\n else if (block.parameters.length > 0) {\n errors.push(new ParseError(block.sourceSpan, '@empty block cannot have parameters'));\n }\n else {\n empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);\n }\n }\n else {\n errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block \"${block.name}\"`));\n }\n }\n if (params !== null) {\n if (params.trackBy === null) {\n // TODO: We should not fail here, and instead try to produce some AST for the language\n // service.\n errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a \"track\" expression'));\n }\n else {\n // The `for` block has a main span that includes the `empty` branch. For only the span of the\n // main `for` body, use `mainSourceSpan`.\n const endSpan = empty?.endSourceSpan ?? ast.endSourceSpan;\n const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, endSpan?.end ?? ast.sourceSpan.end);\n node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);\n }\n }\n return { node, errors };\n}\n/** Creates a switch block from an HTML AST node. */\nfunction createSwitchBlock(ast, visitor, bindingParser) {\n const errors = validateSwitchBlock(ast);\n const primaryExpression = ast.parameters.length > 0\n ? parseBlockParameterToBinding(ast.parameters[0], bindingParser)\n : bindingParser.parseBinding('', false, ast.sourceSpan, 0);\n const cases = [];\n const unknownBlocks = [];\n let defaultCase = null;\n // Here we assume that all the blocks are valid given that we validated them above.\n for (const node of ast.children) {\n if (!(node instanceof Block)) {\n continue;\n }\n if ((node.name !== 'case' || node.parameters.length === 0) && node.name !== 'default') {\n unknownBlocks.push(new UnknownBlock(node.name, node.sourceSpan, node.nameSpan));\n continue;\n }\n const expression = node.name === 'case' ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;\n const ast = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);\n if (expression === null) {\n defaultCase = ast;\n }\n else {\n cases.push(ast);\n }\n }\n // Ensure that the default case is last in the array.\n if (defaultCase !== null) {\n cases.push(defaultCase);\n }\n return {\n node: new SwitchBlock(primaryExpression, cases, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan),\n errors,\n };\n}\n/** Parses the parameters of a `for` loop block. */\nfunction parseForLoopParameters(block, errors, bindingParser) {\n if (block.parameters.length === 0) {\n errors.push(new ParseError(block.startSourceSpan, '@for loop does not have an expression'));\n return null;\n }\n const [expressionParam, ...secondaryParams] = block.parameters;\n const match = stripOptionalParentheses(expressionParam, errors)?.match(FOR_LOOP_EXPRESSION_PATTERN);\n if (!match || match[2].trim().length === 0) {\n errors.push(new ParseError(expressionParam.sourceSpan, 'Cannot parse expression. @for loop expression must match the pattern \"<identifier> of <expression>\"'));\n return null;\n }\n const [, itemName, rawExpression] = match;\n if (ALLOWED_FOR_LOOP_LET_VARIABLES.has(itemName)) {\n errors.push(new ParseError(expressionParam.sourceSpan, `@for loop item name cannot be one of ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(', ')}.`));\n }\n // `expressionParam.expression` contains the variable declaration and the expression of the\n // for...of statement, i.e. 'user of users' The variable of a ForOfStatement is _only_ the \"const\n // user\" part and does not include \"of x\".\n const variableName = expressionParam.expression.split(' ')[0];\n const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));\n const result = {\n itemName: new Variable(itemName, '$implicit', variableSpan, variableSpan),\n trackBy: null,\n expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),\n context: Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES, (variableName) => {\n // Give ambiently-available context variables empty spans at the end of\n // the start of the `for` block, since they are not explicitly defined.\n const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);\n return new Variable(variableName, variableName, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);\n }),\n };\n for (const param of secondaryParams) {\n const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);\n if (letMatch !== null) {\n const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);\n parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, itemName, result.context, errors);\n continue;\n }\n const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);\n if (trackMatch !== null) {\n if (result.trackBy !== null) {\n errors.push(new ParseError(param.sourceSpan, '@for loop can only have one \"track\" expression'));\n }\n else {\n const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);\n if (expression.ast instanceof EmptyExpr$1) {\n errors.push(new ParseError(block.startSourceSpan, '@for loop must have a \"track\" expression'));\n }\n const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy('track'.length));\n result.trackBy = { expression, keywordSpan };\n }\n continue;\n }\n errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater \"${param.expression}\"`));\n }\n return result;\n}\n/** Parses the `let` parameter of a `for` loop block. */\nfunction parseLetParameter(sourceSpan, expression, span, loopItemName, context, errors) {\n const parts = expression.split(',');\n let startSpan = span.start;\n for (const part of parts) {\n const expressionParts = part.split('=');\n const name = expressionParts.length === 2 ? expressionParts[0].trim() : '';\n const variableName = expressionParts.length === 2 ? expressionParts[1].trim() : '';\n if (name.length === 0 || variableName.length === 0) {\n errors.push(new ParseError(sourceSpan, `Invalid @for loop \"let\" parameter. Parameter should match the pattern \"<name> = <variable name>\"`));\n }\n else if (!ALLOWED_FOR_LOOP_LET_VARIABLES.has(variableName)) {\n errors.push(new ParseError(sourceSpan, `Unknown \"let\" parameter variable \"${variableName}\". The allowed variables are: ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(', ')}`));\n }\n else if (name === loopItemName) {\n errors.push(new ParseError(sourceSpan, `Invalid @for loop \"let\" parameter. Variable cannot be called \"${loopItemName}\"`));\n }\n else if (context.some((v) => v.name === name)) {\n errors.push(new ParseError(sourceSpan, `Duplicate \"let\" parameter variable \"${variableName}\"`));\n }\n else {\n const [, keyLeadingWhitespace, keyName] = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN) ?? [];\n const keySpan = keyLeadingWhitespace !== undefined && expressionParts.length === 2\n ? new ParseSourceSpan(\n /* strip leading spaces */\n startSpan.moveBy(keyLeadingWhitespace.length), \n /* advance to end of the variable name */\n startSpan.moveBy(keyLeadingWhitespace.length + keyName.length))\n : span;\n let valueSpan = undefined;\n if (expressionParts.length === 2) {\n const [, valueLeadingWhitespace, implicit] = expressionParts[1].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN) ?? [];\n valueSpan =\n valueLeadingWhitespace !== undefined\n ? new ParseSourceSpan(startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length), startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length + implicit.length))\n : undefined;\n }\n const sourceSpan = new ParseSourceSpan(keySpan.start, valueSpan?.end ?? keySpan.end);\n context.push(new Variable(name, variableName, sourceSpan, keySpan, valueSpan));\n }\n startSpan = startSpan.moveBy(part.length + 1 /* add 1 to move past the comma */);\n }\n}\n/**\n * Checks that the shape of the blocks connected to an\n * `@if` block is correct. Returns an array of errors.\n */\nfunction validateIfConnectedBlocks(connectedBlocks) {\n const errors = [];\n let hasElse = false;\n for (let i = 0; i < connectedBlocks.length; i++) {\n const block = connectedBlocks[i];\n if (block.name === 'else') {\n if (hasElse) {\n errors.push(new ParseError(block.startSourceSpan, 'Conditional can only have one @else block'));\n }\n else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {\n errors.push(new ParseError(block.startSourceSpan, '@else block must be last inside the conditional'));\n }\n else if (block.parameters.length > 0) {\n errors.push(new ParseError(block.startSourceSpan, '@else block cannot have parameters'));\n }\n hasElse = true;\n }\n else if (!ELSE_IF_PATTERN.test(block.name)) {\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));\n }\n }\n return errors;\n}\n/** Checks that the shape of a `switch` block is valid. Returns an array of errors. */\nfunction validateSwitchBlock(ast) {\n const errors = [];\n let hasDefault = false;\n if (ast.parameters.length !== 1) {\n errors.push(new ParseError(ast.startSourceSpan, '@switch block must have exactly one parameter'));\n return errors;\n }\n for (const node of ast.children) {\n // Skip over comments and empty text nodes inside the switch block.\n // Empty text nodes can be used for formatting while comments don't affect the runtime.\n if (node instanceof Comment ||\n (node instanceof Text && node.value.trim().length === 0)) {\n continue;\n }\n if (!(node instanceof Block) || (node.name !== 'case' && node.name !== 'default')) {\n errors.push(new ParseError(node.sourceSpan, '@switch block can only contain @case and @default blocks'));\n continue;\n }\n if (node.name === 'default') {\n if (hasDefault) {\n errors.push(new ParseError(node.startSourceSpan, '@switch block can only have one @default block'));\n }\n else if (node.parameters.length > 0) {\n errors.push(new ParseError(node.startSourceSpan, '@default block cannot have parameters'));\n }\n hasDefault = true;\n }\n else if (node.name === 'case' && node.parameters.length !== 1) {\n errors.push(new ParseError(node.startSourceSpan, '@case block must have exactly one parameter'));\n }\n }\n return errors;\n}\n/**\n * Parses a block parameter into a binding AST.\n * @param ast Block parameter that should be parsed.\n * @param bindingParser Parser that the expression should be parsed with.\n * @param part Specific part of the expression that should be parsed.\n */\nfunction parseBlockParameterToBinding(ast, bindingParser, part) {\n let start;\n let end;\n if (typeof part === 'string') {\n // Note: `lastIndexOf` here should be enough to know the start index of the expression,\n // because we know that it'll be at the end of the param. Ideally we could use the `d`\n // flag when matching via regex and get the index from `match.indices`, but it's unclear\n // if we can use it yet since it's a relatively new feature. See:\n // https://github.com/tc39/proposal-regexp-match-indices\n start = Math.max(0, ast.expression.lastIndexOf(part));\n end = start + part.length;\n }\n else {\n start = 0;\n end = ast.expression.length;\n }\n return bindingParser.parseBinding(ast.expression.slice(start, end), false, ast.sourceSpan, ast.sourceSpan.start.offset + start);\n}\n/** Parses the parameter of a conditional block (`if` or `else if`). */\nfunction parseConditionalBlockParameters(block, errors, bindingParser) {\n if (block.parameters.length === 0) {\n errors.push(new ParseError(block.startSourceSpan, 'Conditional block does not have an expression'));\n return null;\n }\n const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);\n let expressionAlias = null;\n // Start from 1 since we processed the first parameter already.\n for (let i = 1; i < block.parameters.length; i++) {\n const param = block.parameters[i];\n const aliasMatch = param.expression.match(CONDITIONAL_ALIAS_PATTERN);\n // For now conditionals can only have an `as` parameter.\n // We may want to rework this later if we add more.\n if (aliasMatch === null) {\n errors.push(new ParseError(param.sourceSpan, `Unrecognized conditional paramater \"${param.expression}\"`));\n }\n else if (block.name !== 'if') {\n errors.push(new ParseError(param.sourceSpan, '\"as\" expression is only allowed on the primary @if block'));\n }\n else if (expressionAlias !== null) {\n errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one \"as\" expression'));\n }\n else {\n const name = aliasMatch[2].trim();\n const variableStart = param.sourceSpan.start.moveBy(aliasMatch[1].length);\n const variableSpan = new ParseSourceSpan(variableStart, variableStart.moveBy(name.length));\n expressionAlias = new Variable(name, name, variableSpan, variableSpan);\n }\n }\n return { expression, expressionAlias };\n}\n/** Strips optional parentheses around from a control from expression parameter. */\nfunction stripOptionalParentheses(param, errors) {\n const expression = param.expression;\n const spaceRegex = /^\\s$/;\n let openParens = 0;\n let start = 0;\n let end = expression.length - 1;\n for (let i = 0; i < expression.length; i++) {\n const char = expression[i];\n if (char === '(') {\n start = i + 1;\n openParens++;\n }\n else if (spaceRegex.test(char)) {\n continue;\n }\n else {\n break;\n }\n }\n if (openParens === 0) {\n return expression;\n }\n for (let i = expression.length - 1; i > -1; i--) {\n const char = expression[i];\n if (char === ')') {\n end = i;\n openParens--;\n if (openParens === 0) {\n break;\n }\n }\n else if (spaceRegex.test(char)) {\n continue;\n }\n else {\n break;\n }\n }\n if (openParens !== 0) {\n errors.push(new ParseError(param.sourceSpan, 'Unclosed parentheses in expression'));\n return null;\n }\n return expression.slice(start, end);\n}\n\n/** Pattern for a timing value in a trigger. */\nconst TIME_PATTERN = /^\\d+\\.?\\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], // Object literals\n [$LBRACKET, $RBRACKET], // Array literals\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, triggers, errors) {\n const whenIndex = expression.indexOf('when');\n const whenSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(whenIndex), sourceSpan.start.moveBy(whenIndex + 'when'.length));\n const prefetchSpan = getPrefetchSpan(expression, sourceSpan);\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 }\n else {\n const start = getTriggerParametersStart(expression, whenIndex + 1);\n const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);\n trackTrigger('when', triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan, prefetchSpan, whenSourceSpan));\n }\n}\n/** Parses an `on` trigger */\nfunction parseOnTrigger({ expression, sourceSpan }, triggers, errors, placeholder) {\n const onIndex = expression.indexOf('on');\n const onSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(onIndex), sourceSpan.start.moveBy(onIndex + 'on'.length));\n const prefetchSpan = getPrefetchSpan(expression, sourceSpan);\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 }\n else {\n const start = getTriggerParametersStart(expression, onIndex + 1);\n const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, placeholder, prefetchSpan, onSourceSpan);\n parser.parse();\n }\n}\nfunction getPrefetchSpan(expression, sourceSpan) {\n if (!expression.startsWith('prefetch')) {\n return null;\n }\n return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy('prefetch'.length));\n}\nclass OnTriggerParser {\n constructor(expression, start, span, triggers, errors, placeholder, prefetchSpan, onSourceSpan) {\n this.expression = expression;\n this.start = start;\n this.span = span;\n this.triggers = triggers;\n this.errors = errors;\n this.placeholder = placeholder;\n this.prefetchSpan = prefetchSpan;\n this.onSourceSpan = onSourceSpan;\n this.index = 0;\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 }\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 triggerNameStartSpan = this.span.start.moveBy(this.start + identifier.index - this.tokens[0].index);\n const nameSpan = new ParseSourceSpan(triggerNameStartSpan, triggerNameStartSpan.moveBy(identifier.strValue.length));\n const endSpan = triggerNameStartSpan.moveBy(this.token().end - identifier.index);\n // Put the prefetch and on spans with the first trigger\n // This should maybe be refactored to have something like an outer OnGroup AST\n // Since triggers can be grouped with commas \"on hover(x), interaction(y)\"\n const isFirstTrigger = identifier.index === 0;\n const onSourceSpan = isFirstTrigger ? this.onSourceSpan : null;\n const prefetchSourceSpan = isFirstTrigger ? this.prefetchSpan : null;\n const sourceSpan = new ParseSourceSpan(isFirstTrigger ? this.span.start : triggerNameStartSpan, endSpan);\n try {\n switch (identifier.toString()) {\n case OnTriggerType.IDLE:\n this.trackTrigger('idle', createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSourceSpan, onSourceSpan));\n break;\n case OnTriggerType.TIMER:\n this.trackTrigger('timer', createTimerTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));\n break;\n case OnTriggerType.INTERACTION:\n this.trackTrigger('interaction', createInteractionTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\n break;\n case OnTriggerType.IMMEDIATE:\n this.trackTrigger('immediate', createImmediateTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));\n break;\n case OnTriggerType.HOVER:\n this.trackTrigger('hover', createHoverTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\n break;\n case OnTriggerType.VIEWPORT:\n this.trackTrigger('viewport', createViewportTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));\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 trackTrigger(name, trigger) {\n trackTrigger(name, this.triggers, this.errors, trigger);\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}\n/** Adds a trigger to a map of triggers. */\nfunction trackTrigger(name, allTriggers, errors, trigger) {\n if (allTriggers[name]) {\n errors.push(new ParseError(trigger.sourceSpan, `Duplicate \"${name}\" trigger is not allowed`));\n }\n else {\n allTriggers[name] = trigger;\n }\n}\nfunction createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IDLE}\" trigger cannot have parameters`);\n }\n return new IdleDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\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, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createImmediateTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {\n if (parameters.length > 0) {\n throw new Error(`\"${OnTriggerType.IMMEDIATE}\" trigger cannot have parameters`);\n }\n return new ImmediateDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createHoverTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.HOVER, parameters, placeholder);\n return new HoverDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createInteractionTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.INTERACTION, parameters, placeholder);\n return new InteractionDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction createViewportTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {\n validateReferenceBasedTrigger(OnTriggerType.VIEWPORT, parameters, placeholder);\n return new ViewportDeferredTrigger(parameters[0] ?? null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);\n}\nfunction validateReferenceBasedTrigger(type, parameters, placeholder) {\n if (parameters.length > 1) {\n throw new Error(`\"${type}\" trigger can only have zero or one parameters`);\n }\n if (parameters.length === 0) {\n if (placeholder === null) {\n throw new Error(`\"${type}\" trigger with no parameters can only be placed on an @defer that has a @placeholder block`);\n }\n if (placeholder.children.length !== 1 || !(placeholder.children[0] instanceof Element$1)) {\n throw new Error(`\"${type}\" trigger with no parameters can only be placed on an @defer that has a ` +\n `@placeholder block with exactly one root element node`);\n }\n }\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 parseFloat(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/**\n * Predicate function that determines if a block with\n * a specific name cam be connected to a `defer` block.\n */\nfunction isConnectedDeferLoopBlock(name) {\n return name === 'placeholder' || name === 'loading' || name === 'error';\n}\n/** Creates a deferred block from an HTML AST node. */\nfunction createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {\n const errors = [];\n const { placeholder, loading, error } = parseConnectedBlocks(connectedBlocks, errors, visitor);\n const { triggers, prefetchTriggers } = parsePrimaryTriggers(ast.parameters, bindingParser, errors, placeholder);\n // The `defer` block has a main span encompassing all of the connected branches as well.\n let lastEndSourceSpan = ast.endSourceSpan;\n let endOfLastSourceSpan = ast.sourceSpan.end;\n if (connectedBlocks.length > 0) {\n const lastConnectedBlock = connectedBlocks[connectedBlocks.length - 1];\n lastEndSourceSpan = lastConnectedBlock.endSourceSpan;\n endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;\n }\n const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);\n const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);\n return { node, errors };\n}\nfunction parseConnectedBlocks(connectedBlocks, errors, visitor) {\n let placeholder = null;\n let loading = null;\n let error = null;\n for (const block of connectedBlocks) {\n try {\n if (!isConnectedDeferLoopBlock(block.name)) {\n errors.push(new ParseError(block.startSourceSpan, `Unrecognized block \"@${block.name}\"`));\n break;\n }\n switch (block.name) {\n case 'placeholder':\n if (placeholder !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @placeholder block`));\n }\n else {\n placeholder = parsePlaceholderBlock(block, visitor);\n }\n break;\n case 'loading':\n if (loading !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @loading block`));\n }\n else {\n loading = parseLoadingBlock(block, visitor);\n }\n break;\n case 'error':\n if (error !== null) {\n errors.push(new ParseError(block.startSourceSpan, `@defer block can only have one @error block`));\n }\n else {\n error = parseErrorBlock(block, visitor);\n }\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 if (minimumTime != null) {\n throw new Error(`@placeholder block can only have one \"minimum\" parameter`);\n }\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 @placeholder block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\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 if (afterTime != null) {\n throw new Error(`@loading block can only have one \"after\" parameter`);\n }\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 if (minimumTime != null) {\n throw new Error(`@loading block can only have one \"minimum\" parameter`);\n }\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 @loading block: \"${param.expression}\"`);\n }\n }\n return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\n}\nfunction parseErrorBlock(ast, visitor) {\n if (ast.parameters.length > 0) {\n throw new Error(`@error block cannot have parameters`);\n }\n return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);\n}\nfunction parsePrimaryTriggers(params, bindingParser, errors, placeholder) {\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 parseWhenTrigger(param, bindingParser, triggers, errors);\n }\n else if (ON_PARAMETER_PATTERN.test(param.expression)) {\n parseOnTrigger(param, triggers, errors, placeholder);\n }\n else if (PREFETCH_WHEN_PATTERN.test(param.expression)) {\n parseWhenTrigger(param, bindingParser, prefetchTriggers, errors);\n }\n else if (PREFETCH_ON_PATTERN.test(param.expression)) {\n parseOnTrigger(param, prefetchTriggers, errors, placeholder);\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, 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 * Keeps track of the nodes that have been processed already when previous nodes were visited.\n * These are typically blocks connected to other blocks or text nodes between connected blocks.\n */\n this.processedNodes = new Set();\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 blocks 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, element.children);\n }\n let parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n const selector = preparsedElement.selectAttr;\n const attrs = element.attrs.map((attr) => this.visitAttribute(attr));\n parsedElement = new Content(selector, attrs, children, 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, [\n /* no template attributes */\n ], 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], [\n /* no references */\n ], 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.processedNodes.has(text)\n ? null\n : 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 visitLetDeclaration(decl, context) {\n const value = this.bindingParser.parseBinding(decl.value, false, decl.valueSpan, decl.valueSpan.start.offset);\n if (value.errors.length === 0 && value.ast instanceof EmptyExpr$1) {\n this.reportError('@let declaration value cannot be empty', decl.valueSpan);\n }\n return new LetDeclaration$1(decl.name, value, decl.sourceSpan, decl.nameSpan, decl.valueSpan);\n }\n visitBlockParameter() {\n return null;\n }\n visitBlock(block, context) {\n const index = Array.isArray(context) ? context.indexOf(block) : -1;\n if (index === -1) {\n throw new Error('Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context');\n }\n // Connected blocks may have been processed as a part of the previous block.\n if (this.processedNodes.has(block)) {\n return null;\n }\n let result = null;\n switch (block.name) {\n case 'defer':\n result = createDeferredBlock(block, this.findConnectedBlocks(index, context, isConnectedDeferLoopBlock), this, this.bindingParser);\n break;\n case 'switch':\n result = createSwitchBlock(block, this, this.bindingParser);\n break;\n case 'for':\n result = createForLoop(block, this.findConnectedBlocks(index, context, isConnectedForLoopBlock), this, this.bindingParser);\n break;\n case 'if':\n result = createIfBlock(block, this.findConnectedBlocks(index, context, isConnectedIfLoopBlock), this, this.bindingParser);\n break;\n default:\n let errorMessage;\n if (isConnectedDeferLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @defer block.`;\n this.processedNodes.add(block);\n }\n else if (isConnectedForLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @for block.`;\n this.processedNodes.add(block);\n }\n else if (isConnectedIfLoopBlock(block.name)) {\n errorMessage = `@${block.name} block can only be used after an @if or @else if block.`;\n this.processedNodes.add(block);\n }\n else {\n errorMessage = `Unrecognized block @${block.name}.`;\n }\n result = {\n node: new UnknownBlock(block.name, block.sourceSpan, block.nameSpan),\n errors: [new ParseError(block.sourceSpan, errorMessage)],\n };\n break;\n }\n this.errors.push(...result.errors);\n return result.node;\n }\n findConnectedBlocks(primaryBlockIndex, siblings, predicate) {\n const relatedBlocks = [];\n for (let i = primaryBlockIndex + 1; i < siblings.length; i++) {\n const node = siblings[i];\n // Skip over comments.\n if (node instanceof Comment) {\n continue;\n }\n // Ignore empty text nodes between blocks.\n if (node instanceof Text && node.value.trim().length === 0) {\n // Add the text node to the processed nodes since we don't want\n // it to be generated between the connected nodes.\n this.processedNodes.add(node);\n continue;\n }\n // Stop searching as soon as we hit a non-block node or a block that is unrelated.\n if (!(node instanceof Block) || !predicate(node.name)) {\n break;\n }\n relatedBlocks.push(node);\n this.processedNodes.add(node);\n }\n return relatedBlocks;\n }\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, \n /* skipValidation */ true, \n /* 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\n ? attribute.valueSpan.start.offset\n : 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, 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, \n /* 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, true, 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) &&\n 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, true, 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, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n }\n else {\n const events = [];\n this.bindingParser.parseEvent(identifier, value, \n /* 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, \n /* 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 */ [], \n /* outputs */ [], children, \n /* 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 visitBlock(block, context) {\n const nodes = [\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 if (block.endSourceSpan !== null) {\n nodes.push(new Text$3(block.endSourceSpan.toString(), block.endSourceSpan));\n }\n return nodes;\n }\n visitBlockParameter(parameter, context) {\n return null;\n }\n visitLetDeclaration(decl, context) {\n return new Text$3(`@let ${decl.name} = ${decl.value};`, decl.sourceSpan);\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 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\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\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, allowInvalidAssignmentEvents, } = options;\n const bindingParser = makeBindingParser(interpolationConfig, allowInvalidAssignmentEvents);\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.enableBlockSyntax ?? true,\n tokenizeLet: options.enableLetSyntax ?? true,\n });\n if (!options.alwaysAttemptHtmlToR3AstConversion &&\n 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 // We need to use the same `retainEmptyTokens` value for both parses to avoid\n // causing a mismatch when reusing source spans, even if the\n // `preserveSignificantWhitespace` behavior is different between the two\n // parses.\n const retainEmptyTokens = !(options.preserveSignificantWhitespace ?? true);\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, \n /* keepI18nAttrs */ !preserveWhitespaces, enableI18nLegacyMessageIdFormat, \n /* containerBlocks */ undefined, options.preserveSignificantWhitespace, retainEmptyTokens);\n const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);\n if (!options.alwaysAttemptHtmlToR3AstConversion &&\n 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 // Always preserve significant whitespace here because this is used to generate the `goog.getMsg`\n // and `$localize` calls which should retain significant whitespace in order to render the\n // correct output. We let this diverge from the message IDs generated earlier which might not\n // have preserved significant whitespace.\n //\n // This should use `visitAllWithSiblings` to set `WhitespaceVisitor` context correctly, however\n // there is an existing bug where significant whitespace is not properly retained in the JS\n // output of leading/trailing whitespace for ICU messages due to the existing lack of context\\\n // in `WhitespaceVisitor`. Using `visitAllWithSiblings` here would fix that bug and retain the\n // whitespace, however it would also change the runtime representation which we don't want to do\n // right now.\n rootNodes = visitAll(new WhitespaceVisitor(\n /* preserveSignificantWhitespace */ true, \n /* originalNodeMap */ undefined, \n /* requireContext */ false), 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, \n /* keepI18nAttrs */ false, \n /* enableI18nLegacyMessageIdFormat */ undefined, \n /* containerBlocks */ undefined, \n /* preserveSignificantWhitespace */ true, retainEmptyTokens), rootNodes);\n }\n }\n const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, { collectCommentNodes: !!options.collectCommentNodes });\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, allowInvalidAssignmentEvents = false) {\n return new BindingParser(new Parser(new Lexer()), interpolationConfig, elementRegistry, [], allowInvalidAssignmentEvents);\n}\n\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 // Note: host directives feature needs to be inserted before the\n // inheritance feature to ensure the correct execution order.\n if (meta.hostDirectives?.length) {\n features.push(importExpr(Identifiers.HostDirectivesFeature)\n .callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));\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 (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)\n .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 let allDeferrableDepsFn = null;\n if (meta.defer.mode === 1 /* DeferBlockDepsEmitMode.PerComponent */ &&\n meta.defer.dependenciesFn !== null) {\n const fnName = `${templateTypeName}_DeferFn`;\n constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, undefined, StmtModifier.Final));\n allDeferrableDepsFn = variable(fnName);\n }\n // First the template is ingested into IR:\n const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn);\n // Then the IR is transformed to prepare it for cod egeneration.\n transform(tpl, CompilationJobKind.Tmpl);\n // Finally we emit the template function:\n const templateFn = emitTemplateFn(tpl, constantPool);\n if (tpl.contentSelectors !== null) {\n definitionMap.set('ngContentSelectors', tpl.contentSelectors);\n }\n definitionMap.set('decls', literal(tpl.root.decls));\n definitionMap.set('vars', literal(tpl.root.vars));\n if (tpl.consts.length > 0) {\n if (tpl.constsInitializers.length > 0) {\n definitionMap.set('consts', arrowFn([], [...tpl.constsInitializers, new ReturnStatement(literalArr(tpl.consts))]));\n }\n else {\n definitionMap.set('consts', literalArr(tpl.consts));\n }\n }\n definitionMap.set('template', templateFn);\n if (meta.declarationListEmitMode !== 3 /* DeclarationListEmitMode.RuntimeResolved */ &&\n meta.declarations.length > 0) {\n definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map((decl) => decl.type)), meta.declarationListEmitMode));\n }\n else if (meta.declarationListEmitMode === 3 /* DeclarationListEmitMode.RuntimeResolved */) {\n const args = [meta.type.value];\n if (meta.rawImports) {\n args.push(meta.rawImports);\n }\n definitionMap.set('dependencies', importExpr(Identifiers.getComponentDepsFactory).callFn(args));\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 // Setting change detection flag\n if (meta.changeDetection !== null) {\n if (typeof meta.changeDetection === 'number' &&\n meta.changeDetection !== ChangeDetectionStrategy.Default) {\n // changeDetection is resolved during analysis. Only set it if not the default.\n definitionMap.set('changeDetection', literal(meta.changeDetection));\n }\n else if (typeof meta.changeDetection === 'object') {\n // changeDetection is not resolved during analysis (e.g., we are in local compilation mode).\n // So place it as is.\n definitionMap.set('changeDetection', meta.changeDetection);\n }\n }\n const expression = importExpr(Identifiers.defineComponent)\n .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 arrowFn([], 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 arrowFn([], resolvedList);\n case 3 /* DeclarationListEmitMode.RuntimeResolved */:\n throw new Error(`Unsupported with an array of pre-resolved dependencies`);\n }\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\n ? 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 const values = [\n { key: 'alias', value: literal(value.bindingPropertyName), quoted: true },\n { key: 'required', value: literal(value.required), quoted: true },\n ];\n // TODO(legacy-partial-output-inputs): Consider always emitting this information,\n // or leaving it as is.\n if (value.isSignal) {\n values.push({ key: 'isSignal', value: literal(value.isSignal), quoted: true });\n }\n return { key, value: literalMap(values), quoted: true };\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// 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 // The parser for host bindings treats class and style attributes specially -- they are\n // extracted into these separate fields. This is not the case for templates, so the compiler can\n // actually already handle these special attributes internally. Therefore, we just drop them\n // into the attributes map.\n if (hostBindingsMetadata.specialAttributes.styleAttr) {\n hostBindingsMetadata.attributes['style'] = literal(hostBindingsMetadata.specialAttributes.styleAttr);\n }\n if (hostBindingsMetadata.specialAttributes.classAttr) {\n hostBindingsMetadata.attributes['class'] = literal(hostBindingsMetadata.specialAttributes.classAttr);\n }\n const hostJob = ingestHostBinding({\n componentName: name,\n componentSelector: selector,\n properties: bindings,\n events: eventBindings,\n attributes: hostBindingsMetadata.attributes,\n }, bindingParser, constantPool);\n transform(hostJob, CompilationJobKind.Host);\n definitionMap.set('hostAttrs', hostJob.root.attributes);\n const varCount = hostJob.root.vars;\n if (varCount !== null && varCount > 0) {\n definitionMap.set('hostVars', literal(varCount));\n }\n return emitHostBindingFunction(hostJob);\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}\n/**\n * Encapsulates a CSS stylesheet with emulated view encapsulation.\n * This allows a stylesheet to be used with an Angular component that\n * is using the `ViewEncapsulation.Emulated` mode.\n *\n * @param style The content of a CSS stylesheet.\n * @returns The encapsulated content for the style.\n */\nfunction encapsulateStyle(style) {\n const shadowCss = new ShadowCss();\n return shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR);\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 {\n key: 'inputs',\n value: stringMapAsLiteralExpression(hostMeta.inputs || {}),\n quoted: false,\n },\n {\n key: 'outputs',\n value: stringMapAsLiteralExpression(hostMeta.outputs || {}),\n quoted: false,\n },\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 * Compiles the dependency resolver function for a defer block.\n */\nfunction compileDeferResolverFunction(meta) {\n const depExpressions = [];\n if (meta.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n for (const dep of meta.dependencies) {\n if (dep.isDeferrable) {\n // Callback function, e.g. `m () => m.MyCmp;`.\n const innerFn = arrowFn(\n // Default imports are always accessed through the `default` property.\n [new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(dep.isDefaultImport ? 'default' : dep.symbolName));\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = new DynamicImportExpr(dep.importPath).prop('then').callFn([innerFn]);\n depExpressions.push(importExpr);\n }\n else {\n // Non-deferrable symbol, just use a reference to the type. Note that it's important to\n // go through `typeReference`, rather than `symbolName` in order to preserve the\n // original reference within the source file.\n depExpressions.push(dep.typeReference);\n }\n }\n }\n else {\n for (const { symbolName, importPath, isDefaultImport } of meta.dependencies) {\n // Callback function, e.g. `m () => m.MyCmp;`.\n const innerFn = arrowFn([new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(isDefaultImport ? 'default' : symbolName));\n // Dynamic import, e.g. `import('./a').then(...)`.\n const importExpr = new DynamicImportExpr(importPath).prop('then').callFn([innerFn]);\n depExpressions.push(importExpr);\n }\n }\n return arrowFn([], literalArr(depExpressions));\n}\n\n/**\n * Computes a difference between full list (first argument) and\n * list of items that should be excluded from the full list (second\n * argument).\n */\nfunction diff(fullList, itemsToExclude) {\n const exclude = new Set(itemsToExclude);\n return fullList.filter((item) => !exclude.has(item));\n}\n/**\n * Given a template string and a set of available directive selectors,\n * computes a list of matching selectors and splits them into 2 buckets:\n * (1) eagerly used in a template and (2) directives used only in defer\n * blocks. Similarly, returns 2 lists of pipes (eager and deferrable).\n *\n * Note: deferrable directives selectors and pipes names used in `@defer`\n * blocks are **candidates** and API caller should make sure that:\n *\n * * A Component where a given template is defined is standalone\n * * Underlying dependency classes are also standalone\n * * Dependency class symbols are not eagerly used in a TS file\n * where a host component (that owns the template) is located\n */\nfunction findMatchingDirectivesAndPipes(template, directiveSelectors) {\n const matcher = new SelectorMatcher();\n for (const selector of directiveSelectors) {\n // Create a fake directive instance to account for the logic inside\n // of the `R3TargetBinder` class (which invokes the `hasBindingPropertyName`\n // function internally).\n const fakeDirective = {\n selector,\n exportAs: null,\n inputs: {\n hasBindingPropertyName() {\n return false;\n },\n },\n outputs: {\n hasBindingPropertyName() {\n return false;\n },\n },\n };\n matcher.addSelectables(CssSelector.parse(selector), [fakeDirective]);\n }\n const parsedTemplate = parseTemplate(template, '' /* templateUrl */);\n const binder = new R3TargetBinder(matcher);\n const bound = binder.bind({ template: parsedTemplate.nodes });\n const eagerDirectiveSelectors = bound.getEagerlyUsedDirectives().map((dir) => dir.selector);\n const allMatchedDirectiveSelectors = bound.getUsedDirectives().map((dir) => dir.selector);\n const eagerPipes = bound.getEagerlyUsedPipes();\n return {\n directives: {\n regular: eagerDirectiveSelectors,\n deferCandidates: diff(allMatchedDirectiveSelectors, eagerDirectiveSelectors),\n },\n pipes: {\n regular: eagerPipes,\n deferCandidates: diff(bound.getUsedPipes(), eagerPipes),\n },\n };\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 scopedNodeEntities = extractScopedNodeEntities(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, scopedNodeEntities, 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, rootNode) {\n this.parentScope = parentScope;\n this.rootNode = rootNode;\n /**\n * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n */\n this.namedEntities = new Map();\n /**\n * Set of elements that belong to this scope.\n */\n this.elementsInScope = new Set();\n /**\n * Child `Scope`s for immediately nested `ScopedNode`s.\n */\n this.childScopes = new Map();\n this.isDeferred =\n parentScope !== null && parentScope.isDeferred ? true : rootNode instanceof DeferredBlock;\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 scoped node and populate the `Scope`.\n */\n ingest(nodeOrNodes) {\n if (nodeOrNodes instanceof Template) {\n // Variables on an <ng-template> are defined in the inner scope.\n nodeOrNodes.variables.forEach((node) => this.visitVariable(node));\n // Process the nodes of the template.\n nodeOrNodes.children.forEach((node) => node.visit(this));\n }\n else if (nodeOrNodes instanceof IfBlockBranch) {\n if (nodeOrNodes.expressionAlias !== null) {\n this.visitVariable(nodeOrNodes.expressionAlias);\n }\n nodeOrNodes.children.forEach((node) => node.visit(this));\n }\n else if (nodeOrNodes instanceof ForLoopBlock) {\n this.visitVariable(nodeOrNodes.item);\n nodeOrNodes.contextVariables.forEach((v) => this.visitVariable(v));\n nodeOrNodes.children.forEach((node) => node.visit(this));\n }\n else if (nodeOrNodes instanceof SwitchBlockCase ||\n nodeOrNodes instanceof ForLoopBlockEmpty ||\n nodeOrNodes instanceof DeferredBlock ||\n nodeOrNodes instanceof DeferredBlockError ||\n nodeOrNodes instanceof DeferredBlockPlaceholder ||\n nodeOrNodes instanceof DeferredBlockLoading ||\n nodeOrNodes instanceof Content) {\n nodeOrNodes.children.forEach((node) => node.visit(this));\n }\n else {\n // No overarching `Template` instance, so process the nodes directly.\n nodeOrNodes.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 this.elementsInScope.add(element);\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 this.ingestScopedNode(template);\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 this.ingestScopedNode(deferred);\n deferred.placeholder?.visit(this);\n deferred.loading?.visit(this);\n deferred.error?.visit(this);\n }\n visitDeferredBlockPlaceholder(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockError(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockLoading(block) {\n this.ingestScopedNode(block);\n }\n visitSwitchBlock(block) {\n block.cases.forEach((node) => node.visit(this));\n }\n visitSwitchBlockCase(block) {\n this.ingestScopedNode(block);\n }\n visitForLoopBlock(block) {\n this.ingestScopedNode(block);\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n this.ingestScopedNode(block);\n }\n visitIfBlock(block) {\n block.branches.forEach((node) => node.visit(this));\n }\n visitIfBlockBranch(block) {\n this.ingestScopedNode(block);\n }\n visitContent(content) {\n this.ingestScopedNode(content);\n }\n visitLetDeclaration(decl) {\n this.maybeDeclare(decl);\n }\n // Unused visitors.\n visitBoundAttribute(attr) { }\n visitBoundEvent(event) { }\n visitBoundText(text) { }\n visitText(text) { }\n visitTextAttribute(attr) { }\n visitIcu(icu) { }\n visitDeferredTrigger(trigger) { }\n visitUnknownBlock(block) { }\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 `ScopedNode`.\n *\n * This should always be defined.\n */\n getChildScope(node) {\n const res = this.childScopes.get(node);\n if (res === undefined) {\n throw new Error(`Assertion error: child scope for ${node} not found`);\n }\n return res;\n }\n ingestScopedNode(node) {\n const scope = new Scope(this, node);\n scope.ingest(node);\n this.childScopes.set(node, scope);\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);\n }\n visitTemplate(template) {\n this.visitElementOrTemplate(template);\n }\n visitElementOrTemplate(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 = createCssSelectorFromNode(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)) || 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 const wasInDeferBlock = this.isInDeferBlock;\n this.isInDeferBlock = true;\n deferred.children.forEach((child) => child.visit(this));\n this.isInDeferBlock = wasInDeferBlock;\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 visitSwitchBlock(block) {\n block.cases.forEach((node) => node.visit(this));\n }\n visitSwitchBlockCase(block) {\n block.children.forEach((node) => node.visit(this));\n }\n visitForLoopBlock(block) {\n block.item.visit(this);\n block.contextVariables.forEach((v) => v.visit(this));\n block.children.forEach((node) => node.visit(this));\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n block.children.forEach((node) => node.visit(this));\n }\n visitIfBlock(block) {\n block.branches.forEach((node) => node.visit(this));\n }\n visitIfBlockBranch(block) {\n block.expressionAlias?.visit(this);\n block.children.forEach((node) => node.visit(this));\n }\n visitContent(content) {\n content.children.forEach((child) => child.visit(this));\n }\n // Unused visitors.\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 visitUnknownBlock(block) { }\n visitLetDeclaration(decl) { }\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, rootNode, 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.rootNode = rootNode;\n this.level = level;\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 = [];\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(nodeOrNodes) {\n if (nodeOrNodes 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 nodeOrNodes.variables.forEach(this.visitNode);\n nodeOrNodes.children.forEach(this.visitNode);\n // Set the nesting level.\n this.nestingLevel.set(nodeOrNodes, this.level);\n }\n else if (nodeOrNodes instanceof IfBlockBranch) {\n if (nodeOrNodes.expressionAlias !== null) {\n this.visitNode(nodeOrNodes.expressionAlias);\n }\n nodeOrNodes.children.forEach(this.visitNode);\n this.nestingLevel.set(nodeOrNodes, this.level);\n }\n else if (nodeOrNodes instanceof ForLoopBlock) {\n this.visitNode(nodeOrNodes.item);\n nodeOrNodes.contextVariables.forEach((v) => this.visitNode(v));\n nodeOrNodes.trackBy.visit(this);\n nodeOrNodes.children.forEach(this.visitNode);\n this.nestingLevel.set(nodeOrNodes, this.level);\n }\n else if (nodeOrNodes instanceof DeferredBlock) {\n if (this.scope.rootNode !== nodeOrNodes) {\n throw new Error(`Assertion error: resolved incorrect scope for deferred block ${nodeOrNodes}`);\n }\n this.deferBlocks.push([nodeOrNodes, this.scope]);\n nodeOrNodes.children.forEach((node) => node.visit(this));\n this.nestingLevel.set(nodeOrNodes, this.level);\n }\n else if (nodeOrNodes instanceof SwitchBlockCase ||\n nodeOrNodes instanceof ForLoopBlockEmpty ||\n nodeOrNodes instanceof DeferredBlockError ||\n nodeOrNodes instanceof DeferredBlockPlaceholder ||\n nodeOrNodes instanceof DeferredBlockLoading ||\n nodeOrNodes instanceof Content) {\n nodeOrNodes.children.forEach((node) => node.visit(this));\n this.nestingLevel.set(nodeOrNodes, this.level);\n }\n else {\n // Visit each node from the top-level template.\n nodeOrNodes.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 element.references.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 template.references.forEach(this.visitNode);\n // Next, recurse into the template.\n this.ingestScopedNode(template);\n }\n visitVariable(variable) {\n // Register the `Variable` as a symbol in the current `Template`.\n if (this.rootNode !== null) {\n this.symbols.set(variable, this.rootNode);\n }\n }\n visitReference(reference) {\n // Register the `Reference` as a symbol in the current `Template`.\n if (this.rootNode !== null) {\n this.symbols.set(reference, this.rootNode);\n }\n }\n // Unused template visitors\n visitText(text) { }\n visitTextAttribute(attribute) { }\n visitUnknownBlock(block) { }\n visitDeferredTrigger() { }\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.ingestScopedNode(deferred);\n deferred.triggers.when?.value.visit(this);\n deferred.prefetchTriggers.when?.value.visit(this);\n deferred.placeholder && this.visitNode(deferred.placeholder);\n deferred.loading && this.visitNode(deferred.loading);\n deferred.error && this.visitNode(deferred.error);\n }\n visitDeferredBlockPlaceholder(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockError(block) {\n this.ingestScopedNode(block);\n }\n visitDeferredBlockLoading(block) {\n this.ingestScopedNode(block);\n }\n visitSwitchBlock(block) {\n block.expression.visit(this);\n block.cases.forEach(this.visitNode);\n }\n visitSwitchBlockCase(block) {\n block.expression?.visit(this);\n this.ingestScopedNode(block);\n }\n visitForLoopBlock(block) {\n block.expression.visit(this);\n this.ingestScopedNode(block);\n block.empty?.visit(this);\n }\n visitForLoopBlockEmpty(block) {\n this.ingestScopedNode(block);\n }\n visitIfBlock(block) {\n block.branches.forEach((node) => node.visit(this));\n }\n visitIfBlockBranch(block) {\n block.expression?.visit(this);\n this.ingestScopedNode(block);\n }\n visitContent(content) {\n this.ingestScopedNode(content);\n }\n visitBoundText(text) {\n text.value.visit(this);\n }\n visitLetDeclaration(decl) {\n decl.value.visit(this);\n if (this.rootNode !== null) {\n this.symbols.set(decl, this.rootNode);\n }\n }\n visitPipe(ast, context) {\n this.usedPipes.add(ast.name);\n if (!this.scope.isDeferred) {\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(ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }\n visitSafePropertyRead(ast, context) {\n this.maybeMap(ast, ast.name);\n return super.visitSafePropertyRead(ast, context);\n }\n visitPropertyWrite(ast, context) {\n this.maybeMap(ast, ast.name);\n return super.visitPropertyWrite(ast, context);\n }\n ingestScopedNode(node) {\n const childScope = this.scope.getChildScope(node);\n const binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);\n binder.ingest(node);\n }\n maybeMap(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 const target = this.scope.lookup(name);\n // It's not allowed to read template entities via `this`, however it previously worked by\n // accident (see #55115). Since `@let` declarations are new, we can fix it from the beginning,\n // whereas pre-existing template entities will be fixed in #55115.\n if (target instanceof LetDeclaration$1 && ast.receiver instanceof ThisReceiver) {\n return;\n }\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, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {\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.scopedNodeEntities = scopedNodeEntities;\n this.usedPipes = usedPipes;\n this.eagerPipes = eagerPipes;\n this.deferredBlocks = rawDeferred.map((current) => current[0]);\n this.deferredScopes = new Map(rawDeferred);\n }\n getEntitiesInScope(node) {\n return this.scopedNodeEntities.get(node) ?? 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 getDefinitionNodeOfSymbol(symbol) {\n return this.symbols.get(symbol) || null;\n }\n getNestingLevel(node) {\n return this.nestingLevel.get(node) || 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 this.deferredBlocks;\n }\n getDeferredTriggerTarget(block, trigger) {\n // Only triggers that refer to DOM nodes can be resolved.\n if (!(trigger instanceof InteractionDeferredTrigger) &&\n !(trigger instanceof ViewportDeferredTrigger) &&\n !(trigger instanceof HoverDeferredTrigger)) {\n return null;\n }\n const name = trigger.reference;\n if (name === null) {\n let trigger = null;\n if (block.placeholder !== null) {\n for (const child of block.placeholder.children) {\n // Skip over comment nodes. Currently by default the template parser doesn't capture\n // comments, but we have a safeguard here just in case since it can be enabled.\n if (child instanceof Comment$1) {\n continue;\n }\n // We can only infer the trigger if there's one root element node. Any other\n // nodes at the root make it so that we can't infer the trigger anymore.\n if (trigger !== null) {\n return null;\n }\n if (child instanceof Element$1) {\n trigger = child;\n }\n }\n }\n return trigger;\n }\n const outsideRef = this.findEntityInScope(block, name);\n // First try to resolve the target in the scope of the main deferred block. Note that we\n // skip triggers defined inside the main block itself, because they might not exist yet.\n if (outsideRef instanceof Reference && this.getDefinitionNodeOfSymbol(outsideRef) !== block) {\n const target = this.getReferenceTarget(outsideRef);\n if (target !== null) {\n return this.referenceTargetToElement(target);\n }\n }\n // If the trigger couldn't be found in the main block, check the\n // placeholder block which is shown before the main block has loaded.\n if (block.placeholder !== null) {\n const refInPlaceholder = this.findEntityInScope(block.placeholder, name);\n const targetInPlaceholder = refInPlaceholder instanceof Reference ? this.getReferenceTarget(refInPlaceholder) : null;\n if (targetInPlaceholder !== null) {\n return this.referenceTargetToElement(targetInPlaceholder);\n }\n }\n return null;\n }\n isDeferred(element) {\n for (const block of this.deferredBlocks) {\n if (!this.deferredScopes.has(block)) {\n continue;\n }\n const stack = [this.deferredScopes.get(block)];\n while (stack.length > 0) {\n const current = stack.pop();\n if (current.elementsInScope.has(element)) {\n return true;\n }\n stack.push(...current.childScopes.values());\n }\n }\n return false;\n }\n /**\n * Finds an entity with a specific name in a scope.\n * @param rootNode Root node of the scope.\n * @param name Name of the entity.\n */\n findEntityInScope(rootNode, name) {\n const entities = this.getEntitiesInScope(rootNode);\n for (const entity of entities) {\n if (entity.name === name) {\n return entity;\n }\n }\n return null;\n }\n /** Coerces a `ReferenceTarget` to an `Element`, if possible. */\n referenceTargetToElement(target) {\n if (target instanceof Element$1) {\n return target;\n }\n if (target instanceof Template) {\n return null;\n }\n return this.referenceTargetToElement(target.node);\n }\n}\nfunction extractScopedNodeEntities(rootScope) {\n const entityMap = new Map();\n function extractScopeEntities(scope) {\n if (entityMap.has(scope.rootNode)) {\n return entityMap.get(scope.rootNode);\n }\n const currentEntities = scope.namedEntities;\n let entities;\n if (scope.parentScope !== null) {\n entities = new Map([...extractScopeEntities(scope.parentScope), ...currentEntities]);\n }\n else {\n entities = new Map(currentEntities);\n }\n entityMap.set(scope.rootNode, entities);\n return entities;\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\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\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, // only needed for types in AOT\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, defer } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation, undefined);\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 defer,\n styles: [...facade.styles, ...template.styles],\n encapsulation: facade.encapsulation,\n interpolation,\n changeDetection: facade.changeDetection ?? null,\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)\n ? 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), \n /* enableSourceMaps */ true);\n return res['$def'];\n }\n}\nfunction convertToR3QueryMetadata(facade) {\n return {\n ...facade,\n isSignal: facade.isSignal,\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 isSignal: !!declaration.isSignal,\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 // For JIT, decorators are used to declare signal inputs. That is because of\n // a technical limitation where it's not possible to statically reflect class\n // members of a directive/component at runtime before instantiating the class.\n isSignal: !!ann.isSignal,\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 const hostDirectives = facade.hostDirectives?.length\n ? facade.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\n ? parseMappingStringArray(hostDirective.outputs)\n : null,\n };\n })\n : null;\n return {\n ...facade,\n typeArgumentCount: 0,\n typeSourceSpan: facade.typeSourceSpan,\n type: wrapReference(facade.type),\n deps: null,\n host: {\n ...extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n },\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,\n };\n}\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n const hostDirectives = declaration.hostDirectives?.length\n ? declaration.hostDirectives.map((dir) => ({\n directive: wrapReference(dir.directive),\n isForwardReference: false,\n inputs: dir.inputs ? getHostDirectiveBindingMapping(dir.inputs) : null,\n outputs: dir.outputs ? getHostDirectiveBindingMapping(dir.outputs) : null,\n }))\n : null;\n return {\n name: declaration.type.name,\n type: wrapReference(declaration.type),\n typeSourceSpan,\n selector: declaration.selector ?? null,\n inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(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: { 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,\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}\n/**\n * Parses a host directive mapping where each odd array key is the name of an input/output\n * and each even key is its public name, e.g. `['one', 'oneAlias', 'two', 'two']`.\n */\nfunction getHostDirectiveBindingMapping(array) {\n let result = null;\n for (let i = 1; i < array.length; i += 2) {\n result = result || {};\n result[array[i - 1]] = array[i];\n }\n return result;\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, defer } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation, decl.deferBlockDependencies);\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) : null,\n animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null,\n defer,\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, deferBlockDependencies) {\n const interpolationConfig = interpolation\n ? InterpolationConfig.fromArray(interpolation)\n : DEFAULT_INTERPOLATION_CONFIG;\n // Parse the template and check for errors.\n const parsed = parseTemplate(template, sourceMapUrl, {\n preserveWhitespaces,\n interpolationConfig,\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 const binder = new R3TargetBinder(new SelectorMatcher());\n const boundTarget = binder.bind({ template: parsed.nodes });\n return {\n template: parsed,\n interpolation: interpolationConfig,\n defer: createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies),\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 }\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'\n ? 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 createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies) {\n const deferredBlocks = boundTarget.getDeferBlocks();\n const blocks = new Map();\n for (let i = 0; i < deferredBlocks.length; i++) {\n const dependencyFn = deferBlockDependencies?.[i];\n blocks.set(deferredBlocks[i], dependencyFn ? new WrappedNodeExpr(dependencyFn) : null);\n }\n return { mode: 0 /* DeferBlockDepsEmitMode.PerBlock */, blocks };\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 }\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 inputsPartialMetadataToInputMetadata(inputs) {\n return Object.keys(inputs).reduce((result, minifiedClassName) => {\n const value = inputs[minifiedClassName];\n // Handle legacy partial input output.\n if (typeof value === 'string' || Array.isArray(value)) {\n result[minifiedClassName] = parseLegacyInputPartialOutput(value);\n }\n else {\n result[minifiedClassName] = {\n bindingPropertyName: value.publicName,\n classPropertyName: minifiedClassName,\n transformFunction: value.transformFunction !== null ? new WrappedNodeExpr(value.transformFunction) : null,\n required: value.isRequired,\n isSignal: value.isSignal,\n };\n }\n return result;\n }, {});\n}\n/**\n * Parses the legacy input partial output. For more details see `partial/directive.ts`.\n * TODO(legacy-partial-output-inputs): Remove in v18.\n */\nfunction parseLegacyInputPartialOutput(value) {\n if (typeof value === 'string') {\n return {\n bindingPropertyName: value,\n classPropertyName: value,\n transformFunction: null,\n required: false,\n // legacy partial output does not capture signal inputs.\n isSignal: false,\n };\n }\n return {\n bindingPropertyName: value[0],\n classPropertyName: value[1],\n transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,\n required: false,\n // legacy partial output does not capture signal inputs.\n isSignal: false,\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 // Signal inputs not supported for the inputs array.\n isSignal: 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 // Signal inputs not supported for the inputs array.\n isSignal: 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('18.2.10');\n\nclass CompilerConfig {\n constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {\n this.defaultEncapsulation = defaultEncapsulation;\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, preserveSignificantWhitespace) {\n const visitor = new _Visitor(implicitTags, implicitAttrs, preserveSignificantWhitespace);\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, _preserveSignificantWhitespace = true) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._preserveSignificantWhitespace = _preserveSignificantWhitespace;\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\n .value.replace(_I18N_COMMENT_PREFIX_REGEXP, '')\n .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) &&\n !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 visitBlock(block, context) {\n visitAll(this, block.children, context);\n }\n visitBlockParameter(parameter, context) { }\n visitLetDeclaration(decl, 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, DEFAULT_CONTAINER_BLOCKS, \n // When dropping significant whitespace we need to retain whitespace tokens or\n // else we won't be able to reuse source spans because empty tokens would be\n // removed and cause a mismatch.\n !this._preserveSignificantWhitespace /* retainEmptyTokens */);\n }\n // looks for translatable attributes\n _visitAttributesOf(el) {\n const explicitAttrNameToValue = {};\n const implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs\n .filter((attr) => attr.name.startsWith(_I18N_ATTR_PREFIX))\n .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 }\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)] = _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$1 {\n constructor() {\n super(getXmlTagDefinition);\n }\n parse(source, url, options = {}) {\n // Blocks and let declarations aren't supported in an XML context.\n return super.parse(source, url, { ...options, tokenizeBlocks: false, tokenizeLet: 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' }, [\n new Text$1(source.filePath),\n ]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [\n new Text$1(`${source.startLine}`),\n ]), 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' }, [\n new Text$1(message.description),\n ]));\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 }, [\n new CR(2),\n file,\n new CR(),\n ]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n xliff,\n 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 [\n new Tag(_PLACEHOLDER_TAG$2, { id: ph.startName, ctype, '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, { id: ph.name, 'equiv-text': `{{${ph.value}}}` })];\n }\n visitBlockPlaceholder(ph, context) {\n const ctype = `x-${ph.name.toLowerCase().replace(/[^a-z0-9]/g, '-')}`;\n const startTagPh = new Tag(_PLACEHOLDER_TAG$2, {\n id: ph.startName,\n ctype,\n 'equiv-text': `@${ph.name}`,\n });\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$2, { id: ph.closeName, ctype, 'equiv-text': `}` });\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitIcuPlaceholder(ph, context) {\n const equivText = `{${ph.value.expression}, ${ph.value.type}, ${Object.keys(ph.value.cases)\n .map((value) => value + ' {...}')\n .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 visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n visitLetDeclaration(decl, 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 visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n visitLetDeclaration(decl, 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' }, [\n ...units,\n new CR(2),\n ]);\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' }),\n new CR(),\n xliff,\n 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, /* preservePlaceholders */ true);\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 [\n new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{{${ph.value}}}`,\n }),\n ];\n }\n visitBlockPlaceholder(ph, context) {\n const tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equivStart: ph.startName,\n equivEnd: ph.closeName,\n type: 'other',\n dispStart: `@${ph.name}`,\n dispEnd: `}`,\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 visitIcuPlaceholder(ph, context) {\n const cases = Object.keys(ph.value.cases)\n .map((value) => value + ' {...}')\n .join(' ');\n const idStr = (this._nextPlaceholderId++).toString();\n return [\n new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: `{${ph.value.expression}, ${ph.value.type}, ${cases}}`,\n }),\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 }\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 visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n visitLetDeclaration(decl, 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 visitBlock(block, context) { }\n visitBlockParameter(parameter, context) { }\n visitLetDeclaration(decl, 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, /* preservePlaceholders */ true);\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 visitBlock(block, context) { }\n visitBlockParameter(block, context) { }\n visitLetDeclaration(decl, 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 visitBlock(block, context) { }\n visitBlockParameter(block, context) { }\n visitLetDeclaration(decl, 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)\n .map((name) => `${name}=\"${ph.attrs[name]}\"`)\n .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 visitBlockPlaceholder(ph, context) {\n const params = ph.parameters.length === 0 ? '' : ` (${ph.parameters.join('; ')})`;\n const children = ph.children.map((c) => c.visit(this)).join('');\n return `@${ph.name}${params} {${children}}`;\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 = TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n }\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, { 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(/* preservePlaceholders */ true);\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, _preserveWhitespace = true) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._preserveWhitespace = _preserveWhitespace;\n this._messages = [];\n }\n updateFromTemplate(source, url, interpolationConfig) {\n const htmlParserResult = this._htmlParser.parse(source, url, {\n tokenizeExpansionForms: true,\n interpolationConfig,\n });\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n // Trim unnecessary whitespace from extracted messages if requested. This\n // makes the messages more durable to trivial whitespace changes without\n // affected message IDs.\n const rootNodes = this._preserveWhitespace\n ? htmlParserResult.rootNodes\n : visitAllWithSiblings(new WhitespaceVisitor(/* preserveSignificantWhitespace */ false), htmlParserResult.rootNodes);\n const i18nParserResult = extractMessages(rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs, \n /* preserveSignificantWhitespace */ this._preserveWhitespace);\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 visitBlockPlaceholder(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 BlockPlaceholder(ph.name, ph.parameters, startName, closeName, children, 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\nfunction compileClassMetadata(metadata) {\n const fnCall = internalCompileClassMetadata(metadata);\n return arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()]).callFn([]);\n}\n/** Compiles only the `setClassMetadata` call without any additional wrappers. */\nfunction internalCompileClassMetadata(metadata) {\n return importExpr(Identifiers.setClassMetadata)\n .callFn([\n metadata.type,\n metadata.decorators,\n metadata.ctorParameters ?? literal(null),\n metadata.propDecorators ?? literal(null),\n ]);\n}\n/**\n * Wraps the `setClassMetadata` function with extra logic that dynamically\n * loads dependencies from `@defer` blocks.\n *\n * Generates a call like this:\n * ```\n * setClassMetadataAsync(type, () => [\n * import('./cmp-a').then(m => m.CmpA);\n * import('./cmp-b').then(m => m.CmpB);\n * ], (CmpA, CmpB) => {\n * setClassMetadata(type, decorators, ctorParameters, propParameters);\n * });\n * ```\n *\n * Similar to the `setClassMetadata` call, it's wrapped into the `ngDevMode`\n * check to tree-shake away this code in production mode.\n */\nfunction compileComponentClassMetadata(metadata, dependencies) {\n if (dependencies === null || dependencies.length === 0) {\n // If there are no deferrable symbols - just generate a regular `setClassMetadata` call.\n return compileClassMetadata(metadata);\n }\n return internalCompileSetClassMetadataAsync(metadata, dependencies.map((dep) => new FnParam(dep.symbolName, DYNAMIC_TYPE)), compileComponentMetadataAsyncResolver(dependencies));\n}\n/**\n * Identical to `compileComponentClassMetadata`. Used for the cases where we're unable to\n * analyze the deferred block dependencies, but we have a reference to the compiled\n * dependency resolver function that we can use as is.\n * @param metadata Class metadata for the internal `setClassMetadata` call.\n * @param deferResolver Expression representing the deferred dependency loading function.\n * @param deferredDependencyNames Names of the dependencies that are being loaded asynchronously.\n */\nfunction compileOpaqueAsyncClassMetadata(metadata, deferResolver, deferredDependencyNames) {\n return internalCompileSetClassMetadataAsync(metadata, deferredDependencyNames.map((name) => new FnParam(name, DYNAMIC_TYPE)), deferResolver);\n}\n/**\n * Internal logic used to compile a `setClassMetadataAsync` call.\n * @param metadata Class metadata for the internal `setClassMetadata` call.\n * @param wrapperParams Parameters to be set on the callback that wraps `setClassMetata`.\n * @param dependencyResolverFn Function to resolve the deferred dependencies.\n */\nfunction internalCompileSetClassMetadataAsync(metadata, wrapperParams, dependencyResolverFn) {\n // Omit the wrapper since it'll be added around `setClassMetadataAsync` instead.\n const setClassMetadataCall = internalCompileClassMetadata(metadata);\n const setClassMetaWrapper = arrowFn(wrapperParams, [setClassMetadataCall.toStmt()]);\n const setClassMetaAsync = importExpr(Identifiers.setClassMetadataAsync)\n .callFn([metadata.type, dependencyResolverFn, setClassMetaWrapper]);\n return arrowFn([], [devOnlyGuardedExpression(setClassMetaAsync).toStmt()]).callFn([]);\n}\n/**\n * Compiles the function that loads the dependencies for the\n * entire component in `setClassMetadataAsync`.\n */\nfunction compileComponentMetadataAsyncResolver(dependencies) {\n const dynamicImports = dependencies.map(({ symbolName, importPath, isDefaultImport }) => {\n // e.g. `(m) => m.CmpA`\n const innerFn = \n // Default imports are always accessed through the `default` property.\n arrowFn([new FnParam('m', DYNAMIC_TYPE)], variable('m').prop(isDefaultImport ? 'default' : symbolName));\n // e.g. `import('./cmp-a').then(...)`\n return new DynamicImportExpr(importPath).prop('then').callFn([innerFn]);\n });\n // e.g. `() => [ ... ];`\n return arrowFn([], literalArr(dynamicImports));\n}\n\n/**\n * Generate an ngDevMode guarded call to setClassDebugInfo with the debug info about the class\n * (e.g., the file name in which the class is defined)\n */\nfunction compileClassDebugInfo(debugInfo) {\n const debugInfoObject = {\n className: debugInfo.className,\n };\n // Include file path and line number only if the file relative path is calculated successfully.\n if (debugInfo.filePath) {\n debugInfoObject.filePath = debugInfo.filePath;\n debugInfoObject.lineNumber = debugInfo.lineNumber;\n }\n // Include forbidOrphanRendering only if it's set to true (to reduce generated code)\n if (debugInfo.forbidOrphanRendering) {\n debugInfoObject.forbidOrphanRendering = literal(true);\n }\n const fnCall = importExpr(Identifiers.setClassDebugInfo)\n .callFn([debugInfo.type, mapLiteral(debugInfoObject)]);\n const iife = arrowFn([], [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$5 = '12.0.0';\n/**\n * Minimum version at which deferred blocks are supported in the linker.\n */\nconst MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';\nfunction compileDeclareClassMetadata(metadata) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));\n definitionMap.set('version', literal('18.2.10'));\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}\nfunction compileComponentDeclareClassMetadata(metadata, dependencies) {\n if (dependencies === null || dependencies.length === 0) {\n return compileDeclareClassMetadata(metadata);\n }\n const definitionMap = new DefinitionMap();\n const callbackReturnDefinitionMap = new DefinitionMap();\n callbackReturnDefinitionMap.set('decorators', metadata.decorators);\n callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));\n callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));\n definitionMap.set('version', literal('18.2.10'));\n definitionMap.set('ngImport', importExpr(Identifiers.core));\n definitionMap.set('type', metadata.type);\n definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));\n definitionMap.set('resolveMetadata', arrowFn(dependencies.map((dep) => new FnParam(dep.symbolName, DYNAMIC_TYPE)), callbackReturnDefinitionMap.toLiteralMap()));\n return importExpr(Identifiers.declareClassMetadataAsync).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 * 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 minVersion = getMinimumVersionForPartialOutput(meta);\n definitionMap.set('minVersion', literal(minVersion));\n definitionMap.set('version', literal('18.2.10'));\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', needsNewInputPartialOutput(meta)\n ? createInputsPartialMetadata(meta.inputs)\n : legacyInputsPartialMetadata(meta.inputs));\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 * Determines the minimum linker version for the partial output\n * generated for this directive.\n *\n * Every time we make a breaking change to the declaration interface or partial-linker\n * behavior, we must update the minimum versions to prevent old partial-linkers from\n * incorrectly processing the declaration.\n *\n * NOTE: Do not include any prerelease in these versions as they are ignored.\n */\nfunction getMinimumVersionForPartialOutput(meta) {\n // We are starting with the oldest minimum version that can work for common\n // directive partial compilation output. As we discover usages of new features\n // that require a newer partial output emit, we bump the `minVersion`. Our goal\n // is to keep libraries as much compatible with older linker versions as possible.\n let minVersion = '14.0.0';\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 hasDecoratorTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);\n if (hasDecoratorTransformFunctions) {\n minVersion = '16.1.0';\n }\n // If there are input flags and we need the new emit, use the actual minimum version,\n // where this was introduced. i.e. in 17.1.0\n // TODO(legacy-partial-output-inputs): Remove in v18.\n if (needsNewInputPartialOutput(meta)) {\n minVersion = '17.1.0';\n }\n // If there are signal-based queries, partial output generates an extra field\n // that should be parsed by linkers. Ensure a proper minimum linker version.\n if (meta.queries.some((q) => q.isSignal) || meta.viewQueries.some((q) => q.isSignal)) {\n minVersion = '17.2.0';\n }\n return minVersion;\n}\n/**\n * Gets whether the given directive needs the new input partial output structure\n * that can hold additional metadata like `isRequired`, `isSignal` etc.\n */\nfunction needsNewInputPartialOutput(meta) {\n return Object.values(meta.inputs).some((input) => input.isSignal);\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)\n ? 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 if (query.isSignal) {\n meta.set('isSignal', 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 {\n key: 'directive',\n value: current.isForwardReference\n ? generateForwardRef(current.directive.type)\n : current.directive.type,\n quoted: false,\n },\n ];\n const inputsLiteral = current.inputs ? createHostDirectivesMappingArray(current.inputs) : null;\n const outputsLiteral = current.outputs\n ? createHostDirectivesMappingArray(current.outputs)\n : 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 * Generates partial output metadata for inputs of a directive.\n *\n * The generated structure is expected to match `R3DeclareDirectiveFacade['inputs']`.\n */\nfunction createInputsPartialMetadata(inputs) {\n const keys = Object.getOwnPropertyNames(inputs);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map((declaredName) => {\n const value = inputs[declaredName];\n return {\n key: declaredName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(declaredName),\n value: literalMap([\n { key: 'classPropertyName', quoted: false, value: asLiteral(value.classPropertyName) },\n { key: 'publicName', quoted: false, value: asLiteral(value.bindingPropertyName) },\n { key: 'isSignal', quoted: false, value: asLiteral(value.isSignal) },\n { key: 'isRequired', quoted: false, value: asLiteral(value.required) },\n { key: 'transformFunction', quoted: false, value: value.transformFunction ?? NULL_EXPR },\n ]),\n };\n }));\n}\n/**\n * Pre v18 legacy partial output for inputs.\n *\n * Previously, inputs did not capture metadata like `isSignal` in the partial compilation output.\n * To enable capturing such metadata, we restructured how input metadata is communicated in the\n * partial output. This would make libraries incompatible with older Angular FW versions where the\n * linker would not know how to handle this new \"format\". For this reason, if we know this metadata\n * does not need to be captured- we fall back to the old format. This is what this function\n * generates.\n *\n * See:\n * https://github.com/angular/angular/blob/d4b423690210872b5c32a322a6090beda30b05a3/packages/core/src/compiler/compiler_facade_interface.ts#L197-L199\n */\nfunction legacyInputsPartialMetadata(inputs) {\n // TODO(legacy-partial-output-inputs): Remove function in v18.\n const keys = Object.getOwnPropertyNames(inputs);\n if (keys.length === 0) {\n return null;\n }\n return literalMap(keys.map((declaredName) => {\n const value = inputs[declaredName];\n const publicName = value.bindingPropertyName;\n const differentDeclaringName = publicName !== declaredName;\n let result;\n if (differentDeclaringName || value.transformFunction !== null) {\n const values = [asLiteral(publicName), asLiteral(declaredName)];\n if (value.transformFunction !== null) {\n values.push(value.transformFunction);\n }\n result = literalArr(values);\n }\n else {\n result = asLiteral(publicName);\n }\n return {\n key: declaredName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(declaredName),\n value: result,\n };\n }));\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 const blockVisitor = new BlockPresenceVisitor();\n visitAll$1(blockVisitor, template.nodes);\n definitionMap.set('template', getTemplateExpression(template, templateInfo));\n if (templateInfo.isInline) {\n definitionMap.set('isInline', literal(true));\n }\n // Set the minVersion to 17.0.0 if the component is using at least one block in its template.\n // We don't do this for templates without blocks, in order to preserve backwards compatibility.\n if (blockVisitor.hasBlocks) {\n definitionMap.set('minVersion', literal('17.0.0'));\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 !== null) {\n if (typeof meta.changeDetection === 'object') {\n throw new Error('Impossible state! Change detection flag is not resolved!');\n }\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 if (meta.defer.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {\n const resolvers = [];\n let hasResolvers = false;\n for (const deps of meta.defer.blocks.values()) {\n // Note: we need to push a `null` even if there are no dependencies, because matching of\n // defer resolver functions to defer blocks happens by index and not adding an array\n // entry for a block can throw off the blocks coming after it.\n if (deps === null) {\n resolvers.push(literal(null));\n }\n else {\n resolvers.push(deps);\n hasResolvers = true;\n }\n }\n // If *all* the resolvers are null, we can skip the field.\n if (hasResolvers) {\n definitionMap.set('deferBlockDependencies', literalArr(resolvers));\n }\n }\n else {\n throw new Error('Unsupported defer function emit mode in partial compilation');\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 if (meta.declarationListEmitMode === 3 /* DeclarationListEmitMode.RuntimeResolved */) {\n throw new Error(`Unsupported emit mode`);\n }\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}\nclass BlockPresenceVisitor extends RecursiveVisitor$1 {\n constructor() {\n super(...arguments);\n this.hasBlocks = false;\n }\n visitDeferredBlock() {\n this.hasBlocks = true;\n }\n visitDeferredBlockPlaceholder() {\n this.hasBlocks = true;\n }\n visitDeferredBlockLoading() {\n this.hasBlocks = true;\n }\n visitDeferredBlockError() {\n this.hasBlocks = true;\n }\n visitIfBlock() {\n this.hasBlocks = true;\n }\n visitIfBlockBranch() {\n this.hasBlocks = true;\n }\n visitForLoopBlock() {\n this.hasBlocks = true;\n }\n visitForLoopBlockEmpty() {\n this.hasBlocks = true;\n }\n visitSwitchBlock() {\n this.hasBlocks = true;\n }\n visitSwitchBlockCase() {\n this.hasBlocks = true;\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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('18.2.10'));\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, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, 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, LetDeclaration, 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, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, 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, BlockNode as TmplAstBlockNode, 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, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, 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, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,gBAAgB,GAAG,IAAIC,MAAM,CAAC,cAAc;AAAG;AACjD,uBAAuB;AAAG;AAC1B;AACA;AACA,0DAA0D;AAAG;AAC7D;AACA;AACA,QAAQ;AAAG;AACX,aAAa;AAAE;AACnB,GAAG,CAAC;AACJ;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,CAAC;EACdC,WAAWA,CAAA,EA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AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,IAAI/L,GAAG,CAAC;AAC9B;AACA,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO;AACP;AACA,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,SAAS;AACT;AACA,WAAW,EACX,MAAM,EACN,UAAU,EACV,MAAM;AACN;AACA,QAAQ,EACR,SAAS;AACT;AACA,MAAM,EACN,SAAS,EACT,aAAa,EACb,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU;AACV;AACA,KAAK,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,OAAO,CACV,CAAC;AACF;AACA;AACA;AACA,MAAMgM,uBAAuB,GAAG,CAC5B,QAAQ,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,iBAAiB,CACpB;AACD;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,MAAMC,SAAS,CAAC;EACZlgD,WAAWA,CAAA,EAAG;IACV;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACQ,IAAI,CAACmgD,gCAAgC,GAAG,mFAAmF;EAC/H;EACA;AACJ;AACA;AACA;AACA;AACA;E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