{ "version": 3, "sources": ["../ui/web_modules/@angular/platform-browser.js", "../ui/web_modules/@angular/upgrade/static.js"], "sourcesContent": ["import { b as __extends, g as __spread, _ as __decorate, c as __param, a as __metadata, f as __assign } from '../common/tslib.es6-c4a4947b.js';\nimport '../common/mergeMap-64c6f393.js';\nimport '../common/merge-183efbc7.js';\nimport '../common/share-d41e3509.js';\nimport { Injectable, Inject, InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, \u0275global as _global, NgProbeToken, Optional, ViewEncapsulation, APP_ID, RendererStyleFlags2, NgZone, PLATFORM_ID, SecurityContext, \u0275_sanitizeUrl as _sanitizeUrl, \u0275_sanitizeStyle as _sanitizeStyle, \u0275_sanitizeHtml as _sanitizeHtml, PLATFORM_INITIALIZER, Sanitizer, createPlatformFactory, platformCore, ErrorHandler, \u0275APP_ROOT as APP_ROOT, \u0275Console as Console, RendererFactory2, Testability, NgModule, ApplicationModule, SkipSelf, \u0275\u0275inject, \u0275\u0275defineInjectable, Version, setTestabilityGetter, ApplicationRef, getDebugNode } from './core.js';\nimport { \u0275parseCookieValue as parseCookieValue, DOCUMENT, PlatformLocation, CommonModule, isPlatformServer, \u0275PLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID } from './common.js';\n\n/**\n * @license Angular v8.2.14\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _DOM = null;\nfunction getDOM() {\n return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\n }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nvar DomAdapter = /** @class */ (function () {\n function DomAdapter() {\n this.resourceLoaderType = null;\n }\n Object.defineProperty(DomAdapter.prototype, \"attrToPropMap\", {\n /**\n * Maps attribute names to their corresponding property names for cases\n * where attribute name doesn't match property name.\n */\n get: function () { return this._attrToPropMap; },\n set: function (value) { this._attrToPropMap = value; },\n enumerable: true,\n configurable: true\n });\n return DomAdapter;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nvar GenericBrowserDomAdapter = /** @class */ (function (_super) {\n __extends(GenericBrowserDomAdapter, _super);\n function GenericBrowserDomAdapter() {\n var _this = _super.call(this) || this;\n _this._animationPrefix = null;\n _this._transitionEnd = null;\n try {\n var element_1 = _this.createElement('div', document);\n if (_this.getStyle(element_1, 'animationName') != null) {\n _this._animationPrefix = '';\n }\n else {\n var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];\n for (var i = 0; i < domPrefixes.length; i++) {\n if (_this.getStyle(element_1, domPrefixes[i] + 'AnimationName') != null) {\n _this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';\n break;\n }\n }\n }\n var transEndEventNames_1 = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n };\n Object.keys(transEndEventNames_1).forEach(function (key) {\n if (_this.getStyle(element_1, key) != null) {\n _this._transitionEnd = transEndEventNames_1[key];\n }\n });\n }\n catch (_a) {\n _this._animationPrefix = null;\n _this._transitionEnd = null;\n }\n return _this;\n }\n GenericBrowserDomAdapter.prototype.getDistributedNodes = function (el) { return el.getDistributedNodes(); };\n GenericBrowserDomAdapter.prototype.resolveAndSetHref = function (el, baseUrl, href) {\n el.href = href == null ? baseUrl : baseUrl + '/../' + href;\n };\n GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () { return true; };\n GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {\n return typeof document.body.createShadowRoot === 'function';\n };\n GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () { return this._animationPrefix ? this._animationPrefix : ''; };\n GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return this._transitionEnd ? this._transitionEnd : ''; };\n GenericBrowserDomAdapter.prototype.supportsAnimation = function () {\n return this._animationPrefix != null && this._transitionEnd != null;\n };\n return GenericBrowserDomAdapter;\n}(DomAdapter));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _attrToPropMap = {\n 'class': 'className',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\nvar DOM_KEY_LOCATION_NUMPAD = 3;\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nvar _keyMap = {\n // The following values are here for cross-browser compatibility and to match the W3C standard\n // cf http://www.w3.org/TR/DOM-Level-3-Events-key/\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS'\n};\n// There is a bug in Chrome for numeric keypad keys:\n// https://code.google.com/p/chromium/issues/detail?id=155654\n// 1, 2, 3 ... are reported as A, B, C ...\nvar _chromeNumKeyPadMap = {\n 'A': '1',\n 'B': '2',\n 'C': '3',\n 'D': '4',\n 'E': '5',\n 'F': '6',\n 'G': '7',\n 'H': '8',\n 'I': '9',\n 'J': '*',\n 'K': '+',\n 'M': '-',\n 'N': '.',\n 'O': '/',\n '\\x60': '0',\n '\\x90': 'NumLock'\n};\nvar \u02750 = function () {\n if (_global['Node']) {\n return _global['Node'].prototype.contains || function (node) {\n return !!(this.compareDocumentPosition(node) & 16);\n };\n }\n return undefined;\n};\nvar nodeContains = (\u02750)();\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nvar BrowserDomAdapter = /** @class */ (function (_super) {\n __extends(BrowserDomAdapter, _super);\n function BrowserDomAdapter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };\n BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };\n BrowserDomAdapter.prototype.hasProperty = function (element, name) { return name in element; };\n BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };\n BrowserDomAdapter.prototype.getProperty = function (el, name) { return el[name]; };\n BrowserDomAdapter.prototype.invoke = function (el, methodName, args) {\n var _a;\n (_a = el)[methodName].apply(_a, __spread(args));\n };\n // TODO(tbosch): move this into a separate environment class once we have it\n BrowserDomAdapter.prototype.logError = function (error) {\n if (window.console) {\n if (console.error) {\n console.error(error);\n }\n else {\n console.log(error);\n }\n }\n };\n BrowserDomAdapter.prototype.log = function (error) {\n if (window.console) {\n window.console.log && window.console.log(error);\n }\n };\n BrowserDomAdapter.prototype.logGroup = function (error) {\n if (window.console) {\n window.console.group && window.console.group(error);\n }\n };\n BrowserDomAdapter.prototype.logGroupEnd = function () {\n if (window.console) {\n window.console.groupEnd && window.console.groupEnd();\n }\n };\n Object.defineProperty(BrowserDomAdapter.prototype, \"attrToPropMap\", {\n get: function () { return _attrToPropMap; },\n enumerable: true,\n configurable: true\n });\n BrowserDomAdapter.prototype.contains = function (nodeA, nodeB) { return nodeContains.call(nodeA, nodeB); };\n BrowserDomAdapter.prototype.querySelector = function (el, selector) { return el.querySelector(selector); };\n BrowserDomAdapter.prototype.querySelectorAll = function (el, selector) { return el.querySelectorAll(selector); };\n BrowserDomAdapter.prototype.on = function (el, evt, listener) { el.addEventListener(evt, listener, false); };\n BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {\n el.addEventListener(evt, listener, false);\n // Needed to follow Dart's subscription semantic, until fix of\n // https://code.google.com/p/dart/issues/detail?id=17406\n return function () { el.removeEventListener(evt, listener, false); };\n };\n BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };\n BrowserDomAdapter.prototype.createMouseEvent = function (eventType) {\n var evt = this.getDefaultDocument().createEvent('MouseEvent');\n evt.initEvent(eventType, true, true);\n return evt;\n };\n BrowserDomAdapter.prototype.createEvent = function (eventType) {\n var evt = this.getDefaultDocument().createEvent('Event');\n evt.initEvent(eventType, true, true);\n return evt;\n };\n BrowserDomAdapter.prototype.preventDefault = function (evt) {\n evt.preventDefault();\n evt.returnValue = false;\n };\n BrowserDomAdapter.prototype.isPrevented = function (evt) {\n return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;\n };\n BrowserDomAdapter.prototype.getInnerHTML = function (el) { return el.innerHTML; };\n BrowserDomAdapter.prototype.getTemplateContent = function (el) {\n return 'content' in el && this.isTemplateElement(el) ? el.content : null;\n };\n BrowserDomAdapter.prototype.getOuterHTML = function (el) { return el.outerHTML; };\n BrowserDomAdapter.prototype.nodeName = function (node) { return node.nodeName; };\n BrowserDomAdapter.prototype.nodeValue = function (node) { return node.nodeValue; };\n BrowserDomAdapter.prototype.type = function (node) { return node.type; };\n BrowserDomAdapter.prototype.content = function (node) {\n if (this.hasProperty(node, 'content')) {\n return node.content;\n }\n else {\n return node;\n }\n };\n BrowserDomAdapter.prototype.firstChild = function (el) { return el.firstChild; };\n BrowserDomAdapter.prototype.nextSibling = function (el) { return el.nextSibling; };\n BrowserDomAdapter.prototype.parentElement = function (el) { return el.parentNode; };\n BrowserDomAdapter.prototype.childNodes = function (el) { return el.childNodes; };\n BrowserDomAdapter.prototype.childNodesAsList = function (el) {\n var childNodes = el.childNodes;\n var res = new Array(childNodes.length);\n for (var i = 0; i < childNodes.length; i++) {\n res[i] = childNodes[i];\n }\n return res;\n };\n BrowserDomAdapter.prototype.clearNodes = function (el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n };\n BrowserDomAdapter.prototype.appendChild = function (el, node) { el.appendChild(node); };\n BrowserDomAdapter.prototype.removeChild = function (el, node) { el.removeChild(node); };\n BrowserDomAdapter.prototype.replaceChild = function (el, newChild, oldChild) { el.replaceChild(newChild, oldChild); };\n BrowserDomAdapter.prototype.remove = function (node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return node;\n };\n BrowserDomAdapter.prototype.insertBefore = function (parent, ref, node) { parent.insertBefore(node, ref); };\n BrowserDomAdapter.prototype.insertAllBefore = function (parent, ref, nodes) {\n nodes.forEach(function (n) { return parent.insertBefore(n, ref); });\n };\n BrowserDomAdapter.prototype.insertAfter = function (parent, ref, node) { parent.insertBefore(node, ref.nextSibling); };\n BrowserDomAdapter.prototype.setInnerHTML = function (el, value) { el.innerHTML = value; };\n BrowserDomAdapter.prototype.getText = function (el) { return el.textContent; };\n BrowserDomAdapter.prototype.setText = function (el, value) { el.textContent = value; };\n BrowserDomAdapter.prototype.getValue = function (el) { return el.value; };\n BrowserDomAdapter.prototype.setValue = function (el, value) { el.value = value; };\n BrowserDomAdapter.prototype.getChecked = function (el) { return el.checked; };\n BrowserDomAdapter.prototype.setChecked = function (el, value) { el.checked = value; };\n BrowserDomAdapter.prototype.createComment = function (text) { return this.getDefaultDocument().createComment(text); };\n BrowserDomAdapter.prototype.createTemplate = function (html) {\n var t = this.getDefaultDocument().createElement('template');\n t.innerHTML = html;\n return t;\n };\n BrowserDomAdapter.prototype.createElement = function (tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n };\n BrowserDomAdapter.prototype.createElementNS = function (ns, tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElementNS(ns, tagName);\n };\n BrowserDomAdapter.prototype.createTextNode = function (text, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createTextNode(text);\n };\n BrowserDomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) {\n doc = doc || this.getDefaultDocument();\n var el = doc.createElement('SCRIPT');\n el.setAttribute(attrName, attrValue);\n return el;\n };\n BrowserDomAdapter.prototype.createStyleElement = function (css, doc) {\n doc = doc || this.getDefaultDocument();\n var style = doc.createElement('style');\n this.appendChild(style, this.createTextNode(css, doc));\n return style;\n };\n BrowserDomAdapter.prototype.createShadowRoot = function (el) { return el.createShadowRoot(); };\n BrowserDomAdapter.prototype.getShadowRoot = function (el) { return el.shadowRoot; };\n BrowserDomAdapter.prototype.getHost = function (el) { return el.host; };\n BrowserDomAdapter.prototype.clone = function (node) { return node.cloneNode(true); };\n BrowserDomAdapter.prototype.getElementsByClassName = function (element, name) {\n return element.getElementsByClassName(name);\n };\n BrowserDomAdapter.prototype.getElementsByTagName = function (element, name) {\n return element.getElementsByTagName(name);\n };\n BrowserDomAdapter.prototype.classList = function (element) { return Array.prototype.slice.call(element.classList, 0); };\n BrowserDomAdapter.prototype.addClass = function (element, className) { element.classList.add(className); };\n BrowserDomAdapter.prototype.removeClass = function (element, className) { element.classList.remove(className); };\n BrowserDomAdapter.prototype.hasClass = function (element, className) {\n return element.classList.contains(className);\n };\n BrowserDomAdapter.prototype.setStyle = function (element, styleName, styleValue) {\n element.style[styleName] = styleValue;\n };\n BrowserDomAdapter.prototype.removeStyle = function (element, stylename) {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n element.style[stylename] = '';\n };\n BrowserDomAdapter.prototype.getStyle = function (element, stylename) { return element.style[stylename]; };\n BrowserDomAdapter.prototype.hasStyle = function (element, styleName, styleValue) {\n var value = this.getStyle(element, styleName) || '';\n return styleValue ? value == styleValue : value.length > 0;\n };\n BrowserDomAdapter.prototype.tagName = function (element) { return element.tagName; };\n BrowserDomAdapter.prototype.attributeMap = function (element) {\n var res = new Map();\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var attrib = elAttrs.item(i);\n res.set(attrib.name, attrib.value);\n }\n return res;\n };\n BrowserDomAdapter.prototype.hasAttribute = function (element, attribute) {\n return element.hasAttribute(attribute);\n };\n BrowserDomAdapter.prototype.hasAttributeNS = function (element, ns, attribute) {\n return element.hasAttributeNS(ns, attribute);\n };\n BrowserDomAdapter.prototype.getAttribute = function (element, attribute) {\n return element.getAttribute(attribute);\n };\n BrowserDomAdapter.prototype.getAttributeNS = function (element, ns, name) {\n return element.getAttributeNS(ns, name);\n };\n BrowserDomAdapter.prototype.setAttribute = function (element, name, value) { element.setAttribute(name, value); };\n BrowserDomAdapter.prototype.setAttributeNS = function (element, ns, name, value) {\n element.setAttributeNS(ns, name, value);\n };\n BrowserDomAdapter.prototype.removeAttribute = function (element, attribute) { element.removeAttribute(attribute); };\n BrowserDomAdapter.prototype.removeAttributeNS = function (element, ns, name) {\n element.removeAttributeNS(ns, name);\n };\n BrowserDomAdapter.prototype.templateAwareRoot = function (el) { return this.isTemplateElement(el) ? this.content(el) : el; };\n BrowserDomAdapter.prototype.createHtmlDocument = function () {\n return document.implementation.createHTMLDocument('fakeTitle');\n };\n BrowserDomAdapter.prototype.getDefaultDocument = function () { return document; };\n BrowserDomAdapter.prototype.getBoundingClientRect = function (el) {\n try {\n return el.getBoundingClientRect();\n }\n catch (_a) {\n return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };\n }\n };\n BrowserDomAdapter.prototype.getTitle = function (doc) { return doc.title; };\n BrowserDomAdapter.prototype.setTitle = function (doc, newTitle) { doc.title = newTitle || ''; };\n BrowserDomAdapter.prototype.elementMatches = function (n, selector) {\n if (this.isElementNode(n)) {\n return n.matches && n.matches(selector) ||\n n.msMatchesSelector && n.msMatchesSelector(selector) ||\n n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n }\n return false;\n };\n BrowserDomAdapter.prototype.isTemplateElement = function (el) {\n return this.isElementNode(el) && el.nodeName === 'TEMPLATE';\n };\n BrowserDomAdapter.prototype.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };\n BrowserDomAdapter.prototype.isCommentNode = function (node) { return node.nodeType === Node.COMMENT_NODE; };\n BrowserDomAdapter.prototype.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };\n BrowserDomAdapter.prototype.hasShadowRoot = function (node) {\n return node.shadowRoot != null && node instanceof HTMLElement;\n };\n BrowserDomAdapter.prototype.isShadowRoot = function (node) { return node instanceof DocumentFragment; };\n BrowserDomAdapter.prototype.importIntoDoc = function (node) { return document.importNode(this.templateAwareRoot(node), true); };\n BrowserDomAdapter.prototype.adoptNode = function (node) { return document.adoptNode(node); };\n BrowserDomAdapter.prototype.getHref = function (el) { return el.getAttribute('href'); };\n BrowserDomAdapter.prototype.getEventKey = function (event) {\n var key = event.key;\n if (key == null) {\n key = event.keyIdentifier;\n // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n // Safari cf\n // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n if (key == null) {\n return 'Unidentified';\n }\n if (key.startsWith('U+')) {\n key = String.fromCharCode(parseInt(key.substring(2), 16));\n if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {\n // There is a bug in Chrome for numeric keypad keys:\n // https://code.google.com/p/chromium/issues/detail?id=155654\n // 1, 2, 3 ... are reported as A, B, C ...\n key = _chromeNumKeyPadMap[key];\n }\n }\n }\n return _keyMap[key] || key;\n };\n BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n };\n BrowserDomAdapter.prototype.getHistory = function () { return window.history; };\n BrowserDomAdapter.prototype.getLocation = function () { return window.location; };\n BrowserDomAdapter.prototype.getBaseHref = function (doc) {\n var href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n };\n BrowserDomAdapter.prototype.resetBaseElement = function () { baseElement = null; };\n BrowserDomAdapter.prototype.getUserAgent = function () { return window.navigator.userAgent; };\n BrowserDomAdapter.prototype.setData = function (element, name, value) {\n this.setAttribute(element, 'data-' + name, value);\n };\n BrowserDomAdapter.prototype.getData = function (element, name) {\n return this.getAttribute(element, 'data-' + name);\n };\n BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };\n // TODO(tbosch): move this into a separate environment class once we have it\n BrowserDomAdapter.prototype.supportsWebAnimation = function () {\n return typeof Element.prototype['animate'] === 'function';\n };\n BrowserDomAdapter.prototype.performanceNow = function () {\n // performance.now() is not available in all browsers, see\n // http://caniuse.com/#search=performance.now\n return window.performance && window.performance.now ? window.performance.now() :\n new Date().getTime();\n };\n BrowserDomAdapter.prototype.supportsCookies = function () { return true; };\n BrowserDomAdapter.prototype.getCookie = function (name) { return parseCookieValue(document.cookie, name); };\n BrowserDomAdapter.prototype.setCookie = function (name, value) {\n // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does\n // not clear other cookies.\n document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);\n };\n return BrowserDomAdapter;\n}(GenericBrowserDomAdapter));\nvar baseElement = null;\nfunction getBaseElementHref() {\n if (!baseElement) {\n baseElement = document.querySelector('base');\n if (!baseElement) {\n return null;\n }\n }\n return baseElement.getAttribute('href');\n}\n// based on urlUtils.js in AngularJS 1\nvar urlParsingNode;\nfunction relativePath(url) {\n if (!urlParsingNode) {\n urlParsingNode = document.createElement('a');\n }\n urlParsingNode.setAttribute('href', url);\n return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :\n '/' + urlParsingNode.pathname;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction supportsState() {\n return !!window.history.pushState;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\nvar BrowserPlatformLocation = /** @class */ (function (_super) {\n __extends(BrowserPlatformLocation, _super);\n function BrowserPlatformLocation(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._init();\n return _this;\n }\n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n BrowserPlatformLocation.prototype._init = function () {\n this.location = getDOM().getLocation();\n this._history = getDOM().getHistory();\n };\n BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(this._doc); };\n BrowserPlatformLocation.prototype.onPopState = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);\n };\n BrowserPlatformLocation.prototype.onHashChange = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);\n };\n Object.defineProperty(BrowserPlatformLocation.prototype, \"href\", {\n get: function () { return this.location.href; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"protocol\", {\n get: function () { return this.location.protocol; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"hostname\", {\n get: function () { return this.location.hostname; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"port\", {\n get: function () { return this.location.port; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"pathname\", {\n get: function () { return this.location.pathname; },\n set: function (newPath) { this.location.pathname = newPath; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"search\", {\n get: function () { return this.location.search; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"hash\", {\n get: function () { return this.location.hash; },\n enumerable: true,\n configurable: true\n });\n BrowserPlatformLocation.prototype.pushState = function (state, title, url) {\n if (supportsState()) {\n this._history.pushState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {\n if (supportsState()) {\n this._history.replaceState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.forward = function () { this._history.forward(); };\n BrowserPlatformLocation.prototype.back = function () { this._history.back(); };\n BrowserPlatformLocation.prototype.getState = function () { return this._history.state; };\n BrowserPlatformLocation = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserPlatformLocation);\n return BrowserPlatformLocation;\n}(PlatformLocation));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nvar TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n return function () {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(function () {\n var dom = getDOM();\n var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, \"style[ng-transition]\"));\n styles.filter(function (el) { return dom.getAttribute(el, 'ng-transition') === transitionId; })\n .forEach(function (el) { return dom.remove(el); });\n });\n };\n}\nvar SERVER_TRANSITION_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT, Injector],\n multi: true\n },\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar BrowserGetTestability = /** @class */ (function () {\n function BrowserGetTestability() {\n }\n BrowserGetTestability.init = function () { setTestabilityGetter(new BrowserGetTestability()); };\n BrowserGetTestability.prototype.addToWindow = function (registry) {\n _global['getAngularTestability'] = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n var testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new Error('Could not find testability for element.');\n }\n return testability;\n };\n _global['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };\n _global['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };\n var whenAllStable = function (callback /** TODO #9100 */) {\n var testabilities = _global['getAllAngularTestabilities']();\n var count = testabilities.length;\n var didWork = false;\n var decrement = function (didWork_ /** TODO #9100 */) {\n didWork = didWork || didWork_;\n count--;\n if (count == 0) {\n callback(didWork);\n }\n };\n testabilities.forEach(function (testability /** TODO #9100 */) {\n testability.whenStable(decrement);\n });\n };\n if (!_global['frameworkStabilizers']) {\n _global['frameworkStabilizers'] = [];\n }\n _global['frameworkStabilizers'].push(whenAllStable);\n };\n BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n var t = registry.getTestability(elem);\n if (t != null) {\n return t;\n }\n else if (!findInAncestors) {\n return null;\n }\n if (getDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);\n }\n return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);\n };\n return BrowserGetTestability;\n}());\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n var ng = _global['ng'] = _global['ng'] || {};\n ng[name] = value;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar \u02750$1 = function () { return ({\n 'ApplicationRef': ApplicationRef,\n 'NgZone': NgZone,\n}); };\nvar CORE_TOKENS = (\u02750$1)();\nvar INSPECT_GLOBAL_NAME = 'probe';\nvar CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\n/**\n * Returns a {@link DebugElement} for the given native DOM element, or\n * null if the given native element does not have an Angular view associated\n * with it.\n */\nfunction inspectNativeElement(element) {\n return getDebugNode(element);\n}\nfunction _createNgProbe(coreTokens) {\n exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);\n exportNgVar(CORE_TOKENS_GLOBAL_NAME, __assign({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));\n return function () { return inspectNativeElement; };\n}\nfunction _ngProbeTokensToMap(tokens) {\n return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});\n}\n/**\n * In Ivy, we don't support NgProbe because we have our own set of testing utilities\n * with more robust functionality.\n *\n * We shouldn't bring in NgProbe because it prevents DebugNode and friends from\n * tree-shaking properly.\n */\nvar ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nvar ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [\n {\n provide: APP_INITIALIZER,\n useFactory: _createNgProbe,\n deps: [\n [NgProbeToken, new Optional()],\n ],\n multi: true,\n },\n];\nvar ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nvar EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nvar EventManager = /** @class */ (function () {\n /**\n * Initializes an instance of the event-manager service.\n */\n function EventManager(plugins, _zone) {\n var _this = this;\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach(function (p) { return p.manager = _this; });\n this._plugins = plugins.slice().reverse();\n }\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addEventListener = function (element, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n };\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n };\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n EventManager.prototype.getZone = function () { return this._zone; };\n /** @internal */\n EventManager.prototype._findPluginFor = function (eventName) {\n var plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n var plugins = this._plugins;\n for (var i = 0; i < plugins.length; i++) {\n var plugin_1 = plugins[i];\n if (plugin_1.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin_1);\n return plugin_1;\n }\n }\n throw new Error(\"No event manager plugin found for event \" + eventName);\n };\n EventManager = __decorate([\n Injectable(),\n __param(0, Inject(EVENT_MANAGER_PLUGINS)),\n __metadata(\"design:paramtypes\", [Array, NgZone])\n ], EventManager);\n return EventManager;\n}());\nvar EventManagerPlugin = /** @class */ (function () {\n function EventManagerPlugin(_doc) {\n this._doc = _doc;\n }\n EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {\n var target = getDOM().getGlobalEventTarget(this._doc, element);\n if (!target) {\n throw new Error(\"Unsupported event target \" + target + \" for event \" + eventName);\n }\n return this.addEventListener(target, eventName, handler);\n };\n return EventManagerPlugin;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar SharedStylesHost = /** @class */ (function () {\n function SharedStylesHost() {\n /** @internal */\n this._stylesSet = new Set();\n }\n SharedStylesHost.prototype.addStyles = function (styles) {\n var _this = this;\n var additions = new Set();\n styles.forEach(function (style) {\n if (!_this._stylesSet.has(style)) {\n _this._stylesSet.add(style);\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n };\n SharedStylesHost.prototype.onStylesAdded = function (additions) { };\n SharedStylesHost.prototype.getAllStyles = function () { return Array.from(this._stylesSet); };\n SharedStylesHost = __decorate([\n Injectable()\n ], SharedStylesHost);\n return SharedStylesHost;\n}());\nvar DomSharedStylesHost = /** @class */ (function (_super) {\n __extends(DomSharedStylesHost, _super);\n function DomSharedStylesHost(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._hostNodes = new Set();\n _this._styleNodes = new Set();\n _this._hostNodes.add(_doc.head);\n return _this;\n }\n DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {\n var _this = this;\n styles.forEach(function (style) {\n var styleEl = _this._doc.createElement('style');\n styleEl.textContent = style;\n _this._styleNodes.add(host.appendChild(styleEl));\n });\n };\n DomSharedStylesHost.prototype.addHost = function (hostNode) {\n this._addStylesToHost(this._stylesSet, hostNode);\n this._hostNodes.add(hostNode);\n };\n DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };\n DomSharedStylesHost.prototype.onStylesAdded = function (additions) {\n var _this = this;\n this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });\n };\n DomSharedStylesHost.prototype.ngOnDestroy = function () { this._styleNodes.forEach(function (styleNode) { return getDOM().remove(styleNode); }); };\n DomSharedStylesHost = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSharedStylesHost);\n return DomSharedStylesHost;\n}(SharedStylesHost));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NAMESPACE_URIS = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n};\nvar COMPONENT_REGEX = /%COMP%/g;\nvar COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles, target) {\n for (var i = 0; i < styles.length; i++) {\n var style = styles[i];\n if (Array.isArray(style)) {\n flattenStyles(compId, style, target);\n }\n else {\n style = style.replace(COMPONENT_REGEX, compId);\n target.push(style);\n }\n }\n return target;\n}\nfunction decoratePreventDefault(eventHandler) {\n return function (event) {\n var allowDefaultBehavior = eventHandler(event);\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n };\n}\nvar DomRendererFactory2 = /** @class */ (function () {\n function DomRendererFactory2(eventManager, sharedStylesHost, appId) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n DomRendererFactory2.prototype.createRenderer = function (element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated: {\n var renderer = this.rendererByCompId.get(type.id);\n if (!renderer) {\n renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n this.rendererByCompId.set(type.id, renderer);\n }\n renderer.applyToHost(element);\n return renderer;\n }\n case ViewEncapsulation.Native:\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n default: {\n if (!this.rendererByCompId.has(type.id)) {\n var styles = flattenStyles(type.id, type.styles, []);\n this.sharedStylesHost.addStyles(styles);\n this.rendererByCompId.set(type.id, this.defaultRenderer);\n }\n return this.defaultRenderer;\n }\n }\n };\n DomRendererFactory2.prototype.begin = function () { };\n DomRendererFactory2.prototype.end = function () { };\n DomRendererFactory2 = __decorate([\n Injectable(),\n __param(2, Inject(APP_ID)),\n __metadata(\"design:paramtypes\", [EventManager, DomSharedStylesHost, String])\n ], DomRendererFactory2);\n return DomRendererFactory2;\n}());\nvar DefaultDomRenderer2 = /** @class */ (function () {\n function DefaultDomRenderer2(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n }\n DefaultDomRenderer2.prototype.destroy = function () { };\n DefaultDomRenderer2.prototype.createElement = function (name, namespace) {\n if (namespace) {\n // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key\n // will result in undefined, so we just return the namespace here.\n return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n return document.createElement(name);\n };\n DefaultDomRenderer2.prototype.createComment = function (value) { return document.createComment(value); };\n DefaultDomRenderer2.prototype.createText = function (value) { return document.createTextNode(value); };\n DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) { parent.appendChild(newChild); };\n DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n if (parent) {\n parent.insertBefore(newChild, refChild);\n }\n };\n DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n };\n DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {\n var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n selectorOrNode;\n if (!el) {\n throw new Error(\"The selector \\\"\" + selectorOrNode + \"\\\" did not match any elements\");\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n };\n DefaultDomRenderer2.prototype.parentNode = function (node) { return node.parentNode; };\n DefaultDomRenderer2.prototype.nextSibling = function (node) { return node.nextSibling; };\n DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name;\n // TODO(benlesh): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n };\n DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n if (namespace) {\n // TODO(benlesh): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n // TODO(benlesh): Since ivy is passing around full URIs for namespaces\n // this could result in properties like `http://www.w3.org/2000/svg:cx=\"123\"`,\n // which is wrong.\n el.removeAttribute(namespace + \":\" + name);\n }\n }\n else {\n el.removeAttribute(name);\n }\n };\n DefaultDomRenderer2.prototype.addClass = function (el, name) { el.classList.add(name); };\n DefaultDomRenderer2.prototype.removeClass = function (el, name) { el.classList.remove(name); };\n DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.setProperty(style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n };\n DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n }\n else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n };\n DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {\n checkNoSyntheticProp(name, 'property');\n el[name] = value;\n };\n DefaultDomRenderer2.prototype.setValue = function (node, value) { node.nodeValue = value; };\n DefaultDomRenderer2.prototype.listen = function (target, event, callback) {\n checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n };\n return DefaultDomRenderer2;\n}());\nvar \u02750$2 = function () { return '@'.charCodeAt(0); };\nvar AT_CHARCODE = (\u02750$2)();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(\"Found the synthetic \" + nameKind + \" \" + name + \". Please include either \\\"BrowserAnimationsModule\\\" or \\\"NoopAnimationsModule\\\" in your application.\");\n }\n}\nvar EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {\n __extends(EmulatedEncapsulationDomRenderer2, _super);\n function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {\n var _this = _super.call(this, eventManager) || this;\n _this.component = component;\n var styles = flattenStyles(appId + '-' + component.id, component.styles, []);\n sharedStylesHost.addStyles(styles);\n _this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n _this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n return _this;\n }\n EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) { _super.prototype.setAttribute.call(this, element, this.hostAttr, ''); };\n EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {\n var el = _super.prototype.createElement.call(this, parent, name);\n _super.prototype.setAttribute.call(this, el, this.contentAttr, '');\n return el;\n };\n return EmulatedEncapsulationDomRenderer2;\n}(DefaultDomRenderer2));\nvar ShadowDomRenderer = /** @class */ (function (_super) {\n __extends(ShadowDomRenderer, _super);\n function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {\n var _this = _super.call(this, eventManager) || this;\n _this.sharedStylesHost = sharedStylesHost;\n _this.hostEl = hostEl;\n _this.component = component;\n if (component.encapsulation === ViewEncapsulation.ShadowDom) {\n _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n }\n else {\n _this.shadowRoot = hostEl.createShadowRoot();\n }\n _this.sharedStylesHost.addHost(_this.shadowRoot);\n var styles = flattenStyles(component.id, component.styles, []);\n for (var i = 0; i < styles.length; i++) {\n var styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n _this.shadowRoot.appendChild(styleEl);\n }\n return _this;\n }\n ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) { return node === this.hostEl ? this.shadowRoot : node; };\n ShadowDomRenderer.prototype.destroy = function () { this.sharedStylesHost.removeHost(this.shadowRoot); };\n ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {\n return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);\n };\n ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {\n return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);\n };\n ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {\n return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);\n };\n ShadowDomRenderer.prototype.parentNode = function (node) {\n return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));\n };\n return ShadowDomRenderer;\n}(DefaultDomRenderer2));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar \u02750$3 = function () { return (typeof Zone !== 'undefined') && Zone['__symbol__'] ||\n function (v) { return '__zone_symbol__' + v; }; };\n/**\n * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'\n * since Angular can do much more\n * efficient bookkeeping than Zone can, because we have additional information. This speeds up\n * addEventListener by 3x.\n */\nvar __symbol__ = (\u02750$3)();\nvar ADD_EVENT_LISTENER = __symbol__('addEventListener');\nvar REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');\nvar symbolNames = {};\nvar FALSE = 'FALSE';\nvar ANGULAR = 'ANGULAR';\nvar NATIVE_ADD_LISTENER = 'addEventListener';\nvar NATIVE_REMOVE_LISTENER = 'removeEventListener';\n// use the same symbol string which is used in zone.js\nvar stopSymbol = '__zone_symbol__propagationStopped';\nvar stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';\nvar \u02751 = function () {\n var blackListedEvents = (typeof Zone !== 'undefined') && Zone[__symbol__('BLACK_LISTED_EVENTS')];\n if (blackListedEvents) {\n var res_1 = {};\n blackListedEvents.forEach(function (eventName) { res_1[eventName] = eventName; });\n return res_1;\n }\n return undefined;\n};\nvar blackListedMap = (\u02751)();\nvar isBlackListedEvent = function (eventName) {\n if (!blackListedMap) {\n return false;\n }\n return blackListedMap.hasOwnProperty(eventName);\n};\n// a global listener to handle all dom event,\n// so we do not need to create a closure every time\nvar globalListener = function (event) {\n var symbolName = symbolNames[event.type];\n if (!symbolName) {\n return;\n }\n var taskDatas = this[symbolName];\n if (!taskDatas) {\n return;\n }\n var args = [event];\n if (taskDatas.length === 1) {\n // if taskDatas only have one element, just invoke it\n var taskData = taskDatas[0];\n if (taskData.zone !== Zone.current) {\n // only use Zone.run when Zone.current not equals to stored zone\n return taskData.zone.run(taskData.handler, this, args);\n }\n else {\n return taskData.handler.apply(this, args);\n }\n }\n else {\n // copy tasks as a snapshot to avoid event handlers remove\n // itself or others\n var copiedTasks = taskDatas.slice();\n for (var i = 0; i < copiedTasks.length; i++) {\n // if other listener call event.stopImmediatePropagation\n // just break\n if (event[stopSymbol] === true) {\n break;\n }\n var taskData = copiedTasks[i];\n if (taskData.zone !== Zone.current) {\n // only use Zone.run when Zone.current not equals to stored zone\n taskData.zone.run(taskData.handler, this, args);\n }\n else {\n taskData.handler.apply(this, args);\n }\n }\n }\n};\nvar DomEventsPlugin = /** @class */ (function (_super) {\n __extends(DomEventsPlugin, _super);\n function DomEventsPlugin(doc, ngZone, platformId) {\n var _this = _super.call(this, doc) || this;\n _this.ngZone = ngZone;\n if (!platformId || !isPlatformServer(platformId)) {\n _this.patchEvent();\n }\n return _this;\n }\n DomEventsPlugin.prototype.patchEvent = function () {\n if (typeof Event === 'undefined' || !Event || !Event.prototype) {\n return;\n }\n if (Event.prototype[stopMethodSymbol]) {\n // already patched by zone.js\n return;\n }\n var delegate = Event.prototype[stopMethodSymbol] =\n Event.prototype.stopImmediatePropagation;\n Event.prototype.stopImmediatePropagation = function () {\n if (this) {\n this[stopSymbol] = true;\n }\n // We should call native delegate in case in some environment part of\n // the application will not use the patched Event. Also we cast the\n // \"arguments\" to any since \"stopImmediatePropagation\" technically does not\n // accept any arguments, but we don't know what developers pass through the\n // function and we want to not break these calls.\n delegate && delegate.apply(this, arguments);\n };\n };\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n DomEventsPlugin.prototype.supports = function (eventName) { return true; };\n DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n var zoneJsLoaded = element[ADD_EVENT_LISTENER];\n var callback = handler;\n // if zonejs is loaded and current zone is not ngZone\n // we keep Zone.current on target for later restoration.\n if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {\n var symbolName = symbolNames[eventName];\n if (!symbolName) {\n symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);\n }\n var taskDatas = element[symbolName];\n var globalListenerRegistered = taskDatas && taskDatas.length > 0;\n if (!taskDatas) {\n taskDatas = element[symbolName] = [];\n }\n var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;\n if (taskDatas.length === 0) {\n taskDatas.push({ zone: zone, handler: callback });\n }\n else {\n var callbackRegistered = false;\n for (var i = 0; i < taskDatas.length; i++) {\n if (taskDatas[i].handler === callback) {\n callbackRegistered = true;\n break;\n }\n }\n if (!callbackRegistered) {\n taskDatas.push({ zone: zone, handler: callback });\n }\n }\n if (!globalListenerRegistered) {\n element[ADD_EVENT_LISTENER](eventName, globalListener, false);\n }\n }\n else {\n element[NATIVE_ADD_LISTENER](eventName, callback, false);\n }\n return function () { return _this.removeEventListener(element, eventName, callback); };\n };\n DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {\n var underlyingRemove = target[REMOVE_EVENT_LISTENER];\n // zone.js not loaded, use native removeEventListener\n if (!underlyingRemove) {\n return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n var symbolName = symbolNames[eventName];\n var taskDatas = symbolName && target[symbolName];\n if (!taskDatas) {\n // addEventListener not using patched version\n // just call native removeEventListener\n return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n // fix issue 20532, should be able to remove\n // listener which was added inside of ngZone\n var found = false;\n for (var i = 0; i < taskDatas.length; i++) {\n // remove listener from taskDatas if the callback equals\n if (taskDatas[i].handler === callback) {\n found = true;\n taskDatas.splice(i, 1);\n break;\n }\n }\n if (found) {\n if (taskDatas.length === 0) {\n // all listeners are removed, we can remove the globalListener from target\n underlyingRemove.apply(target, [eventName, globalListener, false]);\n }\n }\n else {\n // not found in taskDatas, the callback may be added inside of ngZone\n // use native remove listener to remove the callback\n target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n };\n DomEventsPlugin = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __param(2, Optional()), __param(2, Inject(PLATFORM_ID)),\n __metadata(\"design:paramtypes\", [Object, NgZone, Object])\n ], DomEventsPlugin);\n return DomEventsPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Supported HammerJS recognizer event names.\n */\nvar EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n};\n/**\n * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @publicApi\n */\nvar HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nvar HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nvar HammerGestureConfig = /** @class */ (function () {\n function HammerGestureConfig() {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](http://hammerjs.github.io/).\n */\n this.events = [];\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](http://hammerjs.github.io/).\n *\n */\n this.overrides = {};\n }\n /**\n * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n HammerGestureConfig.prototype.buildHammer = function (element) {\n var mc = new Hammer(element, this.options);\n mc.get('pinch').set({ enable: true });\n mc.get('rotate').set({ enable: true });\n for (var eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n return mc;\n };\n HammerGestureConfig = __decorate([\n Injectable()\n ], HammerGestureConfig);\n return HammerGestureConfig;\n}());\nvar HammerGesturesPlugin = /** @class */ (function (_super) {\n __extends(HammerGesturesPlugin, _super);\n function HammerGesturesPlugin(doc, _config, console, loader) {\n var _this = _super.call(this, doc) || this;\n _this._config = _config;\n _this.console = console;\n _this.loader = loader;\n return _this;\n }\n HammerGesturesPlugin.prototype.supports = function (eventName) {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n if (!window.Hammer && !this.loader) {\n this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because Hammer.JS is not \" +\n \"loaded and no custom loader has been specified.\");\n return false;\n }\n return true;\n };\n HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n var zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!window.Hammer && this.loader) {\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n var cancelRegistration_1 = false;\n var deregister_1 = function () { cancelRegistration_1 = true; };\n this.loader()\n .then(function () {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!window.Hammer) {\n _this.console.warn(\"The custom HAMMER_LOADER completed, but Hammer.JS is not present.\");\n deregister_1 = function () { };\n return;\n }\n if (!cancelRegistration_1) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to removal.\n deregister_1 = _this.addEventListener(element, eventName, handler);\n }\n })\n .catch(function () {\n _this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because the custom \" +\n \"Hammer.JS loader failed.\");\n deregister_1 = function () { };\n });\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return function () { deregister_1(); };\n }\n return zone.runOutsideAngular(function () {\n // Creating the manager bind events, must be done outside of angular\n var mc = _this._config.buildHammer(element);\n var callback = function (eventObj) {\n zone.runGuarded(function () { handler(eventObj); });\n };\n mc.on(eventName, callback);\n return function () {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n };\n HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };\n HammerGesturesPlugin = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __param(1, Inject(HAMMER_GESTURE_CONFIG)),\n __param(3, Optional()), __param(3, Inject(HAMMER_LOADER)),\n __metadata(\"design:paramtypes\", [Object, HammerGestureConfig, Console, Object])\n ], HammerGesturesPlugin);\n return HammerGesturesPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines supported modifiers for key events.\n */\nvar MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nvar \u02750$4 = function (event) { return event.altKey; }, \u02751$1 = function (event) { return event.ctrlKey; }, \u02752$1 = function (event) { return event.metaKey; }, \u02753$1 = function (event) { return event.shiftKey; };\n/**\n * Retrieves modifiers from key-event objects.\n */\nvar MODIFIER_KEY_GETTERS = {\n 'alt': \u02750$4,\n 'control': \u02751$1,\n 'meta': \u02752$1,\n 'shift': \u02753$1\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nvar KeyEventsPlugin = /** @class */ (function (_super) {\n __extends(KeyEventsPlugin, _super);\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n function KeyEventsPlugin(doc) {\n return _super.call(this, doc) || this;\n }\n KeyEventsPlugin_1 = KeyEventsPlugin;\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin_1.parseEventName(eventName) != null; };\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);\n var outsideHandler = KeyEventsPlugin_1.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(function () {\n return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n };\n KeyEventsPlugin.parseEventName = function (eventName) {\n var parts = eventName.toLowerCase().split('.');\n var domEventName = parts.shift();\n if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n var key = KeyEventsPlugin_1._normalizeKey(parts.pop());\n var fullKey = '';\n MODIFIER_KEYS.forEach(function (modifierName) {\n var index = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n var result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n };\n KeyEventsPlugin.getEventFullKey = function (event) {\n var fullKey = '';\n var key = getDOM().getEventKey(event);\n key = key.toLowerCase();\n if (key === ' ') {\n key = 'space'; // for readability\n }\n else if (key === '.') {\n key = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach(function (modifierName) {\n if (modifierName != key) {\n var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n fullKey += modifierName + '.';\n }\n }\n });\n fullKey += key;\n return fullKey;\n };\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {\n return function (event /** TODO #9100 */) {\n if (KeyEventsPlugin_1.getEventFullKey(event) === fullKey) {\n zone.runGuarded(function () { return handler(event); });\n }\n };\n };\n /** @internal */\n KeyEventsPlugin._normalizeKey = function (keyName) {\n // TODO: switch to a Map if the mapping grows too much\n switch (keyName) {\n case 'esc':\n return 'escape';\n default:\n return keyName;\n }\n };\n var KeyEventsPlugin_1;\n KeyEventsPlugin = KeyEventsPlugin_1 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], KeyEventsPlugin);\n return KeyEventsPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\nvar DomSanitizer = /** @class */ (function () {\n function DomSanitizer() {\n }\n return DomSanitizer;\n}());\nvar DomSanitizerImpl = /** @class */ (function (_super) {\n __extends(DomSanitizerImpl, _super);\n function DomSanitizerImpl(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n return _this;\n }\n DomSanitizerImpl.prototype.sanitize = function (ctx, value) {\n if (value == null)\n return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value;\n case SecurityContext.HTML:\n if (value instanceof SafeHtmlImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'HTML');\n return _sanitizeHtml(this._doc, String(value));\n case SecurityContext.STYLE:\n if (value instanceof SafeStyleImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'Style');\n return _sanitizeStyle(value);\n case SecurityContext.SCRIPT:\n if (value instanceof SafeScriptImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'Script');\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {\n // Allow resource URLs in URL contexts, they are strictly more trusted.\n return value.changingThisBreaksApplicationSecurity;\n }\n this.checkNotSafeValue(value, 'URL');\n return _sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (value instanceof SafeResourceUrlImpl) {\n return value.changingThisBreaksApplicationSecurity;\n }\n this.checkNotSafeValue(value, 'ResourceURL');\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n default:\n throw new Error(\"Unexpected SecurityContext \" + ctx + \" (see http://g.co/ng/security#xss)\");\n }\n };\n DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {\n if (value instanceof SafeValueImpl) {\n throw new Error(\"Required a safe \" + expectedType + \", got a \" + value.getTypeName() + \" \" +\n \"(see http://g.co/ng/security#xss)\");\n }\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {\n return new SafeResourceUrlImpl(value);\n };\n DomSanitizerImpl = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSanitizerImpl);\n return DomSanitizerImpl;\n}(DomSanitizer));\nvar SafeValueImpl = /** @class */ (function () {\n function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n // empty\n }\n SafeValueImpl.prototype.toString = function () {\n return \"SafeValue must use [property]=binding: \" + this.changingThisBreaksApplicationSecurity +\n \" (see http://g.co/ng/security#xss)\";\n };\n return SafeValueImpl;\n}());\nvar SafeHtmlImpl = /** @class */ (function (_super) {\n __extends(SafeHtmlImpl, _super);\n function SafeHtmlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeHtmlImpl.prototype.getTypeName = function () { return 'HTML'; };\n return SafeHtmlImpl;\n}(SafeValueImpl));\nvar SafeStyleImpl = /** @class */ (function (_super) {\n __extends(SafeStyleImpl, _super);\n function SafeStyleImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeStyleImpl.prototype.getTypeName = function () { return 'Style'; };\n return SafeStyleImpl;\n}(SafeValueImpl));\nvar SafeScriptImpl = /** @class */ (function (_super) {\n __extends(SafeScriptImpl, _super);\n function SafeScriptImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeScriptImpl.prototype.getTypeName = function () { return 'Script'; };\n return SafeScriptImpl;\n}(SafeValueImpl));\nvar SafeUrlImpl = /** @class */ (function (_super) {\n __extends(SafeUrlImpl, _super);\n function SafeUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeUrlImpl.prototype.getTypeName = function () { return 'URL'; };\n return SafeUrlImpl;\n}(SafeValueImpl));\nvar SafeResourceUrlImpl = /** @class */ (function (_super) {\n __extends(SafeResourceUrlImpl, _super);\n function SafeResourceUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeResourceUrlImpl.prototype.getTypeName = function () { return 'ResourceURL'; };\n return SafeResourceUrlImpl;\n}(SafeValueImpl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar \u02750$5 = PLATFORM_BROWSER_ID;\nvar INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: \u02750$5 },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT] },\n { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\n/**\n * @security Replacing built-in sanitization providers exposes the application to XSS risks.\n * Attacker-controlled data introduced by an unsanitized provider could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n * @publicApi\n */\nvar BROWSER_SANITIZATION_PROVIDERS = [\n { provide: Sanitizer, useExisting: DomSanitizer },\n { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT] },\n];\n/**\n * @publicApi\n */\nvar platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n BrowserGetTestability.init();\n}\nfunction errorHandler() {\n return new ErrorHandler();\n}\nfunction _document() {\n return document;\n}\nvar BROWSER_MODULE_PROVIDERS = [\n BROWSER_SANITIZATION_PROVIDERS,\n { provide: APP_ROOT, useValue: true },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT, NgZone, PLATFORM_ID]\n },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] },\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost, APP_ID]\n },\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },\n { provide: Testability, useClass: Testability, deps: [NgZone] },\n { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n ELEMENT_PROBE_PROVIDERS,\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nvar BrowserModule = /** @class */ (function () {\n function BrowserModule(parentModule) {\n if (parentModule) {\n throw new Error(\"BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.\");\n }\n }\n BrowserModule_1 = BrowserModule;\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n */\n BrowserModule.withServerTransition = function (params) {\n return {\n ngModule: BrowserModule_1,\n providers: [\n { provide: APP_ID, useValue: params.appId },\n { provide: TRANSITION_ID, useExisting: APP_ID },\n SERVER_TRANSITION_PROVIDERS,\n ],\n };\n };\n var BrowserModule_1;\n BrowserModule = BrowserModule_1 = __decorate([\n NgModule({ providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule] }),\n __param(0, Optional()), __param(0, SkipSelf()), __param(0, Inject(BrowserModule_1)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserModule);\n return BrowserModule;\n}());\n\n/**\n * Factory to create Meta service.\n */\nfunction createMeta() {\n return new Meta(\u0275\u0275inject(DOCUMENT));\n}\n/**\n * A service that can be used to get and add meta tags.\n *\n * @publicApi\n */\nvar Meta = /** @class */ (function () {\n function Meta(_doc) {\n this._doc = _doc;\n this._dom = getDOM();\n }\n Meta.prototype.addTag = function (tag, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tag)\n return null;\n return this._getOrCreateElement(tag, forceCreation);\n };\n Meta.prototype.addTags = function (tags, forceCreation) {\n var _this = this;\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tags)\n return [];\n return tags.reduce(function (result, tag) {\n if (tag) {\n result.push(_this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n };\n Meta.prototype.getTag = function (attrSelector) {\n if (!attrSelector)\n return null;\n return this._dom.querySelector(this._doc, \"meta[\" + attrSelector + \"]\") || null;\n };\n Meta.prototype.getTags = function (attrSelector) {\n if (!attrSelector)\n return [];\n var list /*NodeList*/ = this._dom.querySelectorAll(this._doc, \"meta[\" + attrSelector + \"]\");\n return list ? [].slice.call(list) : [];\n };\n Meta.prototype.updateTag = function (tag, selector) {\n if (!tag)\n return null;\n selector = selector || this._parseSelector(tag);\n var meta = this.getTag(selector);\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n };\n Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(this.getTag(attrSelector)); };\n Meta.prototype.removeTagElement = function (meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n };\n Meta.prototype._getOrCreateElement = function (meta, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!forceCreation) {\n var selector = this._parseSelector(meta);\n var elem = this.getTag(selector);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n if (elem && this._containsAttributes(meta, elem))\n return elem;\n }\n var element = this._dom.createElement('meta');\n this._setMetaElementAttributes(meta, element);\n var head = this._dom.getElementsByTagName(this._doc, 'head')[0];\n this._dom.appendChild(head, element);\n return element;\n };\n Meta.prototype._setMetaElementAttributes = function (tag, el) {\n var _this = this;\n Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\n return el;\n };\n Meta.prototype._parseSelector = function (tag) {\n var attr = tag.name ? 'name' : 'property';\n return attr + \"=\\\"\" + tag[attr] + \"\\\"\";\n };\n Meta.prototype._containsAttributes = function (tag, elem) {\n var _this = this;\n return Object.keys(tag).every(function (key) { return _this._dom.getAttribute(elem, key) === tag[key]; });\n };\n Meta.ngInjectableDef = \u0275\u0275defineInjectable({ factory: createMeta, token: Meta, providedIn: \"root\" });\n Meta = __decorate([\n Injectable({ providedIn: 'root', useFactory: createMeta, deps: [] }),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], Meta);\n return Meta;\n}());\n\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n return new Title(\u0275\u0275inject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nvar Title = /** @class */ (function () {\n function Title(_doc) {\n this._doc = _doc;\n }\n /**\n * Get the title of the current HTML document.\n */\n Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };\n Title.ngInjectableDef = \u0275\u0275defineInjectable({ factory: createTitle, token: Title, providedIn: \"root\" });\n Title = __decorate([\n Injectable({ providedIn: 'root', useFactory: createTitle, deps: [] }),\n __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], Title);\n return Title;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar win = typeof window !== 'undefined' && window || {};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ChangeDetectionPerfRecord = /** @class */ (function () {\n function ChangeDetectionPerfRecord(msPerTick, numTicks) {\n this.msPerTick = msPerTick;\n this.numTicks = numTicks;\n }\n return ChangeDetectionPerfRecord;\n}());\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nvar AngularProfiler = /** @class */ (function () {\n function AngularProfiler(ref) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n AngularProfiler.prototype.timeChangeDetection = function (config) {\n var record = config && config['record'];\n var profileName = 'Change Detection';\n // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n var isProfilerAvailable = win.console.profile != null;\n if (record && isProfilerAvailable) {\n win.console.profile(profileName);\n }\n var start = getDOM().performanceNow();\n var numTicks = 0;\n while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n var end = getDOM().performanceNow();\n if (record && isProfilerAvailable) {\n win.console.profileEnd(profileName);\n }\n var msPerTick = (end - start) / numTicks;\n win.console.log(\"ran \" + numTicks + \" change detection cycles\");\n win.console.log(msPerTick.toFixed(2) + \" ms per check\");\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n };\n return AngularProfiler;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n * then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction escapeHtml(text) {\n var escapedText = {\n '&': '&a;',\n '\"': '&q;',\n '\\'': '&s;',\n '<': '&l;',\n '>': '&g;',\n };\n return text.replace(/[&\"'<>]/g, function (s) { return escapedText[s]; });\n}\nfunction unescapeHtml(text) {\n var unescapedText = {\n '&a;': '&',\n '&q;': '\"',\n '&s;': '\\'',\n '&l;': '<',\n '&g;': '>',\n };\n return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * `TransferState` will be available as an injectable token. To use it import\n * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialzied in a\n * non-lossy manner.\n *\n * @publicApi\n */\nvar TransferState = /** @class */ (function () {\n function TransferState() {\n this.store = {};\n this.onSerializeCallbacks = {};\n }\n TransferState_1 = TransferState;\n /** @internal */\n TransferState.init = function (initState) {\n var transferState = new TransferState_1();\n transferState.store = initState;\n return transferState;\n };\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n TransferState.prototype.get = function (key, defaultValue) {\n return this.store[key] !== undefined ? this.store[key] : defaultValue;\n };\n /**\n * Set the value corresponding to a key.\n */\n TransferState.prototype.set = function (key, value) { this.store[key] = value; };\n /**\n * Remove a key from the store.\n */\n TransferState.prototype.remove = function (key) { delete this.store[key]; };\n /**\n * Test whether a key exists in the store.\n */\n TransferState.prototype.hasKey = function (key) { return this.store.hasOwnProperty(key); };\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n TransferState.prototype.onSerialize = function (key, callback) {\n this.onSerializeCallbacks[key] = callback;\n };\n /**\n * Serialize the current state of the store to JSON.\n */\n TransferState.prototype.toJson = function () {\n // Call the onSerialize callbacks and put those values into the store.\n for (var key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n }\n catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store);\n };\n var TransferState_1;\n TransferState = TransferState_1 = __decorate([\n Injectable()\n ], TransferState);\n return TransferState;\n}());\nfunction initTransferState(doc, appId) {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n var script = doc.getElementById(appId + '-state');\n var initialState = {};\n if (script && script.textContent) {\n try {\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return TransferState.init(initialState);\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n */\nvar BrowserTransferStateModule = /** @class */ (function () {\n function BrowserTransferStateModule() {\n }\n BrowserTransferStateModule = __decorate([\n NgModule({\n providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }],\n })\n ], BrowserTransferStateModule);\n return BrowserTransferStateModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nvar By = /** @class */ (function () {\n function By() {\n }\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n By.all = function () { return function () { return true; }; };\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n By.css = function (selector) {\n return function (debugElement) {\n return debugElement.nativeElement != null ?\n getDOM().elementMatches(debugElement.nativeElement, selector) :\n false;\n };\n };\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n By.directive = function (type) {\n return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };\n };\n return By;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nvar VERSION = new Version('8.2.14');\n\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, BROWSER_SANITIZATION_PROVIDERS as \u0275BROWSER_SANITIZATION_PROVIDERS, BrowserDomAdapter as \u0275BrowserDomAdapter, BrowserGetTestability as \u0275BrowserGetTestability, BrowserPlatformLocation as \u0275BrowserPlatformLocation, DomAdapter as \u0275DomAdapter, DomEventsPlugin as \u0275DomEventsPlugin, DomRendererFactory2 as \u0275DomRendererFactory2, DomSanitizerImpl as \u0275DomSanitizerImpl, DomSharedStylesHost as \u0275DomSharedStylesHost, ELEMENT_PROBE_PROVIDERS as \u0275ELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS__POST_R3__ as \u0275ELEMENT_PROBE_PROVIDERS__POST_R3__, HammerGesturesPlugin as \u0275HammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as \u0275INTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as \u0275KeyEventsPlugin, NAMESPACE_URIS as \u0275NAMESPACE_URIS, SharedStylesHost as \u0275SharedStylesHost, TRANSITION_ID as \u0275TRANSITION_ID, errorHandler as \u0275angular_packages_platform_browser_platform_browser_a, _document as \u0275angular_packages_platform_browser_platform_browser_b, BROWSER_MODULE_PROVIDERS as \u0275angular_packages_platform_browser_platform_browser_c, createMeta as \u0275angular_packages_platform_browser_platform_browser_d, createTitle as \u0275angular_packages_platform_browser_platform_browser_e, initTransferState as \u0275angular_packages_platform_browser_platform_browser_f, EventManagerPlugin as \u0275angular_packages_platform_browser_platform_browser_g, appInitializerFactory as \u0275angular_packages_platform_browser_platform_browser_h, SERVER_TRANSITION_PROVIDERS as \u0275angular_packages_platform_browser_platform_browser_i, _createNgProbe as \u0275angular_packages_platform_browser_platform_browser_j, ELEMENT_PROBE_PROVIDERS__PRE_R3__ as \u0275angular_packages_platform_browser_platform_browser_k, GenericBrowserDomAdapter as \u0275angular_packages_platform_browser_platform_browser_l, escapeHtml as \u0275escapeHtml, flattenStyles as \u0275flattenStyles, getDOM as \u0275getDOM, initDomAdapter as \u0275initDomAdapter, setRootDomAdapter as \u0275setRootDomAdapter, shimContentAttribute as \u0275shimContentAttribute, shimHostAttribute as \u0275shimHostAttribute };\n", "import { b as __extends, _ as __decorate, a as __metadata, d as __read, g as __spread } from '../../common/tslib.es6-c4a4947b.js';\nimport '../../common/mergeMap-64c6f393.js';\nimport '../../common/merge-183efbc7.js';\nimport '../../common/share-d41e3509.js';\nimport { Version, \u0275looseIdentical as looseIdentical, EventEmitter, isDevMode, NgModule, Testability, Injector, NgZone, \u0275NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ComponentFactoryResolver, ChangeDetectorRef, TestabilityRegistry, ApplicationRef, SimpleChange } from '../core.js';\nimport '../common.js';\nimport { platformBrowser } from '../platform-browser.js';\n\n/**\n * @license Angular v8.2.14\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noNg() {\n throw new Error('AngularJS v1.x is not loaded!');\n}\nvar noNgElement = (function () { return noNg(); });\nnoNgElement.cleanData = noNg;\nvar angular = {\n bootstrap: noNg,\n module: noNg,\n element: noNgElement,\n injector: noNg,\n version: undefined,\n resumeBootstrap: noNg,\n getTestability: noNg\n};\ntry {\n if (window.hasOwnProperty('angular')) {\n angular = window.angular;\n }\n}\ncatch (_a) {\n // ignore in CJS mode.\n}\n/**\n * @deprecated Use `setAngularJSGlobal` instead.\n *\n * @publicApi\n */\nfunction setAngularLib(ng) {\n setAngularJSGlobal(ng);\n}\n/**\n * @deprecated Use `getAngularJSGlobal` instead.\n *\n * @publicApi\n */\nfunction getAngularLib() {\n return getAngularJSGlobal();\n}\n/**\n * Resets the AngularJS global.\n *\n * Used when AngularJS is loaded lazily, and not available on `window`.\n *\n * @publicApi\n */\nfunction setAngularJSGlobal(ng) {\n angular = ng;\n}\n/**\n * Returns the current AngularJS global.\n *\n * @publicApi\n */\nfunction getAngularJSGlobal() {\n return angular;\n}\nvar bootstrap = function (e, modules, config) {\n return angular.bootstrap(e, modules, config);\n};\n// Do not declare as `module` to avoid webpack bug\n// (see https://github.com/angular/angular/issues/30050).\nvar module_ = function (prefix, dependencies) {\n return angular.module(prefix, dependencies);\n};\nvar element = (function (e) { return angular.element(e); });\nelement.cleanData = function (nodes) { return angular.element.cleanData(nodes); };\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar $COMPILE = '$compile';\nvar $CONTROLLER = '$controller';\nvar $DELEGATE = '$delegate';\nvar $HTTP_BACKEND = '$httpBackend';\nvar $INJECTOR = '$injector';\nvar $INTERVAL = '$interval';\nvar $PARSE = '$parse';\nvar $PROVIDE = '$provide';\nvar $SCOPE = '$scope';\nvar $TEMPLATE_CACHE = '$templateCache';\nvar $$TESTABILITY = '$$testability';\nvar DOWNGRADED_MODULE_COUNT_KEY = '$$angularDowngradedModuleCount';\nvar INJECTOR_KEY = '$$angularInjector';\nvar LAZY_MODULE_REF = '$$angularLazyModuleRef';\nvar UPGRADE_APP_TYPE_KEY = '$$angularUpgradeAppType';\nvar REQUIRE_INJECTOR = '?^^' + INJECTOR_KEY;\nvar REQUIRE_NG_MODEL = '?ngModel';\nvar UPGRADE_MODULE_NAME = '$$UpgradeModule';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A `PropertyBinding` represents a mapping between a property name\n * and an attribute name. It is parsed from a string of the form\n * `\"prop: attr\"`; or simply `\"propAndAttr\" where the property\n * and attribute have the same identifier.\n */\nvar PropertyBinding = /** @class */ (function () {\n function PropertyBinding(prop, attr) {\n this.prop = prop;\n this.attr = attr;\n this.parseBinding();\n }\n PropertyBinding.prototype.parseBinding = function () {\n this.bracketAttr = \"[\" + this.attr + \"]\";\n this.parenAttr = \"(\" + this.attr + \")\";\n this.bracketParenAttr = \"[(\" + this.attr + \")]\";\n var capitalAttr = this.attr.charAt(0).toUpperCase() + this.attr.substr(1);\n this.onAttr = \"on\" + capitalAttr;\n this.bindAttr = \"bind\" + capitalAttr;\n this.bindonAttr = \"bindon\" + capitalAttr;\n };\n return PropertyBinding;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar DIRECTIVE_PREFIX_REGEXP = /^(?:x|data)[:\\-_]/i;\nvar DIRECTIVE_SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\nfunction controllerKey(name) {\n return '$' + name + 'Controller';\n}\nfunction directiveNormalize(name) {\n return name.replace(DIRECTIVE_PREFIX_REGEXP, '')\n .replace(DIRECTIVE_SPECIAL_CHARS_REGEXP, function (_, letter) { return letter.toUpperCase(); });\n}\nfunction getTypeName(type) {\n // Return the name of the type or the first line of its stringified version.\n return type.overriddenName || type.name || type.toString().split('\\n')[0];\n}\nfunction getDowngradedModuleCount($injector) {\n return $injector.has(DOWNGRADED_MODULE_COUNT_KEY) ? $injector.get(DOWNGRADED_MODULE_COUNT_KEY) :\n 0;\n}\nfunction getUpgradeAppType($injector) {\n return $injector.has(UPGRADE_APP_TYPE_KEY) ? $injector.get(UPGRADE_APP_TYPE_KEY) :\n 0 /* None */;\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction validateInjectionKey($injector, downgradedModule, injectionKey, attemptedAction) {\n var upgradeAppType = getUpgradeAppType($injector);\n var downgradedModuleCount = getDowngradedModuleCount($injector);\n // Check for common errors.\n switch (upgradeAppType) {\n case 1 /* Dynamic */:\n case 2 /* Static */:\n if (downgradedModule) {\n throw new Error(\"Error while \" + attemptedAction + \": 'downgradedModule' unexpectedly specified.\\n\" +\n 'You should not specify a value for \\'downgradedModule\\', unless you are downgrading ' +\n 'more than one Angular module (via \\'downgradeModule()\\').');\n }\n break;\n case 3 /* Lite */:\n if (!downgradedModule && (downgradedModuleCount >= 2)) {\n throw new Error(\"Error while \" + attemptedAction + \": 'downgradedModule' not specified.\\n\" +\n 'This application contains more than one downgraded Angular module, thus you need to ' +\n 'always specify \\'downgradedModule\\' when downgrading components and injectables.');\n }\n if (!$injector.has(injectionKey)) {\n throw new Error(\"Error while \" + attemptedAction + \": Unable to find the specified downgraded module.\\n\" +\n 'Did you forget to downgrade an Angular module or include it in the AngularJS ' +\n 'application?');\n }\n break;\n default:\n throw new Error(\"Error while \" + attemptedAction + \": Not a valid '@angular/upgrade' application.\\n\" +\n 'Did you forget to downgrade an Angular module or include it in the AngularJS ' +\n 'application?');\n }\n}\n/**\n * @return Whether the passed-in component implements the subset of the\n * `ControlValueAccessor` interface needed for AngularJS `ng-model`\n * compatibility.\n */\nfunction supportsNgModel(component) {\n return typeof component.writeValue === 'function' &&\n typeof component.registerOnChange === 'function';\n}\n/**\n * Glue the AngularJS `NgModelController` (if it exists) to the component\n * (if it implements the needed subset of the `ControlValueAccessor` interface).\n */\nfunction hookupNgModel(ngModel, component) {\n if (ngModel && supportsNgModel(component)) {\n ngModel.$render = function () { component.writeValue(ngModel.$viewValue); };\n component.registerOnChange(ngModel.$setViewValue.bind(ngModel));\n if (typeof component.registerOnTouched === 'function') {\n component.registerOnTouched(ngModel.$setTouched.bind(ngModel));\n }\n }\n}\n/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n */\nfunction strictEquals(val1, val2) {\n return val1 === val2 || (val1 !== val1 && val2 !== val2);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nvar DowngradeComponentAdapter = /** @class */ (function () {\n function DowngradeComponentAdapter(element, attrs, scope, ngModel, parentInjector, $injector, $compile, $parse, componentFactory, wrapCallback) {\n this.element = element;\n this.attrs = attrs;\n this.scope = scope;\n this.ngModel = ngModel;\n this.parentInjector = parentInjector;\n this.$injector = $injector;\n this.$compile = $compile;\n this.$parse = $parse;\n this.componentFactory = componentFactory;\n this.wrapCallback = wrapCallback;\n this.implementsOnChanges = false;\n this.inputChangeCount = 0;\n this.inputChanges = {};\n this.componentScope = scope.$new();\n }\n DowngradeComponentAdapter.prototype.compileContents = function () {\n var _this = this;\n var compiledProjectableNodes = [];\n var projectableNodes = this.groupProjectableNodes();\n var linkFns = projectableNodes.map(function (nodes) { return _this.$compile(nodes); });\n this.element.empty();\n linkFns.forEach(function (linkFn) {\n linkFn(_this.scope, function (clone) {\n compiledProjectableNodes.push(clone);\n _this.element.append(clone);\n });\n });\n return compiledProjectableNodes;\n };\n DowngradeComponentAdapter.prototype.createComponent = function (projectableNodes) {\n var providers = [{ provide: $SCOPE, useValue: this.componentScope }];\n var childInjector = Injector.create({ providers: providers, parent: this.parentInjector, name: 'DowngradeComponentAdapter' });\n this.componentRef =\n this.componentFactory.create(childInjector, projectableNodes, this.element[0]);\n this.viewChangeDetector = this.componentRef.injector.get(ChangeDetectorRef);\n this.changeDetector = this.componentRef.changeDetectorRef;\n this.component = this.componentRef.instance;\n // testability hook is commonly added during component bootstrap in\n // packages/core/src/application_ref.bootstrap()\n // in downgraded application, component creation will take place here as well as adding the\n // testability hook.\n var testability = this.componentRef.injector.get(Testability, null);\n if (testability) {\n this.componentRef.injector.get(TestabilityRegistry)\n .registerApplication(this.componentRef.location.nativeElement, testability);\n }\n hookupNgModel(this.ngModel, this.component);\n };\n DowngradeComponentAdapter.prototype.setupInputs = function (manuallyAttachView, propagateDigest) {\n var _this = this;\n if (propagateDigest === void 0) { propagateDigest = true; }\n var attrs = this.attrs;\n var inputs = this.componentFactory.inputs || [];\n var _loop_1 = function (i) {\n var input = new PropertyBinding(inputs[i].propName, inputs[i].templateName);\n var expr = null;\n if (attrs.hasOwnProperty(input.attr)) {\n var observeFn_1 = (function (prop) {\n var prevValue = INITIAL_VALUE;\n return function (currValue) {\n // Initially, both `$observe()` and `$watch()` will call this function.\n if (!strictEquals(prevValue, currValue)) {\n if (prevValue === INITIAL_VALUE) {\n prevValue = currValue;\n }\n _this.updateInput(prop, prevValue, currValue);\n prevValue = currValue;\n }\n };\n })(input.prop);\n attrs.$observe(input.attr, observeFn_1);\n // Use `$watch()` (in addition to `$observe()`) in order to initialize the input in time\n // for `ngOnChanges()`. This is necessary if we are already in a `$digest`, which means that\n // `ngOnChanges()` (which is called by a watcher) will run before the `$observe()` callback.\n var unwatch_1 = this_1.componentScope.$watch(function () {\n unwatch_1();\n unwatch_1 = null;\n observeFn_1(attrs[input.attr]);\n });\n }\n else if (attrs.hasOwnProperty(input.bindAttr)) {\n expr = attrs[input.bindAttr];\n }\n else if (attrs.hasOwnProperty(input.bracketAttr)) {\n expr = attrs[input.bracketAttr];\n }\n else if (attrs.hasOwnProperty(input.bindonAttr)) {\n expr = attrs[input.bindonAttr];\n }\n else if (attrs.hasOwnProperty(input.bracketParenAttr)) {\n expr = attrs[input.bracketParenAttr];\n }\n if (expr != null) {\n var watchFn = (function (prop) { return function (currValue, prevValue) {\n return _this.updateInput(prop, prevValue, currValue);\n }; })(input.prop);\n this_1.componentScope.$watch(expr, watchFn);\n }\n };\n var this_1 = this;\n for (var i = 0; i < inputs.length; i++) {\n _loop_1(i);\n }\n // Invoke `ngOnChanges()` and Change Detection (when necessary)\n var detectChanges = function () { return _this.changeDetector.detectChanges(); };\n var prototype = this.componentFactory.componentType.prototype;\n this.implementsOnChanges = !!(prototype && prototype.ngOnChanges);\n this.componentScope.$watch(function () { return _this.inputChangeCount; }, this.wrapCallback(function () {\n // Invoke `ngOnChanges()`\n if (_this.implementsOnChanges) {\n var inputChanges = _this.inputChanges;\n _this.inputChanges = {};\n _this.component.ngOnChanges(inputChanges);\n }\n _this.viewChangeDetector.markForCheck();\n // If opted out of propagating digests, invoke change detection when inputs change.\n if (!propagateDigest) {\n detectChanges();\n }\n }));\n // If not opted out of propagating digests, invoke change detection on every digest\n if (propagateDigest) {\n this.componentScope.$watch(this.wrapCallback(detectChanges));\n }\n // If necessary, attach the view so that it will be dirty-checked.\n // (Allow time for the initial input values to be set and `ngOnChanges()` to be called.)\n if (manuallyAttachView || !propagateDigest) {\n var unwatch_2 = this.componentScope.$watch(function () {\n unwatch_2();\n unwatch_2 = null;\n var appRef = _this.parentInjector.get(ApplicationRef);\n appRef.attachView(_this.componentRef.hostView);\n });\n }\n };\n DowngradeComponentAdapter.prototype.setupOutputs = function () {\n var attrs = this.attrs;\n var outputs = this.componentFactory.outputs || [];\n for (var j = 0; j < outputs.length; j++) {\n var output = new PropertyBinding(outputs[j].propName, outputs[j].templateName);\n var bindonAttr = output.bindonAttr.substring(0, output.bindonAttr.length - 6);\n var bracketParenAttr = \"[(\" + output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8) + \")]\";\n // order below is important - first update bindings then evaluate expressions\n if (attrs.hasOwnProperty(bindonAttr)) {\n this.subscribeToOutput(output, attrs[bindonAttr], true);\n }\n if (attrs.hasOwnProperty(bracketParenAttr)) {\n this.subscribeToOutput(output, attrs[bracketParenAttr], true);\n }\n if (attrs.hasOwnProperty(output.onAttr)) {\n this.subscribeToOutput(output, attrs[output.onAttr]);\n }\n if (attrs.hasOwnProperty(output.parenAttr)) {\n this.subscribeToOutput(output, attrs[output.parenAttr]);\n }\n }\n };\n DowngradeComponentAdapter.prototype.subscribeToOutput = function (output, expr, isAssignment) {\n var _this = this;\n if (isAssignment === void 0) { isAssignment = false; }\n var getter = this.$parse(expr);\n var setter = getter.assign;\n if (isAssignment && !setter) {\n throw new Error(\"Expression '\" + expr + \"' is not assignable!\");\n }\n var emitter = this.component[output.prop];\n if (emitter) {\n emitter.subscribe({\n next: isAssignment ? function (v) { return setter(_this.scope, v); } :\n function (v) { return getter(_this.scope, { '$event': v }); }\n });\n }\n else {\n throw new Error(\"Missing emitter '\" + output.prop + \"' on component '\" + getTypeName(this.componentFactory.componentType) + \"'!\");\n }\n };\n DowngradeComponentAdapter.prototype.registerCleanup = function () {\n var _this = this;\n var testabilityRegistry = this.componentRef.injector.get(TestabilityRegistry);\n var destroyComponentRef = this.wrapCallback(function () { return _this.componentRef.destroy(); });\n var destroyed = false;\n this.element.on('$destroy', function () { return _this.componentScope.$destroy(); });\n this.componentScope.$on('$destroy', function () {\n if (!destroyed) {\n destroyed = true;\n testabilityRegistry.unregisterApplication(_this.componentRef.location.nativeElement);\n destroyComponentRef();\n }\n });\n };\n DowngradeComponentAdapter.prototype.getInjector = function () { return this.componentRef.injector; };\n DowngradeComponentAdapter.prototype.updateInput = function (prop, prevValue, currValue) {\n if (this.implementsOnChanges) {\n this.inputChanges[prop] = new SimpleChange(prevValue, currValue, prevValue === currValue);\n }\n this.inputChangeCount++;\n this.component[prop] = currValue;\n };\n DowngradeComponentAdapter.prototype.groupProjectableNodes = function () {\n var ngContentSelectors = this.componentFactory.ngContentSelectors;\n return groupNodesBySelector(ngContentSelectors, this.element.contents());\n };\n return DowngradeComponentAdapter;\n}());\n/**\n * Group a set of DOM nodes into `ngContent` groups, based on the given content selectors.\n */\nfunction groupNodesBySelector(ngContentSelectors, nodes) {\n var projectableNodes = [];\n for (var i = 0, ii = ngContentSelectors.length; i < ii; ++i) {\n projectableNodes[i] = [];\n }\n for (var j = 0, jj = nodes.length; j < jj; ++j) {\n var node = nodes[j];\n var ngContentIndex = findMatchingNgContentIndex(node, ngContentSelectors);\n if (ngContentIndex != null) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n return projectableNodes;\n}\nfunction findMatchingNgContentIndex(element, ngContentSelectors) {\n var ngContentIndices = [];\n var wildcardNgContentIndex = -1;\n for (var i = 0; i < ngContentSelectors.length; i++) {\n var selector = ngContentSelectors[i];\n if (selector === '*') {\n wildcardNgContentIndex = i;\n }\n else {\n if (matchesSelector(element, selector)) {\n ngContentIndices.push(i);\n }\n }\n }\n ngContentIndices.sort();\n if (wildcardNgContentIndex !== -1) {\n ngContentIndices.push(wildcardNgContentIndex);\n }\n return ngContentIndices.length ? ngContentIndices[0] : null;\n}\nvar _matches;\nfunction matchesSelector(el, selector) {\n if (!_matches) {\n var elProto = Element.prototype;\n _matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector ||\n elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector;\n }\n return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isThenable(obj) {\n return !!obj && isFunction(obj.then);\n}\n/**\n * Synchronous, promise-like object.\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise() {\n this.resolved = false;\n this.callbacks = [];\n }\n SyncPromise.all = function (valuesOrPromises) {\n var aggrPromise = new SyncPromise();\n var resolvedCount = 0;\n var results = [];\n var resolve = function (idx, value) {\n results[idx] = value;\n if (++resolvedCount === valuesOrPromises.length)\n aggrPromise.resolve(results);\n };\n valuesOrPromises.forEach(function (p, idx) {\n if (isThenable(p)) {\n p.then(function (v) { return resolve(idx, v); });\n }\n else {\n resolve(idx, p);\n }\n });\n return aggrPromise;\n };\n SyncPromise.prototype.resolve = function (value) {\n // Do nothing, if already resolved.\n if (this.resolved)\n return;\n this.value = value;\n this.resolved = true;\n // Run the queued callbacks.\n this.callbacks.forEach(function (callback) { return callback(value); });\n this.callbacks.length = 0;\n };\n SyncPromise.prototype.then = function (callback) {\n if (this.resolved) {\n callback(this.value);\n }\n else {\n this.callbacks.push(callback);\n }\n };\n return SyncPromise;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * A helper function that allows an Angular component to be used from AngularJS.\n *\n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n *\n * This helper function returns a factory function to be used for registering\n * an AngularJS wrapper directive for \"downgrading\" an Angular component.\n *\n * @usageNotes\n * ### Examples\n *\n * Let's assume that you have an Angular component called `ng2Heroes` that needs\n * to be made available in AngularJS templates.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng2-heroes\"}\n *\n * We must create an AngularJS [directive](https://docs.angularjs.org/guide/directive)\n * that will make this Angular component available inside AngularJS templates.\n * The `downgradeComponent()` function returns a factory function that we\n * can use to define the AngularJS directive that wraps the \"downgraded\" component.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng2-heroes-wrapper\"}\n *\n * @param info contains information about the Component that is being downgraded:\n *\n * - `component: Type<any>`: The type of the Component that will be downgraded\n * - `downgradedModule?: string`: The name of the downgraded module (if any) that the component\n * \"belongs to\", as returned by a call to `downgradeModule()`. It is the module, whose\n * corresponding Angular module will be bootstrapped, when the component needs to be instantiated.\n * <br />\n * (This option is only necessary when using `downgradeModule()` to downgrade more than one\n * Angular module.)\n * - `propagateDigest?: boolean`: Whether to perform {@link ChangeDetectorRef#detectChanges\n * change detection} on the component on every\n * [$digest](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest). If set to `false`,\n * change detection will still be performed when any of the component's inputs changes.\n * (Default: true)\n *\n * @returns a factory function that can be used to register the component in an\n * AngularJS module.\n *\n * @publicApi\n */\nfunction downgradeComponent(info) {\n var directiveFactory = function ($compile, $injector, $parse) {\n // When using `downgradeModule()`, we need to handle certain things specially. For example:\n // - We always need to attach the component view to the `ApplicationRef` for it to be\n // dirty-checked.\n // - We need to ensure callbacks to Angular APIs (e.g. change detection) are run inside the\n // Angular zone.\n // NOTE: This is not needed, when using `UpgradeModule`, because `$digest()` will be run\n // inside the Angular zone (except if explicitly escaped, in which case we shouldn't\n // force it back in).\n var isNgUpgradeLite = getUpgradeAppType($injector) === 3 /* Lite */;\n var wrapCallback = !isNgUpgradeLite ? function (cb) { return cb; } : function (cb) { return function () { return NgZone.isInAngularZone() ? cb() : ngZone.run(cb); }; };\n var ngZone;\n // When downgrading multiple modules, special handling is needed wrt injectors.\n var hasMultipleDowngradedModules = isNgUpgradeLite && (getDowngradedModuleCount($injector) > 1);\n return {\n restrict: 'E',\n terminal: true,\n require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],\n link: function (scope, element, attrs, required) {\n // We might have to compile the contents asynchronously, because this might have been\n // triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have\n // been compiled.\n var ngModel = required[1];\n var parentInjector = required[0];\n var moduleInjector = undefined;\n var ranAsync = false;\n if (!parentInjector || hasMultipleDowngradedModules) {\n var downgradedModule = info.downgradedModule || '';\n var lazyModuleRefKey = \"\" + LAZY_MODULE_REF + downgradedModule;\n var attemptedAction = \"instantiating component '\" + getTypeName(info.component) + \"'\";\n validateInjectionKey($injector, downgradedModule, lazyModuleRefKey, attemptedAction);\n var lazyModuleRef = $injector.get(lazyModuleRefKey);\n moduleInjector = lazyModuleRef.injector || lazyModuleRef.promise;\n }\n // Notes:\n //\n // There are two injectors: `finalModuleInjector` and `finalParentInjector` (they might be\n // the same instance, but that is irrelevant):\n // - `finalModuleInjector` is used to retrieve `ComponentFactoryResolver`, thus it must be\n // on the same tree as the `NgModule` that declares this downgraded component.\n // - `finalParentInjector` is used for all other injection purposes.\n // (Note that Angular knows to only traverse the component-tree part of that injector,\n // when looking for an injectable and then switch to the module injector.)\n //\n // There are basically three cases:\n // - If there is no parent component (thus no `parentInjector`), we bootstrap the downgraded\n // `NgModule` and use its injector as both `finalModuleInjector` and\n // `finalParentInjector`.\n // - If there is a parent component (and thus a `parentInjector`) and we are sure that it\n // belongs to the same `NgModule` as this downgraded component (e.g. because there is only\n // one downgraded module, we use that `parentInjector` as both `finalModuleInjector` and\n // `finalParentInjector`.\n // - If there is a parent component, but it may belong to a different `NgModule`, then we\n // use the `parentInjector` as `finalParentInjector` and this downgraded component's\n // declaring `NgModule`'s injector as `finalModuleInjector`.\n // Note 1: If the `NgModule` is already bootstrapped, we just get its injector (we don't\n // bootstrap again).\n // Note 2: It is possible that (while there are multiple downgraded modules) this\n // downgraded component and its parent component both belong to the same NgModule.\n // In that case, we could have used the `parentInjector` as both\n // `finalModuleInjector` and `finalParentInjector`, but (for simplicity) we are\n // treating this case as if they belong to different `NgModule`s. That doesn't\n // really affect anything, since `parentInjector` has `moduleInjector` as ancestor\n // and trying to resolve `ComponentFactoryResolver` from either one will return\n // the same instance.\n // If there is a parent component, use its injector as parent injector.\n // If this is a \"top-level\" Angular component, use the module injector.\n var finalParentInjector = parentInjector || moduleInjector;\n // If this is a \"top-level\" Angular component or the parent component may belong to a\n // different `NgModule`, use the module injector for module-specific dependencies.\n // If there is a parent component that belongs to the same `NgModule`, use its injector.\n var finalModuleInjector = moduleInjector || parentInjector;\n var doDowngrade = function (injector, moduleInjector) {\n // Retrieve `ComponentFactoryResolver` from the injector tied to the `NgModule` this\n // component belongs to.\n var componentFactoryResolver = moduleInjector.get(ComponentFactoryResolver);\n var componentFactory = componentFactoryResolver.resolveComponentFactory(info.component);\n if (!componentFactory) {\n throw new Error(\"Expecting ComponentFactory for: \" + getTypeName(info.component));\n }\n var injectorPromise = new ParentInjectorPromise(element);\n var facade = new DowngradeComponentAdapter(element, attrs, scope, ngModel, injector, $injector, $compile, $parse, componentFactory, wrapCallback);\n var projectableNodes = facade.compileContents();\n facade.createComponent(projectableNodes);\n facade.setupInputs(isNgUpgradeLite, info.propagateDigest);\n facade.setupOutputs();\n facade.registerCleanup();\n injectorPromise.resolve(facade.getInjector());\n if (ranAsync) {\n // If this is run async, it is possible that it is not run inside a\n // digest and initial input values will not be detected.\n scope.$evalAsync(function () { });\n }\n };\n var downgradeFn = !isNgUpgradeLite ? doDowngrade : function (pInjector, mInjector) {\n if (!ngZone) {\n ngZone = pInjector.get(NgZone);\n }\n wrapCallback(function () { return doDowngrade(pInjector, mInjector); })();\n };\n // NOTE:\n // Not using `ParentInjectorPromise.all()` (which is inherited from `SyncPromise`), because\n // Closure Compiler (or some related tool) complains:\n // `TypeError: ...$src$downgrade_component_ParentInjectorPromise.all is not a function`\n SyncPromise.all([finalParentInjector, finalModuleInjector])\n .then(function (_a) {\n var _b = __read(_a, 2), pInjector = _b[0], mInjector = _b[1];\n return downgradeFn(pInjector, mInjector);\n });\n ranAsync = true;\n }\n };\n };\n // bracket-notation because of closure - see #14441\n directiveFactory['$inject'] = [$COMPILE, $INJECTOR, $PARSE];\n return directiveFactory;\n}\n/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of AngularJS's `$compile`.\n */\nvar ParentInjectorPromise = /** @class */ (function (_super) {\n __extends(ParentInjectorPromise, _super);\n function ParentInjectorPromise(element) {\n var _this = _super.call(this) || this;\n _this.element = element;\n _this.injectorKey = controllerKey(INJECTOR_KEY);\n // Store the promise on the element.\n element.data(_this.injectorKey, _this);\n return _this;\n }\n ParentInjectorPromise.prototype.resolve = function (injector) {\n // Store the real injector on the element.\n this.element.data(this.injectorKey, injector);\n // Release the element to prevent memory leaks.\n this.element = null;\n // Resolve the promise.\n _super.prototype.resolve.call(this, injector);\n };\n return ParentInjectorPromise;\n}(SyncPromise));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * A helper function to allow an Angular service to be accessible from AngularJS.\n *\n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n *\n * This helper function returns a factory function that provides access to the Angular\n * service identified by the `token` parameter.\n *\n * @usageNotes\n * ### Examples\n *\n * First ensure that the service to be downgraded is provided in an `NgModule`\n * that will be part of the upgrade application. For example, let's assume we have\n * defined `HeroesService`\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng2-heroes-service\"}\n *\n * and that we have included this in our upgrade app `NgModule`\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng2-module\"}\n *\n * Now we can register the `downgradeInjectable` factory function for the service\n * on an AngularJS module.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"downgrade-ng2-heroes-service\"}\n *\n * Inside an AngularJS component's controller we can get hold of the\n * downgraded service via the name we gave when downgrading.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"example-app\"}\n *\n * <div class=\"alert is-important\">\n *\n * When using `downgradeModule()`, downgraded injectables will not be available until the Angular\n * module that provides them is instantiated. In order to be safe, you need to ensure that the\n * downgraded injectables are not used anywhere _outside_ the part of the app where it is\n * guaranteed that their module has been instantiated.\n *\n * For example, it is _OK_ to use a downgraded service in an upgraded component that is only used\n * from a downgraded Angular component provided by the same Angular module as the injectable, but\n * it is _not OK_ to use it in an AngularJS component that may be used independently of Angular or\n * use it in a downgraded Angular component from a different module.\n *\n * </div>\n *\n * @param token an `InjectionToken` that identifies a service provided from Angular.\n * @param downgradedModule the name of the downgraded module (if any) that the injectable\n * \"belongs to\", as returned by a call to `downgradeModule()`. It is the module, whose injector will\n * be used for instantiating the injectable.<br />\n * (This option is only necessary when using `downgradeModule()` to downgrade more than one Angular\n * module.)\n *\n * @returns a [factory function](https://docs.angularjs.org/guide/di) that can be\n * used to register the service on an AngularJS module.\n *\n * @publicApi\n */\nfunction downgradeInjectable(token, downgradedModule) {\n if (downgradedModule === void 0) { downgradedModule = ''; }\n var factory = function ($injector) {\n var injectorKey = \"\" + INJECTOR_KEY + downgradedModule;\n var injectableName = isFunction(token) ? getTypeName(token) : String(token);\n var attemptedAction = \"instantiating injectable '\" + injectableName + \"'\";\n validateInjectionKey($injector, downgradedModule, injectorKey, attemptedAction);\n var injector = $injector.get(injectorKey);\n return injector.get(token);\n };\n factory['$inject'] = [$INJECTOR];\n return factory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nvar VERSION = new Version('8.2.14');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// We have to do a little dance to get the ng1 injector into the module injector.\n// We store the ng1 injector so that the provider in the module injector can access it\n// Then we \"get\" the ng1 injector from the module injector, which triggers the provider to read\n// the stored injector and release the reference to it.\nvar tempInjectorRef = null;\nfunction setTempInjectorRef(injector) {\n tempInjectorRef = injector;\n}\nfunction injectorFactory() {\n if (!tempInjectorRef) {\n throw new Error('Trying to get the AngularJS injector before it being set.');\n }\n var injector = tempInjectorRef;\n tempInjectorRef = null; // clear the value to prevent memory leaks\n return injector;\n}\nfunction rootScopeFactory(i) {\n return i.get('$rootScope');\n}\nfunction compileFactory(i) {\n return i.get('$compile');\n}\nfunction parseFactory(i) {\n return i.get('$parse');\n}\nvar angular1Providers = [\n // We must use exported named functions for the ng2 factories to keep the compiler happy:\n // > Metadata collected contains an error that will be reported at runtime:\n // > Function calls are not supported.\n // > Consider replacing the function or lambda with a reference to an exported function\n { provide: '$injector', useFactory: injectorFactory, deps: [] },\n { provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector'] },\n { provide: '$compile', useFactory: compileFactory, deps: ['$injector'] },\n { provide: '$parse', useFactory: parseFactory, deps: ['$injector'] }\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NgAdapterInjector = /** @class */ (function () {\n function NgAdapterInjector(modInjector) {\n this.modInjector = modInjector;\n }\n // When Angular locate a service in the component injector tree, the not found value is set to\n // `NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR`. In such a case we should not walk up to the module\n // injector.\n // AngularJS only supports a single tree and should always check the module injector.\n NgAdapterInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n return notFoundValue;\n }\n return this.modInjector.get(token, notFoundValue);\n };\n return NgAdapterInjector;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar moduleUid = 0;\n/**\n * @description\n *\n * A helper function for creating an AngularJS module that can bootstrap an Angular module\n * \"on-demand\" (possibly lazily) when a {@link downgradeComponent downgraded component} needs to be\n * instantiated.\n *\n * *Part of the [upgrade/static](api?query=upgrade/static) library for hybrid upgrade apps that\n * support AoT compilation.*\n *\n * It allows loading/bootstrapping the Angular part of a hybrid application lazily and not having to\n * pay the cost up-front. For example, you can have an AngularJS application that uses Angular for\n * specific routes and only instantiate the Angular modules if/when the user visits one of these\n * routes.\n *\n * The Angular module will be bootstrapped once (when requested for the first time) and the same\n * reference will be used from that point onwards.\n *\n * `downgradeModule()` requires either an `NgModuleFactory` or a function:\n * - `NgModuleFactory`: If you pass an `NgModuleFactory`, it will be used to instantiate a module\n * using `platformBrowser`'s {@link PlatformRef#bootstrapModuleFactory bootstrapModuleFactory()}.\n * - `Function`: If you pass a function, it is expected to return a promise resolving to an\n * `NgModuleRef`. The function is called with an array of extra {@link StaticProvider Providers}\n * that are expected to be available from the returned `NgModuleRef`'s `Injector`.\n *\n * `downgradeModule()` returns the name of the created AngularJS wrapper module. You can use it to\n * declare a dependency in your main AngularJS module.\n *\n * {@example upgrade/static/ts/lite/module.ts region=\"basic-how-to\"}\n *\n * For more details on how to use `downgradeModule()` see\n * [Upgrading for Performance](guide/upgrade-performance).\n *\n * @usageNotes\n *\n * Apart from `UpgradeModule`, you can use the rest of the `upgrade/static` helpers as usual to\n * build a hybrid application. Note that the Angular pieces (e.g. downgraded services) will not be\n * available until the downgraded module has been bootstrapped, i.e. by instantiating a downgraded\n * component.\n *\n * <div class=\"alert is-important\">\n *\n * You cannot use `downgradeModule()` and `UpgradeModule` in the same hybrid application.<br />\n * Use one or the other.\n *\n * </div>\n *\n * ### Differences with `UpgradeModule`\n *\n * Besides their different API, there are two important internal differences between\n * `downgradeModule()` and `UpgradeModule` that affect the behavior of hybrid applications:\n *\n * 1. Unlike `UpgradeModule`, `downgradeModule()` does not bootstrap the main AngularJS module\n * inside the {@link NgZone Angular zone}.\n * 2. Unlike `UpgradeModule`, `downgradeModule()` does not automatically run a\n * [$digest()](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest) when changes are\n * detected in the Angular part of the application.\n *\n * What this means is that applications using `UpgradeModule` will run change detection more\n * frequently in order to ensure that both frameworks are properly notified about possible changes.\n * This will inevitably result in more change detection runs than necessary.\n *\n * `downgradeModule()`, on the other side, does not try to tie the two change detection systems as\n * tightly, restricting the explicit change detection runs only to cases where it knows it is\n * necessary (e.g. when the inputs of a downgraded component change). This improves performance,\n * especially in change-detection-heavy applications, but leaves it up to the developer to manually\n * notify each framework as needed.\n *\n * For a more detailed discussion of the differences and their implications, see\n * [Upgrading for Performance](guide/upgrade-performance).\n *\n * <div class=\"alert is-helpful\">\n *\n * You can manually trigger a change detection run in AngularJS using\n * [scope.$apply(...)](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$apply) or\n * [$rootScope.$digest()](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest).\n *\n * You can manually trigger a change detection run in Angular using {@link NgZone#run\n * ngZone.run(...)}.\n *\n * </div>\n *\n * ### Downgrading multiple modules\n *\n * It is possible to downgrade multiple modules and include them in an AngularJS application. In\n * that case, each downgraded module will be bootstrapped when an associated downgraded component or\n * injectable needs to be instantiated.\n *\n * Things to keep in mind, when downgrading multiple modules:\n *\n * - Each downgraded component/injectable needs to be explicitly associated with a downgraded\n * module. See `downgradeComponent()` and `downgradeInjectable()` for more details.\n *\n * - If you want some injectables to be shared among all downgraded modules, you can provide them as\n * `StaticProvider`s, when creating the `PlatformRef` (e.g. via `platformBrowser` or\n * `platformBrowserDynamic`).\n *\n * - When using {@link PlatformRef#bootstrapmodule `bootstrapModule()`} or\n * {@link PlatformRef#bootstrapmodulefactory `bootstrapModuleFactory()`} to bootstrap the\n * downgraded modules, each one is considered a \"root\" module. As a consequence, a new instance\n * will be created for every injectable provided in `\"root\"` (via\n * {@link Injectable#providedIn `providedIn`}).\n * If this is not your intention, you can have a shared module (that will act as act as the \"root\"\n * module) and create all downgraded modules using that module's injector:\n *\n * {@example upgrade/static/ts/lite-multi-shared/module.ts region=\"shared-root-module\"}\n *\n * @publicApi\n */\nfunction downgradeModule(moduleFactoryOrBootstrapFn) {\n var lazyModuleName = UPGRADE_MODULE_NAME + \".lazy\" + ++moduleUid;\n var lazyModuleRefKey = \"\" + LAZY_MODULE_REF + lazyModuleName;\n var lazyInjectorKey = \"\" + INJECTOR_KEY + lazyModuleName;\n var bootstrapFn = isFunction(moduleFactoryOrBootstrapFn) ?\n moduleFactoryOrBootstrapFn :\n function (extraProviders) {\n return platformBrowser(extraProviders).bootstrapModuleFactory(moduleFactoryOrBootstrapFn);\n };\n var injector;\n // Create an ng1 module to bootstrap.\n module_(lazyModuleName, [])\n .constant(UPGRADE_APP_TYPE_KEY, 3 /* Lite */)\n .factory(INJECTOR_KEY, [lazyInjectorKey, identity])\n .factory(lazyInjectorKey, function () {\n if (!injector) {\n throw new Error('Trying to get the Angular injector before bootstrapping the corresponding ' +\n 'Angular module.');\n }\n return injector;\n })\n .factory(LAZY_MODULE_REF, [lazyModuleRefKey, identity])\n .factory(lazyModuleRefKey, [\n $INJECTOR,\n function ($injector) {\n setTempInjectorRef($injector);\n var result = {\n promise: bootstrapFn(angular1Providers).then(function (ref) {\n injector = result.injector = new NgAdapterInjector(ref.injector);\n injector.get($INJECTOR);\n return injector;\n })\n };\n return result;\n }\n ])\n .config([\n $INJECTOR, $PROVIDE,\n function ($injector, $provide) {\n $provide.constant(DOWNGRADED_MODULE_COUNT_KEY, getDowngradedModuleCount($injector) + 1);\n }\n ]);\n return lazyModuleName;\n}\nfunction identity(x) {\n return x;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Constants\nvar REQUIRE_PREFIX_RE = /^(\\^\\^?)?(\\?)?(\\^\\^?)?/;\n// Classes\nvar UpgradeHelper = /** @class */ (function () {\n function UpgradeHelper(injector, name, elementRef, directive) {\n this.injector = injector;\n this.name = name;\n this.$injector = injector.get($INJECTOR);\n this.$compile = this.$injector.get($COMPILE);\n this.$controller = this.$injector.get($CONTROLLER);\n this.element = elementRef.nativeElement;\n this.$element = element(this.element);\n this.directive = directive || UpgradeHelper.getDirective(this.$injector, name);\n }\n UpgradeHelper.getDirective = function ($injector, name) {\n var directives = $injector.get(name + 'Directive');\n if (directives.length > 1) {\n throw new Error(\"Only support single directive definition for: \" + name);\n }\n var directive = directives[0];\n // AngularJS will transform `link: xyz` to `compile: () => xyz`. So we can only tell there was a\n // user-defined `compile` if there is no `link`. In other cases, we will just ignore `compile`.\n if (directive.compile && !directive.link)\n notSupported(name, 'compile');\n if (directive.replace)\n notSupported(name, 'replace');\n if (directive.terminal)\n notSupported(name, 'terminal');\n return directive;\n };\n UpgradeHelper.getTemplate = function ($injector, directive, fetchRemoteTemplate, $element) {\n if (fetchRemoteTemplate === void 0) { fetchRemoteTemplate = false; }\n if (directive.template !== undefined) {\n return getOrCall(directive.template, $element);\n }\n else if (directive.templateUrl) {\n var $templateCache_1 = $injector.get($TEMPLATE_CACHE);\n var url_1 = getOrCall(directive.templateUrl, $element);\n var template = $templateCache_1.get(url_1);\n if (template !== undefined) {\n return template;\n }\n else if (!fetchRemoteTemplate) {\n throw new Error('loading directive templates asynchronously is not supported');\n }\n return new Promise(function (resolve, reject) {\n var $httpBackend = $injector.get($HTTP_BACKEND);\n $httpBackend('GET', url_1, null, function (status, response) {\n if (status === 200) {\n resolve($templateCache_1.put(url_1, response));\n }\n else {\n reject(\"GET component template from '\" + url_1 + \"' returned '\" + status + \": \" + response + \"'\");\n }\n });\n });\n }\n else {\n throw new Error(\"Directive '\" + directive.name + \"' is not a component, it is missing template.\");\n }\n };\n UpgradeHelper.prototype.buildController = function (controllerType, $scope) {\n // TODO: Document that we do not pre-assign bindings on the controller instance.\n // Quoted properties below so that this code can be optimized with Closure Compiler.\n var locals = { '$scope': $scope, '$element': this.$element };\n var controller = this.$controller(controllerType, locals, null, this.directive.controllerAs);\n this.$element.data(controllerKey(this.directive.name), controller);\n return controller;\n };\n UpgradeHelper.prototype.compileTemplate = function (template) {\n if (template === undefined) {\n template =\n UpgradeHelper.getTemplate(this.$injector, this.directive, false, this.$element);\n }\n return this.compileHtml(template);\n };\n UpgradeHelper.prototype.onDestroy = function ($scope, controllerInstance) {\n if (controllerInstance && isFunction(controllerInstance.$onDestroy)) {\n controllerInstance.$onDestroy();\n }\n $scope.$destroy();\n // Clean the jQuery/jqLite data on the component+child elements.\n // Equivelent to how jQuery/jqLite invoke `cleanData` on an Element (this.element)\n // https://github.com/jquery/jquery/blob/e743cbd28553267f955f71ea7248377915613fd9/src/manipulation.js#L223\n // https://github.com/angular/angular.js/blob/26ddc5f830f902a3d22f4b2aab70d86d4d688c82/src/jqLite.js#L306-L312\n // `cleanData` will invoke the AngularJS `$destroy` DOM event\n // https://github.com/angular/angular.js/blob/26ddc5f830f902a3d22f4b2aab70d86d4d688c82/src/Angular.js#L1911-L1924\n element.cleanData([this.element]);\n element.cleanData(this.element.querySelectorAll('*'));\n };\n UpgradeHelper.prototype.prepareTransclusion = function () {\n var _this = this;\n var transclude = this.directive.transclude;\n var contentChildNodes = this.extractChildNodes();\n var attachChildrenFn = function (scope, cloneAttachFn) {\n // Since AngularJS v1.5.8, `cloneAttachFn` will try to destroy the transclusion scope if\n // `$template` is empty. Since the transcluded content comes from Angular, not AngularJS,\n // there will be no transclusion scope here.\n // Provide a dummy `scope.$destroy()` method to prevent `cloneAttachFn` from throwing.\n scope = scope || { $destroy: function () { return undefined; } };\n return cloneAttachFn($template, scope);\n };\n var $template = contentChildNodes;\n if (transclude) {\n var slots_1 = Object.create(null);\n if (typeof transclude === 'object') {\n $template = [];\n var slotMap_1 = Object.create(null);\n var filledSlots_1 = Object.create(null);\n // Parse the element selectors.\n Object.keys(transclude).forEach(function (slotName) {\n var selector = transclude[slotName];\n var optional = selector.charAt(0) === '?';\n selector = optional ? selector.substring(1) : selector;\n slotMap_1[selector] = slotName;\n slots_1[slotName] = null; // `null`: Defined but not yet filled.\n filledSlots_1[slotName] = optional; // Consider optional slots as filled.\n });\n // Add the matching elements into their slot.\n contentChildNodes.forEach(function (node) {\n var slotName = slotMap_1[directiveNormalize(node.nodeName.toLowerCase())];\n if (slotName) {\n filledSlots_1[slotName] = true;\n slots_1[slotName] = slots_1[slotName] || [];\n slots_1[slotName].push(node);\n }\n else {\n $template.push(node);\n }\n });\n // Check for required slots that were not filled.\n Object.keys(filledSlots_1).forEach(function (slotName) {\n if (!filledSlots_1[slotName]) {\n throw new Error(\"Required transclusion slot '\" + slotName + \"' on directive: \" + _this.name);\n }\n });\n Object.keys(slots_1).filter(function (slotName) { return slots_1[slotName]; }).forEach(function (slotName) {\n var nodes = slots_1[slotName];\n slots_1[slotName] = function (scope, cloneAttach) {\n return cloneAttach(nodes, scope);\n };\n });\n }\n // Attach `$$slots` to default slot transclude fn.\n attachChildrenFn.$$slots = slots_1;\n // AngularJS v1.6+ ignores empty or whitespace-only transcluded text nodes. But Angular\n // removes all text content after the first interpolation and updates it later, after\n // evaluating the expressions. This would result in AngularJS failing to recognize text\n // nodes that start with an interpolation as transcluded content and use the fallback\n // content instead.\n // To avoid this issue, we add a\n // [zero-width non-joiner character](https://en.wikipedia.org/wiki/Zero-width_non-joiner)\n // to empty text nodes (which can only be a result of Angular removing their initial content).\n // NOTE: Transcluded text content that starts with whitespace followed by an interpolation\n // will still fail to be detected by AngularJS v1.6+\n $template.forEach(function (node) {\n if (node.nodeType === Node.TEXT_NODE && !node.nodeValue) {\n node.nodeValue = '\\u200C';\n }\n });\n }\n return attachChildrenFn;\n };\n UpgradeHelper.prototype.resolveAndBindRequiredControllers = function (controllerInstance) {\n var directiveRequire = this.getDirectiveRequire();\n var requiredControllers = this.resolveRequire(directiveRequire);\n if (controllerInstance && this.directive.bindToController && isMap(directiveRequire)) {\n var requiredControllersMap_1 = requiredControllers;\n Object.keys(requiredControllersMap_1).forEach(function (key) {\n controllerInstance[key] = requiredControllersMap_1[key];\n });\n }\n return requiredControllers;\n };\n UpgradeHelper.prototype.compileHtml = function (html) {\n this.element.innerHTML = html;\n return this.$compile(this.element.childNodes);\n };\n UpgradeHelper.prototype.extractChildNodes = function () {\n var childNodes = [];\n var childNode;\n while (childNode = this.element.firstChild) {\n this.element.removeChild(childNode);\n childNodes.push(childNode);\n }\n return childNodes;\n };\n UpgradeHelper.prototype.getDirectiveRequire = function () {\n var require = this.directive.require || (this.directive.controller && this.directive.name);\n if (isMap(require)) {\n Object.keys(require).forEach(function (key) {\n var value = require[key];\n var match = value.match(REQUIRE_PREFIX_RE);\n var name = value.substring(match[0].length);\n if (!name) {\n require[key] = match[0] + key;\n }\n });\n }\n return require;\n };\n UpgradeHelper.prototype.resolveRequire = function (require, controllerInstance) {\n var _this = this;\n if (!require) {\n return null;\n }\n else if (Array.isArray(require)) {\n return require.map(function (req) { return _this.resolveRequire(req); });\n }\n else if (typeof require === 'object') {\n var value_1 = {};\n Object.keys(require).forEach(function (key) { return value_1[key] = _this.resolveRequire(require[key]); });\n return value_1;\n }\n else if (typeof require === 'string') {\n var match = require.match(REQUIRE_PREFIX_RE);\n var inheritType = match[1] || match[3];\n var name_1 = require.substring(match[0].length);\n var isOptional = !!match[2];\n var searchParents = !!inheritType;\n var startOnParent = inheritType === '^^';\n var ctrlKey = controllerKey(name_1);\n var elem = startOnParent ? this.$element.parent() : this.$element;\n var value = searchParents ? elem.inheritedData(ctrlKey) : elem.data(ctrlKey);\n if (!value && !isOptional) {\n throw new Error(\"Unable to find required '\" + require + \"' in upgraded directive '\" + this.name + \"'.\");\n }\n return value;\n }\n else {\n throw new Error(\"Unrecognized 'require' syntax on upgraded directive '\" + this.name + \"': \" + require);\n }\n };\n return UpgradeHelper;\n}());\nfunction getOrCall(property) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return isFunction(property) ? property.apply(void 0, __spread(args)) : property;\n}\n// NOTE: Only works for `typeof T !== 'object'`.\nfunction isMap(value) {\n return value && !Array.isArray(value) && typeof value === 'object';\n}\nfunction notSupported(name, feature) {\n throw new Error(\"Upgraded directive '\" + name + \"' contains unsupported feature: '\" + feature + \"'.\");\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar NOT_SUPPORTED = 'NOT_SUPPORTED';\nvar INITIAL_VALUE$1 = {\n __UNINITIALIZED__: true\n};\nvar Bindings = /** @class */ (function () {\n function Bindings() {\n this.twoWayBoundProperties = [];\n this.twoWayBoundLastValues = [];\n this.expressionBoundProperties = [];\n this.propertyToOutputMap = {};\n }\n return Bindings;\n}());\n/**\n * @description\n *\n * A helper class that allows an AngularJS component to be used from Angular.\n *\n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation.*\n *\n * This helper class should be used as a base class for creating Angular directives\n * that wrap AngularJS components that need to be \"upgraded\".\n *\n * @usageNotes\n * ### Examples\n *\n * Let's assume that you have an AngularJS component called `ng1Hero` that needs\n * to be made available in Angular templates.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng1-hero\"}\n *\n * We must create a `Directive` that will make this AngularJS component\n * available inside Angular templates.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng1-hero-wrapper\"}\n *\n * In this example you can see that we must derive from the `UpgradeComponent`\n * base class but also provide an {@link Directive `@Directive`} decorator. This is\n * because the AoT compiler requires that this information is statically available at\n * compile time.\n *\n * Note that we must do the following:\n * * specify the directive's selector (`ng1-hero`)\n * * specify all inputs and outputs that the AngularJS component expects\n * * derive from `UpgradeComponent`\n * * call the base class from the constructor, passing\n * * the AngularJS name of the component (`ng1Hero`)\n * * the `ElementRef` and `Injector` for the component wrapper\n *\n * @publicApi\n */\nvar UpgradeComponent = /** @class */ (function () {\n /**\n * Create a new `UpgradeComponent` instance. You should not normally need to do this.\n * Instead you should derive a new class from this one and call the super constructor\n * from the base class.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng1-hero-wrapper\" }\n *\n * * The `name` parameter should be the name of the AngularJS directive.\n * * The `elementRef` and `injector` parameters should be acquired from Angular by dependency\n * injection into the base class constructor.\n */\n function UpgradeComponent(name, elementRef, injector) {\n this.name = name;\n this.elementRef = elementRef;\n this.injector = injector;\n this.helper = new UpgradeHelper(injector, name, elementRef);\n this.$injector = this.helper.$injector;\n this.element = this.helper.element;\n this.$element = this.helper.$element;\n this.directive = this.helper.directive;\n this.bindings = this.initializeBindings(this.directive);\n // We ask for the AngularJS scope from the Angular injector, since\n // we will put the new component scope onto the new injector for each component\n var $parentScope = injector.get($SCOPE);\n // QUESTION 1: Should we create an isolated scope if the scope is only true?\n // QUESTION 2: Should we make the scope accessible through `$element.scope()/isolateScope()`?\n this.$componentScope = $parentScope.$new(!!this.directive.scope);\n this.initializeOutputs();\n }\n UpgradeComponent.prototype.ngOnInit = function () {\n var _this = this;\n // Collect contents, insert and compile template\n var attachChildNodes = this.helper.prepareTransclusion();\n var linkFn = this.helper.compileTemplate();\n // Instantiate controller\n var controllerType = this.directive.controller;\n var bindToController = this.directive.bindToController;\n if (controllerType) {\n this.controllerInstance = this.helper.buildController(controllerType, this.$componentScope);\n }\n else if (bindToController) {\n throw new Error(\"Upgraded directive '\" + this.directive.name + \"' specifies 'bindToController' but no controller.\");\n }\n // Set up outputs\n this.bindingDestination = bindToController ? this.controllerInstance : this.$componentScope;\n this.bindOutputs();\n // Require other controllers\n var requiredControllers = this.helper.resolveAndBindRequiredControllers(this.controllerInstance);\n // Hook: $onChanges\n if (this.pendingChanges) {\n this.forwardChanges(this.pendingChanges);\n this.pendingChanges = null;\n }\n // Hook: $onInit\n if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {\n this.controllerInstance.$onInit();\n }\n // Hook: $doCheck\n if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {\n var callDoCheck = function () { return _this.controllerInstance.$doCheck(); };\n this.unregisterDoCheckWatcher = this.$componentScope.$parent.$watch(callDoCheck);\n callDoCheck();\n }\n // Linking\n var link = this.directive.link;\n var preLink = (typeof link == 'object') && link.pre;\n var postLink = (typeof link == 'object') ? link.post : link;\n var attrs = NOT_SUPPORTED;\n var transcludeFn = NOT_SUPPORTED;\n if (preLink) {\n preLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n linkFn(this.$componentScope, null, { parentBoundTranscludeFn: attachChildNodes });\n if (postLink) {\n postLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n // Hook: $postLink\n if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {\n this.controllerInstance.$postLink();\n }\n };\n UpgradeComponent.prototype.ngOnChanges = function (changes) {\n if (!this.bindingDestination) {\n this.pendingChanges = changes;\n }\n else {\n this.forwardChanges(changes);\n }\n };\n UpgradeComponent.prototype.ngDoCheck = function () {\n var _this = this;\n var twoWayBoundProperties = this.bindings.twoWayBoundProperties;\n var twoWayBoundLastValues = this.bindings.twoWayBoundLastValues;\n var propertyToOutputMap = this.bindings.propertyToOutputMap;\n twoWayBoundProperties.forEach(function (propName, idx) {\n var newValue = _this.bindingDestination[propName];\n var oldValue = twoWayBoundLastValues[idx];\n if (!looseIdentical(newValue, oldValue)) {\n var outputName = propertyToOutputMap[propName];\n var eventEmitter = _this[outputName];\n eventEmitter.emit(newValue);\n twoWayBoundLastValues[idx] = newValue;\n }\n });\n };\n UpgradeComponent.prototype.ngOnDestroy = function () {\n if (isFunction(this.unregisterDoCheckWatcher)) {\n this.unregisterDoCheckWatcher();\n }\n this.helper.onDestroy(this.$componentScope, this.controllerInstance);\n };\n UpgradeComponent.prototype.initializeBindings = function (directive) {\n var _this = this;\n var btcIsObject = typeof directive.bindToController === 'object';\n if (btcIsObject && Object.keys(directive.scope).length) {\n throw new Error(\"Binding definitions on scope and controller at the same time is not supported.\");\n }\n var context = (btcIsObject) ? directive.bindToController : directive.scope;\n var bindings = new Bindings();\n if (typeof context == 'object') {\n Object.keys(context).forEach(function (propName) {\n var definition = context[propName];\n var bindingType = definition.charAt(0);\n // QUESTION: What about `=*`? Ignore? Throw? Support?\n switch (bindingType) {\n case '@':\n case '<':\n // We don't need to do anything special. They will be defined as inputs on the\n // upgraded component facade and the change propagation will be handled by\n // `ngOnChanges()`.\n break;\n case '=':\n bindings.twoWayBoundProperties.push(propName);\n bindings.twoWayBoundLastValues.push(INITIAL_VALUE$1);\n bindings.propertyToOutputMap[propName] = propName + 'Change';\n break;\n case '&':\n bindings.expressionBoundProperties.push(propName);\n bindings.propertyToOutputMap[propName] = propName;\n break;\n default:\n var json = JSON.stringify(context);\n throw new Error(\"Unexpected mapping '\" + bindingType + \"' in '\" + json + \"' in '\" + _this.name + \"' directive.\");\n }\n });\n }\n return bindings;\n };\n UpgradeComponent.prototype.initializeOutputs = function () {\n var _this = this;\n // Initialize the outputs for `=` and `&` bindings\n this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties)\n .forEach(function (propName) {\n var outputName = _this.bindings.propertyToOutputMap[propName];\n _this[outputName] = new EventEmitter();\n });\n };\n UpgradeComponent.prototype.bindOutputs = function () {\n var _this = this;\n // Bind `&` bindings to the corresponding outputs\n this.bindings.expressionBoundProperties.forEach(function (propName) {\n var outputName = _this.bindings.propertyToOutputMap[propName];\n var emitter = _this[outputName];\n _this.bindingDestination[propName] = function (value) { return emitter.emit(value); };\n });\n };\n UpgradeComponent.prototype.forwardChanges = function (changes) {\n var _this = this;\n // Forward input changes to `bindingDestination`\n Object.keys(changes).forEach(function (propName) { return _this.bindingDestination[propName] = changes[propName].currentValue; });\n if (isFunction(this.bindingDestination.$onChanges)) {\n this.bindingDestination.$onChanges(changes);\n }\n };\n return UpgradeComponent;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * An `NgModule`, which you import to provide AngularJS core services,\n * and has an instance method used to bootstrap the hybrid upgrade application.\n *\n * *Part of the [upgrade/static](api?query=upgrade/static)\n * library for hybrid upgrade apps that support AoT compilation*\n *\n * The `upgrade/static` package contains helpers that allow AngularJS and Angular components\n * to be used together inside a hybrid upgrade application, which supports AoT compilation.\n *\n * Specifically, the classes and functions in the `upgrade/static` module allow the following:\n *\n * 1. Creation of an Angular directive that wraps and exposes an AngularJS component so\n * that it can be used in an Angular template. See `UpgradeComponent`.\n * 2. Creation of an AngularJS directive that wraps and exposes an Angular component so\n * that it can be used in an AngularJS template. See `downgradeComponent`.\n * 3. Creation of an Angular root injector provider that wraps and exposes an AngularJS\n * service so that it can be injected into an Angular context. See\n * {@link UpgradeModule#upgrading-an-angular-1-service Upgrading an AngularJS service} below.\n * 4. Creation of an AngularJS service that wraps and exposes an Angular injectable\n * so that it can be injected into an AngularJS context. See `downgradeInjectable`.\n * 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks\n * coexisting in a single application.\n *\n * @usageNotes\n *\n * ```ts\n * import {UpgradeModule} from '@angular/upgrade/static';\n * ```\n *\n * See also the {@link UpgradeModule#examples examples} below.\n *\n * ### Mental Model\n *\n * When reasoning about how a hybrid application works it is useful to have a mental model which\n * describes what is happening and explains what is happening at the lowest level.\n *\n * 1. There are two independent frameworks running in a single application, each framework treats\n * the other as a black box.\n * 2. Each DOM element on the page is owned exactly by one framework. Whichever framework\n * instantiated the element is the owner. Each framework only updates/interacts with its own\n * DOM elements and ignores others.\n * 3. AngularJS directives always execute inside the AngularJS framework codebase regardless of\n * where they are instantiated.\n * 4. Angular components always execute inside the Angular framework codebase regardless of\n * where they are instantiated.\n * 5. An AngularJS component can be \"upgraded\"\" to an Angular component. This is achieved by\n * defining an Angular directive, which bootstraps the AngularJS component at its location\n * in the DOM. See `UpgradeComponent`.\n * 6. An Angular component can be \"downgraded\" to an AngularJS component. This is achieved by\n * defining an AngularJS directive, which bootstraps the Angular component at its location\n * in the DOM. See `downgradeComponent`.\n * 7. Whenever an \"upgraded\"/\"downgraded\" component is instantiated the host element is owned by\n * the framework doing the instantiation. The other framework then instantiates and owns the\n * view for that component.\n * 1. This implies that the component bindings will always follow the semantics of the\n * instantiation framework.\n * 2. The DOM attributes are parsed by the framework that owns the current template. So\n * attributes in AngularJS templates must use kebab-case, while AngularJS templates must use\n * camelCase.\n * 3. However the template binding syntax will always use the Angular style, e.g. square\n * brackets (`[...]`) for property binding.\n * 8. Angular is bootstrapped first; AngularJS is bootstrapped second. AngularJS always owns the\n * root component of the application.\n * 9. The new application is running in an Angular zone, and therefore it no longer needs calls to\n * `$apply()`.\n *\n * ### The `UpgradeModule` class\n *\n * This class is an `NgModule`, which you import to provide AngularJS core services,\n * and has an instance method used to bootstrap the hybrid upgrade application.\n *\n * * Core AngularJS services\n * Importing this `NgModule` will add providers for the core\n * [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.\n *\n * * Bootstrap\n * The runtime instance of this class contains a {@link UpgradeModule#bootstrap `bootstrap()`}\n * method, which you use to bootstrap the top level AngularJS module onto an element in the\n * DOM for the hybrid upgrade app.\n *\n * It also contains properties to access the {@link UpgradeModule#injector root injector}, the\n * bootstrap `NgZone` and the\n * [AngularJS $injector](https://docs.angularjs.org/api/auto/service/$injector).\n *\n * ### Examples\n *\n * Import the `UpgradeModule` into your top level {@link NgModule Angular `NgModule`}.\n *\n * {@example upgrade/static/ts/full/module.ts region='ng2-module'}\n *\n * Then inject `UpgradeModule` into your Angular `NgModule` and use it to bootstrap the top level\n * [AngularJS module](https://docs.angularjs.org/api/ng/type/angular.Module) in the\n * `ngDoBootstrap()` method.\n *\n * {@example upgrade/static/ts/full/module.ts region='bootstrap-ng1'}\n *\n * Finally, kick off the whole process, by bootstraping your top level Angular `NgModule`.\n *\n * {@example upgrade/static/ts/full/module.ts region='bootstrap-ng2'}\n *\n * {@a upgrading-an-angular-1-service}\n * ### Upgrading an AngularJS service\n *\n * There is no specific API for upgrading an AngularJS service. Instead you should just follow the\n * following recipe:\n *\n * Let's say you have an AngularJS service:\n *\n * {@example upgrade/static/ts/full/module.ts region=\"ng1-text-formatter-service\"}\n *\n * Then you should define an Angular provider to be included in your `NgModule` `providers`\n * property.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"upgrade-ng1-service\"}\n *\n * Then you can use the \"upgraded\" AngularJS service by injecting it into an Angular component\n * or service.\n *\n * {@example upgrade/static/ts/full/module.ts region=\"use-ng1-upgraded-service\"}\n *\n * @publicApi\n */\nvar UpgradeModule = /** @class */ (function () {\n function UpgradeModule(\n /** The root `Injector` for the upgrade application. */\n injector, \n /** The bootstrap zone for the upgrade application */\n ngZone) {\n this.ngZone = ngZone;\n this.injector = new NgAdapterInjector(injector);\n }\n /**\n * Bootstrap an AngularJS application from this NgModule\n * @param element the element on which to bootstrap the AngularJS application\n * @param [modules] the AngularJS modules to bootstrap for this application\n * @param [config] optional extra AngularJS bootstrap configuration\n */\n UpgradeModule.prototype.bootstrap = function (element$1, modules, config /*angular.IAngularBootstrapConfig*/) {\n var _this = this;\n if (modules === void 0) { modules = []; }\n var INIT_MODULE_NAME = UPGRADE_MODULE_NAME + '.init';\n // Create an ng1 module to bootstrap\n var initModule = module_(INIT_MODULE_NAME, [])\n .constant(UPGRADE_APP_TYPE_KEY, 2 /* Static */)\n .value(INJECTOR_KEY, this.injector)\n .factory(LAZY_MODULE_REF, [INJECTOR_KEY, function (injector) { return ({ injector: injector }); }])\n .config([\n $PROVIDE, $INJECTOR,\n function ($provide, $injector) {\n if ($injector.has($$TESTABILITY)) {\n $provide.decorator($$TESTABILITY, [\n $DELEGATE,\n function (testabilityDelegate) {\n var originalWhenStable = testabilityDelegate.whenStable;\n var injector = _this.injector;\n // Cannot use arrow function below because we need the context\n var newWhenStable = function (callback) {\n originalWhenStable.call(testabilityDelegate, function () {\n var ng2Testability = injector.get(Testability);\n if (ng2Testability.isStable()) {\n callback();\n }\n else {\n ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate, callback));\n }\n });\n };\n testabilityDelegate.whenStable = newWhenStable;\n return testabilityDelegate;\n }\n ]);\n }\n if ($injector.has($INTERVAL)) {\n $provide.decorator($INTERVAL, [\n $DELEGATE,\n function (intervalDelegate) {\n // Wrap the $interval service so that setInterval is called outside NgZone,\n // but the callback is still invoked within it. This is so that $interval\n // won't block stability, which preserves the behavior from AngularJS.\n var wrappedInterval = function (fn, delay, count, invokeApply) {\n var pass = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n pass[_i - 4] = arguments[_i];\n }\n return _this.ngZone.runOutsideAngular(function () {\n return intervalDelegate.apply(void 0, __spread([function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Run callback in the next VM turn - $interval calls\n // $rootScope.$apply, and running the callback in NgZone will\n // cause a '$digest already in progress' error if it's in the\n // same vm turn.\n setTimeout(function () { _this.ngZone.run(function () { return fn.apply(void 0, __spread(args)); }); });\n }, delay, count, invokeApply], pass));\n });\n };\n wrappedInterval['cancel'] = intervalDelegate.cancel;\n return wrappedInterval;\n }\n ]);\n }\n }\n ])\n .run([\n $INJECTOR,\n function ($injector) {\n _this.$injector = $injector;\n // Initialize the ng1 $injector provider\n setTempInjectorRef($injector);\n _this.injector.get($INJECTOR);\n // Put the injector on the DOM, so that it can be \"required\"\n element(element$1).data(controllerKey(INJECTOR_KEY), _this.injector);\n // Wire up the ng1 rootScope to run a digest cycle whenever the zone settles\n // We need to do this in the next tick so that we don't prevent the bootup\n // stabilizing\n setTimeout(function () {\n var $rootScope = $injector.get('$rootScope');\n var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () {\n if ($rootScope.$$phase) {\n if (isDevMode()) {\n console.warn('A digest was triggered while one was already in progress. This may mean that something is triggering digests outside the Angular zone.');\n }\n return $rootScope.$evalAsync();\n }\n return $rootScope.$digest();\n });\n $rootScope.$on('$destroy', function () { subscription.unsubscribe(); });\n }, 0);\n }\n ]);\n var upgradeModule = module_(UPGRADE_MODULE_NAME, [INIT_MODULE_NAME].concat(modules));\n // Make sure resumeBootstrap() only exists if the current bootstrap is deferred\n var windowAngular = window['angular'];\n windowAngular.resumeBootstrap = undefined;\n // Bootstrap the AngularJS application inside our zone\n this.ngZone.run(function () { bootstrap(element$1, [upgradeModule.name], config); });\n // Patch resumeBootstrap() to run inside the ngZone\n if (windowAngular.resumeBootstrap) {\n var originalResumeBootstrap_1 = windowAngular.resumeBootstrap;\n var ngZone_1 = this.ngZone;\n windowAngular.resumeBootstrap = function () {\n var _this = this;\n var args = arguments;\n windowAngular.resumeBootstrap = originalResumeBootstrap_1;\n return ngZone_1.run(function () { return windowAngular.resumeBootstrap.apply(_this, args); });\n };\n }\n };\n UpgradeModule = __decorate([\n NgModule({ providers: [angular1Providers] }),\n __metadata(\"design:paramtypes\", [Injector,\n NgZone])\n ], UpgradeModule);\n return UpgradeModule;\n}());\n\nexport { UpgradeComponent, UpgradeModule, VERSION, downgradeComponent, downgradeInjectable, downgradeModule, getAngularJSGlobal, getAngularLib, setAngularJSGlobal, setAngularLib, injectorFactory as \u0275angular_packages_upgrade_static_static_a, rootScopeFactory as \u0275angular_packages_upgrade_static_static_b, compileFactory as \u0275angular_packages_upgrade_static_static_c, parseFactory as \u0275angular_packages_upgrade_static_static_d, angular1Providers as \u0275angular_packages_upgrade_static_static_e };\n"], "mappings": "83BAOA,AAMA,AAOA,GAAI,MAAO,KACX,iBAAkB,CACd,MAAO,MADF,wBAGT,2BAA2B,QAAS,CAChC,AAAK,MACD,MAAO,SAFN,8CAYT,GAAI,YAA4B,UAAY,CACxC,sBAAsB,CAClB,KAAK,mBAAqB,KADrB,wCAGT,OAAO,eAAe,YAAW,UAAW,gBAAiB,CAKzD,IAAK,UAAY,CAAE,MAAO,MAAK,gBAC/B,IAAK,SAAU,MAAO,CAAE,KAAK,eAAiB,OAC9C,WAAY,GACZ,aAAc,KAEX,eAGX,AAaA,GAAI,0BAA0C,SAAU,OAAQ,CAC5D,UAAU,0BAA0B,QACpC,oCAAoC,CAChC,GAAI,OAAQ,OAAO,KAAK,OAAS,KACjC,MAAM,iBAAmB,KACzB,MAAM,eAAiB,KACvB,GAAI,CACA,GAAI,WAAY,MAAM,cAAc,MAAO,UAC3C,GAAI,MAAM,SAAS,UAAW,kBAAoB,KAC9C,MAAM,iBAAmB,OAIzB,QADI,aAAc,CAAC,SAAU,MAAO,IAAK,MAChC,EAAI,EAAG,EAAI,YAAY,OAAQ,IACpC,GAAI,MAAM,SAAS,UAAW,YAAY,GAAK,kBAAoB,KAAM,CACrE,MAAM,iBAAmB,IAAM,YAAY,GAAG,cAAgB,IAC9D,MAIZ,GAAI,sBAAuB,CACvB,iBAAkB,sBAClB,cAAe,gBACf,YAAa,gCACb,WAAY,iBA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