{"ast":null,"code":"/**\n * @license Angular v13.1.1\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, setTestabilityGetter, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵINJECTOR_SCOPE, NgZone, RendererFactory2, Testability, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, ɵConsole, forwardRef, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵgetSanitizationBypassType, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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 */\n\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n constructor() {\n super(...arguments);\n this.supportsDOMEvents = true;\n }\n\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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\n/* tslint:disable:requireParameterType no-console */\n\n\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n static makeCurrent() {\n ɵsetRootDomAdapter(new BrowserDomAdapter());\n }\n\n onAndCancel(el, evt, listener) {\n el.addEventListener(evt, listener, false); // Needed to follow Dart's subscription semantic, until fix of\n // https://code.google.com/p/dart/issues/detail?id=17406\n\n return () => {\n el.removeEventListener(evt, listener, false);\n };\n }\n\n dispatchEvent(el, evt) {\n el.dispatchEvent(evt);\n }\n\n remove(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n\n createElement(tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n\n createHtmlDocument() {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n\n getDefaultDocument() {\n return document;\n }\n\n isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n\n isShadowRoot(node) {\n return node instanceof DocumentFragment;\n }\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n\n\n getGlobalEventTarget(doc, target) {\n if (target === 'window') {\n return window;\n }\n\n if (target === 'document') {\n return doc;\n }\n\n if (target === 'body') {\n return doc.body;\n }\n\n return null;\n }\n\n getBaseHref(doc) {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n\n resetBaseElement() {\n baseElement = null;\n }\n\n getUserAgent() {\n return window.navigator.userAgent;\n }\n\n getCookie(name) {\n return ɵparseCookieValue(document.cookie, name);\n }\n\n}\n\nlet baseElement = null;\n\nfunction getBaseElementHref() {\n baseElement = baseElement || document.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n} // based on urlUtils.js in AngularJS 1\n\n\nlet urlParsingNode;\n\nfunction relativePath(url) {\n urlParsingNode = urlParsingNode || document.createElement('a');\n urlParsingNode.setAttribute('href', url);\n const pathName = urlParsingNode.pathname;\n return pathName.charAt(0) === '/' ? pathName : `/${pathName}`;\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\n\n\nconst TRANSITION_ID = new InjectionToken('TRANSITION_ID');\n\nfunction appInitializerFactory(transitionId, document, injector) {\n return () => {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(() => {\n const dom = ɵgetDOM();\n const styles = document.querySelectorAll(`style[ng-transition=\"${transitionId}\"]`);\n\n for (let i = 0; i < styles.length; i++) {\n dom.remove(styles[i]);\n }\n });\n };\n}\n\nconst SERVER_TRANSITION_PROVIDERS = [{\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT, Injector],\n multi: true\n}];\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nclass BrowserGetTestability {\n static init() {\n setTestabilityGetter(new BrowserGetTestability());\n }\n\n addToWindow(registry) {\n ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n\n if (testability == null) {\n throw new Error('Could not find testability for element.');\n }\n\n return testability;\n };\n\n ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n const whenAllStable = (callback\n /** TODO #9100 */\n ) => {\n const testabilities = ɵglobal['getAllAngularTestabilities']();\n let count = testabilities.length;\n let didWork = false;\n\n const decrement = function (didWork_\n /** TODO #9100 */\n ) {\n didWork = didWork || didWork_;\n count--;\n\n if (count == 0) {\n callback(didWork);\n }\n };\n\n testabilities.forEach(function (testability\n /** TODO #9100 */\n ) {\n testability.whenStable(decrement);\n });\n };\n\n if (!ɵglobal['frameworkStabilizers']) {\n ɵglobal['frameworkStabilizers'] = [];\n }\n\n ɵglobal['frameworkStabilizers'].push(whenAllStable);\n }\n\n findTestabilityInTree(registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n\n const t = registry.getTestability(elem);\n\n if (t != null) {\n return t;\n } else if (!findInAncestors) {\n return null;\n }\n\n if (ɵgetDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, elem.host, true);\n }\n\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n }\n\n}\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\n\n\nclass BrowserXhr {\n build() {\n return new XMLHttpRequest();\n }\n\n}\n\nBrowserXhr.ɵfac = function BrowserXhr_Factory(t) {\n return new (t || BrowserXhr)();\n};\n\nBrowserXhr.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BrowserXhr,\n factory: BrowserXhr.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(BrowserXhr, [{\n type: Injectable\n }], null, null);\n})();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\n\n\nconst 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 */\n\nclass EventManager {\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(plugins, _zone) {\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach(p => 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\n\n addEventListener(element, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n\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 * @deprecated No longer being used in Ivy code. To be removed in version 14.\n */\n\n\n addGlobalEventListener(target, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n\n return plugin.addGlobalEventListener(target, eventName, handler);\n }\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n\n\n getZone() {\n return this._zone;\n }\n /** @internal */\n\n\n _findPluginFor(eventName) {\n const plugin = this._eventNameToPlugin.get(eventName);\n\n if (plugin) {\n return plugin;\n }\n\n const plugins = this._plugins;\n\n for (let i = 0; i < plugins.length; i++) {\n const plugin = plugins[i];\n\n if (plugin.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin);\n\n return plugin;\n }\n }\n\n throw new Error(`No event manager plugin found for event ${eventName}`);\n }\n\n}\n\nEventManager.ɵfac = function EventManager_Factory(t) {\n return new (t || EventManager)(i0.ɵɵinject(EVENT_MANAGER_PLUGINS), i0.ɵɵinject(i0.NgZone));\n};\n\nEventManager.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EventManager,\n factory: EventManager.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(EventManager, [{\n type: Injectable\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [EVENT_MANAGER_PLUGINS]\n }]\n }, {\n type: i0.NgZone\n }];\n }, null);\n})();\n\nclass EventManagerPlugin {\n constructor(_doc) {\n this._doc = _doc;\n }\n\n addGlobalEventListener(element, eventName, handler) {\n const target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n\n if (!target) {\n throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n }\n\n return this.addEventListener(target, eventName, handler);\n }\n\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nclass SharedStylesHost {\n constructor() {\n /** @internal */\n this._stylesSet = new Set();\n }\n\n addStyles(styles) {\n const additions = new Set();\n styles.forEach(style => {\n if (!this._stylesSet.has(style)) {\n this._stylesSet.add(style);\n\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n }\n\n onStylesAdded(additions) {}\n\n getAllStyles() {\n return Array.from(this._stylesSet);\n }\n\n}\n\nSharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) {\n return new (t || SharedStylesHost)();\n};\n\nSharedStylesHost.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SharedStylesHost,\n factory: SharedStylesHost.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(SharedStylesHost, [{\n type: Injectable\n }], null, null);\n})();\n\nclass DomSharedStylesHost extends SharedStylesHost {\n constructor(_doc) {\n super();\n this._doc = _doc; // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n\n this._hostNodes = new Map();\n\n this._hostNodes.set(_doc.head, []);\n }\n\n _addStylesToHost(styles, host, styleNodes) {\n styles.forEach(style => {\n const styleEl = this._doc.createElement('style');\n\n styleEl.textContent = style;\n styleNodes.push(host.appendChild(styleEl));\n });\n }\n\n addHost(hostNode) {\n const styleNodes = [];\n\n this._addStylesToHost(this._stylesSet, hostNode, styleNodes);\n\n this._hostNodes.set(hostNode, styleNodes);\n }\n\n removeHost(hostNode) {\n const styleNodes = this._hostNodes.get(hostNode);\n\n if (styleNodes) {\n styleNodes.forEach(removeStyle);\n }\n\n this._hostNodes.delete(hostNode);\n }\n\n onStylesAdded(additions) {\n this._hostNodes.forEach((styleNodes, hostNode) => {\n this._addStylesToHost(additions, hostNode, styleNodes);\n });\n }\n\n ngOnDestroy() {\n this._hostNodes.forEach(styleNodes => styleNodes.forEach(removeStyle));\n }\n\n}\n\nDomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) {\n return new (t || DomSharedStylesHost)(i0.ɵɵinject(DOCUMENT));\n};\n\nDomSharedStylesHost.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DomSharedStylesHost,\n factory: DomSharedStylesHost.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(DomSharedStylesHost, [{\n type: Injectable\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n }];\n }, null);\n})();\n\nfunction removeStyle(styleNode) {\n ɵgetDOM().remove(styleNode);\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nconst 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};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nfunction flattenStyles(compId, styles, target) {\n for (let i = 0; i < styles.length; i++) {\n let style = styles[i];\n\n if (Array.isArray(style)) {\n flattenStyles(compId, style, target);\n } else {\n style = style.replace(COMPONENT_REGEX, compId);\n target.push(style);\n }\n }\n\n return target;\n}\n\nfunction decoratePreventDefault(eventHandler) {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n // the listener (see below).\n return event => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n // can inspect the listener toString contents for the existence of this special token. Because\n // the token is a string literal, it is ensured to not be modified by compiled code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n\n const allowDefaultBehavior = eventHandler(event);\n\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n\n return undefined;\n };\n}\n\nlet hasLoggedNativeEncapsulationWarning = false;\n\nclass DomRendererFactory2 {\n constructor(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\n createRenderer(element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n {\n let renderer = this.rendererByCompId.get(type.id);\n\n if (!renderer) {\n renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n this.rendererByCompId.set(type.id, renderer);\n }\n\n renderer.applyToHost(element);\n return renderer;\n }\n // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n // value that is not known (but previously was the value for ViewEncapsulation.Native)\n\n case 1:\n case ViewEncapsulation.ShadowDom:\n // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an\n // enum value that is not known (but previously was the value for\n // ViewEncapsulation.Native)\n !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) {\n hasLoggedNativeEncapsulationWarning = true;\n console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.');\n }\n\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n\n default:\n {\n if (!this.rendererByCompId.has(type.id)) {\n const styles = flattenStyles(type.id, type.styles, []);\n this.sharedStylesHost.addStyles(styles);\n this.rendererByCompId.set(type.id, this.defaultRenderer);\n }\n\n return this.defaultRenderer;\n }\n }\n }\n\n begin() {}\n\n end() {}\n\n}\n\nDomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) {\n return new (t || DomRendererFactory2)(i0.ɵɵinject(EventManager), i0.ɵɵinject(DomSharedStylesHost), i0.ɵɵinject(APP_ID));\n};\n\nDomRendererFactory2.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DomRendererFactory2,\n factory: DomRendererFactory2.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(DomRendererFactory2, [{\n type: Injectable\n }], function () {\n return [{\n type: EventManager\n }, {\n type: DomSharedStylesHost\n }, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [APP_ID]\n }]\n }];\n }, null);\n})();\n\nclass DefaultDomRenderer2 {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n this.destroyNode = null;\n }\n\n destroy() {}\n\n createElement(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\n return document.createElement(name);\n }\n\n createComment(value) {\n return document.createComment(value);\n }\n\n createText(value) {\n return document.createTextNode(value);\n }\n\n appendChild(parent, newChild) {\n parent.appendChild(newChild);\n }\n\n insertBefore(parent, newChild, refChild) {\n if (parent) {\n parent.insertBefore(newChild, refChild);\n }\n }\n\n removeChild(parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n }\n\n selectRootElement(selectorOrNode, preserveContent) {\n let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) : selectorOrNode;\n\n if (!el) {\n throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n }\n\n if (!preserveContent) {\n el.textContent = '';\n }\n\n return el;\n }\n\n parentNode(node) {\n return node.parentNode;\n }\n\n nextSibling(node) {\n return node.nextSibling;\n }\n\n setAttribute(el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name; // TODO(FW-811): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n\n const namespaceUri = NAMESPACE_URIS[namespace];\n\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n } else {\n el.setAttribute(name, value);\n }\n } else {\n el.setAttribute(name, value);\n }\n }\n\n removeAttribute(el, name, namespace) {\n if (namespace) {\n // TODO(FW-811): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n const namespaceUri = NAMESPACE_URIS[namespace];\n\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n } else {\n // TODO(FW-811): 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 } else {\n el.removeAttribute(name);\n }\n }\n\n addClass(el, name) {\n el.classList.add(name);\n }\n\n removeClass(el, name) {\n el.classList.remove(name);\n }\n\n setStyle(el, style, value, flags) {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n } else {\n el.style[style] = value;\n }\n }\n\n removeStyle(el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n } else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n }\n\n setProperty(el, name, value) {\n NG_DEV_MODE && checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n\n setValue(node, value) {\n node.nodeValue = value;\n }\n\n listen(target, event, callback) {\n NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');\n\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n }\n\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\n\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, component, appId) {\n super(eventManager);\n this.component = component;\n const 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 }\n\n applyToHost(element) {\n super.setAttribute(element, this.hostAttr, '');\n }\n\n createElement(parent, name) {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, hostEl, component) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.hostEl = hostEl;\n this.shadowRoot = hostEl.attachShadow({\n mode: 'open'\n });\n this.sharedStylesHost.addHost(this.shadowRoot);\n const styles = flattenStyles(component.id, component.styles, []);\n\n for (let i = 0; i < styles.length; i++) {\n const styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n this.shadowRoot.appendChild(styleEl);\n }\n }\n\n nodeOrShadowRoot(node) {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n\n destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n\n appendChild(parent, newChild) {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n\n insertBefore(parent, newChild, refChild) {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n\n removeChild(parent, oldChild) {\n return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n }\n\n parentNode(node) {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nclass DomEventsPlugin extends EventManagerPlugin {\n constructor(doc) {\n super(doc);\n } // This plugin should come last in the list of plugins, because it accepts all\n // events.\n\n\n supports(eventName) {\n return true;\n }\n\n addEventListener(element, eventName, handler) {\n element.addEventListener(eventName, handler, false);\n return () => this.removeEventListener(element, eventName, handler);\n }\n\n removeEventListener(target, eventName, callback) {\n return target.removeEventListener(eventName, callback);\n }\n\n}\n\nDomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) {\n return new (t || DomEventsPlugin)(i0.ɵɵinject(DOCUMENT));\n};\n\nDomEventsPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DomEventsPlugin,\n factory: DomEventsPlugin.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(DomEventsPlugin, [{\n type: Injectable\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n }];\n }, null);\n})();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Defines supported modifiers for key events.\n */\n\n\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nconst DOM_KEY_LOCATION_NUMPAD = 3; // Map to convert some key or keyIdentifier values to what will be returned by getEventKey\n\nconst _keyMap = {\n // The following values are here for cross-browser compatibility and to match the W3C standard\n // cf https://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}; // 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\nconst _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};\n/**\n * Retrieves modifiers from key-event objects.\n */\n\nconst MODIFIER_KEY_GETTERS = {\n 'alt': event => event.altKey,\n 'control': event => event.ctrlKey,\n 'meta': event => event.metaKey,\n 'shift': event => event.shiftKey\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n\nclass KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(doc) {\n super(doc);\n }\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\n\n supports(eventName) {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\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\n\n addEventListener(element, eventName, handler) {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(() => {\n return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n }\n\n static parseEventName(eventName) {\n const parts = eventName.toLowerCase().split('.');\n const domEventName = parts.shift();\n\n if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n\n const key = KeyEventsPlugin._normalizeKey(parts.pop());\n\n let fullKey = '';\n MODIFIER_KEYS.forEach(modifierName => {\n const index = parts.indexOf(modifierName);\n\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n\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 } // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n\n\n const result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n\n static getEventFullKey(event) {\n let fullKey = '';\n let key = getEventKey(event);\n key = key.toLowerCase();\n\n if (key === ' ') {\n key = 'space'; // for readability\n } else if (key === '.') {\n key = 'dot'; // because '.' is used as a separator in event names\n }\n\n MODIFIER_KEYS.forEach(modifierName => {\n if (modifierName != key) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n\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\n\n static eventCallback(fullKey, handler, zone) {\n return (event\n /** TODO #9100 */\n ) => {\n if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n /** @internal */\n\n\n static _normalizeKey(keyName) {\n // TODO: switch to a Map if the mapping grows too much\n switch (keyName) {\n case 'esc':\n return 'escape';\n\n default:\n return keyName;\n }\n }\n\n}\n\nKeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) {\n return new (t || KeyEventsPlugin)(i0.ɵɵinject(DOCUMENT));\n};\n\nKeyEventsPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: KeyEventsPlugin,\n factory: KeyEventsPlugin.ɵfac\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(KeyEventsPlugin, [{\n type: Injectable\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n }];\n }, null);\n})();\n\nfunction getEventKey(event) {\n let key = event.key;\n\n if (key == null) {\n key = event.keyIdentifier; // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n // Safari cf\n // https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n\n if (key == null) {\n return 'Unidentified';\n }\n\n if (key.startsWith('U+')) {\n key = String.fromCharCode(parseInt(key.substring(2), 16));\n\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\n return _keyMap[key] || key;\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n BrowserGetTestability.init();\n}\n\nfunction errorHandler() {\n return new ErrorHandler();\n}\n\nfunction _document() {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{\n provide: PLATFORM_ID,\n useValue: ɵPLATFORM_BROWSER_ID\n}, {\n provide: PLATFORM_INITIALIZER,\n useValue: initDomAdapter,\n multi: true\n}, {\n provide: DOCUMENT,\n useFactory: _document,\n deps: []\n}];\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\n\nconst platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\nconst BROWSER_MODULE_PROVIDERS = [{\n provide: ɵINJECTOR_SCOPE,\n useValue: 'root'\n}, {\n provide: ErrorHandler,\n useFactory: errorHandler,\n 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,\n useClass: KeyEventsPlugin,\n multi: true,\n deps: [DOCUMENT]\n}, {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost, APP_ID]\n}, {\n provide: RendererFactory2,\n useExisting: DomRendererFactory2\n}, {\n provide: SharedStylesHost,\n useExisting: DomSharedStylesHost\n}, {\n provide: DomSharedStylesHost,\n useClass: DomSharedStylesHost,\n deps: [DOCUMENT]\n}, {\n provide: Testability,\n useClass: Testability,\n deps: [NgZone]\n}, {\n provide: EventManager,\n useClass: EventManager,\n deps: [EVENT_MANAGER_PLUGINS, NgZone]\n}, {\n provide: XhrFactory,\n useClass: BrowserXhr,\n deps: []\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 */\n\nclass BrowserModule {\n constructor(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 /**\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\n\n static withServerTransition(params) {\n return {\n ngModule: BrowserModule,\n providers: [{\n provide: APP_ID,\n useValue: params.appId\n }, {\n provide: TRANSITION_ID,\n useExisting: APP_ID\n }, SERVER_TRANSITION_PROVIDERS]\n };\n }\n\n}\n\nBrowserModule.ɵfac = function BrowserModule_Factory(t) {\n return new (t || BrowserModule)(i0.ɵɵinject(BrowserModule, 12));\n};\n\nBrowserModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: BrowserModule\n});\nBrowserModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: BROWSER_MODULE_PROVIDERS,\n imports: [CommonModule, ApplicationModule]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(BrowserModule, [{\n type: NgModule,\n args: [{\n providers: BROWSER_MODULE_PROVIDERS,\n exports: [CommonModule, ApplicationModule]\n }]\n }], function () {\n return [{\n type: BrowserModule,\n decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [BrowserModule]\n }]\n }];\n }, null);\n})();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\n\n\nfunction createMeta() {\n return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service for managing HTML `` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\n\n\nclass Meta {\n constructor(_doc) {\n this._doc = _doc;\n this._dom = ɵgetDOM();\n }\n /**\n * Retrieves or creates a specific `` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n\n\n addTag(tag, forceCreation = false) {\n if (!tag) return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n /**\n * Retrieves or creates a set of `` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n\n\n addTags(tags, forceCreation = false) {\n if (!tags) return [];\n return tags.reduce((result, tag) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n\n return result;\n }, []);\n }\n /**\n * Retrieves a `` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n\n\n getTag(attrSelector) {\n if (!attrSelector) return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n /**\n * Retrieves a set of `` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n\n\n getTags(attrSelector) {\n if (!attrSelector) return [];\n\n const list\n /*NodeList*/\n = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n\n return list ? [].slice.call(list) : [];\n }\n /**\n * Modifies an existing `` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n\n\n updateTag(tag, selector) {\n if (!tag) return null;\n selector = selector || this._parseSelector(tag);\n const meta = this.getTag(selector);\n\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n\n return this._getOrCreateElement(tag, true);\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n\n\n removeTag(attrSelector) {\n this.removeTagElement(this.getTag(attrSelector));\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n\n\n removeTagElement(meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n\n _getOrCreateElement(meta, forceCreation = false) {\n if (!forceCreation) {\n const selector = this._parseSelector(meta); // 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\n\n const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined) return elem;\n }\n\n const element = this._dom.createElement('meta');\n\n this._setMetaElementAttributes(meta, element);\n\n const head = this._doc.getElementsByTagName('head')[0];\n\n head.appendChild(element);\n return element;\n }\n\n _setMetaElementAttributes(tag, el) {\n Object.keys(tag).forEach(prop => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n return el;\n }\n\n _parseSelector(tag) {\n const attr = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n\n _containsAttributes(tag, elem) {\n return Object.keys(tag).every(key => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n }\n\n _getMetaKeyMap(prop) {\n return META_KEYS_MAP[prop] || prop;\n }\n\n}\n\nMeta.ɵfac = function Meta_Factory(t) {\n return new (t || Meta)(i0.ɵɵinject(DOCUMENT));\n};\n\nMeta.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Meta,\n factory: function Meta_Factory(t) {\n let r = null;\n\n if (t) {\n r = new t();\n } else {\n r = createMeta();\n }\n\n return r;\n },\n providedIn: 'root'\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Meta, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: createMeta,\n deps: []\n }]\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n }];\n }, null);\n})();\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\n\n\nconst META_KEYS_MAP = {\n httpEquiv: 'http-equiv'\n};\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Factory to create Title service.\n */\n\nfunction createTitle() {\n return new Title(ɵɵinject(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 `