blob: e1c22a93309f4004ec34f488ac60670b8357dfa5 [file] [log] [blame]
{"version":3,"file":"cdk-a11y.umd.js","sources":["../../../../../src/cdk/a11y/aria-describer/aria-reference.ts","../../../../../src/cdk/a11y/aria-describer/aria-describer.ts","../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../src/cdk/a11y/key-manager/list-key-manager.ts","../../../../../src/cdk/a11y/key-manager/activedescendant-key-manager.ts","../../../../../src/cdk/a11y/key-manager/focus-key-manager.ts","../../../../../src/cdk/a11y/interactivity-checker/interactivity-checker.ts","../../../../../src/cdk/a11y/focus-trap/focus-trap.ts","../../../../../src/cdk/a11y/focus-trap/configurable-focus-trap.ts","../../../../../src/cdk/a11y/focus-trap/polyfill.ts","../../../../../src/cdk/a11y/focus-trap/event-listener-inert-strategy.ts","../../../../../src/cdk/a11y/focus-trap/configurable-focus-trap-config.ts","../../../../../src/cdk/a11y/focus-trap/focus-trap-inert-strategy.ts","../../../../../src/cdk/a11y/focus-trap/focus-trap-manager.ts","../../../../../src/cdk/a11y/focus-trap/configurable-focus-trap-factory.ts","../../../../../src/cdk/a11y/live-announcer/live-announcer-tokens.ts","../../../../../src/cdk/a11y/live-announcer/live-announcer.ts","../../../../../src/cdk/a11y/fake-event-detection.ts","../../../../../src/cdk/a11y/focus-monitor/focus-monitor.ts","../../../../../src/cdk/a11y/high-contrast-mode/high-contrast-mode-detector.ts","../../../../../src/cdk/a11y/a11y-module.ts","../../../../../src/cdk/a11y/public-api.ts","../../../../../src/cdk/a11y/index.ts"],"sourcesContent":["/**\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/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function addAriaReferencedId(el: Element, attr: string, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n if (ids.some(existingId => existingId.trim() == id.trim())) { return; }\n ids.push(id.trim());\n\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function removeAriaReferencedId(el: Element, attr: string, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n const filteredIds = ids.filter(val => val != id.trim());\n\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n } else {\n el.removeAttribute(attr);\n }\n}\n\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function getAriaReferenceIds(el: Element, attr: string): string[] {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n return (el.getAttribute(attr) || '').match(/\\S+/g) || [];\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, OnDestroy} from '@angular/core';\nimport {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference';\n\n\n/**\n * Interface used to register message elements and keep a count of how many registrations have\n * the same message and the reference to the message element used for the `aria-describedby`.\n */\nexport interface RegisteredMessage {\n /** The element containing the message. */\n messageElement: Element;\n\n /** The number of elements that reference this message element via `aria-describedby`. */\n referenceCount: number;\n}\n\n/** ID used for the body container where all messages are appended. */\nexport const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n\n/** ID prefix used for each created message element. */\nexport const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/** Attribute given to each host element that is described by a message element. */\nexport const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n\n/** Global map of all registered message elements that have been placed into the document. */\nconst messageRegistry = new Map<string|Element, RegisteredMessage>();\n\n/** Container for all registered messages. */\nlet messagesContainer: HTMLElement | null = null;\n\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\n@Injectable({providedIn: 'root'})\nexport class AriaDescriber implements OnDestroy {\n private _document: Document;\n\n constructor(\n @Inject(DOCUMENT) _document: any) {\n this._document = _document;\n }\n\n /**\n * Adds to the host element an aria-describedby reference to a hidden element that contains\n * the message. If the same message has already been registered, then it will reuse the created\n * message element.\n */\n describe(hostElement: Element, message: string, role?: string): void;\n\n /**\n * Adds to the host element an aria-describedby reference to an already-existing message element.\n */\n describe(hostElement: Element, message: HTMLElement): void;\n\n describe(hostElement: Element, message: string|HTMLElement, role?: string): void {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message);\n messageRegistry.set(key, {messageElement: message, referenceCount: 0});\n } else if (!messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n\n /** Removes the host element's aria-describedby reference to the message. */\n removeDescription(hostElement: Element, message: string, role?: string): void;\n\n /** Removes the host element's aria-describedby reference to the message element. */\n removeDescription(hostElement: Element, message: HTMLElement): void;\n\n removeDescription(hostElement: Element, message: string|HTMLElement, role?: string): void {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n\n if (messagesContainer && messagesContainer.childNodes.length === 0) {\n this._deleteMessagesContainer();\n }\n }\n\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements =\n this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}]`);\n\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n if (messagesContainer) {\n this._deleteMessagesContainer();\n }\n\n messageRegistry.clear();\n }\n\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n private _createMessageElement(message: string, role?: string) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement);\n messageElement.textContent = message;\n\n if (role) {\n messageElement.setAttribute('role', role);\n }\n\n this._createMessagesContainer();\n messagesContainer!.appendChild(messageElement);\n messageRegistry.set(getKey(message, role), {messageElement, referenceCount: 0});\n }\n\n /** Deletes the message element from the global messages container. */\n private _deleteMessageElement(key: string|Element) {\n const registeredMessage = messageRegistry.get(key);\n const messageElement = registeredMessage && registeredMessage.messageElement;\n if (messagesContainer && messageElement) {\n messagesContainer.removeChild(messageElement);\n }\n messageRegistry.delete(key);\n }\n\n /** Creates the global container for all aria-describedby messages. */\n private _createMessagesContainer() {\n if (!messagesContainer) {\n const preExistingContainer = this._document.getElementById(MESSAGES_CONTAINER_ID);\n\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n if (preExistingContainer && preExistingContainer.parentNode) {\n preExistingContainer.parentNode.removeChild(preExistingContainer);\n }\n\n messagesContainer = this._document.createElement('div');\n messagesContainer.id = MESSAGES_CONTAINER_ID;\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add('cdk-visually-hidden');\n\n this._document.body.appendChild(messagesContainer);\n }\n }\n\n /** Deletes the global messages container. */\n private _deleteMessagesContainer() {\n if (messagesContainer && messagesContainer.parentNode) {\n messagesContainer.parentNode.removeChild(messagesContainer);\n messagesContainer = null;\n }\n }\n\n /** Removes all cdk-describedby messages that are hosted through the element. */\n private _removeCdkDescribedByReferenceIds(element: Element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')\n .filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0);\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n private _addMessageReference(element: Element, key: string|Element) {\n const registeredMessage = messageRegistry.get(key)!;\n\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, '');\n registeredMessage.referenceCount++;\n }\n\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n private _removeMessageReference(element: Element, key: string|Element) {\n const registeredMessage = messageRegistry.get(key)!;\n registeredMessage.referenceCount--;\n\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n /** Returns true if the element has been described by the provided message ID. */\n private _isElementDescribedByMessage(element: Element, key: string|Element): boolean {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n\n /** Determines whether a message can be described on a particular element. */\n private _canBeDescribed(element: Element, message: string|HTMLElement|void): boolean {\n if (!this._isElementNode(element)) {\n return false;\n }\n\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? (!ariaLabel || ariaLabel.trim() !== trimmedMessage) : false;\n }\n\n /** Checks whether a node is an Element node. */\n private _isElementNode(element: Node): element is Element {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n}\n\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message: string|Element, role?: string): string|Element {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element: HTMLElement) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${nextId++}`;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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\nimport {QueryList} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {\n UP_ARROW,\n DOWN_ARROW,\n LEFT_ARROW,\n RIGHT_ARROW,\n TAB,\n A,\n Z,\n ZERO,\n NINE,\n hasModifierKey,\n HOME,\n END,\n} from '@angular/cdk/keycodes';\nimport {debounceTime, filter, map, tap} from 'rxjs/operators';\n\n/** This interface is for items that can be passed to a ListKeyManager. */\nexport interface ListKeyManagerOption {\n /** Whether the option is disabled. */\n disabled?: boolean;\n\n /** Gets the label for this option. */\n getLabel?(): string;\n}\n\n/** Modifier keys handled by the ListKeyManager. */\nexport type ListKeyManagerModifierKey = 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey';\n\n/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nexport class ListKeyManager<T extends ListKeyManagerOption> {\n private _activeItemIndex = -1;\n private _activeItem: T | null = null;\n private _wrap = false;\n private _letterKeyStream = new Subject<string>();\n private _typeaheadSubscription = Subscription.EMPTY;\n private _vertical = true;\n private _horizontal: 'ltr' | 'rtl' | null;\n private _allowedModifierKeys: ListKeyManagerModifierKey[] = [];\n private _homeAndEnd = false;\n\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */\n private _skipPredicateFn = (item: T) => item.disabled;\n\n // Buffer for the letters that the user has pressed when the typeahead option is turned on.\n private _pressedLetters: string[] = [];\n\n constructor(private _items: QueryList<T> | T[]) {\n // We allow for the items to be an array because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (_items instanceof QueryList) {\n _items.changes.subscribe((newItems: QueryList<T>) => {\n if (this._activeItem) {\n const itemArray = newItems.toArray();\n const newIndex = itemArray.indexOf(this._activeItem);\n\n if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n this._activeItemIndex = newIndex;\n }\n }\n });\n }\n }\n\n /**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */\n tabOut: Subject<void> = new Subject<void>();\n\n /** Stream that emits whenever the active item of the list manager changes. */\n change = new Subject<number>();\n\n /**\n * Sets the predicate function that determines which items should be skipped by the\n * list key manager.\n * @param predicate Function that determines whether the given item should be skipped.\n */\n skipPredicate(predicate: (item: T) => boolean): this {\n this._skipPredicateFn = predicate;\n return this;\n }\n\n /**\n * Configures wrapping mode, which determines whether the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n * @param shouldWrap Whether the list should wrap when reaching the end.\n */\n withWrap(shouldWrap = true): this {\n this._wrap = shouldWrap;\n return this;\n }\n\n /**\n * Configures whether the key manager should be able to move the selection vertically.\n * @param enabled Whether vertical selection should be enabled.\n */\n withVerticalOrientation(enabled: boolean = true): this {\n this._vertical = enabled;\n return this;\n }\n\n /**\n * Configures the key manager to move the selection horizontally.\n * Passing in `null` will disable horizontal movement.\n * @param direction Direction in which the selection can be moved.\n */\n withHorizontalOrientation(direction: 'ltr' | 'rtl' | null): this {\n this._horizontal = direction;\n return this;\n }\n\n /**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */\n withAllowedModifierKeys(keys: ListKeyManagerModifierKey[]): this {\n this._allowedModifierKeys = keys;\n return this;\n }\n\n /**\n * Turns on typeahead mode which allows users to set the active item by typing.\n * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n */\n withTypeAhead(debounceInterval: number = 200): this {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && (this._items.length &&\n this._items.some(item => typeof item.getLabel !== 'function'))) {\n throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n\n this._typeaheadSubscription.unsubscribe();\n\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._typeaheadSubscription = this._letterKeyStream.pipe(\n tap(letter => this._pressedLetters.push(letter)),\n debounceTime(debounceInterval),\n filter(() => this._pressedLetters.length > 0),\n map(() => this._pressedLetters.join(''))\n ).subscribe(inputString => {\n const items = this._getItemsArray();\n\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < items.length + 1; i++) {\n const index = (this._activeItemIndex + i) % items.length;\n const item = items[index];\n\n if (!this._skipPredicateFn(item) &&\n item.getLabel!().toUpperCase().trim().indexOf(inputString) === 0) {\n\n this.setActiveItem(index);\n break;\n }\n }\n\n this._pressedLetters = [];\n });\n\n return this;\n }\n\n /**\n * Configures the key manager to activate the first and last items\n * respectively when the Home or End key is pressed.\n * @param enabled Whether pressing the Home or End key activates the first/last item.\n */\n withHomeAndEnd(enabled: boolean = true): this {\n this._homeAndEnd = enabled;\n return this;\n }\n\n /**\n * Sets the active item to the item at the index specified.\n * @param index The index of the item to be set as active.\n */\n setActiveItem(index: number): void;\n\n /**\n * Sets the active item to the specified item.\n * @param item The item to be set as active.\n */\n setActiveItem(item: T): void;\n\n setActiveItem(item: any): void {\n const previousActiveItem = this._activeItem;\n\n this.updateActiveItem(item);\n\n if (this._activeItem !== previousActiveItem) {\n this.change.next(this._activeItemIndex);\n }\n }\n\n /**\n * Sets the active item depending on the key event passed in.\n * @param event Keyboard event to be used for determining which element should be active.\n */\n onKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const modifiers: ListKeyManagerModifierKey[] = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n const isModifierAllowed = modifiers.every(modifier => {\n return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1;\n });\n\n switch (keyCode) {\n case TAB:\n this.tabOut.next();\n return;\n\n case DOWN_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setNextItemActive();\n break;\n } else {\n return;\n }\n\n case UP_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n\n case RIGHT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n break;\n } else {\n return;\n }\n\n case LEFT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n\n case HOME:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setFirstItemActive();\n break;\n } else {\n return;\n }\n\n case END:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setLastItemActive();\n break;\n } else {\n return;\n }\n\n default:\n if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n } else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n\n // Note that we return here, in order to avoid preventing\n // the default action of non-navigational keys.\n return;\n }\n\n this._pressedLetters = [];\n event.preventDefault();\n }\n\n /** Index of the currently active item. */\n get activeItemIndex(): number | null {\n return this._activeItemIndex;\n }\n\n /** The active item. */\n get activeItem(): T | null {\n return this._activeItem;\n }\n\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping(): boolean {\n return this._pressedLetters.length > 0;\n }\n\n /** Sets the active item to the first enabled item in the list. */\n setFirstItemActive(): void {\n this._setActiveItemByIndex(0, 1);\n }\n\n /** Sets the active item to the last enabled item in the list. */\n setLastItemActive(): void {\n this._setActiveItemByIndex(this._items.length - 1, -1);\n }\n\n /** Sets the active item to the next enabled item in the list. */\n setNextItemActive(): void {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }\n\n /** Sets the active item to a previous enabled item in the list. */\n setPreviousItemActive(): void {\n this._activeItemIndex < 0 && this._wrap ? this.setLastItemActive()\n : this._setActiveItemByDelta(-1);\n }\n\n /**\n * Allows setting the active without any other effects.\n * @param index Index of the item to be set as active.\n */\n updateActiveItem(index: number): void;\n\n /**\n * Allows setting the active item without any other effects.\n * @param item Item to be set as active.\n */\n updateActiveItem(item: T): void;\n\n updateActiveItem(item: any): void {\n const itemArray = this._getItemsArray();\n const index = typeof item === 'number' ? item : itemArray.indexOf(item);\n const activeItem = itemArray[index];\n\n // Explicitly check for `null` and `undefined` because other falsy values are valid.\n this._activeItem = activeItem == null ? null : activeItem;\n this._activeItemIndex = index;\n }\n\n /**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */\n private _setActiveItemByDelta(delta: -1 | 1): void {\n this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n }\n\n /**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */\n private _setActiveInWrapMode(delta: -1 | 1): void {\n const items = this._getItemsArray();\n\n for (let i = 1; i <= items.length; i++) {\n const index = (this._activeItemIndex + (delta * i) + items.length) % items.length;\n const item = items[index];\n\n if (!this._skipPredicateFn(item)) {\n this.setActiveItem(index);\n return;\n }\n }\n }\n\n /**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */\n private _setActiveInDefaultMode(delta: -1 | 1): void {\n this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n }\n\n /**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */\n private _setActiveItemByIndex(index: number, fallbackDelta: -1 | 1): void {\n const items = this._getItemsArray();\n\n if (!items[index]) {\n return;\n }\n\n while (this._skipPredicateFn(items[index])) {\n index += fallbackDelta;\n\n if (!items[index]) {\n return;\n }\n }\n\n this.setActiveItem(index);\n }\n\n /** Returns the items as an array. */\n private _getItemsArray(): T[] {\n return this._items instanceof QueryList ? this._items.toArray() : this._items;\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\nimport {ListKeyManager, ListKeyManagerOption} from './list-key-manager';\n\n/**\n * This is the interface for highlightable items (used by the ActiveDescendantKeyManager).\n * Each item must know how to style itself as active or inactive and whether or not it is\n * currently disabled.\n */\nexport interface Highlightable extends ListKeyManagerOption {\n /** Applies the styles for an active item to this item. */\n setActiveStyles(): void;\n\n /** Applies the styles for an inactive item to this item. */\n setInactiveStyles(): void;\n}\n\nexport class ActiveDescendantKeyManager<T> extends ListKeyManager<Highlightable & T> {\n\n /**\n * Sets the active item to the item at the specified index and adds the\n * active styles to the newly active item. Also removes active styles\n * from the previously active item.\n * @param index Index of the item to be set as active.\n */\n setActiveItem(index: number): void;\n\n /**\n * Sets the active item to the item to the specified one and adds the\n * active styles to the it. Also removes active styles from the\n * previously active item.\n * @param item Item to be set as active.\n */\n setActiveItem(item: T): void;\n\n setActiveItem(index: any): void {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n super.setActiveItem(index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\n }\n }\n\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ListKeyManager, ListKeyManagerOption} from './list-key-manager';\nimport {FocusOrigin} from '../focus-monitor/focus-monitor';\n\n/**\n * This is the interface for focusable items (used by the FocusKeyManager).\n * Each item must know how to focus itself, whether or not it is currently disabled\n * and be able to supply its label.\n */\nexport interface FocusableOption extends ListKeyManagerOption {\n /** Focuses the `FocusableOption`. */\n focus(origin?: FocusOrigin): void;\n}\n\nexport class FocusKeyManager<T> extends ListKeyManager<FocusableOption & T> {\n private _origin: FocusOrigin = 'program';\n\n /**\n * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.\n * @param origin Focus origin to be used when focusing items.\n */\n setFocusOrigin(origin: FocusOrigin): this {\n this._origin = origin;\n return this;\n }\n\n /**\n * Sets the active item to the item at the specified\n * index and focuses the newly active item.\n * @param index Index of the item to be set as active.\n */\n setActiveItem(index: number): void;\n\n /**\n * Sets the active item to the item that is specified and focuses it.\n * @param item Item to be set as active.\n */\n setActiveItem(item: T): void;\n\n setActiveItem(item: any): void {\n super.setActiveItem(item);\n\n if (this.activeItem) {\n this.activeItem.focus(this._origin);\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\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable} from '@angular/core';\n\n/**\n * Configuration for the isFocusable method.\n */\nexport class IsFocusableConfig {\n /**\n * Whether to count an element as focusable even if it is not currently visible.\n */\n ignoreVisibility: boolean = false;\n}\n\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n\n/**\n * Utility for checking the interactivity of an element, such as whether is is focusable or\n * tabbable.\n */\n@Injectable({providedIn: 'root'})\nexport class InteractivityChecker {\n\n constructor(private _platform: Platform) {}\n\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n isDisabled(element: HTMLElement): boolean {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n }\n\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n isVisible(element: HTMLElement): boolean {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }\n\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n isTabbable(element: HTMLElement): boolean {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n\n const frameElement = getFrameElement(getWindow(element));\n\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!this.isVisible(frameElement)) {\n return false;\n }\n }\n\n let nodeName = element.nodeName.toLowerCase();\n let tabIndexValue = getTabIndexValue(element);\n\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n\n // In iOS, the browser only considers some specific elements as tabbable.\n if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n return false;\n }\n\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return this._platform.FIREFOX || element.hasAttribute('controls');\n }\n\n return element.tabIndex >= 0;\n }\n\n /**\n * Gets whether an element can be focused by the user.\n *\n * @param element Element to be checked.\n * @param config The config object with options to customize this method's behavior\n * @returns Whether the element is focusable.\n */\n isFocusable(element: HTMLElement, config?: IsFocusableConfig): boolean {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return isPotentiallyFocusable(element) && !this.isDisabled(element) &&\n (config?.ignoreVisibility || this.isVisible(element));\n }\n\n}\n\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window: Window) {\n try {\n return window.frameElement as HTMLElement;\n } catch {\n return null;\n }\n}\n\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element: HTMLElement): boolean {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n return !!(element.offsetWidth || element.offsetHeight ||\n (typeof element.getClientRects === 'function' && element.getClientRects().length));\n}\n\n/** Gets whether an element's */\nfunction isNativeFormElement(element: Node) {\n let nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' ||\n nodeName === 'select' ||\n nodeName === 'button' ||\n nodeName === 'textarea';\n}\n\n/** Gets whether an element is an `<input type=\"hidden\">`. */\nfunction isHiddenInput(element: HTMLElement): boolean {\n return isInputElement(element) && element.type == 'hidden';\n}\n\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element: HTMLElement): boolean {\n return isAnchorElement(element) && element.hasAttribute('href');\n}\n\n/** Gets whether an element is an input element. */\nfunction isInputElement(element: HTMLElement): element is HTMLInputElement {\n return element.nodeName.toLowerCase() == 'input';\n}\n\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element: HTMLElement): element is HTMLAnchorElement {\n return element.nodeName.toLowerCase() == 'a';\n}\n\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element: HTMLElement): boolean {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n\n let tabIndex = element.getAttribute('tabindex');\n\n // IE11 parses tabindex=\"\" as the value \"-32768\"\n if (tabIndex == '-32768') {\n return false;\n }\n\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element: HTMLElement): number | null {\n if (!hasValidTabIndex(element)) {\n return null;\n }\n\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n\n return isNaN(tabIndex) ? -1 : tabIndex;\n}\n\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element: HTMLElement): boolean {\n let nodeName = element.nodeName.toLowerCase();\n let inputType = nodeName === 'input' && (element as HTMLInputElement).type;\n\n return inputType === 'text'\n || inputType === 'password'\n || nodeName === 'select'\n || nodeName === 'textarea';\n}\n\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element: HTMLElement): boolean {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if (isHiddenInput(element)) {\n return false;\n }\n\n return isNativeFormElement(element) ||\n isAnchorWithHref(element) ||\n element.hasAttribute('contenteditable') ||\n hasValidTabIndex(element);\n}\n\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node: HTMLElement): Window {\n // ownerDocument is null if `node` itself *is* a document.\n return node.ownerDocument && node.ownerDocument.defaultView || window;\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\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n Inject,\n Injectable,\n Input,\n NgZone,\n OnDestroy,\n DoCheck,\n SimpleChanges,\n OnChanges,\n} from '@angular/core';\nimport {take} from 'rxjs/operators';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\n\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.\n *\n * @deprecated Use `ConfigurableFocusTrap` instead.\n * @breaking-change 11.0.0\n */\nexport class FocusTrap {\n private _startAnchor: HTMLElement | null;\n private _endAnchor: HTMLElement | null;\n private _hasAttached = false;\n\n // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n protected startAnchorListener = () => this.focusLastTabbableElement();\n protected endAnchorListener = () => this.focusFirstTabbableElement();\n\n /** Whether the focus trap is active. */\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n this._enabled = value;\n\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(value, this._startAnchor);\n this._toggleAnchorTabIndex(value, this._endAnchor);\n }\n }\n protected _enabled: boolean = true;\n\n constructor(\n readonly _element: HTMLElement,\n private _checker: InteractivityChecker,\n readonly _ngZone: NgZone,\n readonly _document: Document,\n deferAnchors = false) {\n\n if (!deferAnchors) {\n this.attachAnchors();\n }\n }\n\n /** Destroys the focus trap by cleaning up the anchors. */\n destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n\n if (startAnchor.parentNode) {\n startAnchor.parentNode.removeChild(startAnchor);\n }\n }\n\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n\n if (endAnchor.parentNode) {\n endAnchor.parentNode.removeChild(endAnchor);\n }\n }\n\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }\n\n /**\n * Inserts the anchors into the DOM. This is usually done automatically\n * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n * @returns Whether the focus trap managed to attach successfully. This may not be the case\n * if the target element isn't currently in the DOM.\n */\n attachAnchors(): boolean {\n // If we're not on the browser, there can be no focus to trap.\n if (this._hasAttached) {\n return true;\n }\n\n this._ngZone.runOutsideAngular(() => {\n if (!this._startAnchor) {\n this._startAnchor = this._createAnchor();\n this._startAnchor!.addEventListener('focus', this.startAnchorListener);\n }\n\n if (!this._endAnchor) {\n this._endAnchor = this._createAnchor();\n this._endAnchor!.addEventListener('focus', this.endAnchorListener);\n }\n });\n\n if (this._element.parentNode) {\n this._element.parentNode.insertBefore(this._startAnchor!, this._element);\n this._element.parentNode.insertBefore(this._endAnchor!, this._element.nextSibling);\n this._hasAttached = true;\n }\n\n return this._hasAttached;\n }\n\n /**\n * Waits for the zone to stabilize, then either focuses the first element that the\n * user specified, or the first tabbable element.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusInitialElementWhenReady(): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement()));\n });\n }\n\n /**\n * Waits for the zone to stabilize, then focuses\n * the first tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusFirstTabbableElementWhenReady(): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusFirstTabbableElement()));\n });\n }\n\n /**\n * Waits for the zone to stabilize, then focuses\n * the last tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusLastTabbableElementWhenReady(): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusLastTabbableElement()));\n });\n }\n\n /**\n * Get the specified boundary element of the trapped region.\n * @param bound The boundary to get (start or end of trapped region).\n * @returns The boundary element.\n */\n private _getRegionBoundary(bound: 'start' | 'end'): HTMLElement | null {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n let markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` +\n `[cdkFocusRegion${bound}], ` +\n `[cdk-focus-${bound}]`) as NodeListOf<HTMLElement>;\n\n for (let i = 0; i < markers.length; i++) {\n // @breaking-change 8.0.0\n if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n `attribute will be removed in 8.0.0.`, markers[i]);\n } else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n `will be removed in 8.0.0.`, markers[i]);\n }\n }\n\n if (bound == 'start') {\n return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n }\n return markers.length ?\n markers[markers.length - 1] : this._getLastTabbableElement(this._element);\n }\n\n /**\n * Focuses the element that should be focused when the focus trap is initialized.\n * @returns Whether focus was moved successfully.\n */\n focusInitialElement(): boolean {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` +\n `[cdkFocusInitial]`) as HTMLElement;\n\n if (redirectToElement) {\n // @breaking-change 8.0.0\n if (redirectToElement.hasAttribute(`cdk-focus-initial`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` +\n `use 'cdkFocusInitial' instead. The deprecated attribute ` +\n `will be removed in 8.0.0`, redirectToElement);\n }\n\n // Warn the consumer if the element they've pointed to\n // isn't focusable, when not in production mode.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !this._checker.isFocusable(redirectToElement)) {\n console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement);\n }\n\n if (!this._checker.isFocusable(redirectToElement)) {\n const focusableChild = this._getFirstTabbableElement(redirectToElement) as HTMLElement;\n focusableChild?.focus();\n return !!focusableChild;\n }\n\n redirectToElement.focus();\n return true;\n }\n\n return this.focusFirstTabbableElement();\n }\n\n /**\n * Focuses the first tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusFirstTabbableElement(): boolean {\n const redirectToElement = this._getRegionBoundary('start');\n\n if (redirectToElement) {\n redirectToElement.focus();\n }\n\n return !!redirectToElement;\n }\n\n /**\n * Focuses the last tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusLastTabbableElement(): boolean {\n const redirectToElement = this._getRegionBoundary('end');\n\n if (redirectToElement) {\n redirectToElement.focus();\n }\n\n return !!redirectToElement;\n }\n\n /**\n * Checks whether the focus trap has successfully been attached.\n */\n hasAttached(): boolean {\n return this._hasAttached;\n }\n\n /** Get the first tabbable element from a DOM subtree (inclusive). */\n private _getFirstTabbableElement(root: HTMLElement): HTMLElement | null {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n\n // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall\n // back to `childNodes` which includes text nodes, comments etc.\n let children = root.children || root.childNodes;\n\n for (let i = 0; i < children.length; i++) {\n let tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?\n this._getFirstTabbableElement(children[i] as HTMLElement) :\n null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n }\n\n /** Get the last tabbable element from a DOM subtree (inclusive). */\n private _getLastTabbableElement(root: HTMLElement): HTMLElement | null {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n\n // Iterate in reverse DOM order.\n let children = root.children || root.childNodes;\n\n for (let i = children.length - 1; i >= 0; i--) {\n let tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?\n this._getLastTabbableElement(children[i] as HTMLElement) :\n null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n }\n\n /** Creates an anchor element. */\n private _createAnchor(): HTMLElement {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }\n\n /**\n * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n * @param isEnabled Whether the focus trap is enabled.\n * @param anchor Anchor on which to toggle the tabindex.\n */\n private _toggleAnchorTabIndex(isEnabled: boolean, anchor: HTMLElement) {\n // Remove the tabindex completely, rather than setting it to -1, because if the\n // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n }\n\n /**\n * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n * @param enabled: Whether the anchors should trap Tab.\n */\n protected toggleAnchors(enabled: boolean) {\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(enabled, this._startAnchor);\n this._toggleAnchorTabIndex(enabled, this._endAnchor);\n }\n }\n\n /** Executes a function when the zone is stable. */\n private _executeOnStable(fn: () => any): void {\n if (this._ngZone.isStable) {\n fn();\n } else {\n this._ngZone.onStable.pipe(take(1)).subscribe(fn);\n }\n }\n}\n\n/**\n * Factory that allows easy instantiation of focus traps.\n * @deprecated Use `ConfigurableFocusTrapFactory` instead.\n * @breaking-change 11.0.0\n */\n@Injectable({providedIn: 'root'})\nexport class FocusTrapFactory {\n private _document: Document;\n\n constructor(\n private _checker: InteractivityChecker,\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any) {\n\n this._document = _document;\n }\n\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n * manually by the user.\n * @returns The created focus trap instance.\n */\n create(element: HTMLElement, deferCaptureElements: boolean = false): FocusTrap {\n return new FocusTrap(\n element, this._checker, this._ngZone, this._document, deferCaptureElements);\n }\n}\n\n/** Directive for trapping focus within a region. */\n@Directive({\n selector: '[cdkTrapFocus]',\n exportAs: 'cdkTrapFocus',\n})\nexport class CdkTrapFocus implements OnDestroy, AfterContentInit, OnChanges, DoCheck {\n private _document: Document;\n\n /** Underlying FocusTrap instance. */\n focusTrap: FocusTrap;\n\n /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n private _previouslyFocusedElement: HTMLElement | null = null;\n\n /** Whether the focus trap is active. */\n @Input('cdkTrapFocus')\n get enabled(): boolean { return this.focusTrap.enabled; }\n set enabled(value: boolean) { this.focusTrap.enabled = coerceBooleanProperty(value); }\n\n /**\n * Whether the directive should automatically move focus into the trapped region upon\n * initialization and return focus to the previous activeElement upon destruction.\n */\n @Input('cdkTrapFocusAutoCapture')\n get autoCapture(): boolean { return this._autoCapture; }\n set autoCapture(value: boolean) { this._autoCapture = coerceBooleanProperty(value); }\n private _autoCapture: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _focusTrapFactory: FocusTrapFactory,\n @Inject(DOCUMENT) _document: any) {\n\n this._document = _document;\n this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n }\n\n ngOnDestroy() {\n this.focusTrap.destroy();\n\n // If we stored a previously focused element when using autoCapture, return focus to that\n // element now that the trapped region is being destroyed.\n if (this._previouslyFocusedElement) {\n this._previouslyFocusedElement.focus();\n this._previouslyFocusedElement = null;\n }\n }\n\n ngAfterContentInit() {\n this.focusTrap.attachAnchors();\n\n if (this.autoCapture) {\n this._captureFocus();\n }\n }\n\n ngDoCheck() {\n if (!this.focusTrap.hasAttached()) {\n this.focusTrap.attachAnchors();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const autoCaptureChange = changes['autoCapture'];\n\n if (autoCaptureChange && !autoCaptureChange.firstChange && this.autoCapture &&\n this.focusTrap.hasAttached()) {\n this._captureFocus();\n }\n }\n\n private _captureFocus() {\n // If the `activeElement` is inside a shadow root, `document.activeElement` will\n // point to the shadow root so we have to descend into it ourselves.\n const activeElement = this._document?.activeElement as HTMLElement|null;\n this._previouslyFocusedElement =\n activeElement?.shadowRoot?.activeElement as HTMLElement || activeElement;\n this.focusTrap.focusInitialElementWhenReady();\n }\n\n static ngAcceptInputType_enabled: BooleanInput;\n static ngAcceptInputType_autoCapture: BooleanInput;\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\nimport {NgZone} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {FocusTrap} from './focus-trap';\nimport {FocusTrapManager, ManagedFocusTrap} from './focus-trap-manager';\nimport {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nexport class ConfigurableFocusTrap extends FocusTrap implements ManagedFocusTrap {\n /** Whether the FocusTrap is enabled. */\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n this._enabled = value;\n if (this._enabled) {\n this._focusTrapManager.register(this);\n } else {\n this._focusTrapManager.deregister(this);\n }\n }\n\n constructor(\n _element: HTMLElement,\n _checker: InteractivityChecker,\n _ngZone: NgZone,\n _document: Document,\n private _focusTrapManager: FocusTrapManager,\n private _inertStrategy: FocusTrapInertStrategy,\n config: ConfigurableFocusTrapConfig) {\n super(_element, _checker, _ngZone, _document, config.defer);\n this._focusTrapManager.register(this);\n }\n\n /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n destroy() {\n this._focusTrapManager.deregister(this);\n super.destroy();\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _enable() {\n this._inertStrategy.preventFocus(this);\n this.toggleAnchors(true);\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _disable() {\n this._inertStrategy.allowFocus(this);\n this.toggleAnchors(false);\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/** IE 11 compatible closest implementation that is able to start from non-Element Nodes. */\nexport function closest(element: EventTarget|Element|null|undefined, selector: string):\n Element|null {\n if (!(element instanceof Node)) { return null; }\n\n let curr: Node|null = element;\n while (curr != null && !(curr instanceof Element)) {\n curr = curr.parentNode;\n }\n\n return curr && (hasNativeClosest ?\n curr.closest(selector) : polyfillClosest(curr, selector)) as Element|null;\n}\n\n/** Polyfill for browsers without Element.closest. */\nfunction polyfillClosest(element: Element, selector: string): Element|null {\n let curr: Node|null = element;\n while (curr != null && !(curr instanceof Element && matches(curr, selector))) {\n curr = curr.parentNode;\n }\n\n return (curr || null) as Element|null;\n}\n\nconst hasNativeClosest = typeof Element != 'undefined' && !!Element.prototype.closest;\n\n/** IE 11 compatible matches implementation. */\nfunction matches(element: Element, selector: string): boolean {\n return element.matches ?\n element.matches(selector) :\n (element as any)['msMatchesSelector'](selector);\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\nimport {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\nimport {closest} from './polyfill';\n\n/**\n * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nexport class EventListenerFocusTrapInertStrategy implements FocusTrapInertStrategy {\n /** Focus event handler. */\n private _listener: ((e: FocusEvent) => void) | null = null;\n\n /** Adds a document event listener that keeps focus inside the FocusTrap. */\n preventFocus(focusTrap: ConfigurableFocusTrap): void {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n }\n\n this._listener = (e: FocusEvent) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener!, true);\n });\n }\n\n /** Removes the event listener added in preventFocus. */\n allowFocus(focusTrap: ConfigurableFocusTrap): void {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n this._listener = null;\n }\n\n /**\n * Refocuses the first element in the FocusTrap if the focus event target was outside\n * the FocusTrap.\n *\n * This is an event listener callback. The event listener is added in runOutsideAngular,\n * so all this code runs outside Angular as well.\n */\n private _trapFocus(focusTrap: ConfigurableFocusTrap, event: FocusEvent) {\n const target = event.target as HTMLElement;\n const focusTrapRoot = focusTrap._element;\n\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Configuration for creating a ConfigurableFocusTrap.\n */\nexport class ConfigurableFocusTrapConfig {\n /**\n * Whether to defer the creation of FocusTrap elements to be\n * done manually by the user. Default is to create them\n * automatically.\n */\n defer: boolean = false;\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 */\nimport {\n InjectionToken,\n} from '@angular/core';\nimport {FocusTrap} from './focus-trap';\n\n/** The injection token used to specify the inert strategy. */\nexport const FOCUS_TRAP_INERT_STRATEGY =\n new InjectionToken<FocusTrapInertStrategy>('FOCUS_TRAP_INERT_STRATEGY');\n\n/**\n * A strategy that dictates how FocusTrap should prevent elements\n * outside of the FocusTrap from being focused.\n */\nexport interface FocusTrapInertStrategy {\n /** Makes all elements outside focusTrap unfocusable. */\n preventFocus(focusTrap: FocusTrap): void;\n /** Reverts elements made unfocusable by preventFocus to their previous state. */\n allowFocus(focusTrap: FocusTrap): void;\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\nimport {Injectable} from '@angular/core';\n\n/**\n * A FocusTrap managed by FocusTrapManager.\n * Implemented by ConfigurableFocusTrap to avoid circular dependency.\n */\nexport interface ManagedFocusTrap {\n _enable(): void;\n _disable(): void;\n focusInitialElementWhenReady(): Promise<boolean>;\n}\n\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\n@Injectable({providedIn: 'root'})\nexport class FocusTrapManager {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n private _focusTrapStack: ManagedFocusTrap[] = [];\n\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap: ManagedFocusTrap): void {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter((ft) => ft !== focusTrap);\n\n let stack = this._focusTrapStack;\n\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n\n stack.push(focusTrap);\n focusTrap._enable();\n }\n\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap: ManagedFocusTrap): void {\n focusTrap._disable();\n\n const stack = this._focusTrapStack;\n\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n Inject,\n Injectable,\n Optional,\n NgZone,\n} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\nimport {FOCUS_TRAP_INERT_STRATEGY, FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {EventListenerFocusTrapInertStrategy} from './event-listener-inert-strategy';\nimport {FocusTrapManager} from './focus-trap-manager';\n\n/** Factory that allows easy instantiation of configurable focus traps. */\n@Injectable({providedIn: 'root'})\nexport class ConfigurableFocusTrapFactory {\n private _document: Document;\n private _inertStrategy: FocusTrapInertStrategy;\n\n constructor(\n private _checker: InteractivityChecker,\n private _ngZone: NgZone,\n private _focusTrapManager: FocusTrapManager,\n @Inject(DOCUMENT) _document: any,\n @Optional() @Inject(FOCUS_TRAP_INERT_STRATEGY) _inertStrategy?: FocusTrapInertStrategy) {\n\n this._document = _document;\n // TODO split up the strategies into different modules, similar to DateAdapter.\n this._inertStrategy = _inertStrategy || new EventListenerFocusTrapInertStrategy();\n }\n\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param config The focus trap configuration.\n * @returns The created focus trap instance.\n */\n create(element: HTMLElement, config?: ConfigurableFocusTrapConfig): ConfigurableFocusTrap;\n\n /**\n * @deprecated Pass a config object instead of the `deferCaptureElements` flag.\n * @breaking-change 11.0.0\n */\n create(element: HTMLElement, deferCaptureElements: boolean): ConfigurableFocusTrap;\n\n create(element: HTMLElement, config: ConfigurableFocusTrapConfig | boolean =\n new ConfigurableFocusTrapConfig()): ConfigurableFocusTrap {\n let configObject: ConfigurableFocusTrapConfig;\n if (typeof config === 'boolean') {\n configObject = new ConfigurableFocusTrapConfig();\n configObject.defer = config;\n } else {\n configObject = config;\n }\n return new ConfigurableFocusTrap(\n element, this._checker, this._ngZone, this._document, this._focusTrapManager,\n this._inertStrategy, configObject);\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\nimport {InjectionToken} from '@angular/core';\n\n// The tokens for the live announcer are defined in a separate file from LiveAnnouncer\n// as a workaround for https://github.com/angular/angular/issues/22559\n\n/** Possible politeness levels. */\nexport type AriaLivePoliteness = 'off' | 'polite' | 'assertive';\n\nexport const LIVE_ANNOUNCER_ELEMENT_TOKEN =\n new InjectionToken<HTMLElement | null>('liveAnnouncerElement', {\n providedIn: 'root',\n factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY,\n });\n\n/** @docs-private */\nexport function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY(): null {\n return null;\n}\n\n/** Object that can be used to configure the default options for the LiveAnnouncer. */\nexport interface LiveAnnouncerDefaultOptions {\n /** Default politeness for the announcements. */\n politeness?: AriaLivePoliteness;\n\n /** Default duration for the announcement messages. */\n duration?: number;\n}\n\n/** Injection token that can be used to configure the default options for the LiveAnnouncer. */\nexport const LIVE_ANNOUNCER_DEFAULT_OPTIONS =\n new InjectionToken<LiveAnnouncerDefaultOptions>('LIVE_ANNOUNCER_DEFAULT_OPTIONS');\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\nimport {ContentObserver} from '@angular/cdk/observers';\nimport {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Injectable,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {\n AriaLivePoliteness,\n LiveAnnouncerDefaultOptions,\n LIVE_ANNOUNCER_ELEMENT_TOKEN,\n LIVE_ANNOUNCER_DEFAULT_OPTIONS,\n} from './live-announcer-tokens';\n\n\n@Injectable({providedIn: 'root'})\nexport class LiveAnnouncer implements OnDestroy {\n private _liveElement: HTMLElement;\n private _document: Document;\n private _previousTimeout?: number;\n\n constructor(\n @Optional() @Inject(LIVE_ANNOUNCER_ELEMENT_TOKEN) elementToken: any,\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any,\n @Optional() @Inject(LIVE_ANNOUNCER_DEFAULT_OPTIONS)\n private _defaultOptions?: LiveAnnouncerDefaultOptions) {\n\n // We inject the live element and document as `any` because the constructor signature cannot\n // reference browser globals (HTMLElement, Document) on non-browser environments, since having\n // a class decorator causes TypeScript to preserve the constructor signature types.\n this._document = _document;\n this._liveElement = elementToken || this._createLiveElement();\n }\n\n /**\n * Announces a message to screenreaders.\n * @param message Message to be announced to the screenreader.\n * @returns Promise that will be resolved when the message is added to the DOM.\n */\n announce(message: string): Promise<void>;\n\n /**\n * Announces a message to screenreaders.\n * @param message Message to be announced to the screenreader.\n * @param politeness The politeness of the announcer element.\n * @returns Promise that will be resolved when the message is added to the DOM.\n */\n announce(message: string, politeness?: AriaLivePoliteness): Promise<void>;\n\n /**\n * Announces a message to screenreaders.\n * @param message Message to be announced to the screenreader.\n * @param duration Time in milliseconds after which to clear out the announcer element. Note\n * that this takes effect after the message has been added to the DOM, which can be up to\n * 100ms after `announce` has been called.\n * @returns Promise that will be resolved when the message is added to the DOM.\n */\n announce(message: string, duration?: number): Promise<void>;\n\n /**\n * Announces a message to screenreaders.\n * @param message Message to be announced to the screenreader.\n * @param politeness The politeness of the announcer element.\n * @param duration Time in milliseconds after which to clear out the announcer element. Note\n * that this takes effect after the message has been added to the DOM, which can be up to\n * 100ms after `announce` has been called.\n * @returns Promise that will be resolved when the message is added to the DOM.\n */\n announce(message: string, politeness?: AriaLivePoliteness, duration?: number): Promise<void>;\n\n announce(message: string, ...args: any[]): Promise<void> {\n const defaultOptions = this._defaultOptions;\n let politeness: AriaLivePoliteness | undefined;\n let duration: number | undefined;\n\n if (args.length === 1 && typeof args[0] === 'number') {\n duration = args[0];\n } else {\n [politeness, duration] = args;\n }\n\n this.clear();\n clearTimeout(this._previousTimeout);\n\n if (!politeness) {\n politeness =\n (defaultOptions && defaultOptions.politeness) ? defaultOptions.politeness : 'polite';\n }\n\n if (duration == null && defaultOptions) {\n duration = defaultOptions.duration;\n }\n\n // TODO: ensure changing the politeness works on all environments we support.\n this._liveElement.setAttribute('aria-live', politeness);\n\n // This 100ms timeout is necessary for some browser + screen-reader combinations:\n // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.\n // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a\n // second time without clearing and then using a non-zero delay.\n // (using JAWS 17 at time of this writing).\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n clearTimeout(this._previousTimeout);\n this._previousTimeout = setTimeout(() => {\n this._liveElement.textContent = message;\n resolve();\n\n if (typeof duration === 'number') {\n this._previousTimeout = setTimeout(() => this.clear(), duration);\n }\n }, 100);\n });\n });\n }\n\n /**\n * Clears the current text from the announcer element. Can be used to prevent\n * screen readers from reading the text out again while the user is going\n * through the page landmarks.\n */\n clear() {\n if (this._liveElement) {\n this._liveElement.textContent = '';\n }\n }\n\n ngOnDestroy() {\n clearTimeout(this._previousTimeout);\n\n if (this._liveElement && this._liveElement.parentNode) {\n this._liveElement.parentNode.removeChild(this._liveElement);\n this._liveElement = null!;\n }\n }\n\n private _createLiveElement(): HTMLElement {\n const elementClass = 'cdk-live-announcer-element';\n const previousElements = this._document.getElementsByClassName(elementClass);\n const liveEl = this._document.createElement('div');\n\n // Remove any old containers. This can happen when coming in from a server-side-rendered page.\n for (let i = 0; i < previousElements.length; i++) {\n previousElements[i].parentNode!.removeChild(previousElements[i]);\n }\n\n liveEl.classList.add(elementClass);\n liveEl.classList.add('cdk-visually-hidden');\n\n liveEl.setAttribute('aria-atomic', 'true');\n liveEl.setAttribute('aria-live', 'polite');\n\n this._document.body.appendChild(liveEl);\n\n return liveEl;\n }\n\n}\n\n\n/**\n * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility\n * with a wider range of browsers and screen readers.\n */\n@Directive({\n selector: '[cdkAriaLive]',\n exportAs: 'cdkAriaLive',\n})\nexport class CdkAriaLive implements OnDestroy {\n /** The aria-live politeness level to use when announcing messages. */\n @Input('cdkAriaLive')\n get politeness(): AriaLivePoliteness { return this._politeness; }\n set politeness(value: AriaLivePoliteness) {\n this._politeness = value === 'off' || value === 'assertive' ? value : 'polite';\n if (this._politeness === 'off') {\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n } else if (!this._subscription) {\n this._subscription = this._ngZone.runOutsideAngular(() => {\n return this._contentObserver\n .observe(this._elementRef)\n .subscribe(() => {\n // Note that we use textContent here, rather than innerText, in order to avoid a reflow.\n const elementText = this._elementRef.nativeElement.textContent;\n\n // The `MutationObserver` fires also for attribute\n // changes which we don't want to announce.\n if (elementText !== this._previousAnnouncedText) {\n this._liveAnnouncer.announce(elementText, this._politeness);\n this._previousAnnouncedText = elementText;\n }\n });\n });\n }\n }\n private _politeness: AriaLivePoliteness = 'polite';\n\n private _previousAnnouncedText?: string;\n private _subscription: Subscription | null;\n\n constructor(private _elementRef: ElementRef, private _liveAnnouncer: LiveAnnouncer,\n private _contentObserver: ContentObserver, private _ngZone: NgZone) {}\n\n ngOnDestroy() {\n if (this._subscription) {\n this._subscription.unsubscribe();\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/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */\nexport function isFakeMousedownFromScreenReader(event: MouseEvent): boolean {\n // We can typically distinguish between these faked mousedown events and real mousedown events\n // using the \"buttons\" property. While real mousedowns will indicate the mouse button that was\n // pressed (e.g. \"1\" for the left mouse button), faked mousedowns will usually set the property\n // value to 0.\n return event.buttons === 0;\n}\n\n/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */\nexport function isFakeTouchstartFromScreenReader(event: TouchEvent): boolean {\n const touch: Touch | undefined = (event.touches && event.touches[0]) ||\n (event.changedTouches && event.changedTouches[0]);\n\n // A fake `touchstart` can be distinguished from a real one by looking at the `identifier`\n // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe,\n // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10\n // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88.\n return !!touch && touch.identifier === -1 && (touch.radiusX == null || touch.radiusX === 1) &&\n (touch.radiusY == null || touch.radiusY === 1);\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\nimport {Platform, normalizePassiveListenerOptions, _getShadowRoot} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n AfterViewInit,\n} from '@angular/core';\nimport {Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n isFakeMousedownFromScreenReader,\n isFakeTouchstartFromScreenReader,\n} from '../fake-event-detection';\n\n\n// This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found\n// that a value of around 650ms seems appropriate.\nexport const TOUCH_BUFFER_MS = 650;\n\n\nexport type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;\n\n/**\n * Corresponds to the options that can be passed to the native `focus` event.\n * via https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus\n */\nexport interface FocusOptions {\n /** Whether the browser should scroll to the element when it is focused. */\n preventScroll?: boolean;\n}\n\n/** Detection mode used for attributing the origin of a focus event. */\nexport const enum FocusMonitorDetectionMode {\n /**\n * Any mousedown, keydown, or touchstart event that happened in the previous\n * tick or the current tick will be used to assign a focus event's origin (to\n * either mouse, keyboard, or touch). This is the default option.\n */\n IMMEDIATE,\n /**\n * A focus event's origin is always attributed to the last corresponding\n * mousedown, keydown, or touchstart event, no matter how long ago it occured.\n */\n EVENTUAL\n}\n\n/** Injectable service-level options for FocusMonitor. */\nexport interface FocusMonitorOptions {\n detectionMode?: FocusMonitorDetectionMode;\n}\n\n/** InjectionToken for FocusMonitorOptions. */\nexport const FOCUS_MONITOR_DEFAULT_OPTIONS =\n new InjectionToken<FocusMonitorOptions>('cdk-focus-monitor-default-options');\n\ntype MonitoredElementInfo = {\n checkChildren: boolean,\n subject: Subject<FocusOrigin>,\n rootNode: HTMLElement|ShadowRoot|Document\n};\n\n/**\n * Event listener options that enable capturing and also\n * mark the listener as passive if the browser supports it.\n */\nconst captureEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true\n});\n\n\n/** Monitors mouse and keyboard events to determine the cause of focus events. */\n@Injectable({providedIn: 'root'})\nexport class FocusMonitor implements OnDestroy {\n /** The focus origin that the next focus event is a result of. */\n private _origin: FocusOrigin = null;\n\n /** The FocusOrigin of the last focus event tracked by the FocusMonitor. */\n private _lastFocusOrigin: FocusOrigin;\n\n /** Whether the window has just been focused. */\n private _windowFocused = false;\n\n /** The target of the last touch event. */\n private _lastTouchTarget: EventTarget | null;\n\n /** The timeout id of the touch timeout, used to cancel timeout later. */\n private _touchTimeoutId: number;\n\n /** The timeout id of the window focus timeout. */\n private _windowFocusTimeoutId: number;\n\n /** The timeout id of the origin clearing timeout. */\n private _originTimeoutId: number;\n\n /** Map of elements being monitored to their info. */\n private _elementInfo = new Map<HTMLElement, MonitoredElementInfo>();\n\n /** The number of elements currently being monitored. */\n private _monitoredElementCount = 0;\n\n /**\n * Keeps track of the root nodes to which we've currently bound a focus/blur handler,\n * as well as the number of monitored elements that they contain. We have to treat focus/blur\n * handlers differently from the rest of the events, because the browser won't emit events\n * to the document when focus moves inside of a shadow root.\n */\n private _rootNodeFocusListenerCount = new Map<HTMLElement|Document|ShadowRoot, number>();\n\n /**\n * The specified detection mode, used for attributing the origin of a focus\n * event.\n */\n private readonly _detectionMode: FocusMonitorDetectionMode;\n\n /**\n * Event listener for `keydown` events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _documentKeydownListener = () => {\n // On keydown record the origin and clear any touch event that may be in progress.\n this._lastTouchTarget = null;\n this._setOriginForCurrentEventQueue('keyboard');\n }\n\n /**\n * Event listener for `mousedown` events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _documentMousedownListener = (event: MouseEvent) => {\n // On mousedown record the origin only if there is not touch\n // target, since a mousedown can happen as a result of a touch event.\n if (!this._lastTouchTarget) {\n // In some cases screen readers fire fake `mousedown` events instead of `keydown`.\n // Resolve the focus source to `keyboard` if we detect one of them.\n const source = isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse';\n this._setOriginForCurrentEventQueue(source);\n }\n }\n\n /**\n * Event listener for `touchstart` events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _documentTouchstartListener = (event: TouchEvent) => {\n // Some screen readers will fire a fake `touchstart` event if an element is activated using\n // the keyboard while on a device with a touchsreen. Consider such events as keyboard focus.\n if (!isFakeTouchstartFromScreenReader(event)) {\n // When the touchstart event fires the focus event is not yet in the event queue. This means\n // we can't rely on the trick used above (setting timeout of 1ms). Instead we wait 650ms to\n // see if a focus happens.\n if (this._touchTimeoutId != null) {\n clearTimeout(this._touchTimeoutId);\n }\n\n this._lastTouchTarget = getTarget(event);\n this._touchTimeoutId = setTimeout(() => this._lastTouchTarget = null, TOUCH_BUFFER_MS);\n } else if (!this._lastTouchTarget) {\n this._setOriginForCurrentEventQueue('keyboard');\n }\n }\n\n /**\n * Event listener for `focus` events on the window.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _windowFocusListener = () => {\n // Make a note of when the window regains focus, so we can\n // restore the origin info for the focused element.\n this._windowFocused = true;\n this._windowFocusTimeoutId = setTimeout(() => this._windowFocused = false);\n }\n\n /** Used to reference correct document/window */\n protected _document?: Document;\n\n constructor(\n private _ngZone: NgZone,\n private _platform: Platform,\n /** @breaking-change 11.0.0 make document required */\n @Optional() @Inject(DOCUMENT) document: any|null,\n @Optional() @Inject(FOCUS_MONITOR_DEFAULT_OPTIONS) options:\n FocusMonitorOptions|null) {\n this._document = document;\n this._detectionMode = options?.detectionMode || FocusMonitorDetectionMode.IMMEDIATE;\n }\n /**\n * Event listener for `focus` and 'blur' events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _rootNodeFocusAndBlurListener = (event: Event) => {\n const target = getTarget(event);\n const handler = event.type === 'focus' ? this._onFocus : this._onBlur;\n\n // We need to walk up the ancestor chain in order to support `checkChildren`.\n for (let element = target; element; element = element.parentElement) {\n handler.call(this, event as FocusEvent, element);\n }\n }\n\n /**\n * Monitors focus on an element and applies appropriate CSS classes.\n * @param element The element to monitor\n * @param checkChildren Whether to count the element as focused when its children are focused.\n * @returns An observable that emits when the focus state of the element changes.\n * When the element is blurred, null will be emitted.\n */\n monitor(element: HTMLElement, checkChildren?: boolean): Observable<FocusOrigin>;\n\n /**\n * Monitors focus on an element and applies appropriate CSS classes.\n * @param element The element to monitor\n * @param checkChildren Whether to count the element as focused when its children are focused.\n * @returns An observable that emits when the focus state of the element changes.\n * When the element is blurred, null will be emitted.\n */\n monitor(element: ElementRef<HTMLElement>, checkChildren?: boolean): Observable<FocusOrigin>;\n\n monitor(element: HTMLElement | ElementRef<HTMLElement>,\n checkChildren: boolean = false): Observable<FocusOrigin> {\n const nativeElement = coerceElement(element);\n\n // Do nothing if we're not on the browser platform or the passed in node isn't an element.\n if (!this._platform.isBrowser || nativeElement.nodeType !== 1) {\n return observableOf(null);\n }\n\n // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to\n // the shadow root, rather than the `document`, because the browser won't emit focus events\n // to the `document`, if focus is moving within the same shadow root.\n const rootNode = _getShadowRoot(nativeElement) || this._getDocument();\n const cachedInfo = this._elementInfo.get(nativeElement);\n\n // Check if we're already monitoring this element.\n if (cachedInfo) {\n if (checkChildren) {\n // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren\n // observers into ones that behave as if `checkChildren` was turned on. We need a more\n // robust solution.\n cachedInfo.checkChildren = true;\n }\n\n return cachedInfo.subject;\n }\n\n // Create monitored element info.\n const info: MonitoredElementInfo = {\n checkChildren: checkChildren,\n subject: new Subject<FocusOrigin>(),\n rootNode\n };\n this._elementInfo.set(nativeElement, info);\n this._registerGlobalListeners(info);\n\n return info.subject;\n }\n\n /**\n * Stops monitoring an element and removes all focus classes.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: HTMLElement): void;\n\n /**\n * Stops monitoring an element and removes all focus classes.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<HTMLElement>): void;\n\n stopMonitoring(element: HTMLElement | ElementRef<HTMLElement>): void {\n const nativeElement = coerceElement(element);\n const elementInfo = this._elementInfo.get(nativeElement);\n\n if (elementInfo) {\n elementInfo.subject.complete();\n\n this._setClasses(nativeElement);\n this._elementInfo.delete(nativeElement);\n this._removeGlobalListeners(elementInfo);\n }\n }\n\n /**\n * Focuses the element via the specified focus origin.\n * @param element Element to focus.\n * @param origin Focus origin.\n * @param options Options that can be used to configure the focus behavior.\n */\n focusVia(element: HTMLElement, origin: FocusOrigin, options?: FocusOptions): void;\n\n /**\n * Focuses the element via the specified focus origin.\n * @param element Element to focus.\n * @param origin Focus origin.\n * @param options Options that can be used to configure the focus behavior.\n */\n focusVia(element: ElementRef<HTMLElement>, origin: FocusOrigin, options?: FocusOptions): void;\n\n focusVia(element: HTMLElement | ElementRef<HTMLElement>,\n origin: FocusOrigin,\n options?: FocusOptions): void {\n\n const nativeElement = coerceElement(element);\n const focusedElement = this._getDocument().activeElement;\n\n // If the element is focused already, calling `focus` again won't trigger the event listener\n // which means that the focus classes won't be updated. If that's the case, update the classes\n // directly without waiting for an event.\n if (nativeElement === focusedElement) {\n this._getClosestElementsInfo(nativeElement)\n .forEach(([currentElement, info]) => this._originChanged(currentElement, origin, info));\n } else {\n this._setOriginForCurrentEventQueue(origin);\n\n // `focus` isn't available on the server\n if (typeof nativeElement.focus === 'function') {\n nativeElement.focus(options);\n }\n }\n }\n\n ngOnDestroy() {\n this._elementInfo.forEach((_info, element) => this.stopMonitoring(element));\n }\n\n /** Access injected document if available or fallback to global document reference */\n private _getDocument(): Document {\n return this._document || document;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n\n private _toggleClass(element: Element, className: string, shouldSet: boolean) {\n if (shouldSet) {\n element.classList.add(className);\n } else {\n element.classList.remove(className);\n }\n }\n\n private _getFocusOrigin(event: FocusEvent): FocusOrigin {\n // If we couldn't detect a cause for the focus event, it's due to one of three reasons:\n // 1) The window has just regained focus, in which case we want to restore the focused state of\n // the element from before the window blurred.\n // 2) It was caused by a touch event, in which case we mark the origin as 'touch'.\n // 3) The element was programmatically focused, in which case we should mark the origin as\n // 'program'.\n if (this._origin) {\n return this._origin;\n }\n\n if (this._windowFocused && this._lastFocusOrigin) {\n return this._lastFocusOrigin;\n } else if (this._wasCausedByTouch(event)) {\n return 'touch';\n } else {\n return 'program';\n }\n }\n\n /**\n * Sets the focus classes on the element based on the given focus origin.\n * @param element The element to update the classes on.\n * @param origin The focus origin.\n */\n private _setClasses(element: HTMLElement, origin?: FocusOrigin): void {\n this._toggleClass(element, 'cdk-focused', !!origin);\n this._toggleClass(element, 'cdk-touch-focused', origin === 'touch');\n this._toggleClass(element, 'cdk-keyboard-focused', origin === 'keyboard');\n this._toggleClass(element, 'cdk-mouse-focused', origin === 'mouse');\n this._toggleClass(element, 'cdk-program-focused', origin === 'program');\n }\n\n /**\n * Sets the origin and schedules an async function to clear it at the end of the event queue.\n * If the detection mode is 'eventual', the origin is never cleared.\n * @param origin The origin to set.\n */\n private _setOriginForCurrentEventQueue(origin: FocusOrigin): void {\n this._ngZone.runOutsideAngular(() => {\n this._origin = origin;\n\n if (this._detectionMode === FocusMonitorDetectionMode.IMMEDIATE) {\n // Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*\n // tick after the interaction event fired. To ensure the focus origin is always correct,\n // the focus origin will be determined at the beginning of the next tick.\n this._originTimeoutId = setTimeout(() => this._origin = null, 1);\n }\n });\n }\n\n /**\n * Checks whether the given focus event was caused by a touchstart event.\n * @param event The focus event to check.\n * @returns Whether the event was caused by a touch.\n */\n private _wasCausedByTouch(event: FocusEvent): boolean {\n // Note(mmalerba): This implementation is not quite perfect, there is a small edge case.\n // Consider the following dom structure:\n //\n // <div #parent tabindex=\"0\" cdkFocusClasses>\n // <div #child (click)=\"#parent.focus()\"></div>\n // </div>\n //\n // If the user touches the #child element and the #parent is programmatically focused as a\n // result, this code will still consider it to have been caused by the touch event and will\n // apply the cdk-touch-focused class rather than the cdk-program-focused class. This is a\n // relatively small edge-case that can be worked around by using\n // focusVia(parentEl, 'program') to focus the parent element.\n //\n // If we decide that we absolutely must handle this case correctly, we can do so by listening\n // for the first focus event after the touchstart, and then the first blur event after that\n // focus event. When that blur event fires we know that whatever follows is not a result of the\n // touchstart.\n const focusTarget = getTarget(event);\n return this._lastTouchTarget instanceof Node && focusTarget instanceof Node &&\n (focusTarget === this._lastTouchTarget || focusTarget.contains(this._lastTouchTarget));\n }\n\n /**\n * Handles focus events on a registered element.\n * @param event The focus event.\n * @param element The monitored element.\n */\n private _onFocus(event: FocusEvent, element: HTMLElement) {\n // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent\n // focus event affecting the monitored element. If we want to use the origin of the first event\n // instead we should check for the cdk-focused class here and return if the element already has\n // it. (This only matters for elements that have includesChildren = true).\n\n // If we are not counting child-element-focus as focused, make sure that the event target is the\n // monitored element itself.\n const elementInfo = this._elementInfo.get(element);\n if (!elementInfo || (!elementInfo.checkChildren && element !== getTarget(event))) {\n return;\n }\n\n this._originChanged(element, this._getFocusOrigin(event), elementInfo);\n }\n\n /**\n * Handles blur events on a registered element.\n * @param event The blur event.\n * @param element The monitored element.\n */\n _onBlur(event: FocusEvent, element: HTMLElement) {\n // If we are counting child-element-focus as focused, make sure that we aren't just blurring in\n // order to focus another child of the monitored element.\n const elementInfo = this._elementInfo.get(element);\n\n if (!elementInfo || (elementInfo.checkChildren && event.relatedTarget instanceof Node &&\n element.contains(event.relatedTarget))) {\n return;\n }\n\n this._setClasses(element);\n this._emitOrigin(elementInfo.subject, null);\n }\n\n private _emitOrigin(subject: Subject<FocusOrigin>, origin: FocusOrigin) {\n this._ngZone.run(() => subject.next(origin));\n }\n\n private _registerGlobalListeners(elementInfo: MonitoredElementInfo) {\n if (!this._platform.isBrowser) {\n return;\n }\n\n const rootNode = elementInfo.rootNode;\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0;\n\n if (!rootNodeFocusListeners) {\n this._ngZone.runOutsideAngular(() => {\n rootNode.addEventListener('focus', this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions);\n rootNode.addEventListener('blur', this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions);\n });\n }\n\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1);\n\n // Register global listeners when first element is monitored.\n if (++this._monitoredElementCount === 1) {\n // Note: we listen to events in the capture phase so we\n // can detect them even if the user stops propagation.\n this._ngZone.runOutsideAngular(() => {\n const document = this._getDocument();\n const window = this._getWindow();\n\n document.addEventListener('keydown', this._documentKeydownListener,\n captureEventListenerOptions);\n document.addEventListener('mousedown', this._documentMousedownListener,\n captureEventListenerOptions);\n document.addEventListener('touchstart', this._documentTouchstartListener,\n captureEventListenerOptions);\n window.addEventListener('focus', this._windowFocusListener);\n });\n }\n }\n\n private _removeGlobalListeners(elementInfo: MonitoredElementInfo) {\n const rootNode = elementInfo.rootNode;\n\n if (this._rootNodeFocusListenerCount.has(rootNode)) {\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode)!;\n\n if (rootNodeFocusListeners > 1) {\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1);\n } else {\n rootNode.removeEventListener('focus', this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions);\n rootNode.removeEventListener('blur', this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions);\n this._rootNodeFocusListenerCount.delete(rootNode);\n }\n }\n\n // Unregister global listeners when last element is unmonitored.\n if (!--this._monitoredElementCount) {\n const document = this._getDocument();\n const window = this._getWindow();\n\n document.removeEventListener('keydown', this._documentKeydownListener,\n captureEventListenerOptions);\n document.removeEventListener('mousedown', this._documentMousedownListener,\n captureEventListenerOptions);\n document.removeEventListener('touchstart', this._documentTouchstartListener,\n captureEventListenerOptions);\n window.removeEventListener('focus', this._windowFocusListener);\n\n // Clear timeouts for all potentially pending timeouts to prevent the leaks.\n clearTimeout(this._windowFocusTimeoutId);\n clearTimeout(this._touchTimeoutId);\n clearTimeout(this._originTimeoutId);\n }\n }\n\n /** Updates all the state on an element once its focus origin has changed. */\n private _originChanged(element: HTMLElement, origin: FocusOrigin,\n elementInfo: MonitoredElementInfo) {\n this._setClasses(element, origin);\n this._emitOrigin(elementInfo.subject, origin);\n this._lastFocusOrigin = origin;\n }\n\n /**\n * Collects the `MonitoredElementInfo` of a particular element and\n * all of its ancestors that have enabled `checkChildren`.\n * @param element Element from which to start the search.\n */\n private _getClosestElementsInfo(element: HTMLElement): [HTMLElement, MonitoredElementInfo][] {\n const results: [HTMLElement, MonitoredElementInfo][] = [];\n\n this._elementInfo.forEach((info, currentElement) => {\n if (currentElement === element || (info.checkChildren && currentElement.contains(element))) {\n results.push([currentElement, info]);\n }\n });\n\n return results;\n }\n}\n\n/** Gets the target of an event, accounting for Shadow DOM. */\nfunction getTarget(event: Event): HTMLElement|null {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target) as HTMLElement | null;\n}\n\n\n/**\n * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or\n * programmatically) and adds corresponding classes to the element.\n *\n * There are two variants of this directive:\n * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is\n * focused.\n * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.\n */\n@Directive({\n selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',\n})\nexport class CdkMonitorFocus implements AfterViewInit, OnDestroy {\n private _monitorSubscription: Subscription;\n @Output() cdkFocusChange = new EventEmitter<FocusOrigin>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>, private _focusMonitor: FocusMonitor) {}\n\n ngAfterViewInit() {\n const element = this._elementRef.nativeElement;\n this._monitorSubscription = this._focusMonitor.monitor(\n element,\n element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus'))\n .subscribe(origin => this.cdkFocusChange.emit(origin));\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n\n if (this._monitorSubscription) {\n this._monitorSubscription.unsubscribe();\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\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n\n/** Set of possible high-contrast mode backgrounds. */\nexport const enum HighContrastMode {\n NONE,\n BLACK_ON_WHITE,\n WHITE_ON_BLACK,\n}\n\n/** CSS class applied to the document body when in black-on-white high-contrast mode. */\nexport const BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white';\n\n/** CSS class applied to the document body when in white-on-black high-contrast mode. */\nexport const WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';\n\n/** CSS class applied to the document body when in high-contrast mode. */\nexport const HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';\n\n/**\n * Service to determine whether the browser is currently in a high-contrast-mode environment.\n *\n * Microsoft Windows supports an accessibility feature called \"High Contrast Mode\". This mode\n * changes the appearance of all applications, including web applications, to dramatically increase\n * contrast.\n *\n * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast\n * Mode. This service does not detect high-contrast mode as added by the Chrome \"High Contrast\"\n * browser extension.\n */\n@Injectable({providedIn: 'root'})\nexport class HighContrastModeDetector {\n private _document: Document;\n\n constructor(private _platform: Platform, @Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /** Gets the current high-contrast-mode for the page. */\n getHighContrastMode(): HighContrastMode {\n if (!this._platform.isBrowser) {\n return HighContrastMode.NONE;\n }\n\n // Create a test element with an arbitrary background-color that is neither black nor\n // white; high-contrast mode will coerce the color to either black or white. Also ensure that\n // appending the test element to the DOM does not affect layout by absolutely positioning it\n const testElement = this._document.createElement('div');\n testElement.style.backgroundColor = 'rgb(1,2,3)';\n testElement.style.position = 'absolute';\n this._document.body.appendChild(testElement);\n\n // Get the computed style for the background color, collapsing spaces to normalize between\n // browsers. Once we get this color, we no longer need the test element. Access the `window`\n // via the document so we can fake it in tests. Note that we have extra null checks, because\n // this logic will likely run during app bootstrap and throwing can break the entire app.\n const documentWindow = this._document.defaultView || window;\n const computedStyle = (documentWindow && documentWindow.getComputedStyle) ?\n documentWindow.getComputedStyle(testElement) : null;\n const computedColor =\n (computedStyle && computedStyle.backgroundColor || '').replace(/ /g, '');\n this._document.body.removeChild(testElement);\n\n switch (computedColor) {\n case 'rgb(0,0,0)': return HighContrastMode.WHITE_ON_BLACK;\n case 'rgb(255,255,255)': return HighContrastMode.BLACK_ON_WHITE;\n }\n return HighContrastMode.NONE;\n }\n\n /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */\n _applyBodyHighContrastModeCssClasses(): void {\n if (this._platform.isBrowser && this._document.body) {\n const bodyClasses = this._document.body.classList;\n // IE11 doesn't support `classList` operations with multiple arguments\n bodyClasses.remove(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS);\n bodyClasses.remove(BLACK_ON_WHITE_CSS_CLASS);\n bodyClasses.remove(WHITE_ON_BLACK_CSS_CLASS);\n\n const mode = this.getHighContrastMode();\n if (mode === HighContrastMode.BLACK_ON_WHITE) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS);\n bodyClasses.add(BLACK_ON_WHITE_CSS_CLASS);\n } else if (mode === HighContrastMode.WHITE_ON_BLACK) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS);\n bodyClasses.add(WHITE_ON_BLACK_CSS_CLASS);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkMonitorFocus} from './focus-monitor/focus-monitor';\nimport {CdkTrapFocus} from './focus-trap/focus-trap';\nimport {HighContrastModeDetector} from './high-contrast-mode/high-contrast-mode-detector';\nimport {CdkAriaLive} from './live-announcer/live-announcer';\n\n\n@NgModule({\n imports: [PlatformModule, ObserversModule],\n declarations: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n})\nexport class A11yModule {\n constructor(highContrastModeDetector: HighContrastModeDetector) {\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\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 */\nexport * from './aria-describer/aria-describer';\nexport * from './key-manager/activedescendant-key-manager';\nexport * from './key-manager/focus-key-manager';\nexport * from './key-manager/list-key-manager';\nexport * from './focus-trap/configurable-focus-trap';\nexport * from './focus-trap/event-listener-inert-strategy';\nexport * from './focus-trap/focus-trap';\nexport * from './focus-trap/configurable-focus-trap-factory';\nexport * from './focus-trap/focus-trap-inert-strategy';\nexport * from './interactivity-checker/interactivity-checker';\nexport * from './live-announcer/live-announcer';\nexport * from './live-announcer/live-announcer-tokens';\nexport * from './focus-monitor/focus-monitor';\nexport * from './fake-event-detection';\nexport * from './a11y-module';\nexport {\n HighContrastModeDetector,\n HighContrastMode,\n} from './high-contrast-mode/high-contrast-mode-detector';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {ConfigurableFocusTrapConfig as ɵangular_material_src_cdk_a11y_a11y_b} from './focus-trap/configurable-focus-trap-config';\nexport {FocusTrapManager as ɵangular_material_src_cdk_a11y_a11y_a} from './focus-trap/focus-trap-manager';"],"names":["Injectable","Inject","DOCUMENT","Subject","Subscription","QueryList","tap","debounceTime","filter","map","TAB","DOWN_ARROW","UP_ARROW","RIGHT_ARROW","LEFT_ARROW","HOME","END","hasModifierKey","A","Z","ZERO","NINE","Platform","take","NgZone","coerceBooleanProperty","Directive","ElementRef","Input","InjectionToken","Optional","ContentObserver","normalizePassiveListenerOptions","coerceElement","observableOf","_getShadowRoot","EventEmitter","Output","NgModule","PlatformModule","ObserversModule"],"mappings":";;;;;;IAAA;;;;;;;IAQA;IACA,IAAM,YAAY,GAAG,GAAG,CAAC;IAEzB;;;;AAIA,aAAgB,mBAAmB,CAAC,EAAW,EAAE,IAAY,EAAE,EAAU;QACvE,IAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAI,GAAG,CAAC,IAAI,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,GAAA,CAAC,EAAE;YAAE,OAAO;SAAE;QACvE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAEpB,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAChD,CAAC;IAED;;;;AAIA,aAAgB,sBAAsB,CAAC,EAAW,EAAE,IAAY,EAAE,EAAU;QAC1E,IAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,IAAI,EAAE,CAAC,IAAI,EAAE,GAAA,CAAC,CAAC;Q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