{"version":3,"sources":["webpack://mdc/webpack/universalModuleDefinition","webpack://mdc/webpack/bootstrap","webpack://mdc/./packages/material-components-web/index.ts","webpack://mdc/./packages/mdc-animation/animationframe.ts","webpack://mdc/./packages/mdc-animation/util.ts","webpack://mdc/./packages/mdc-auto-init/constants.ts","webpack://mdc/./packages/mdc-auto-init/index.ts","webpack://mdc/./packages/mdc-banner/adapter.ts","webpack://mdc/./packages/mdc-banner/component.ts","webpack://mdc/./packages/mdc-banner/constants.ts","webpack://mdc/./packages/mdc-banner/foundation.ts","webpack://mdc/./packages/mdc-banner/index.ts","webpack://mdc/./packages/mdc-base/component.ts","webpack://mdc/./packages/mdc-base/foundation.ts","webpack://mdc/./packages/mdc-base/index.ts","webpack://mdc/./packages/mdc-base/observer.ts","webpack://mdc/./packages/mdc-base/types.ts","webpack://mdc/./packages/mdc-checkbox/adapter.ts","webpack://mdc/./packages/mdc-checkbox/component.ts","webpack://mdc/./packages/mdc-checkbox/constants.ts","webpack://mdc/./packages/mdc-checkbox/foundation.ts","webpack://mdc/./packages/mdc-checkbox/index.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip-set/adapter.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip-set/component.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip-set/constants.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip-set/foundation.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip-set/index.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/adapter.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/component.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/constants.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/foundation.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/index.ts","webpack://mdc/./packages/mdc-chips/deprecated/chip/types.ts","webpack://mdc/./packages/mdc-chips/deprecated/index.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/adapter.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/component.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/constants.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/foundation.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/index.ts","webpack://mdc/./packages/mdc-chips/deprecated/trailingaction/types.ts","webpack://mdc/./packages/mdc-circular-progress/adapter.ts","webpack://mdc/./packages/mdc-circular-progress/component.ts","webpack://mdc/./packages/mdc-circular-progress/constants.ts","webpack://mdc/./packages/mdc-circular-progress/foundation.ts","webpack://mdc/./packages/mdc-circular-progress/index.ts","webpack://mdc/./packages/mdc-data-table/adapter.ts","webpack://mdc/./packages/mdc-data-table/component.ts","webpack://mdc/./packages/mdc-data-table/constants.ts","webpack://mdc/./packages/mdc-data-table/foundation.ts","webpack://mdc/./packages/mdc-data-table/index.ts","webpack://mdc/./packages/mdc-data-table/types.ts","webpack://mdc/./packages/mdc-dialog/adapter.ts","webpack://mdc/./packages/mdc-dialog/component.ts","webpack://mdc/./packages/mdc-dialog/constants.ts","webpack://mdc/./packages/mdc-dialog/foundation.ts","webpack://mdc/./packages/mdc-dialog/index.ts","webpack://mdc/./packages/mdc-dialog/types.ts","webpack://mdc/./packages/mdc-dialog/util.ts","webpack://mdc/./packages/mdc-dom/announce.ts","webpack://mdc/./packages/mdc-dom/events.ts","webpack://mdc/./packages/mdc-dom/focus-trap.ts","webpack://mdc/./packages/mdc-dom/index.ts","webpack://mdc/./packages/mdc-dom/keyboard.ts","webpack://mdc/./packages/mdc-dom/ponyfill.ts","webpack://mdc/./packages/mdc-drawer/adapter.ts","webpack://mdc/./packages/mdc-drawer/component.ts","webpack://mdc/./packages/mdc-drawer/constants.ts","webpack://mdc/./packages/mdc-drawer/dismissible/foundation.ts","webpack://mdc/./packages/mdc-drawer/index.ts","webpack://mdc/./packages/mdc-drawer/modal/foundation.ts","webpack://mdc/./packages/mdc-drawer/util.ts","webpack://mdc/./packages/mdc-floating-label/adapter.ts","webpack://mdc/./packages/mdc-floating-label/component.ts","webpack://mdc/./packages/mdc-floating-label/constants.ts","webpack://mdc/./packages/mdc-floating-label/foundation.ts","webpack://mdc/./packages/mdc-floating-label/index.ts","webpack://mdc/./packages/mdc-form-field/adapter.ts","webpack://mdc/./packages/mdc-form-field/component.ts","webpack://mdc/./packages/mdc-form-field/constants.ts","webpack://mdc/./packages/mdc-form-field/foundation.ts","webpack://mdc/./packages/mdc-form-field/index.ts","webpack://mdc/./packages/mdc-icon-button/adapter.ts","webpack://mdc/./packages/mdc-icon-button/component.ts","webpack://mdc/./packages/mdc-icon-button/constants.ts","webpack://mdc/./packages/mdc-icon-button/foundation.ts","webpack://mdc/./packages/mdc-icon-button/index.ts","webpack://mdc/./packages/mdc-icon-button/types.ts","webpack://mdc/./packages/mdc-line-ripple/adapter.ts","webpack://mdc/./packages/mdc-line-ripple/component.ts","webpack://mdc/./packages/mdc-line-ripple/constants.ts","webpack://mdc/./packages/mdc-line-ripple/foundation.ts","webpack://mdc/./packages/mdc-line-ripple/index.ts","webpack://mdc/./packages/mdc-linear-progress/adapter.ts","webpack://mdc/./packages/mdc-linear-progress/component.ts","webpack://mdc/./packages/mdc-linear-progress/constants.ts","webpack://mdc/./packages/mdc-linear-progress/foundation.ts","webpack://mdc/./packages/mdc-linear-progress/index.ts","webpack://mdc/./packages/mdc-linear-progress/types.ts","webpack://mdc/./packages/mdc-list/adapter.ts","webpack://mdc/./packages/mdc-list/component.ts","webpack://mdc/./packages/mdc-list/constants.ts","webpack://mdc/./packages/mdc-list/events.ts","webpack://mdc/./packages/mdc-list/foundation.ts","webpack://mdc/./packages/mdc-list/index.ts","webpack://mdc/./packages/mdc-list/typeahead.ts","webpack://mdc/./packages/mdc-list/types.ts","webpack://mdc/./packages/mdc-menu-surface/adapter.ts","webpack://mdc/./packages/mdc-menu-surface/component.ts","webpack://mdc/./packages/mdc-menu-surface/constants.ts","webpack://mdc/./packages/mdc-menu-surface/foundation.ts","webpack://mdc/./packages/mdc-menu-surface/index.ts","webpack://mdc/./packages/mdc-menu-surface/types.ts","webpack://mdc/./packages/mdc-menu/adapter.ts","webpack://mdc/./packages/mdc-menu/component.ts","webpack://mdc/./packages/mdc-menu/constants.ts","webpack://mdc/./packages/mdc-menu/foundation.ts","webpack://mdc/./packages/mdc-menu/index.ts","webpack://mdc/./packages/mdc-menu/types.ts","webpack://mdc/./packages/mdc-notched-outline/adapter.ts","webpack://mdc/./packages/mdc-notched-outline/component.ts","webpack://mdc/./packages/mdc-notched-outline/constants.ts","webpack://mdc/./packages/mdc-notched-outline/foundation.ts","webpack://mdc/./packages/mdc-notched-outline/index.ts","webpack://mdc/./packages/mdc-radio/adapter.ts","webpack://mdc/./packages/mdc-radio/component.ts","webpack://mdc/./packages/mdc-radio/constants.ts","webpack://mdc/./packages/mdc-radio/foundation.ts","webpack://mdc/./packages/mdc-radio/index.ts","webpack://mdc/./packages/mdc-ripple/adapter.ts","webpack://mdc/./packages/mdc-ripple/component.ts","webpack://mdc/./packages/mdc-ripple/constants.ts","webpack://mdc/./packages/mdc-ripple/foundation.ts","webpack://mdc/./packages/mdc-ripple/index.ts","webpack://mdc/./packages/mdc-ripple/types.ts","webpack://mdc/./packages/mdc-ripple/util.ts","webpack://mdc/./packages/mdc-segmented-button/index.ts","webpack://mdc/./packages/mdc-segmented-button/segment/adapter.ts","webpack://mdc/./packages/mdc-segmented-button/segment/component.ts","webpack://mdc/./packages/mdc-segmented-button/segment/constants.ts","webpack://mdc/./packages/mdc-segmented-button/segment/foundation.ts","webpack://mdc/./packages/mdc-segmented-button/segment/index.ts","webpack://mdc/./packages/mdc-segmented-button/segmented-button/adapter.ts","webpack://mdc/./packages/mdc-segmented-button/segmented-button/component.ts","webpack://mdc/./packages/mdc-segmented-button/segmented-button/constants.ts","webpack://mdc/./packages/mdc-segmented-button/segmented-button/foundation.ts","webpack://mdc/./packages/mdc-segmented-button/segmented-button/index.ts","webpack://mdc/./packages/mdc-segmented-button/types.ts","webpack://mdc/./packages/mdc-select/adapter.ts","webpack://mdc/./packages/mdc-select/component.ts","webpack://mdc/./packages/mdc-select/constants.ts","webpack://mdc/./packages/mdc-select/foundation.ts","webpack://mdc/./packages/mdc-select/helper-text/adapter.ts","webpack://mdc/./packages/mdc-select/helper-text/component.ts","webpack://mdc/./packages/mdc-select/helper-text/constants.ts","webpack://mdc/./packages/mdc-select/helper-text/foundation.ts","webpack://mdc/./packages/mdc-select/helper-text/index.ts","webpack://mdc/./packages/mdc-select/icon/adapter.ts","webpack://mdc/./packages/mdc-select/icon/component.ts","webpack://mdc/./packages/mdc-select/icon/constants.ts","webpack://mdc/./packages/mdc-select/icon/foundation.ts","webpack://mdc/./packages/mdc-select/icon/index.ts","webpack://mdc/./packages/mdc-select/index.ts","webpack://mdc/./packages/mdc-select/types.ts","webpack://mdc/./packages/mdc-slider/adapter.ts","webpack://mdc/./packages/mdc-slider/component.ts","webpack://mdc/./packages/mdc-slider/constants.ts","webpack://mdc/./packages/mdc-slider/foundation.ts","webpack://mdc/./packages/mdc-slider/index.ts","webpack://mdc/./packages/mdc-slider/types.ts","webpack://mdc/./packages/mdc-snackbar/adapter.ts","webpack://mdc/./packages/mdc-snackbar/component.ts","webpack://mdc/./packages/mdc-snackbar/constants.ts","webpack://mdc/./packages/mdc-snackbar/foundation.ts","webpack://mdc/./packages/mdc-snackbar/index.ts","webpack://mdc/./packages/mdc-snackbar/types.ts","webpack://mdc/./packages/mdc-snackbar/util.ts","webpack://mdc/./packages/mdc-switch/adapter.ts","webpack://mdc/./packages/mdc-switch/component.ts","webpack://mdc/./packages/mdc-switch/constants.ts","webpack://mdc/./packages/mdc-switch/deprecated/adapter.ts","webpack://mdc/./packages/mdc-switch/deprecated/component.ts","webpack://mdc/./packages/mdc-switch/deprecated/constants.ts","webpack://mdc/./packages/mdc-switch/deprecated/foundation.ts","webpack://mdc/./packages/mdc-switch/deprecated/index.ts","webpack://mdc/./packages/mdc-switch/foundation.ts","webpack://mdc/./packages/mdc-switch/index.ts","webpack://mdc/./packages/mdc-tab-bar/adapter.ts","webpack://mdc/./packages/mdc-tab-bar/component.ts","webpack://mdc/./packages/mdc-tab-bar/constants.ts","webpack://mdc/./packages/mdc-tab-bar/foundation.ts","webpack://mdc/./packages/mdc-tab-bar/index.ts","webpack://mdc/./packages/mdc-tab-bar/types.ts","webpack://mdc/./packages/mdc-tab-indicator/adapter.ts","webpack://mdc/./packages/mdc-tab-indicator/component.ts","webpack://mdc/./packages/mdc-tab-indicator/constants.ts","webpack://mdc/./packages/mdc-tab-indicator/fading-foundation.ts","webpack://mdc/./packages/mdc-tab-indicator/foundation.ts","webpack://mdc/./packages/mdc-tab-indicator/index.ts","webpack://mdc/./packages/mdc-tab-indicator/sliding-foundation.ts","webpack://mdc/./packages/mdc-tab-scroller/adapter.ts","webpack://mdc/./packages/mdc-tab-scroller/component.ts","webpack://mdc/./packages/mdc-tab-scroller/constants.ts","webpack://mdc/./packages/mdc-tab-scroller/foundation.ts","webpack://mdc/./packages/mdc-tab-scroller/index.ts","webpack://mdc/./packages/mdc-tab-scroller/rtl-default-scroller.ts","webpack://mdc/./packages/mdc-tab-scroller/rtl-negative-scroller.ts","webpack://mdc/./packages/mdc-tab-scroller/rtl-reverse-scroller.ts","webpack://mdc/./packages/mdc-tab-scroller/rtl-scroller.ts","webpack://mdc/./packages/mdc-tab-scroller/types.ts","webpack://mdc/./packages/mdc-tab-scroller/util.ts","webpack://mdc/./packages/mdc-tab/adapter.ts","webpack://mdc/./packages/mdc-tab/component.ts","webpack://mdc/./packages/mdc-tab/constants.ts","webpack://mdc/./packages/mdc-tab/foundation.ts","webpack://mdc/./packages/mdc-tab/index.ts","webpack://mdc/./packages/mdc-tab/types.ts","webpack://mdc/./packages/mdc-textfield/adapter.ts","webpack://mdc/./packages/mdc-textfield/character-counter/adapter.ts","webpack://mdc/./packages/mdc-textfield/character-counter/component.ts","webpack://mdc/./packages/mdc-textfield/character-counter/constants.ts","webpack://mdc/./packages/mdc-textfield/character-counter/foundation.ts","webpack://mdc/./packages/mdc-textfield/character-counter/index.ts","webpack://mdc/./packages/mdc-textfield/component.ts","webpack://mdc/./packages/mdc-textfield/constants.ts","webpack://mdc/./packages/mdc-textfield/foundation.ts","webpack://mdc/./packages/mdc-textfield/helper-text/adapter.ts","webpack://mdc/./packages/mdc-textfield/helper-text/component.ts","webpack://mdc/./packages/mdc-textfield/helper-text/constants.ts","webpack://mdc/./packages/mdc-textfield/helper-text/foundation.ts","webpack://mdc/./packages/mdc-textfield/helper-text/index.ts","webpack://mdc/./packages/mdc-textfield/icon/adapter.ts","webpack://mdc/./packages/mdc-textfield/icon/component.ts","webpack://mdc/./packages/mdc-textfield/icon/constants.ts","webpack://mdc/./packages/mdc-textfield/icon/foundation.ts","webpack://mdc/./packages/mdc-textfield/icon/index.ts","webpack://mdc/./packages/mdc-textfield/index.ts","webpack://mdc/./packages/mdc-textfield/types.ts","webpack://mdc/./packages/mdc-tooltip/adapter.ts","webpack://mdc/./packages/mdc-tooltip/component.ts","webpack://mdc/./packages/mdc-tooltip/constants.ts","webpack://mdc/./packages/mdc-tooltip/foundation.ts","webpack://mdc/./packages/mdc-tooltip/index.ts","webpack://mdc/./packages/mdc-tooltip/types.ts","webpack://mdc/./packages/mdc-top-app-bar/adapter.ts","webpack://mdc/./packages/mdc-top-app-bar/component.ts","webpack://mdc/./packages/mdc-top-app-bar/constants.ts","webpack://mdc/./packages/mdc-top-app-bar/fixed/foundation.ts","webpack://mdc/./packages/mdc-top-app-bar/foundation.ts","webpack://mdc/./packages/mdc-top-app-bar/index.ts","webpack://mdc/./packages/mdc-top-app-bar/short/foundation.ts","webpack://mdc/./packages/mdc-top-app-bar/standard/foundation.ts"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;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7B,kBAAsB;AACtB,kBAAwB,0BAAS;AACjC,kBAAiB,mBACvB;AAAC,SAJiC,EAI/B,YAAO,QACZ;AAAC;AAIE;;;AACK,qCAAc,iBAAtB;AACE,YAA0B,uBAAG,CAAK,KAAiB;AACnD,YAA2B,wBAAO,KAAuB,yBAAK;AAC9D,YAA0B,uBAClB,KAAuB,yBAAwB;AACvD,YAAsB,mBAAwB,yBAAyB;AAEtB;AACjD,YAAoB,kBAAE;AAChB,iBAAU,YAAS;AACxB,eAAM;AAC+D;AACpE,gBAAI,CAAK,KAAU,WAAE;AACf,qBAAU,YAAQ;AACtB,uBAAY;AACb,mBAAM,IAAQ,KAAgB,oBAAyB,sBAAE;AACpD,qBAAgB,kBAAwB;AAC5C,uBAAY;AACb;AACF;AAED,eACF;AAAC;AAIE;;;AACK,qCAAa,gBAArB;AACE,YAAQ,KAAiB,kBAAE;AACwE;AACJ;AAC7F,gBAAU,SAAO,KAAwB;AACzC,gBAAQ,KAAI,IAAQ,WAAQ,KAAgB,iBAAE;AACtC,yBAAG,CAAC,YAAO,QAAwB;AAC1C;AAEG,iBAAQ,QAAS,SAAM,OAAQ,SAAS;AAEhD;AAAC;AAKE;;;;AACK,qCAAsB,yBAA9B;AACE,YAAmB,gBAAO,KAAQ,QAAsB;AACxD,YAAQ,KAAgB,oBAAkB,eAAE;AACtC,iBAAU,YAAS;AAE4D;AACb;AACK;AACvE,iBAAuB,0BAAQ,KAAgB,kBAAiB;AAChE,iBAAgB,kBAAiB;AACtC;AACG,aACN;AAAC;AACH,WAAC;AAAA,EAtK2C,aAsK3C;AAtKY,iCAAsB;AAwK8E;AACjH,kBAAsC,uB","file":"material-components-web.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mdc\"] = factory();\n\telse\n\t\troot[\"mdc\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/material-components-web/index.ts\");\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport autoInit, {MDCAttachable} from '@material/auto-init/index';\nimport * as banner from '@material/banner/index';\nimport * as base from '@material/base/index';\nimport * as checkbox from '@material/checkbox/index';\nimport * as chips from '@material/chips/deprecated/index';\nimport * as circularProgress from '@material/circular-progress/index';\nimport * as dataTable from '@material/data-table/index';\nimport * as dialog from '@material/dialog/index';\nimport * as dom from '@material/dom/index';\nimport * as drawer from '@material/drawer/index';\nimport * as floatingLabel from '@material/floating-label/index';\nimport * as formField from '@material/form-field/index';\nimport * as iconButton from '@material/icon-button/index';\nimport * as lineRipple from '@material/line-ripple/index';\nimport * as linearProgress from '@material/linear-progress/index';\nimport * as list from '@material/list/index';\nimport * as menuSurface from '@material/menu-surface/index';\nimport * as menu from '@material/menu/index';\nimport * as notchedOutline from '@material/notched-outline/index';\nimport * as radio from '@material/radio/index';\nimport * as ripple from '@material/ripple/index';\nimport * as segmentedButton from '@material/segmented-button/index';\nimport * as select from '@material/select/index';\nimport * as slider from '@material/slider/index';\nimport * as snackbar from '@material/snackbar/index';\nimport * as switchControl from '@material/switch/index';\nimport * as tabBar from '@material/tab-bar/index';\nimport * as tabIndicator from '@material/tab-indicator/index';\nimport * as tabScroller from '@material/tab-scroller/index';\nimport * as tab from '@material/tab/index';\nimport * as textField from '@material/textfield/index';\nimport * as tooltip from '@material/tooltip/index';\nimport * as topAppBar from '@material/top-app-bar/index';\n\n// Register all components\nautoInit.register('MDCBanner', banner.MDCBanner);\nautoInit.register('MDCCheckbox', checkbox.MDCCheckbox);\nautoInit.register('MDCChip', chips.MDCChip);\nautoInit.register('MDCChipSet', chips.MDCChipSet);\nautoInit.register('MDCCircularProgress', circularProgress.MDCCircularProgress);\nautoInit.register('MDCDataTable', dataTable.MDCDataTable);\nautoInit.register('MDCDialog', dialog.MDCDialog);\nautoInit.register('MDCDrawer', drawer.MDCDrawer);\nautoInit.register('MDCFloatingLabel', floatingLabel.MDCFloatingLabel);\nautoInit.register('MDCFormField', formField.MDCFormField);\nautoInit.register('MDCIconButtonToggle', iconButton.MDCIconButtonToggle);\nautoInit.register('MDCLineRipple', lineRipple.MDCLineRipple);\nautoInit.register('MDCLinearProgress', linearProgress.MDCLinearProgress);\nautoInit.register('MDCList', list.MDCList);\nautoInit.register('MDCMenu', menu.MDCMenu);\nautoInit.register('MDCMenuSurface', menuSurface.MDCMenuSurface);\nautoInit.register('MDCNotchedOutline', notchedOutline.MDCNotchedOutline);\nautoInit.register('MDCRadio', radio.MDCRadio);\nautoInit.register('MDCRipple', ripple.MDCRipple);\nautoInit.register('MDCSegmentedButton', segmentedButton.MDCSegmentedButton);\nautoInit.register('MDCSelect', select.MDCSelect);\nautoInit.register('MDCSlider', slider.MDCSlider);\nautoInit.register('MDCSnackbar', snackbar.MDCSnackbar);\nautoInit.register(\n 'MDCSwitch', switchControl.MDCSwitch as unknown as MDCAttachable);\nautoInit.register('MDCTabBar', tabBar.MDCTabBar);\nautoInit.register('MDCTextField', textField.MDCTextField);\nautoInit.register('MDCTooltip', tooltip.MDCTooltip);\nautoInit.register('MDCTopAppBar', topAppBar.MDCTopAppBar);\n\n// Export all components.\nexport {\n autoInit,\n banner,\n base,\n checkbox,\n chips,\n circularProgress,\n dataTable,\n dialog,\n dom,\n drawer,\n floatingLabel,\n formField,\n iconButton,\n lineRipple,\n linearProgress,\n list,\n menu,\n menuSurface,\n notchedOutline,\n radio,\n ripple,\n segmentedButton,\n select,\n slider,\n snackbar,\n switchControl,\n tab,\n tabBar,\n tabIndicator,\n tabScroller,\n textField,\n tooltip,\n topAppBar,\n};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * AnimationFrame provides a user-friendly abstraction around requesting\n * and canceling animation frames.\n */\nexport class AnimationFrame {\n private readonly rafIDs = new Map();\n\n /**\n * Requests an animation frame. Cancels any existing frame with the same key.\n * @param {string} key The key for this callback.\n * @param {FrameRequestCallback} callback The callback to be executed.\n */\n request(key: string, callback: FrameRequestCallback) {\n this.cancel(key);\n const frameID = requestAnimationFrame((frame) => {\n this.rafIDs.delete(key);\n // Callback must come *after* the key is deleted so that nested calls to\n // request with the same key are not deleted.\n callback(frame);\n });\n this.rafIDs.set(key, frameID);\n }\n\n /**\n * Cancels a queued callback with the given key.\n * @param {string} key The key for this callback.\n */\n cancel(key: string) {\n const rafID = this.rafIDs.get(key);\n if (rafID) {\n cancelAnimationFrame(rafID);\n this.rafIDs.delete(key);\n }\n }\n\n /**\n * Cancels all queued callback.\n */\n cancelAll() {\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach((_, key) => {\n this.cancel(key);\n });\n }\n\n /**\n * Returns the queue of unexecuted callback keys.\n */\n getQueue(): string[] {\n const queue: string[] = [];\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach((_, key) => {\n queue.push(key);\n });\n return queue;\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {\n CssVendorPropertyMap, JsVendorPropertyMap,\n PrefixedCssPropertyName, PrefixedJsEventType,\n StandardCssPropertyName, StandardJsEventType,\n} from './types';\n\nconst cssPropertyNameMap: CssVendorPropertyMap = {\n animation: {\n prefixed: '-webkit-animation',\n standard: 'animation',\n },\n transform: {\n prefixed: '-webkit-transform',\n standard: 'transform',\n },\n transition: {\n prefixed: '-webkit-transition',\n standard: 'transition',\n },\n};\n\nconst jsEventTypeMap: JsVendorPropertyMap = {\n animationend: {\n cssProperty: 'animation',\n prefixed: 'webkitAnimationEnd',\n standard: 'animationend',\n },\n animationiteration: {\n cssProperty: 'animation',\n prefixed: 'webkitAnimationIteration',\n standard: 'animationiteration',\n },\n animationstart: {\n cssProperty: 'animation',\n prefixed: 'webkitAnimationStart',\n standard: 'animationstart',\n },\n transitionend: {\n cssProperty: 'transition',\n prefixed: 'webkitTransitionEnd',\n standard: 'transitionend',\n },\n};\n\nfunction isWindow(windowObj: Window): boolean {\n return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';\n}\n\nexport function getCorrectPropertyName(windowObj: Window, cssProperty: StandardCssPropertyName):\n StandardCssPropertyName | PrefixedCssPropertyName {\n if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {\n const el = windowObj.document.createElement('div');\n const {standard, prefixed} = cssPropertyNameMap[cssProperty];\n const isStandard = standard in el.style;\n return isStandard ? standard : prefixed;\n }\n return cssProperty;\n}\n\nexport function getCorrectEventName(windowObj: Window, eventType: StandardJsEventType):\n StandardJsEventType | PrefixedJsEventType {\n if (isWindow(windowObj) && eventType in jsEventTypeMap) {\n const el = windowObj.document.createElement('div');\n const {standard, prefixed, cssProperty} = jsEventTypeMap[eventType];\n const isStandard = cssProperty in el.style;\n return isStandard ? standard : prefixed;\n }\n return eventType;\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const strings = {\n AUTO_INIT_ATTR: 'data-mdc-auto-init',\n AUTO_INIT_STATE_ATTR: 'data-mdc-auto-init-state',\n INITIALIZED_STATE: 'initialized',\n};\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// tslint:disable:only-arrow-functions\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCFoundation} from '@material/base/foundation';\n\nimport {strings} from './constants';\n\nconst {AUTO_INIT_ATTR, AUTO_INIT_STATE_ATTR, INITIALIZED_STATE} = strings;\n\nexport interface MDCAttachable {\n new(root: Element, foundation?: F, ...args: Array): MDCComponent;\n\n // Static method.\n attachTo(root: Element): MDCComponent;\n}\n\ninterface InternalComponentRegistry {\n [key: string]: MDCAttachable;\n}\n\nconst registry: InternalComponentRegistry = {};\n\nconst CONSOLE_WARN = console.warn.bind(console); // tslint:disable-line:no-console\n\nfunction emit(evtType: string, evtData: T, shouldBubble = false) {\n let evt;\n if (typeof CustomEvent === 'function') {\n evt = new CustomEvent(evtType, {\n bubbles: shouldBubble,\n detail: evtData,\n });\n } else {\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(evtType, shouldBubble, false, evtData);\n }\n\n document.dispatchEvent(evt);\n}\n\n/* istanbul ignore next: optional argument is not a branch statement */\n/**\n * Auto-initializes all MDC components on a page.\n */\nfunction mdcAutoInit(root = document) {\n const components = [];\n let nodes: Element[] = [].slice.call(root.querySelectorAll(`[${AUTO_INIT_ATTR}]`));\n nodes = nodes.filter((node) => node.getAttribute(AUTO_INIT_STATE_ATTR) !== INITIALIZED_STATE);\n\n for (const node of nodes) {\n const ctorName = node.getAttribute(AUTO_INIT_ATTR);\n if (!ctorName) {\n throw new Error('(mdc-auto-init) Constructor name must be given.');\n }\n\n const Constructor = registry[ctorName]; // tslint:disable-line:variable-name\n if (typeof Constructor !== 'function') {\n throw new Error(\n `(mdc-auto-init) Could not find constructor in registry for ${ctorName}`);\n }\n\n // TODO: Should we make an eslint rule for an attachTo() static method?\n // See https://github.com/Microsoft/TypeScript/issues/14600 for discussion of static interface support in TS\n const component = Constructor.attachTo(node);\n Object.defineProperty(node, ctorName, {\n configurable: true,\n enumerable: false,\n value: component,\n writable: false,\n });\n components.push(component);\n node.setAttribute(AUTO_INIT_STATE_ATTR, INITIALIZED_STATE);\n }\n\n emit('MDCAutoInit:End', {});\n return components;\n}\n\n// Constructor is PascalCased because it is a direct reference to a class, rather than an instance of a class.\n// tslint:disable-next-line:variable-name\nmdcAutoInit.register = function(componentName: string, Constructor: MDCAttachable, warn = CONSOLE_WARN) {\n if (typeof Constructor !== 'function') {\n throw new Error(`(mdc-auto-init) Invalid Constructor value: ${Constructor}. Expected function.`);\n }\n const registryValue = registry[componentName];\n if (registryValue) {\n warn(`(mdc-auto-init) Overriding registration for ${componentName} with ${Constructor}. Was: ${registryValue}`);\n }\n registry[componentName] = Constructor;\n};\n\nmdcAutoInit.deregister = function(componentName: string) {\n delete registry[componentName];\n};\n\n/** @nocollapse */\nmdcAutoInit.deregisterAll = function() {\n const keys = Object.keys(registry) as string[];\n keys.forEach(this.deregister, this);\n};\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default mdcAutoInit;\nexport {mdcAutoInit};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {CloseReason} from './constants';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCBannerAdapter {\n /**\n * Adds the given class to the banner root element.\n */\n addClass(className: string): void;\n\n /**\n * @return Returns the height of the banner content element.\n */\n getContentHeight(): number;\n\n /**\n * Broadcasts an event denoting that the banner has finished closing.\n */\n notifyClosed(reason: CloseReason): void;\n\n /**\n * Broadcasts an event denoting that the banner has just started closing.\n */\n notifyClosing(reason: CloseReason): void;\n\n /**\n * Broadcasts an event denoting that the banner has finished opening.\n */\n notifyOpened(): void;\n\n /**\n * Broadcasts an event denoting that the banner has just started opening.\n */\n notifyOpening(): void;\n\n /**\n * Releases focus from banner and restores focus to the previously focused\n * element.\n */\n releaseFocus(): void;\n\n /**\n * Removes the given class from the banner root element.\n */\n removeClass(className: string): void;\n\n /**\n * Sets a style property of the banner root element to the passed value.\n */\n setStyleProperty(propertyName: string, value: string): void;\n\n /**\n * Traps focus in banner and focuses on the primary action button.\n */\n trapFocus(): void;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {FocusTrap} from '@material/dom/focus-trap';\nimport {closest} from '@material/dom/ponyfill';\n\nimport {MDCBannerAdapter} from './adapter';\nimport {CloseReason, events, MDCBannerCloseEventDetail, MDCBannerFocusTrapFactory, selectors} from './constants';\nimport {MDCBannerFoundation} from './foundation';\n\n/** Vanilla JS implementation of banner component. */\nexport class MDCBanner extends MDCComponent {\n static attachTo(root: Element) {\n return new MDCBanner(root);\n }\n\n root!: HTMLElement; // Assigned in MDCComponent constructor.\n private handleContentClick!:\n SpecificEventListener<'click'>; // Assigned in #initialize.\n private primaryActionEl!: HTMLElement; // Assigned in #initialize.\n private secondaryActionEl!: HTMLElement|null; // Assigned in #initialize.\n private textEl!: HTMLElement; // Assigned in #initialize.\n private contentEl!: HTMLElement; // Assigned in #initialize.\n private focusTrap!: FocusTrap; // assigned in initialSyncWithDOM()\n private focusTrapFactory!:\n MDCBannerFocusTrapFactory; // assigned in initialize()\n\n initialize(\n focusTrapFactory: MDCBannerFocusTrapFactory = (el, focusOptions) =>\n new FocusTrap(el, focusOptions),\n ) {\n this.contentEl = this.root.querySelector(selectors.CONTENT) as HTMLElement;\n this.textEl = this.root.querySelector(selectors.TEXT) as HTMLElement;\n this.primaryActionEl =\n this.root.querySelector(selectors.PRIMARY_ACTION) as HTMLElement;\n this.secondaryActionEl =\n this.root.querySelector(selectors.SECONDARY_ACTION) as HTMLElement;\n this.focusTrapFactory = focusTrapFactory;\n\n this.handleContentClick = (evt) => {\n const target = evt.target as Element;\n if (closest(target, selectors.PRIMARY_ACTION)) {\n this.foundation.handlePrimaryActionClick();\n } else if (closest(target, selectors.SECONDARY_ACTION)) {\n this.foundation.handleSecondaryActionClick();\n }\n };\n }\n\n initialSyncWithDOM() {\n this.registerContentClickHandler(this.handleContentClick);\n this.focusTrap = this.focusTrapFactory(\n this.root, {initialFocusEl: this.primaryActionEl});\n }\n\n destroy() {\n super.destroy();\n this.deregisterContentClickHandler(this.handleContentClick);\n }\n\n layout() {\n this.foundation.layout();\n }\n\n /**\n * Opens the banner and fires events.OPENING to indicate the beginning of its\n * opening animation and then events.OPENED once the animation finishes.\n */\n open() {\n this.foundation.open();\n }\n\n /**\n * Closes the banner and fires events.CLOSING to indicate the beginning of its\n * closing animation and then events.CLOSED once the animation finishes.\n * @param reason Why the banner was closed. Value will be passed to\n * events.CLOSING and events.CLOSED via the `event.detail.reason`\n * property. Standard values are CloseReason.PRIMARY and\n * CloseReason.SECONDARY, but CloseReason.UNSPECIFIED is provided for\n * custom handling of programmatic closing of the banner.\n */\n close(reason: CloseReason) {\n this.foundation.close(reason);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCBannerAdapter = {\n addClass: (className) => {\n this.root.classList.add(className);\n },\n getContentHeight: () => {\n return this.contentEl.offsetHeight;\n },\n notifyClosed: (reason) => {\n this.emit(events.CLOSED, {reason});\n },\n notifyClosing: (reason) => {\n this.emit(events.CLOSING, {reason});\n },\n notifyOpened: () => {\n this.emit(events.OPENED, {});\n },\n notifyOpening: () => {\n this.emit(events.OPENING, {});\n },\n releaseFocus: () => {\n this.focusTrap.releaseFocus();\n },\n removeClass: (className) => {\n this.root.classList.remove(className);\n },\n setStyleProperty: (propertyName, value) => {\n this.root.style.setProperty(propertyName, value);\n },\n trapFocus: () => {\n this.focusTrap.trapFocus();\n },\n };\n return new MDCBannerFoundation(adapter);\n }\n\n get isOpen(): boolean {\n return this.foundation.isOpen();\n }\n\n getText(): string {\n return this.textEl.textContent || '';\n }\n\n setText(text: string) {\n this.textEl.textContent = text;\n }\n\n getPrimaryActionText(): string {\n return this.primaryActionEl.textContent || '';\n }\n\n setPrimaryActionText(actionButtonText: string) {\n this.primaryActionEl.textContent = actionButtonText;\n }\n\n /** Returns null if the banner has no secondary action. */\n getSecondaryActionText(): string|null {\n return this.secondaryActionEl ? this.secondaryActionEl.textContent || '' :\n null;\n }\n\n setSecondaryActionText(actionButtonText: string) {\n if (this.secondaryActionEl) {\n this.secondaryActionEl.textContent = actionButtonText;\n }\n }\n\n private registerContentClickHandler(handler: SpecificEventListener<'click'>) {\n this.contentEl.addEventListener('click', handler as EventListener);\n }\n\n private deregisterContentClickHandler(handler:\n SpecificEventListener<'click'>) {\n this.contentEl.removeEventListener('click', handler as EventListener);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {FocusOptions, FocusTrap} from '@material/dom/focus-trap';\n\n/** Banner element classes. */\nexport const cssClasses = {\n CLOSING: 'mdc-banner--closing',\n OPEN: 'mdc-banner--open',\n OPENING: 'mdc-banner--opening',\n};\n\n/** Banner numbers. */\nexport const numbers = {\n BANNER_ANIMATION_CLOSE_TIME_MS: 250,\n BANNER_ANIMATION_OPEN_TIME_MS: 300,\n};\n\n/** Banner events. */\nexport const events = {\n CLOSED: 'MDCBanner:closed',\n CLOSING: 'MDCBanner:closing',\n OPENED: 'MDCBanner:opened',\n OPENING: 'MDCBanner:opening',\n};\n\n/** Banner selectors. */\nexport const selectors = {\n CONTENT: '.mdc-banner__content',\n PRIMARY_ACTION: '.mdc-banner__primary-action',\n SECONDARY_ACTION: '.mdc-banner__secondary-action',\n TEXT: '.mdc-banner__text',\n};\n\n/** Reason as to why the banner was closed. */\nexport enum CloseReason {\n // Indicates the banner was closed via primary action button.\n PRIMARY,\n // Indicates the banner was closed via secondary action button.\n SECONDARY,\n // Will never be used by the component. Provided for custom handling of\n // programmatic closing of the banner.\n UNSPECIFIED,\n}\n\n/** Interface for the detail of the closing and closed events emitted. */\nexport interface MDCBannerCloseEventDetail {\n reason: CloseReason;\n}\n\n/** */\nexport type MDCBannerFocusTrapFactory = (\n element: HTMLElement,\n options: FocusOptions,\n ) => FocusTrap;\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\n\nimport {MDCBannerAdapter} from './adapter';\nimport {CloseReason, cssClasses, numbers} from './constants';\n\nconst {OPENING, OPEN, CLOSING} = cssClasses;\n\n/**\n * Foundation class for banner. Responsibilities include opening and closing the\n * banner.\n */\nexport class MDCBannerFoundation extends MDCFoundation {\n static get defaultAdapter(): MDCBannerAdapter {\n return {\n addClass: () => undefined,\n getContentHeight: () => 0,\n notifyClosed: () => undefined,\n notifyClosing: () => undefined,\n notifyOpened: () => undefined,\n notifyOpening: () => undefined,\n releaseFocus: () => undefined,\n removeClass: () => undefined,\n setStyleProperty: () => undefined,\n trapFocus: () => undefined,\n };\n }\n\n private isOpened = false;\n // Request id for open animation, used to cancel the refresh callback\n // request on close() and destroy().\n private animationFrame = 0;\n // Timer id for close and open animation, used to cancel the timer on\n // close() and destroy().\n private animationTimer = 0;\n\n constructor(adapter?: Partial) {\n super({...MDCBannerFoundation.defaultAdapter, ...adapter});\n }\n\n destroy() {\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = 0;\n }\n\n open() {\n this.isOpened = true;\n this.adapter.notifyOpening();\n this.adapter.removeClass(CLOSING);\n this.adapter.addClass(OPENING);\n\n const contentHeight = this.adapter.getContentHeight();\n this.animationFrame = requestAnimationFrame(() => {\n this.adapter.addClass(OPEN);\n this.adapter.setStyleProperty('height', `${contentHeight}px`);\n\n this.animationTimer = setTimeout(() => {\n this.handleAnimationTimerEnd();\n this.adapter.trapFocus();\n this.adapter.notifyOpened();\n }, numbers.BANNER_ANIMATION_OPEN_TIME_MS);\n });\n }\n\n /**\n * @param reason Why the banner was closed. Value will be passed to\n * events.CLOSING and events.CLOSED via the `event.detail.reason`\n * property. Standard values are CloseReason.PRIMARY and\n * CloseReason.SECONDARY, but CloseReason.UNSPECIFIED is provided for\n * custom handling of programmatic closing of the banner.\n */\n close(reason: CloseReason) {\n if (!this.isOpened) {\n // Avoid redundant close calls (and events), e.g. repeated interactions as\n // the banner is animating closed\n return;\n }\n\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n\n this.isOpened = false;\n this.adapter.notifyClosing(reason);\n this.adapter.addClass(CLOSING);\n this.adapter.setStyleProperty('height', '0');\n this.adapter.removeClass(OPEN);\n this.adapter.removeClass(OPENING);\n\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(() => {\n this.adapter.releaseFocus();\n this.handleAnimationTimerEnd();\n this.adapter.notifyClosed(reason);\n }, numbers.BANNER_ANIMATION_CLOSE_TIME_MS);\n }\n\n isOpen(): boolean {\n return this.isOpened;\n }\n\n handlePrimaryActionClick() {\n this.close(CloseReason.PRIMARY);\n }\n\n handleSecondaryActionClick() {\n this.close(CloseReason.SECONDARY);\n }\n\n layout() {\n const contentHeight = this.adapter.getContentHeight();\n this.adapter.setStyleProperty('height', `${contentHeight}px`);\n }\n\n private handleAnimationTimerEnd() {\n this.animationTimer = 0;\n this.adapter.removeClass(OPENING);\n this.adapter.removeClass(CLOSING);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from './foundation';\nimport {CustomEventListener, EventType, SpecificEventListener} from './types';\n\nexport class MDCComponent {\n static attachTo(root: Element): MDCComponent> {\n // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and\n // returns an instantiated component with its root set to that element. Also note that in the cases of\n // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized\n // from getDefaultFoundation().\n return new MDCComponent(root, new MDCFoundation({}));\n }\n\n protected foundation: FoundationType;\n\n constructor(\n public root: Element, foundation?: FoundationType, ...args: unknown[]) {\n this.initialize(...args);\n // Note that we initialize foundation here and not within the constructor's\n // default param so that this.root is defined and can be used within the\n // foundation class.\n this.foundation =\n foundation === undefined ? this.getDefaultFoundation() : foundation;\n this.foundation.init();\n this.initialSyncWithDOM();\n }\n\n /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */\n initialize(..._args: Array) {\n // Subclasses can override this to do any additional setup work that would be considered part of a\n // \"constructor\". Essentially, it is a hook into the parent constructor before the foundation is\n // initialized. Any additional arguments besides root and foundation will be passed in here.\n }\n\n getDefaultFoundation(): FoundationType {\n // Subclasses must override this method to return a properly configured foundation class for the\n // component.\n throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' +\n 'foundation class');\n }\n\n initialSyncWithDOM() {\n // Subclasses should override this method if they need to perform work to synchronize with a host DOM\n // object. An example of this would be a form control wrapper that needs to synchronize its internal state\n // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM\n // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.\n }\n\n destroy() {\n // Subclasses may implement this method to release any resources / deregister any listeners they have\n // attached. An example of this might be deregistering a resize event from the window object.\n this.foundation.destroy();\n }\n\n /**\n * Wrapper method to add an event listener to the component's root element. This is most useful when\n * listening for custom events.\n */\n listen(\n evtType: K, handler: SpecificEventListener, options?: AddEventListenerOptions | boolean): void;\n listen(\n evtType: string, handler: CustomEventListener, options?: AddEventListenerOptions | boolean): void;\n listen(evtType: string, handler: EventListener, options?: AddEventListenerOptions | boolean) {\n this.root.addEventListener(evtType, handler, options);\n }\n\n /**\n * Wrapper method to remove an event listener to the component's root element. This is most useful when\n * unlistening for custom events.\n */\n unlisten(\n evtType: K, handler: SpecificEventListener, options?: AddEventListenerOptions | boolean): void;\n unlisten(\n evtType: string, handler: CustomEventListener, options?: AddEventListenerOptions | boolean): void;\n unlisten(evtType: string, handler: EventListener, options?: AddEventListenerOptions | boolean) {\n this.root.removeEventListener(evtType, handler, options);\n }\n\n /**\n * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.\n */\n emit(evtType: string, evtData: T, shouldBubble = false) {\n let evt: CustomEvent;\n if (typeof CustomEvent === 'function') {\n evt = new CustomEvent(evtType, {\n bubbles: shouldBubble,\n detail: evtData,\n });\n } else {\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(evtType, shouldBubble, false, evtData);\n }\n\n this.root.dispatchEvent(evt);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCComponent;\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport class MDCFoundation {\n static get cssClasses(): { [key: string]: string } {\n // Classes extending MDCFoundation should implement this method to return an object which exports every\n // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n return {};\n }\n\n static get strings(): { [key: string]: string } {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n return {};\n }\n\n static get numbers(): { [key: string]: number } {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n return {};\n }\n\n static get defaultAdapter(): {} {\n // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n // validation.\n return {};\n }\n\n constructor(protected adapter: AdapterType = {} as AdapterType) {}\n\n init() {\n // Subclasses should override this method to perform initialization routines (registering events, etc.)\n }\n\n destroy() {\n // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n }\n}\n\n/**\n * The constructor for MDCFoundation.\n */\nexport interface MDCFoundationConstructor {\n new(adapter: AdapterType): MDCFoundation;\n readonly prototype: MDCFoundation;\n}\n\n/**\n * The deprecated constructor for MDCFoundation.\n */\nexport interface MDCFoundationDeprecatedConstructor {\n readonly cssClasses: Record;\n readonly strings: Record;\n readonly numbers: Record;\n readonly defaultAdapter: AdapterType;\n\n new(adapter?: Partial): MDCFoundation;\n readonly prototype: MDCFoundation;\n}\n\n/**\n * Retrieves the AdapaterType from the provided MDCFoundation generic type.\n */\nexport type MDCFoundationAdapter =\n T extends MDCFoundation? A : never;\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './component';\nexport * from './foundation';\nexport * from './types';\n","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {Constructor} from './types';\n\n/**\n * A class that can observe targets and perform cleanup logic. Classes may\n * implement this using the `mdcObserver()` mixin.\n */\nexport interface MDCObserver {\n /**\n * Observe a target's properties for changes using the provided map of\n * property names and observer functions.\n *\n * @template T The target type.\n * @param {T} target - The target to observe.\n * @param {ObserverRecord} observers - An object whose keys are target\n * properties and values are observer functions that are called when the\n * associated property changes.\n * @return {Function} A cleanup function that can be called to unobserve the\n * target.\n */\n observe(target: T, observers: ObserverRecord):\n () => void;\n\n /**\n * Enables or disables all observers for the provided target. Disabling\n * observers will prevent them from being called until they are re-enabled.\n *\n * @param {object} target - The target to enable or disable observers for.\n * @param {Boolean} enabled - Whether or not observers should be called.\n */\n setObserversEnabled(target: object, enabled: boolean): void;\n\n /**\n * Clean up all observers and stop listening for property changes.\n */\n unobserve(): void;\n}\n\n/**\n * A function used to observe property changes on a target.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @template This The `this` context of the observer function.\n * @param {T[K]} current - The current value of the property.\n * @param {T[K]} previous - The previous value of the property.\n */\nexport type Observer =\n (this: This, current: T[K], previous: T[K]) => void;\n\n/**\n * An object map whose keys are properties of a target to observe and values\n * are `Observer` functions for each property.\n *\n * @template T The observed target type.\n * @template This The `this` context of observer functions.\n */\nexport type ObserverRecord = {\n [K in keyof T]?: Observer;\n};\n\n/**\n * Mixin to add `MDCObserver` functionality.\n *\n * @return {Constructor} A class with `MDCObserver` functionality.\n */\nexport function mdcObserver(): Constructor;\n\n/**\n * Mixin to add `MDCObserver` functionality to a base class.\n *\n * @template T Base class instance type. Specify this generic if the base class\n * itself has generics that cannot be inferred.\n * @template C Base class constructor type.\n * @param {C} baseClass - Base class.\n * @return {Constructor & C} A class that extends the optional base\n * class with `MDCObserver` functionality.\n */\nexport function mdcObserver>(baseClass: C):\n Constructor&Constructor&C;\n\n/**\n * Mixin to add `MDCObserver` functionality to an optional base class.\n *\n * @template C Optional base class constructor type.\n * @param {C} baseClass - Optional base class.\n * @return {Constructor & C} A class that extends the optional base\n * class with `MDCObserver` functionality.\n */\nexport function mdcObserver(\n baseClass: C = class {} as C) {\n // Mixin classes cannot use private members and Symbol() cannot be used in 3P\n // for IE11.\n const unobserveMap = new WeakMap();\n return class MDCObserver extends baseClass implements MDCObserver {\n observe(target: T, observers: ObserverRecord) {\n const cleanup: Function[] = [];\n for (const property of Object.keys(observers) as Array) {\n const observer = observers[property]!.bind(this);\n cleanup.push(observeProperty(target, property, observer));\n }\n\n const unobserve = () => {\n for (const cleanupFn of cleanup) {\n cleanupFn();\n }\n const unobserves = unobserveMap.get(this) || [];\n const index = unobserves.indexOf(unobserve);\n if (index > -1) {\n unobserves.splice(index, 1);\n }\n };\n\n let unobserves = unobserveMap.get(this);\n if (!unobserves) {\n unobserves = [];\n unobserveMap.set(this, unobserves);\n }\n\n unobserves.push(unobserve);\n return unobserve;\n }\n\n setObserversEnabled(target: object, enabled: boolean) {\n setObserversEnabled(target, enabled);\n }\n\n unobserve() {\n // Iterate over a copy since unobserve() will remove themselves from the\n // array\n const unobserves = unobserveMap.get(this) || [];\n for (const unobserve of [...unobserves]) {\n unobserve();\n }\n }\n };\n}\n\n/**\n * A manager for observers listening to a target. A target's `prototype` is its\n * `TargetObservers` instance.\n *\n * @template T The observed target type.\n */\ninterface TargetObservers {\n /**\n * Indicates whether or not observers for this target are enabled. If\n * disabled, observers will not be called in response to target property\n * changes.\n */\n isEnabled: boolean;\n\n /**\n * Retrieves all observers for a given target property.\n *\n * @template K The target property key.\n * @param {K} key - The property to retrieve observers for.\n * @return An array of observers for the provided target property.\n */\n getObservers(key: K): Array>;\n\n /**\n * A Set of properties that have been installed (their getter/setter) replaced\n * to connect with the `TargetObservers`. This prevents multiple installations\n * of the same property.\n */\n installedProperties: Set;\n}\n\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param {T} target - The target to observe.\n * @param {K} property - The property of the target to observe.\n * @param {Observer} - An observer function to invoke each time the\n * property changes.\n * @return {Function} A cleanup function that will stop observing changes for\n * the provided `Observer`.\n */\nexport function observeProperty(\n target: T, property: K, observer: Observer) {\n const targetObservers = installObserver(target, property);\n const observers = targetObservers.getObservers(property);\n observers.push(observer);\n return () => {\n observers.splice(observers.indexOf(observer), 1);\n };\n}\n\n/**\n * A Map of all `TargetObservers` that have been installed.\n */\nconst allTargetObservers = new WeakMap>();\n\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed), and replaces the given property with a getter and setter that\n * will respond to changes and call `TargetObservers`.\n *\n * Subsequent calls to `installObserver()` with the same target and property\n * will not override the property's previously installed getter/setter.\n *\n * @template T The observed target type.\n * @template K The observed property to create a getter/setter for.\n * @param {T} target - The target to observe.\n * @param {K} property - The property to create a getter/setter for, if needed.\n * @return {TargetObservers} The installed `TargetObservers` for the provided\n * target.\n */\nfunction installObserver(\n target: T, property: K): TargetObservers {\n const observersMap = new Map>>();\n\n if (!allTargetObservers.has(target)) {\n allTargetObservers.set(target, {\n isEnabled: true,\n getObservers(key) {\n const observers = observersMap.get(key) || [];\n if (!observersMap.has(key)) {\n observersMap.set(key, observers);\n }\n\n return observers;\n },\n installedProperties: new Set()\n } as TargetObservers);\n }\n\n const targetObservers = allTargetObservers.get(target)!;\n if (targetObservers.installedProperties.has(property)) {\n // The getter/setter has already been replaced for this property\n return targetObservers;\n }\n\n // Retrieve (or create if it's a plain property) the original descriptor from\n // the target...\n const descriptor = getDescriptor(target, property) || {\n configurable: true,\n enumerable: true,\n value: target[property],\n writable: true\n };\n\n // ...and create a copy that will be used for the observer.\n const observedDescriptor = {...descriptor};\n let {get: descGet, set: descSet} = descriptor;\n if ('value' in descriptor) {\n // The descriptor is a simple value (not a getter/setter).\n // For our observer descriptor that we copied, delete the value/writable\n // properties, since they are incompatible with the get/set properties\n // for descriptors.\n delete observedDescriptor.value;\n delete observedDescriptor.writable;\n\n // Set up a simple getter...\n let value = descriptor.value;\n descGet = function(this: T) {\n return value;\n };\n\n // ...and setter (if the original property was writable).\n if (descriptor.writable) {\n descSet = function(this: T, newValue: T[K]) {\n value = newValue;\n };\n }\n }\n\n if (descGet) {\n const getter = descGet;\n observedDescriptor.get = function(this: T) {\n return getter.call(this);\n };\n }\n\n if (descSet) {\n const setter = descSet;\n observedDescriptor.set = function(this: T, newValue: T[K]) {\n const previous = descGet ? descGet.call(this) : newValue;\n setter.call(this, newValue);\n if (targetObservers.isEnabled && (!descGet || newValue !== previous)) {\n for (const observer of targetObservers.getObservers(property)) {\n observer(newValue, previous);\n }\n }\n };\n }\n\n targetObservers.installedProperties.add(property);\n Object.defineProperty(target, property, observedDescriptor);\n return targetObservers;\n}\n\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param {T} target - The target to retrieve a descriptor from.\n * @param {K} property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n * plain properties may not have a descriptor defined.\n */\nexport function getDescriptor(\n target: T, property: K) {\n let descriptorTarget: object|null = target;\n let descriptor: PropertyDescriptor|undefined;\n while (descriptorTarget) {\n descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n if (descriptor) {\n break;\n }\n\n // Walk up the instance's prototype chain in case the property is declared\n // on a superclass.\n descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n }\n\n return descriptor;\n}\n\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param {T} target - The target to enable or disable observers for.\n * @param {Boolean} enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled(\n target: T, enabled: boolean) {\n const targetObservers = allTargetObservers.get(target);\n if (targetObservers) {\n targetObservers.isEnabled = enabled;\n }\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport type EventType = keyof GlobalEventHandlersEventMap;\nexport type SpecificEventListener = (evt: GlobalEventHandlersEventMap[K]) => void;\nexport type CustomEventListener = (evt: E) => void;\nexport type WindowEventType = keyof WindowEventMap;\nexport type SpecificWindowEventListener =\n (evt: WindowEventMap[K]) => void;\n\n// `any` is required for mixin constructors\n// tslint:disable:no-any\n/**\n * A generic type for the constructor of an instance type. Note that this type\n * does not preserve accurate constructor parameters.\n *\n * @template T The instance type.\n */\nexport type Constructor = {\n new (...args: any[]): T;\n};\n// tslint:enable:no-any\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCCheckboxAdapter {\n addClass(className: string): void;\n forceLayout(): void;\n hasNativeControl(): boolean;\n isAttachedToDOM(): boolean;\n isChecked(): boolean;\n isIndeterminate(): boolean;\n removeClass(className: string): void;\n removeNativeControlAttr(attr: string): void;\n setNativeControlAttr(attr: string, value: string): void;\n setNativeControlDisabled(disabled: boolean): void;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {getCorrectEventName} from '@material/animation/util';\nimport {MDCComponent} from '@material/base/component';\nimport {applyPassive} from '@material/dom/events';\nimport {matches} from '@material/dom/ponyfill';\nimport {MDCRippleAdapter} from '@material/ripple/adapter';\nimport {MDCRipple} from '@material/ripple/component';\nimport {MDCRippleFoundation} from '@material/ripple/foundation';\nimport {MDCRippleCapableSurface} from '@material/ripple/types';\n\nimport {MDCCheckboxAdapter} from './adapter';\nimport {strings} from './constants';\nimport {MDCCheckboxFoundation} from './foundation';\n\n/**\n * This type is needed for compatibility with Closure Compiler.\n */\ntype PropertyDescriptorGetter = (() => unknown) | undefined;\n\nconst CB_PROTO_PROPS = ['checked', 'indeterminate'];\n\nexport type MDCCheckboxFactory = (el: Element, foundation?: MDCCheckboxFoundation) => MDCCheckbox;\n\nexport class MDCCheckbox extends MDCComponent implements MDCRippleCapableSurface {\n static attachTo(root: Element) {\n return new MDCCheckbox(root);\n }\n\n get ripple(): MDCRipple {\n return this.rippleSurface;\n }\n\n get checked(): boolean {\n return this.getNativeControl().checked;\n }\n\n set checked(checked: boolean) {\n this.getNativeControl().checked = checked;\n }\n\n get indeterminate(): boolean {\n return this.getNativeControl().indeterminate;\n }\n\n set indeterminate(indeterminate: boolean) {\n this.getNativeControl().indeterminate = indeterminate;\n }\n\n get disabled(): boolean {\n return this.getNativeControl().disabled;\n }\n\n set disabled(disabled: boolean) {\n this.foundation.setDisabled(disabled);\n }\n\n get value(): string {\n return this.getNativeControl().value;\n }\n\n set value(value: string) {\n this.getNativeControl().value = value;\n }\n\n private readonly rippleSurface: MDCRipple = this.createRipple();\n private handleChange!: EventListener; // assigned in initialSyncWithDOM()\n private handleAnimationEnd!:\n EventListener; // assigned in initialSyncWithDOM()\n\n initialize() {\n const {DATA_INDETERMINATE_ATTR} = strings;\n this.getNativeControl().indeterminate =\n this.getNativeControl().getAttribute(DATA_INDETERMINATE_ATTR) ===\n 'true';\n this.getNativeControl().removeAttribute(DATA_INDETERMINATE_ATTR);\n }\n\n initialSyncWithDOM() {\n this.handleChange = () => {\n this.foundation.handleChange();\n };\n this.handleAnimationEnd = () => {\n this.foundation.handleAnimationEnd();\n };\n this.getNativeControl().addEventListener('change', this.handleChange);\n this.listen(\n getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.installPropertyChangeHooks();\n }\n\n destroy() {\n this.rippleSurface.destroy();\n this.getNativeControl().removeEventListener('change', this.handleChange);\n this.unlisten(\n getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.uninstallPropertyChangeHooks();\n super.destroy();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCCheckboxAdapter = {\n addClass: (className) => this.root.classList.add(className),\n forceLayout: () => (this.root as HTMLElement).offsetWidth,\n hasNativeControl: () => !!this.getNativeControl(),\n isAttachedToDOM: () => Boolean(this.root.parentNode),\n isChecked: () => this.checked,\n isIndeterminate: () => this.indeterminate,\n removeClass: (className) => {\n this.root.classList.remove(className);\n },\n removeNativeControlAttr: (attr) => {\n this.getNativeControl().removeAttribute(attr);\n },\n setNativeControlAttr: (attr, value) => {\n this.getNativeControl().setAttribute(attr, value);\n },\n setNativeControlDisabled: (disabled) => {\n this.getNativeControl().disabled = disabled;\n },\n };\n return new MDCCheckboxFoundation(adapter);\n }\n\n private createRipple(): MDCRipple {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCRippleAdapter = {\n ...MDCRipple.createAdapter(this),\n deregisterInteractionHandler: (evtType, handler) => {\n this.getNativeControl().removeEventListener(\n evtType, handler, applyPassive());\n },\n isSurfaceActive: () => matches(this.getNativeControl(), ':active'),\n isUnbounded: () => true,\n registerInteractionHandler: (evtType, handler) => {\n this.getNativeControl().addEventListener(\n evtType, handler, applyPassive());\n },\n };\n return new MDCRipple(this.root, new MDCRippleFoundation(adapter));\n }\n\n private installPropertyChangeHooks() {\n const nativeCb = this.getNativeControl();\n const cbProto = Object.getPrototypeOf(nativeCb);\n\n for (const controlState of CB_PROTO_PROPS) {\n const desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!validDescriptor(desc)) {\n return;\n }\n\n // Type cast is needed for compatibility with Closure Compiler.\n const nativeGetter = (desc as {get: PropertyDescriptorGetter}).get;\n\n const nativeCbDesc = {\n configurable: desc.configurable,\n enumerable: desc.enumerable,\n get: nativeGetter,\n set: (state: boolean) => {\n desc.set!.call(nativeCb, state);\n this.foundation.handleChange();\n },\n };\n Object.defineProperty(nativeCb, controlState, nativeCbDesc);\n }\n }\n\n private uninstallPropertyChangeHooks() {\n const nativeCb = this.getNativeControl();\n const cbProto = Object.getPrototypeOf(nativeCb);\n\n for (const controlState of CB_PROTO_PROPS) {\n const desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n if (!validDescriptor(desc)) {\n return;\n }\n Object.defineProperty(nativeCb, controlState, desc);\n }\n }\n\n private getNativeControl(): HTMLInputElement {\n const {NATIVE_CONTROL_SELECTOR} = strings;\n const el =\n this.root.querySelector(NATIVE_CONTROL_SELECTOR);\n if (!el) {\n throw new Error(`Checkbox component requires a ${NATIVE_CONTROL_SELECTOR} element`);\n }\n return el;\n }\n}\n\nfunction validDescriptor(inputPropDesc: PropertyDescriptor | undefined): inputPropDesc is PropertyDescriptor {\n return !!inputPropDesc && typeof inputPropDesc.set === 'function';\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate',\n ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked',\n ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked',\n ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked',\n ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked',\n ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate',\n BACKGROUND: 'mdc-checkbox__background',\n CHECKED: 'mdc-checkbox--checked',\n CHECKMARK: 'mdc-checkbox__checkmark',\n CHECKMARK_PATH: 'mdc-checkbox__checkmark-path',\n DISABLED: 'mdc-checkbox--disabled',\n INDETERMINATE: 'mdc-checkbox--indeterminate',\n MIXEDMARK: 'mdc-checkbox__mixedmark',\n NATIVE_CONTROL: 'mdc-checkbox__native-control',\n ROOT: 'mdc-checkbox',\n SELECTED: 'mdc-checkbox--selected',\n UPGRADED: 'mdc-checkbox--upgraded',\n};\n\nexport const strings = {\n ARIA_CHECKED_ATTR: 'aria-checked',\n ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed',\n DATA_INDETERMINATE_ATTR: 'data-indeterminate',\n NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control',\n TRANSITION_STATE_CHECKED: 'checked',\n TRANSITION_STATE_INDETERMINATE: 'indeterminate',\n TRANSITION_STATE_INIT: 'init',\n TRANSITION_STATE_UNCHECKED: 'unchecked',\n};\n\nexport const numbers = {\n ANIM_END_LATCH_MS: 250,\n};\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCCheckboxAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\n\nexport class MDCCheckboxFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get numbers() {\n return numbers;\n }\n\n static get defaultAdapter(): MDCCheckboxAdapter {\n return {\n addClass: () => undefined,\n forceLayout: () => undefined,\n hasNativeControl: () => false,\n isAttachedToDOM: () => false,\n isChecked: () => false,\n isIndeterminate: () => false,\n removeClass: () => undefined,\n removeNativeControlAttr: () => undefined,\n setNativeControlAttr: () => undefined,\n setNativeControlDisabled: () => undefined,\n };\n }\n\n private currentCheckState = strings.TRANSITION_STATE_INIT;\n private currentAnimationClass = '';\n private animEndLatchTimer = 0;\n private enableAnimationEndHandler = false;\n\n constructor(adapter?: Partial) {\n super({...MDCCheckboxFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n this.currentCheckState = this.determineCheckState();\n this.updateAriaChecked();\n this.adapter.addClass(cssClasses.UPGRADED);\n }\n\n destroy() {\n clearTimeout(this.animEndLatchTimer);\n }\n\n setDisabled(disabled: boolean) {\n this.adapter.setNativeControlDisabled(disabled);\n if (disabled) {\n this.adapter.addClass(cssClasses.DISABLED);\n } else {\n this.adapter.removeClass(cssClasses.DISABLED);\n }\n }\n\n /**\n * Handles the animationend event for the checkbox\n */\n handleAnimationEnd() {\n if (!this.enableAnimationEndHandler) {\n return;\n }\n\n clearTimeout(this.animEndLatchTimer);\n\n this.animEndLatchTimer = setTimeout(() => {\n this.adapter.removeClass(this.currentAnimationClass);\n this.enableAnimationEndHandler = false;\n }, numbers.ANIM_END_LATCH_MS);\n }\n\n /**\n * Handles the change event for the checkbox\n */\n handleChange() {\n this.transitionCheckState();\n }\n\n private transitionCheckState() {\n if (!this.adapter.hasNativeControl()) {\n return;\n }\n const oldState = this.currentCheckState;\n const newState = this.determineCheckState();\n\n if (oldState === newState) {\n return;\n }\n\n this.updateAriaChecked();\n\n const {TRANSITION_STATE_UNCHECKED} = strings;\n const {SELECTED} = cssClasses;\n if (newState === TRANSITION_STATE_UNCHECKED) {\n this.adapter.removeClass(SELECTED);\n } else {\n this.adapter.addClass(SELECTED);\n }\n\n // Check to ensure that there isn't a previously existing animation class, in case for example\n // the user interacted with the checkbox before the animation was finished.\n if (this.currentAnimationClass.length > 0) {\n clearTimeout(this.animEndLatchTimer);\n this.adapter.forceLayout();\n this.adapter.removeClass(this.currentAnimationClass);\n }\n\n this.currentAnimationClass =\n this.getTransitionAnimationClass(oldState, newState);\n this.currentCheckState = newState;\n\n // Check for parentNode so that animations are only run when the element is attached\n // to the DOM.\n if (this.adapter.isAttachedToDOM() &&\n this.currentAnimationClass.length > 0) {\n this.adapter.addClass(this.currentAnimationClass);\n this.enableAnimationEndHandler = true;\n }\n }\n\n private determineCheckState(): string {\n const {\n TRANSITION_STATE_INDETERMINATE,\n TRANSITION_STATE_CHECKED,\n TRANSITION_STATE_UNCHECKED,\n } = strings;\n\n if (this.adapter.isIndeterminate()) {\n return TRANSITION_STATE_INDETERMINATE;\n }\n return this.adapter.isChecked() ? TRANSITION_STATE_CHECKED :\n TRANSITION_STATE_UNCHECKED;\n }\n\n private getTransitionAnimationClass(oldState: string, newState: string):\n string {\n const {\n TRANSITION_STATE_INIT,\n TRANSITION_STATE_CHECKED,\n TRANSITION_STATE_UNCHECKED,\n } = strings;\n\n const {\n ANIM_UNCHECKED_CHECKED,\n ANIM_UNCHECKED_INDETERMINATE,\n ANIM_CHECKED_UNCHECKED,\n ANIM_CHECKED_INDETERMINATE,\n ANIM_INDETERMINATE_CHECKED,\n ANIM_INDETERMINATE_UNCHECKED,\n } = MDCCheckboxFoundation.cssClasses;\n\n switch (oldState) {\n case TRANSITION_STATE_INIT:\n if (newState === TRANSITION_STATE_UNCHECKED) {\n return '';\n }\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n case TRANSITION_STATE_UNCHECKED:\n return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;\n case TRANSITION_STATE_CHECKED:\n return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;\n default: // TRANSITION_STATE_INDETERMINATE\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n }\n }\n\n private updateAriaChecked() {\n // Ensure aria-checked is set to mixed if checkbox is in indeterminate state.\n if (this.adapter.isIndeterminate()) {\n this.adapter.setNativeControlAttr(\n strings.ARIA_CHECKED_ATTR, strings.ARIA_CHECKED_INDETERMINATE_VALUE);\n } else {\n // The on/off state does not need to keep track of aria-checked, since\n // the screenreader uses the checked property on the checkbox element.\n this.adapter.removeNativeControlAttr(strings.ARIA_CHECKED_ATTR);\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCheckboxFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCChipSetAdapter {\n /**\n * @return true if the root element contains the given class name.\n */\n hasClass(className: string): boolean;\n\n /**\n * Removes the chip with the given index from the chip set.\n * Make sure to remove it from the chip list, too.\n */\n removeChipAtIndex(index: number): void;\n\n /**\n * Sets the selected state of the chip at the given index.\n */\n selectChipAtIndex(index: number, isSelected: boolean, shouldNotifyClients: boolean): void;\n\n /**\n * Returns the index of the chip at the given ID.\n * @param chipId the unique ID of the chip\n * @return the numerical index of the chip with the matching id or -1.\n */\n getIndexOfChipById(chipId: string): number;\n\n /**\n * Calls Chip#focusPrimaryAction() on the chip at the given index.\n * @param index the index of the chip\n */\n focusChipPrimaryActionAtIndex(index: number): void;\n\n /**\n * Calls Chip#focusTrailingAction() on the chip at the given index.\n * @param index the index of the chip\n */\n focusChipTrailingActionAtIndex(index: number): void;\n\n /**\n * Removes focus from the chip at the given index.\n * @param index the index of the chip\n */\n removeFocusFromChipAtIndex(index: number): void;\n\n /**\n * @return true if the text direction is RTL.\n */\n isRTL(): boolean;\n\n /**\n * @return the number of chips in the chip set.\n */\n getChipListCount(): number;\n\n /**\n * Announces the message via an aria-live region.\n */\n announceMessage(message: string): void;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {announce} from '@material/dom/announce';\nimport {MDCChip, MDCChipFactory} from '../chip/component';\nimport {MDCChipFoundation} from '../chip/foundation';\nimport {MDCChipInteractionEvent, MDCChipNavigationEvent, MDCChipRemovalEvent,\n MDCChipSelectionEvent} from '../chip/types';\nimport {MDCChipSetAdapter} from './adapter';\nimport {MDCChipSetFoundation} from './foundation';\n\nconst {INTERACTION_EVENT, SELECTION_EVENT, REMOVAL_EVENT, NAVIGATION_EVENT} = MDCChipFoundation.strings;\nconst {CHIP_SELECTOR} = MDCChipSetFoundation.strings;\n\nlet idCounter = 0;\n\nexport class MDCChipSet extends MDCComponent {\n static attachTo(root: Element) {\n return new MDCChipSet(root);\n }\n\n get chips(): ReadonlyArray {\n return this.chipsList.slice();\n }\n\n /**\n * @return An array of the IDs of all selected chips.\n */\n get selectedChipIds(): ReadonlyArray {\n return this.foundation.getSelectedChipIds();\n }\n\n private chipsList!: MDCChip[]; // assigned in initialize()\n private chipFactory!: (el: Element) => MDCChip; // assigned in initialize()\n private handleChipInteraction!: (evt: MDCChipInteractionEvent) =>\n void; // assigned in initialSyncWithDOM()\n private handleChipSelection!:\n (evt: MDCChipSelectionEvent) => void; // assigned in initialSyncWithDOM()\n private handleChipRemoval!:\n (evt: MDCChipRemovalEvent) => void; // assigned in initialSyncWithDOM()\n private handleChipNavigation!: (evt: MDCChipNavigationEvent) =>\n void; // assigned in initialSyncWithDOM()\n\n /**\n * @param chipFactory A function which creates a new MDCChip.\n */\n initialize(chipFactory: MDCChipFactory = (el) => new MDCChip(el)) {\n this.chipFactory = chipFactory;\n this.chipsList = this.instantiateChips(this.chipFactory);\n }\n\n initialSyncWithDOM() {\n for (const chip of this.chipsList) {\n if (chip.id && chip.selected) {\n this.foundation.select(chip.id);\n }\n }\n\n this.handleChipInteraction = (evt) =>\n this.foundation.handleChipInteraction(evt.detail);\n this.handleChipSelection = (evt) =>\n this.foundation.handleChipSelection(evt.detail);\n this.handleChipRemoval = (evt) =>\n this.foundation.handleChipRemoval(evt.detail);\n this.handleChipNavigation = (evt) =>\n this.foundation.handleChipNavigation(evt.detail);\n this.listen(INTERACTION_EVENT, this.handleChipInteraction);\n this.listen(SELECTION_EVENT, this.handleChipSelection);\n this.listen(REMOVAL_EVENT, this.handleChipRemoval);\n this.listen(NAVIGATION_EVENT, this.handleChipNavigation);\n }\n\n destroy() {\n for (const chip of this.chipsList) {\n chip.destroy();\n }\n\n this.unlisten(INTERACTION_EVENT, this.handleChipInteraction);\n this.unlisten(SELECTION_EVENT, this.handleChipSelection);\n this.unlisten(REMOVAL_EVENT, this.handleChipRemoval);\n this.unlisten(NAVIGATION_EVENT, this.handleChipNavigation);\n\n super.destroy();\n }\n\n /**\n * Adds a new chip object to the chip set from the given chip element.\n */\n addChip(chipEl: Element) {\n chipEl.id = chipEl.id || `mdc-chip-${++idCounter}`;\n this.chipsList.push(this.chipFactory(chipEl));\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCChipSetAdapter = {\n announceMessage: (message) => {\n announce(message);\n },\n focusChipPrimaryActionAtIndex: (index) => {\n this.chipsList[index].focusPrimaryAction();\n },\n focusChipTrailingActionAtIndex: (index) => {\n this.chipsList[index].focusTrailingAction();\n },\n getChipListCount: () => this.chips.length,\n getIndexOfChipById: (chipId) => {\n return this.findChipIndex(chipId);\n },\n hasClass: (className) => this.root.classList.contains(className),\n isRTL: () => window.getComputedStyle(this.root).getPropertyValue(\n 'direction') === 'rtl',\n removeChipAtIndex: (index) => {\n if (index >= 0 && index < this.chips.length) {\n this.chipsList[index].destroy();\n this.chipsList[index].remove();\n this.chipsList.splice(index, 1);\n }\n },\n removeFocusFromChipAtIndex: (index) => {\n this.chipsList[index].removeFocus();\n },\n selectChipAtIndex: (index, selected, shouldNotifyClients) => {\n if (index >= 0 && index < this.chips.length) {\n this.chipsList[index].setSelectedFromChipSet(\n selected, shouldNotifyClients);\n }\n },\n };\n return new MDCChipSetFoundation(adapter);\n }\n\n /**\n * Instantiates chip components on all of the chip set's child chip elements.\n */\n private instantiateChips(chipFactory: MDCChipFactory): MDCChip[] {\n const chipElements: Element[] =\n [].slice.call(this.root.querySelectorAll(CHIP_SELECTOR));\n return chipElements.map((el) => {\n el.id = el.id || `mdc-chip-${++idCounter}`;\n return chipFactory(el);\n });\n }\n\n /**\n * Returns the index of the chip with the given id, or -1 if the chip does not exist.\n */\n private findChipIndex(chipId: string): number {\n for (let i = 0; i < this.chips.length; i++) {\n if (this.chipsList[i].id === chipId) {\n return i;\n }\n }\n return -1;\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const strings = {\n CHIP_SELECTOR: '.mdc-chip',\n};\n\nexport const cssClasses = {\n CHOICE: 'mdc-chip-set--choice',\n FILTER: 'mdc-chip-set--filter',\n};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\n\nimport {Direction, EventSource, jumpChipKeys, navigationKeys, strings as chipStrings} from '../chip/constants';\nimport {MDCChipInteractionEventDetail, MDCChipNavigationEventDetail, MDCChipRemovalEventDetail, MDCChipSelectionEventDetail} from '../chip/types';\n\nimport {MDCChipSetAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCChipSetFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get defaultAdapter(): MDCChipSetAdapter {\n return {\n announceMessage: () => undefined,\n focusChipPrimaryActionAtIndex: () => undefined,\n focusChipTrailingActionAtIndex: () => undefined,\n getChipListCount: () => -1,\n getIndexOfChipById: () => -1,\n hasClass: () => false,\n isRTL: () => false,\n removeChipAtIndex: () => undefined,\n removeFocusFromChipAtIndex: () => undefined,\n selectChipAtIndex: () => undefined,\n };\n }\n\n /**\n * The ids of the selected chips in the set. Only used for choice chip set or filter chip set.\n */\n private selectedChipIds: string[] = [];\n\n constructor(adapter?: Partial) {\n super({...MDCChipSetFoundation.defaultAdapter, ...adapter});\n }\n\n /**\n * Returns an array of the IDs of all selected chips.\n */\n getSelectedChipIds(): ReadonlyArray {\n return this.selectedChipIds.slice();\n }\n\n /**\n * Selects the chip with the given id. Deselects all other chips if the chip set is of the choice variant.\n * Does not notify clients of the updated selection state.\n */\n select(chipId: string) {\n this.selectImpl(chipId, false);\n }\n\n /**\n * Handles a chip interaction event\n */\n handleChipInteraction({chipId}: MDCChipInteractionEventDetail) {\n const index = this.adapter.getIndexOfChipById(chipId);\n this.removeFocusFromChipsExcept(index);\n if (this.adapter.hasClass(cssClasses.CHOICE) ||\n this.adapter.hasClass(cssClasses.FILTER)) {\n this.toggleSelect(chipId);\n }\n }\n\n /**\n * Handles a chip selection event, used to handle discrepancy when selection state is set directly on the Chip.\n */\n handleChipSelection({chipId, selected, shouldIgnore}:\n MDCChipSelectionEventDetail) {\n // Early exit if we should ignore the event\n if (shouldIgnore) {\n return;\n }\n\n const chipIsSelected = this.selectedChipIds.indexOf(chipId) >= 0;\n if (selected && !chipIsSelected) {\n this.select(chipId);\n } else if (!selected && chipIsSelected) {\n this.deselectImpl(chipId);\n }\n }\n\n /**\n * Handles the event when a chip is removed.\n */\n handleChipRemoval({chipId, removedAnnouncement}: MDCChipRemovalEventDetail) {\n if (removedAnnouncement) {\n this.adapter.announceMessage(removedAnnouncement);\n }\n\n const index = this.adapter.getIndexOfChipById(chipId);\n this.deselectAndNotifyClients(chipId);\n this.adapter.removeChipAtIndex(index);\n const maxIndex = this.adapter.getChipListCount() - 1;\n if (maxIndex < 0) {\n return;\n }\n const nextIndex = Math.min(index, maxIndex);\n this.removeFocusFromChipsExcept(nextIndex);\n // After removing a chip, we should focus the trailing action for the next chip.\n this.adapter.focusChipTrailingActionAtIndex(nextIndex);\n }\n\n /**\n * Handles a chip navigation event.\n */\n handleChipNavigation({chipId, key, source}: MDCChipNavigationEventDetail) {\n const maxIndex = this.adapter.getChipListCount() - 1;\n let index = this.adapter.getIndexOfChipById(chipId);\n // Early exit if the index is out of range or the key is unusable\n if (index === -1 || !navigationKeys.has(key)) {\n return;\n }\n\n const isRTL = this.adapter.isRTL();\n const isLeftKey = key === chipStrings.ARROW_LEFT_KEY ||\n key === chipStrings.IE_ARROW_LEFT_KEY;\n const isRightKey = key === chipStrings.ARROW_RIGHT_KEY ||\n key === chipStrings.IE_ARROW_RIGHT_KEY;\n const isDownKey = key === chipStrings.ARROW_DOWN_KEY ||\n key === chipStrings.IE_ARROW_DOWN_KEY;\n const shouldIncrement =\n !isRTL && isRightKey || isRTL && isLeftKey || isDownKey;\n const isHome = key === chipStrings.HOME_KEY;\n const isEnd = key === chipStrings.END_KEY;\n if (shouldIncrement) {\n index++;\n } else if (isHome) {\n index = 0;\n } else if (isEnd) {\n index = maxIndex;\n } else {\n index--;\n }\n\n // Early exit if the index is out of bounds\n if (index < 0 || index > maxIndex) {\n return;\n }\n\n this.removeFocusFromChipsExcept(index);\n this.focusChipAction(index, key, source);\n }\n\n private focusChipAction(index: number, key: string, source: EventSource) {\n const shouldJumpChips = jumpChipKeys.has(key);\n if (shouldJumpChips && source === EventSource.PRIMARY) {\n return this.adapter.focusChipPrimaryActionAtIndex(index);\n }\n\n if (shouldJumpChips && source === EventSource.TRAILING) {\n return this.adapter.focusChipTrailingActionAtIndex(index);\n }\n\n const dir = this.getDirection(key);\n if (dir === Direction.LEFT) {\n return this.adapter.focusChipTrailingActionAtIndex(index);\n }\n\n if (dir === Direction.RIGHT) {\n return this.adapter.focusChipPrimaryActionAtIndex(index);\n }\n }\n\n private getDirection(key: string): Direction {\n const isRTL = this.adapter.isRTL();\n const isLeftKey = key === chipStrings.ARROW_LEFT_KEY ||\n key === chipStrings.IE_ARROW_LEFT_KEY;\n const isRightKey = key === chipStrings.ARROW_RIGHT_KEY ||\n key === chipStrings.IE_ARROW_RIGHT_KEY;\n if (!isRTL && isLeftKey || isRTL && isRightKey) {\n return Direction.LEFT;\n }\n\n return Direction.RIGHT;\n }\n\n /**\n * Deselects the chip with the given id and optionally notifies clients.\n */\n private deselectImpl(chipId: string, shouldNotifyClients = false) {\n const index = this.selectedChipIds.indexOf(chipId);\n if (index >= 0) {\n this.selectedChipIds.splice(index, 1);\n const chipIndex = this.adapter.getIndexOfChipById(chipId);\n this.adapter.selectChipAtIndex(\n chipIndex, /** isSelected */ false, shouldNotifyClients);\n }\n }\n\n /**\n * Deselects the chip with the given id and notifies clients.\n */\n private deselectAndNotifyClients(chipId: string) {\n this.deselectImpl(chipId, true);\n }\n\n /**\n * Toggles selection of the chip with the given id.\n */\n private toggleSelect(chipId: string) {\n if (this.selectedChipIds.indexOf(chipId) >= 0) {\n this.deselectAndNotifyClients(chipId);\n } else {\n this.selectAndNotifyClients(chipId);\n }\n }\n\n private removeFocusFromChipsExcept(index: number) {\n const chipCount = this.adapter.getChipListCount();\n for (let i = 0; i < chipCount; i++) {\n if (i !== index) {\n this.adapter.removeFocusFromChipAtIndex(i);\n }\n }\n }\n\n private selectAndNotifyClients(chipId: string) {\n this.selectImpl(chipId, true);\n }\n\n private selectImpl(chipId: string, shouldNotifyClients: boolean) {\n if (this.selectedChipIds.indexOf(chipId) >= 0) {\n return;\n }\n\n if (this.adapter.hasClass(cssClasses.CHOICE) &&\n this.selectedChipIds.length > 0) {\n const previouslySelectedChip = this.selectedChipIds[0];\n const previouslySelectedIndex =\n this.adapter.getIndexOfChipById(previouslySelectedChip);\n this.selectedChipIds = [];\n this.adapter.selectChipAtIndex(\n previouslySelectedIndex, /** isSelected */ false,\n shouldNotifyClients);\n }\n this.selectedChipIds.push(chipId);\n const index = this.adapter.getIndexOfChipById(chipId);\n this.adapter.selectChipAtIndex(\n index, /** isSelected */ true, shouldNotifyClients);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipSetFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport {cssClasses as chipSetCssClasses, strings as chipSetStrings} from './constants';\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventSource} from './constants';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCChipAdapter {\n /**\n * Adds a class to the root element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the root element.\n */\n removeClass(className: string): void;\n\n /**\n * @return true if the root element contains the given class.\n */\n hasClass(className: string): boolean;\n\n /**\n * Adds a class to the leading icon element.\n */\n addClassToLeadingIcon(className: string): void;\n\n /**\n * Removes a class from the leading icon element.\n */\n removeClassFromLeadingIcon(className: string): void;\n\n /**\n * @return true if target has className, false otherwise.\n */\n eventTargetHasClass(target: EventTarget | null, className: string): boolean;\n\n /**\n * @return the attribute string value if present, otherwise null\n */\n getAttribute(attr: string): string|null;\n\n /**\n * Emits a custom \"MDCChip:interaction\" event denoting the chip has been\n * interacted with (typically on click or keydown).\n */\n notifyInteraction(): void;\n\n /**\n * Emits a custom \"MDCChip:selection\" event denoting the chip has been selected or deselected.\n */\n notifySelection(selected: boolean, chipSetShouldIgnore: boolean): void;\n\n /**\n * Emits a custom \"MDCChip:trailingIconInteraction\" event denoting the trailing icon has been\n * interacted with (typically on click or keydown).\n */\n notifyTrailingIconInteraction(): void;\n\n /**\n * Emits a custom event \"MDCChip:removal\" denoting the chip will be removed.\n */\n notifyRemoval(removedAnnouncement: string|null): void;\n\n /**\n * Emits a custom event \"MDCChip:navigation\" denoting a focus navigation event.\n */\n notifyNavigation(key: string, source: EventSource): void;\n\n /**\n * Emits when editing starts.\n */\n notifyEditStart(): void;\n\n /**\n * Emits when editing finishes.\n */\n notifyEditFinish(): void;\n\n /**\n * @return The computed property value of the given style property on the root element.\n */\n getComputedStyleValue(propertyName: string): string;\n\n /**\n * Sets the property value of the given style property on the root element.\n */\n setStyleProperty(propertyName: string, value: string): void;\n\n /**\n * @return Whether the chip has a leading icon.\n */\n hasLeadingIcon(): boolean;\n\n /**\n * @return The bounding client rect of the root element.\n */\n getRootBoundingClientRect(): ClientRect;\n\n /**\n * @return The bounding client rect of the checkmark element or null if it doesn't exist.\n */\n getCheckmarkBoundingClientRect(): ClientRect | null;\n\n /**\n * Sets the value of the attribute on the primary action content.\n */\n setPrimaryActionAttr(attr: string, value: string): void;\n\n /**\n * Gives focus to the primary action.\n */\n focusPrimaryAction(): void;\n\n /**\n * Sets focus to the trailing action.\n */\n focusTrailingAction(): void;\n\n /**\n * Removes focus from the trailing action.\n */\n removeTrailingActionFocus(): void;\n\n /**\n * Returns true if the trailing action is navigable.\n * Should return the value of MDCChipTrailingAction#isNavigable() or false.\n */\n isTrailingActionNavigable(): boolean;\n\n /**\n * @return true if the text direction is right-to-left.\n */\n isRTL(): boolean;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {CustomEventListener, SpecificEventListener} from '@material/base/types';\nimport {MDCRippleAdapter} from '@material/ripple/adapter';\nimport {MDCRipple, MDCRippleFactory} from '@material/ripple/component';\nimport {MDCRippleFoundation} from '@material/ripple/foundation';\nimport {MDCRippleCapableSurface} from '@material/ripple/types';\n\nimport {MDCChipTrailingAction, MDCChipTrailingActionFactory} from '../trailingaction/component';\nimport {strings as trailingActionStrings} from '../trailingaction/constants';\nimport {MDCChipTrailingActionInteractionEvent, MDCChipTrailingActionNavigationEvent} from '../trailingaction/types';\n\nimport {MDCChipAdapter} from './adapter';\nimport {strings} from './constants';\nimport {MDCChipFoundation} from './foundation';\nimport {MDCChipInteractionEventDetail, MDCChipNavigationEventDetail, MDCChipRemovalEventDetail, MDCChipSelectionEventDetail} from './types';\n\nexport type MDCChipFactory = (el: Element, foundation?: MDCChipFoundation) => MDCChip;\n\nexport class MDCChip extends MDCComponent implements MDCRippleCapableSurface {\n /**\n * @return Whether the chip is selected.\n */\n get selected(): boolean {\n return this.foundation.isSelected();\n }\n\n /**\n * Sets selected state on the chip.\n */\n set selected(selected: boolean) {\n this.foundation.setSelected(selected);\n }\n\n /**\n * @return Whether a trailing icon click should trigger exit/removal of the chip.\n */\n get shouldRemoveOnTrailingIconClick(): boolean {\n return this.foundation.getShouldRemoveOnTrailingIconClick();\n }\n\n /**\n * Sets whether a trailing icon click should trigger exit/removal of the chip.\n */\n set shouldRemoveOnTrailingIconClick(shouldRemove: boolean) {\n this.foundation.setShouldRemoveOnTrailingIconClick(shouldRemove);\n }\n\n /**\n * Sets whether a clicking on the chip should focus the primary action.\n */\n set setShouldFocusPrimaryActionOnClick(shouldFocus: boolean) {\n this.foundation.setShouldFocusPrimaryActionOnClick(shouldFocus);\n }\n\n get ripple(): MDCRipple {\n return this.rippleSurface;\n }\n\n get id(): string {\n return this.root.id;\n }\n\n static attachTo(root: Element) {\n return new MDCChip(root);\n }\n\n private leadingIcon!: Element|null; // assigned in initialize()\n private checkmark!: Element|null; // assigned in initialize()\n private primaryAction!: Element|null; // assigned in initialize()\n private trailingAction!: MDCChipTrailingAction|\n null; // assigned in initialize()\n private rippleSurface!: MDCRipple; // assigned in initialize()\n\n private handleTrailingActionInteraction!: CustomEventListener<\n MDCChipTrailingActionInteractionEvent>; // assigned in\n // initialSyncWithDOM()\n private handleTrailingActionNavigation!: CustomEventListener<\n MDCChipTrailingActionNavigationEvent>; // assigned in\n // initialSyncWithDOM()\n private handleTransitionEnd!:\n SpecificEventListener<'transitionend'>; // assigned in\n // initialSyncWithDOM()\n private handleClick!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleKeydown!:\n SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleFocusIn!:\n SpecificEventListener<'focusin'>; // assigned in initialSyncWIthDOM()\n private handleFocusOut!:\n SpecificEventListener<'focusout'>; // assigned in initialSyncWIthDOM()\n\n initialize(\n rippleFactory:\n MDCRippleFactory = (el, foundation) => new MDCRipple(el, foundation),\n trailingActionFactory:\n MDCChipTrailingActionFactory = (el) => new MDCChipTrailingAction(el),\n ) {\n this.leadingIcon = this.root.querySelector(strings.LEADING_ICON_SELECTOR);\n this.checkmark = this.root.querySelector(strings.CHECKMARK_SELECTOR);\n this.primaryAction =\n this.root.querySelector(strings.PRIMARY_ACTION_SELECTOR);\n\n const trailingActionEl =\n this.root.querySelector(strings.TRAILING_ACTION_SELECTOR);\n\n if (trailingActionEl) {\n this.trailingAction = trailingActionFactory(trailingActionEl);\n }\n\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const rippleAdapter: MDCRippleAdapter = {\n ...MDCRipple.createAdapter(this),\n computeBoundingRect: () => this.foundation.getDimensions(),\n };\n this.rippleSurface =\n rippleFactory(this.root, new MDCRippleFoundation(rippleAdapter));\n }\n\n initialSyncWithDOM() {\n // Custom events\n this.handleTrailingActionInteraction = () => {\n this.foundation.handleTrailingActionInteraction();\n };\n this.handleTrailingActionNavigation =\n (evt: MDCChipTrailingActionNavigationEvent) => {\n this.foundation.handleTrailingActionNavigation(evt);\n };\n // Native events\n this.handleClick = () => {\n this.foundation.handleClick();\n };\n this.handleKeydown = (evt: KeyboardEvent) => {\n this.foundation.handleKeydown(evt);\n };\n this.handleTransitionEnd = (evt: TransitionEvent) => {\n this.foundation.handleTransitionEnd(evt);\n };\n this.handleFocusIn = (evt: FocusEvent) => {\n this.foundation.handleFocusIn(evt);\n };\n this.handleFocusOut = (evt: FocusEvent) => {\n this.foundation.handleFocusOut(evt);\n };\n\n\n this.listen('transitionend', this.handleTransitionEnd);\n this.listen('click', this.handleClick);\n this.listen('keydown', this.handleKeydown);\n this.listen('focusin', this.handleFocusIn);\n this.listen('focusout', this.handleFocusOut);\n\n if (this.trailingAction) {\n this.listen(\n trailingActionStrings.INTERACTION_EVENT,\n this.handleTrailingActionInteraction);\n this.listen(\n trailingActionStrings.NAVIGATION_EVENT,\n this.handleTrailingActionNavigation);\n }\n }\n\n destroy() {\n this.rippleSurface.destroy();\n\n this.unlisten('transitionend', this.handleTransitionEnd);\n this.unlisten('keydown', this.handleKeydown);\n this.unlisten('click', this.handleClick);\n this.unlisten('focusin', this.handleFocusIn);\n this.unlisten('focusout', this.handleFocusOut);\n\n if (this.trailingAction) {\n this.unlisten(\n trailingActionStrings.INTERACTION_EVENT,\n this.handleTrailingActionInteraction);\n this.unlisten(\n trailingActionStrings.NAVIGATION_EVENT,\n this.handleTrailingActionNavigation);\n }\n\n super.destroy();\n }\n\n /**\n * Begins the exit animation which leads to removal of the chip.\n */\n beginExit() {\n this.foundation.beginExit();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCChipAdapter = {\n addClass: (className) => this.root.classList.add(className),\n addClassToLeadingIcon: (className) => {\n if (this.leadingIcon) {\n this.leadingIcon.classList.add(className);\n }\n },\n eventTargetHasClass: (target, className) =>\n target ? (target as Element).classList.contains(className) : false,\n focusPrimaryAction: () => {\n if (this.primaryAction) {\n (this.primaryAction as HTMLElement).focus();\n }\n },\n focusTrailingAction: () => {\n if (this.trailingAction) {\n this.trailingAction.focus();\n }\n },\n getAttribute: (attr) => this.root.getAttribute(attr),\n getCheckmarkBoundingClientRect: () =>\n this.checkmark ? this.checkmark.getBoundingClientRect() : null,\n getComputedStyleValue: (propertyName) =>\n window.getComputedStyle(this.root).getPropertyValue(propertyName),\n getRootBoundingClientRect: () => this.root.getBoundingClientRect(),\n hasClass: (className) => this.root.classList.contains(className),\n hasLeadingIcon: () => !!this.leadingIcon,\n isRTL: () => window.getComputedStyle(this.root).getPropertyValue(\n 'direction') === 'rtl',\n isTrailingActionNavigable: () => {\n if (this.trailingAction) {\n return this.trailingAction.isNavigable();\n }\n return false;\n },\n notifyInteraction: () => this.emit(\n strings.INTERACTION_EVENT, {chipId: this.id},\n true /* shouldBubble */),\n notifyNavigation: (key, source) =>\n this.emit(\n strings.NAVIGATION_EVENT, {chipId: this.id, key, source},\n true /* shouldBubble */),\n notifyRemoval: (removedAnnouncement) => {\n this.emit(\n strings.REMOVAL_EVENT, {chipId: this.id, removedAnnouncement},\n true /* shouldBubble */);\n },\n notifySelection: (selected, shouldIgnore) =>\n this.emit(\n strings.SELECTION_EVENT,\n {chipId: this.id, selected, shouldIgnore},\n true /* shouldBubble */),\n notifyTrailingIconInteraction: () =>\n this.emit(\n strings.TRAILING_ICON_INTERACTION_EVENT, {chipId: this.id},\n true /* shouldBubble */),\n notifyEditStart: () => { /* Not Implemented. */ },\n notifyEditFinish: () => { /* Not Implemented. */ },\n removeClass: (className) => this.root.classList.remove(className),\n removeClassFromLeadingIcon: (className) => {\n if (this.leadingIcon) {\n this.leadingIcon.classList.remove(className);\n }\n },\n removeTrailingActionFocus: () => {\n if (this.trailingAction) {\n this.trailingAction.removeFocus();\n }\n },\n setPrimaryActionAttr: (attr, value) => {\n if (this.primaryAction) {\n this.primaryAction.setAttribute(attr, value);\n }\n },\n setStyleProperty: (propertyName, value) =>\n (this.root as HTMLElement).style.setProperty(propertyName, value),\n };\n return new MDCChipFoundation(adapter);\n }\n\n setSelectedFromChipSet(selected: boolean, shouldNotifyClients: boolean) {\n this.foundation.setSelectedFromChipSet(selected, shouldNotifyClients);\n }\n\n focusPrimaryAction() {\n this.foundation.focusPrimaryAction();\n }\n\n focusTrailingAction() {\n this.foundation.focusTrailingAction();\n }\n\n removeFocus() {\n this.foundation.removeFocus();\n }\n\n remove() {\n const parent = this.root.parentNode;\n if (parent !== null) {\n parent.removeChild(this.root);\n }\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport enum Direction {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport enum EventSource {\n PRIMARY = 'primary',\n TRAILING = 'trailing',\n NONE = 'none',\n}\n\nexport const strings = {\n ADDED_ANNOUNCEMENT_ATTRIBUTE: 'data-mdc-chip-added-announcement',\n ARIA_CHECKED: 'aria-checked',\n ARROW_DOWN_KEY: 'ArrowDown',\n ARROW_LEFT_KEY: 'ArrowLeft',\n ARROW_RIGHT_KEY: 'ArrowRight',\n ARROW_UP_KEY: 'ArrowUp',\n BACKSPACE_KEY: 'Backspace',\n CHECKMARK_SELECTOR: '.mdc-chip__checkmark',\n DELETE_KEY: 'Delete',\n END_KEY: 'End',\n ENTER_KEY: 'Enter',\n ENTRY_ANIMATION_NAME: 'mdc-chip-entry',\n HOME_KEY: 'Home',\n IE_ARROW_DOWN_KEY: 'Down',\n IE_ARROW_LEFT_KEY: 'Left',\n IE_ARROW_RIGHT_KEY: 'Right',\n IE_ARROW_UP_KEY: 'Up',\n IE_DELETE_KEY: 'Del',\n INTERACTION_EVENT: 'MDCChip:interaction',\n LEADING_ICON_SELECTOR: '.mdc-chip__icon--leading',\n NAVIGATION_EVENT: 'MDCChip:navigation',\n PRIMARY_ACTION_SELECTOR: '.mdc-chip__primary-action',\n REMOVED_ANNOUNCEMENT_ATTRIBUTE: 'data-mdc-chip-removed-announcement',\n REMOVAL_EVENT: 'MDCChip:removal',\n SELECTION_EVENT: 'MDCChip:selection',\n SPACEBAR_KEY: ' ',\n TAB_INDEX: 'tabindex',\n TRAILING_ACTION_SELECTOR: '.mdc-chip-trailing-action',\n TRAILING_ICON_INTERACTION_EVENT: 'MDCChip:trailingIconInteraction',\n TRAILING_ICON_SELECTOR: '.mdc-chip__icon--trailing',\n};\n\nexport const cssClasses = {\n CHECKMARK: 'mdc-chip__checkmark',\n CHIP_EXIT: 'mdc-chip--exit',\n DELETABLE: 'mdc-chip--deletable',\n EDITABLE: 'mdc-chip--editable',\n EDITING: 'mdc-chip--editing',\n HIDDEN_LEADING_ICON: 'mdc-chip__icon--leading-hidden',\n LEADING_ICON: 'mdc-chip__icon--leading',\n PRIMARY_ACTION: 'mdc-chip__primary-action',\n PRIMARY_ACTION_FOCUSED: 'mdc-chip--primary-action-focused',\n SELECTED: 'mdc-chip--selected',\n TEXT: 'mdc-chip__text',\n TRAILING_ACTION: 'mdc-chip__trailing-action',\n TRAILING_ICON: 'mdc-chip__icon--trailing',\n};\n\nexport const navigationKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this by hand\nnavigationKeys.add(strings.ARROW_LEFT_KEY);\nnavigationKeys.add(strings.ARROW_RIGHT_KEY);\nnavigationKeys.add(strings.ARROW_DOWN_KEY);\nnavigationKeys.add(strings.ARROW_UP_KEY);\nnavigationKeys.add(strings.END_KEY);\nnavigationKeys.add(strings.HOME_KEY);\nnavigationKeys.add(strings.IE_ARROW_LEFT_KEY);\nnavigationKeys.add(strings.IE_ARROW_RIGHT_KEY);\nnavigationKeys.add(strings.IE_ARROW_DOWN_KEY);\nnavigationKeys.add(strings.IE_ARROW_UP_KEY);\n\nexport const jumpChipKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this by hand\njumpChipKeys.add(strings.ARROW_UP_KEY);\njumpChipKeys.add(strings.ARROW_DOWN_KEY);\njumpChipKeys.add(strings.HOME_KEY);\njumpChipKeys.add(strings.END_KEY);\njumpChipKeys.add(strings.IE_ARROW_UP_KEY);\njumpChipKeys.add(strings.IE_ARROW_DOWN_KEY);\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\n\nimport {MDCChipTrailingActionNavigationEvent} from '../trailingaction/types';\n\nimport {MDCChipAdapter} from './adapter';\nimport {cssClasses, Direction, EventSource, jumpChipKeys, navigationKeys, strings} from './constants';\n\nconst emptyClientRect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n};\n\nenum FocusBehavior {\n SHOULD_FOCUS,\n SHOULD_NOT_FOCUS,\n}\n\nexport class MDCChipFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get defaultAdapter(): MDCChipAdapter {\n return {\n addClass: () => undefined,\n addClassToLeadingIcon: () => undefined,\n eventTargetHasClass: () => false,\n focusPrimaryAction: () => undefined,\n focusTrailingAction: () => undefined,\n getAttribute: () => null,\n getCheckmarkBoundingClientRect: () => emptyClientRect,\n getComputedStyleValue: () => '',\n getRootBoundingClientRect: () => emptyClientRect,\n hasClass: () => false,\n hasLeadingIcon: () => false,\n isRTL: () => false,\n isTrailingActionNavigable: () => false,\n notifyEditFinish: () => undefined,\n notifyEditStart: () => undefined,\n notifyInteraction: () => undefined,\n notifyNavigation: () => undefined,\n notifyRemoval: () => undefined,\n notifySelection: () => undefined,\n notifyTrailingIconInteraction: () => undefined,\n removeClass: () => undefined,\n removeClassFromLeadingIcon: () => undefined,\n removeTrailingActionFocus: () => undefined,\n setPrimaryActionAttr: () => undefined,\n setStyleProperty: () => undefined,\n };\n }\n\n /** Whether a trailing icon click should immediately trigger exit/removal of the chip. */\n private shouldRemoveOnTrailingIconClick = true;\n\n /**\n * Whether the primary action should receive focus on click. Should only be\n * set to true for clients who programmatically give focus to a different\n * element on the page when a chip is clicked (like a menu).\n */\n private shouldFocusPrimaryActionOnClick = true;\n\n constructor(adapter?: Partial) {\n super({...MDCChipFoundation.defaultAdapter, ...adapter});\n }\n\n isSelected() {\n return this.adapter.hasClass(cssClasses.SELECTED);\n }\n\n isEditable() {\n return this.adapter.hasClass(cssClasses.EDITABLE);\n }\n\n isEditing() {\n return this.adapter.hasClass(cssClasses.EDITING);\n }\n\n setSelected(selected: boolean) {\n this.setSelectedImpl(selected);\n this.notifySelection(selected);\n }\n\n setSelectedFromChipSet(selected: boolean, shouldNotifyClients: boolean) {\n this.setSelectedImpl(selected);\n if (shouldNotifyClients) {\n this.notifyIgnoredSelection(selected);\n }\n }\n\n getShouldRemoveOnTrailingIconClick() {\n return this.shouldRemoveOnTrailingIconClick;\n }\n\n setShouldRemoveOnTrailingIconClick(shouldRemove: boolean) {\n this.shouldRemoveOnTrailingIconClick = shouldRemove;\n }\n\n setShouldFocusPrimaryActionOnClick(shouldFocus: boolean) {\n this.shouldFocusPrimaryActionOnClick = shouldFocus;\n }\n\n getDimensions(): ClientRect {\n const getRootRect = () => this.adapter.getRootBoundingClientRect();\n const getCheckmarkRect = () =>\n this.adapter.getCheckmarkBoundingClientRect();\n\n // When a chip has a checkmark and not a leading icon, the bounding rect changes in size depending on the current\n // size of the checkmark.\n if (!this.adapter.hasLeadingIcon()) {\n const checkmarkRect = getCheckmarkRect();\n if (checkmarkRect) {\n const rootRect = getRootRect();\n // Checkmark is a square, meaning the client rect's width and height are identical once the animation completes.\n // However, the checkbox is initially hidden by setting the width to 0.\n // To account for an initial width of 0, we use the checkbox's height instead (which equals the end-state width)\n // when adding it to the root client rect's width.\n return {\n bottom: rootRect.bottom,\n height: rootRect.height,\n left: rootRect.left,\n right: rootRect.right,\n top: rootRect.top,\n width: rootRect.width + checkmarkRect.height,\n };\n }\n }\n\n return getRootRect();\n }\n\n /**\n * Begins the exit animation which leads to removal of the chip.\n */\n beginExit() {\n this.adapter.addClass(cssClasses.CHIP_EXIT);\n }\n\n handleClick() {\n this.adapter.notifyInteraction();\n this.setPrimaryActionFocusable(this.getFocusBehavior());\n }\n\n handleDoubleClick() {\n if (this.isEditable()) {\n this.startEditing();\n }\n }\n\n /**\n * Handles a transition end event on the root element.\n */\n handleTransitionEnd(evt: TransitionEvent) {\n // Handle transition end event on the chip when it is about to be removed.\n const shouldHandle =\n this.adapter.eventTargetHasClass(evt.target, cssClasses.CHIP_EXIT);\n const widthIsAnimating = evt.propertyName === 'width';\n const opacityIsAnimating = evt.propertyName === 'opacity';\n\n if (shouldHandle && opacityIsAnimating) {\n // See: https://css-tricks.com/using-css-transitions-auto-dimensions/#article-header-id-5\n const chipWidth = this.adapter.getComputedStyleValue('width');\n\n // On the next frame (once we get the computed width), explicitly set the chip's width\n // to its current pixel width, so we aren't transitioning out of 'auto'.\n requestAnimationFrame(() => {\n this.adapter.setStyleProperty('width', chipWidth);\n\n // To mitigate jitter, start transitioning padding and margin before width.\n this.adapter.setStyleProperty('padding', '0');\n this.adapter.setStyleProperty('margin', '0');\n\n // On the next frame (once width is explicitly set), transition width to 0.\n requestAnimationFrame(() => {\n this.adapter.setStyleProperty('width', '0');\n });\n });\n return;\n }\n\n if (shouldHandle && widthIsAnimating) {\n this.removeFocus();\n const removedAnnouncement =\n this.adapter.getAttribute(strings.REMOVED_ANNOUNCEMENT_ATTRIBUTE);\n\n this.adapter.notifyRemoval(removedAnnouncement);\n }\n\n // Handle a transition end event on the leading icon or checkmark, since the transition end event bubbles.\n if (!opacityIsAnimating) {\n return;\n }\n\n const shouldHideLeadingIcon =\n this.adapter.eventTargetHasClass(evt.target, cssClasses.LEADING_ICON) &&\n this.adapter.hasClass(cssClasses.SELECTED);\n const shouldShowLeadingIcon =\n this.adapter.eventTargetHasClass(evt.target, cssClasses.CHECKMARK) &&\n !this.adapter.hasClass(cssClasses.SELECTED);\n\n if (shouldHideLeadingIcon) {\n this.adapter.addClassToLeadingIcon(cssClasses.HIDDEN_LEADING_ICON);\n return;\n }\n\n if (shouldShowLeadingIcon) {\n this.adapter.removeClassFromLeadingIcon(cssClasses.HIDDEN_LEADING_ICON);\n return;\n }\n }\n\n handleFocusIn(evt: FocusEvent) {\n // Early exit if the event doesn't come from the primary action\n if (!this.eventFromPrimaryAction(evt)) {\n return;\n }\n\n this.adapter.addClass(cssClasses.PRIMARY_ACTION_FOCUSED);\n }\n\n handleFocusOut(evt: FocusEvent) {\n // Early exit if the event doesn't come from the primary action\n if (!this.eventFromPrimaryAction(evt)) {\n return;\n }\n\n if (this.isEditing()) {\n this.finishEditing();\n }\n\n this.adapter.removeClass(cssClasses.PRIMARY_ACTION_FOCUSED);\n }\n\n /**\n * Handles an interaction event on the trailing icon element. This is used to\n * prevent the ripple from activating on interaction with the trailing icon.\n */\n handleTrailingActionInteraction() {\n this.adapter.notifyTrailingIconInteraction();\n this.removeChip();\n }\n\n /**\n * Handles a keydown event from the root element.\n */\n handleKeydown(evt: KeyboardEvent) {\n if (this.isEditing()) {\n if (this.shouldFinishEditing(evt)) {\n evt.preventDefault();\n this.finishEditing();\n }\n // When editing, the foundation should only handle key events that finish\n // the editing process.\n return;\n }\n\n if (this.isEditable()) {\n if (this.shouldStartEditing(evt)) {\n evt.preventDefault();\n this.startEditing();\n }\n }\n\n if (this.shouldNotifyInteraction(evt)) {\n this.adapter.notifyInteraction();\n this.setPrimaryActionFocusable(this.getFocusBehavior());\n return;\n }\n\n if (this.isDeleteAction(evt)) {\n evt.preventDefault();\n this.removeChip();\n return;\n }\n\n // Early exit if the key is not usable\n if (!navigationKeys.has(evt.key)) {\n return;\n }\n\n // Prevent default behavior for movement keys which could include scrolling\n evt.preventDefault();\n this.focusNextAction(evt.key, EventSource.PRIMARY);\n }\n\n handleTrailingActionNavigation(evt: MDCChipTrailingActionNavigationEvent) {\n this.focusNextAction(evt.detail.key, EventSource.TRAILING);\n }\n\n /**\n * Called by the chip set to remove focus from the chip actions.\n */\n removeFocus() {\n this.adapter.setPrimaryActionAttr(strings.TAB_INDEX, '-1');\n this.adapter.removeTrailingActionFocus();\n }\n\n /**\n * Called by the chip set to focus the primary action.\n *\n */\n focusPrimaryAction() {\n this.setPrimaryActionFocusable(FocusBehavior.SHOULD_FOCUS);\n }\n\n /**\n * Called by the chip set to focus the trailing action (if present), otherwise\n * gives focus to the trailing action.\n */\n focusTrailingAction() {\n const trailingActionIsNavigable = this.adapter.isTrailingActionNavigable();\n if (trailingActionIsNavigable) {\n this.adapter.setPrimaryActionAttr(strings.TAB_INDEX, '-1');\n this.adapter.focusTrailingAction();\n return;\n }\n\n this.focusPrimaryAction();\n }\n\n private setPrimaryActionFocusable(focusBehavior: FocusBehavior) {\n this.adapter.setPrimaryActionAttr(strings.TAB_INDEX, '0');\n if (focusBehavior === FocusBehavior.SHOULD_FOCUS) {\n this.adapter.focusPrimaryAction();\n }\n this.adapter.removeTrailingActionFocus();\n }\n\n private getFocusBehavior(): FocusBehavior {\n if (this.shouldFocusPrimaryActionOnClick) {\n return FocusBehavior.SHOULD_FOCUS;\n }\n return FocusBehavior.SHOULD_NOT_FOCUS;\n }\n\n private focusNextAction(key: string, source: EventSource) {\n const isTrailingActionNavigable = this.adapter.isTrailingActionNavigable();\n const dir = this.getDirection(key);\n\n // Early exit if the key should jump chips\n if (jumpChipKeys.has(key) || !isTrailingActionNavigable) {\n this.adapter.notifyNavigation(key, source);\n return;\n }\n\n if (source === EventSource.PRIMARY && dir === Direction.RIGHT) {\n this.focusTrailingAction();\n return;\n }\n\n if (source === EventSource.TRAILING && dir === Direction.LEFT) {\n this.focusPrimaryAction();\n return;\n }\n\n this.adapter.notifyNavigation(key, EventSource.NONE);\n }\n\n private getDirection(key: string): Direction {\n const isRTL = this.adapter.isRTL();\n const isLeftKey =\n key === strings.ARROW_LEFT_KEY || key === strings.IE_ARROW_LEFT_KEY;\n const isRightKey =\n key === strings.ARROW_RIGHT_KEY || key === strings.IE_ARROW_RIGHT_KEY;\n if (!isRTL && isLeftKey || isRTL && isRightKey) {\n return Direction.LEFT;\n }\n\n return Direction.RIGHT;\n }\n\n private removeChip() {\n if (this.shouldRemoveOnTrailingIconClick) {\n this.beginExit();\n }\n }\n\n private shouldStartEditing(evt: KeyboardEvent): boolean {\n return this.eventFromPrimaryAction(evt) && evt.key === strings.ENTER_KEY;\n }\n\n private shouldFinishEditing(evt: KeyboardEvent): boolean {\n return evt.key === strings.ENTER_KEY;\n }\n\n private shouldNotifyInteraction(evt: KeyboardEvent): boolean {\n return evt.key === strings.ENTER_KEY || evt.key === strings.SPACEBAR_KEY;\n }\n\n private isDeleteAction(evt: KeyboardEvent): boolean {\n const isDeletable = this.adapter.hasClass(cssClasses.DELETABLE);\n return isDeletable &&\n (evt.key === strings.BACKSPACE_KEY || evt.key === strings.DELETE_KEY ||\n evt.key === strings.IE_DELETE_KEY);\n }\n\n private setSelectedImpl(selected: boolean) {\n if (selected) {\n this.adapter.addClass(cssClasses.SELECTED);\n this.adapter.setPrimaryActionAttr(strings.ARIA_CHECKED, 'true');\n } else {\n this.adapter.removeClass(cssClasses.SELECTED);\n this.adapter.setPrimaryActionAttr(strings.ARIA_CHECKED, 'false');\n }\n }\n\n private notifySelection(selected: boolean) {\n this.adapter.notifySelection(selected, false);\n }\n\n private notifyIgnoredSelection(selected: boolean) {\n this.adapter.notifySelection(selected, true);\n }\n\n private eventFromPrimaryAction(evt: Event) {\n return this.adapter.eventTargetHasClass(\n evt.target, cssClasses.PRIMARY_ACTION);\n }\n\n private startEditing() {\n this.adapter.addClass(cssClasses.EDITING);\n this.adapter.notifyEditStart();\n }\n\n private finishEditing() {\n this.adapter.removeClass(cssClasses.EDITING);\n this.adapter.notifyEditFinish();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport * from './types';\nexport {cssClasses as chipCssClasses, strings as chipStrings} from './constants';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventSource} from './constants';\n\nexport interface MDCChipInteractionEventDetail {\n chipId: string;\n}\n\nexport interface MDCChipSelectionEventDetail extends MDCChipInteractionEventDetail {\n selected: boolean;\n shouldIgnore: boolean;\n}\n\nexport interface MDCChipRemovalEventDetail extends MDCChipInteractionEventDetail {\n removedAnnouncement: string|null;\n}\n\nexport interface MDCChipNavigationEventDetail extends MDCChipInteractionEventDetail {\n key: string;\n source: EventSource;\n}\n\n// Note: CustomEvent is not supported by Closure Compiler.\n\nexport interface MDCChipInteractionEvent extends Event {\n readonly detail: MDCChipInteractionEventDetail;\n}\n\nexport interface MDCChipSelectionEvent extends Event {\n readonly detail: MDCChipSelectionEventDetail;\n}\n\nexport interface MDCChipRemovalEvent extends Event {\n readonly detail: MDCChipRemovalEventDetail;\n}\n\nexport interface MDCChipNavigationEvent extends Event {\n readonly detail: MDCChipNavigationEventDetail;\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './trailingaction/index';\nexport * from './chip/index';\nexport * from './chip-set/index';\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {InteractionTrigger} from './constants';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCChipTrailingActionAdapter {\n focus(): void;\n\n getAttribute(attr: string): string|null;\n\n notifyInteraction(trigger: InteractionTrigger): void;\n\n notifyNavigation(key: string): void;\n\n setAttribute(attr: string, value: string): void;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCRippleAdapter} from '@material/ripple/adapter';\nimport {MDCRipple, MDCRippleFactory} from '@material/ripple/component';\nimport {MDCRippleFoundation} from '@material/ripple/foundation';\nimport {MDCRippleCapableSurface} from '@material/ripple/types';\nimport {MDCChipTrailingActionAdapter} from './adapter';\nimport {strings} from './constants';\nimport {MDCChipTrailingActionFoundation} from './foundation';\nimport {MDCChipTrailingActionInteractionEventDetail, MDCChipTrailingActionNavigationEventDetail} from './types';\n\n/**\n * Creates a trailing action component on the given element.\n */\nexport type MDCChipTrailingActionFactory =\n (el: Element, foundation?: MDCChipTrailingActionFoundation) =>\n MDCChipTrailingAction;\n\nexport class MDCChipTrailingAction extends\n MDCComponent implements\n MDCRippleCapableSurface {\n get ripple(): MDCRipple {\n return this.rippleSurface;\n }\n\n static attachTo(root: Element) {\n return new MDCChipTrailingAction(root);\n }\n\n private rippleSurface!: MDCRipple; // assigned in initialize()\n private handleClick!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleKeydown!:\n SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n\n initialize(\n rippleFactory: MDCRippleFactory = (el, foundation) =>\n new MDCRipple(el, foundation)) {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const rippleAdapter: MDCRippleAdapter = MDCRipple.createAdapter(this);\n this.rippleSurface =\n rippleFactory(this.root, new MDCRippleFoundation(rippleAdapter));\n }\n\n initialSyncWithDOM() {\n this.handleClick = (evt: MouseEvent) => {\n this.foundation.handleClick(evt);\n };\n this.handleKeydown = (evt: KeyboardEvent) => {\n this.foundation.handleKeydown(evt);\n };\n\n this.listen('click', this.handleClick);\n this.listen('keydown', this.handleKeydown);\n }\n\n destroy() {\n this.rippleSurface.destroy();\n this.unlisten('click', this.handleClick);\n this.unlisten('keydown', this.handleKeydown);\n super.destroy();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCChipTrailingActionAdapter = {\n focus: () => {\n // TODO(b/157231863): Migate MDCComponent#root to HTMLElement\n (this.root as HTMLElement).focus();\n },\n getAttribute: (attr) => this.root.getAttribute(attr),\n notifyInteraction: (trigger) =>\n this.emit(\n strings.INTERACTION_EVENT, {trigger}, true /* shouldBubble */),\n notifyNavigation: (key) => {\n this.emit(\n strings.NAVIGATION_EVENT, {key}, true /* shouldBubble */);\n },\n setAttribute: (attr, value) => {\n this.root.setAttribute(attr, value);\n },\n };\n return new MDCChipTrailingActionFoundation(adapter);\n }\n\n isNavigable() {\n return this.foundation.isNavigable();\n }\n\n focus() {\n this.foundation.focus();\n }\n\n removeFocus() {\n this.foundation.removeFocus();\n }\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport enum InteractionTrigger {\n UNSPECIFIED, // Default type\n CLICK,\n BACKSPACE_KEY,\n DELETE_KEY,\n SPACEBAR_KEY,\n ENTER_KEY,\n}\n\nexport const strings = {\n ARIA_HIDDEN: 'aria-hidden',\n INTERACTION_EVENT: 'MDCChipTrailingAction:interaction',\n NAVIGATION_EVENT: 'MDCChipTrailingAction:navigation',\n TAB_INDEX: 'tabindex',\n};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {isNavigationEvent, KEY, normalizeKey} from '@material/dom/keyboard';\n\nimport {MDCChipTrailingActionAdapter} from './adapter';\nimport {InteractionTrigger, strings} from './constants';\n\nexport class MDCChipTrailingActionFoundation extends\n MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get defaultAdapter(): MDCChipTrailingActionAdapter {\n return {\n focus: () => undefined,\n getAttribute: () => null,\n setAttribute: () => undefined,\n notifyInteraction: () => undefined,\n notifyNavigation: () => undefined,\n };\n }\n\n constructor(adapter?: Partial) {\n super({...MDCChipTrailingActionFoundation.defaultAdapter, ...adapter});\n }\n\n handleClick(evt: MouseEvent) {\n evt.stopPropagation();\n this.adapter.notifyInteraction(InteractionTrigger.CLICK);\n }\n\n handleKeydown(evt: KeyboardEvent) {\n evt.stopPropagation();\n const key = normalizeKey(evt);\n if (this.shouldNotifyInteractionFromKey(key)) {\n const trigger = this.getTriggerFromKey(key);\n this.adapter.notifyInteraction(trigger);\n return;\n }\n\n if (isNavigationEvent(evt)) {\n this.adapter.notifyNavigation(key);\n return;\n }\n }\n\n removeFocus() {\n this.adapter.setAttribute(strings.TAB_INDEX, '-1');\n }\n\n focus() {\n this.adapter.setAttribute(strings.TAB_INDEX, '0');\n this.adapter.focus();\n }\n\n isNavigable() {\n return this.adapter.getAttribute(strings.ARIA_HIDDEN) !== 'true';\n }\n\n private shouldNotifyInteractionFromKey(key: string): boolean {\n const isFromActionKey = key === KEY.ENTER || key === KEY.SPACEBAR;\n const isFromDeleteKey = key === KEY.BACKSPACE || key === KEY.DELETE;\n\n return isFromActionKey || isFromDeleteKey;\n }\n\n private getTriggerFromKey(key: string): InteractionTrigger {\n if (key === KEY.SPACEBAR) {\n return InteractionTrigger.SPACEBAR_KEY;\n }\n\n if (key === KEY.ENTER) {\n return InteractionTrigger.ENTER_KEY;\n }\n\n if (key === KEY.DELETE) {\n return InteractionTrigger.DELETE_KEY;\n }\n\n if (key === KEY.BACKSPACE) {\n return InteractionTrigger.BACKSPACE_KEY;\n }\n\n // Default case, should never be returned\n return InteractionTrigger.UNSPECIFIED;\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipTrailingActionFoundation;\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport * from './types';\nexport {strings as trailingActionStrings} from './constants';\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {InteractionTrigger} from './constants';\n\nexport interface MDCChipTrailingActionInteractionEventDetail {\n trigger: InteractionTrigger;\n}\n\nexport interface MDCChipTrailingActionNavigationEventDetail {\n key: string;\n}\n\n// Note: CustomEvent is not supported by Closure Compiler.\n\nexport interface MDCChipTrailingActionInteractionEvent extends Event {\n readonly detail: MDCChipTrailingActionInteractionEventDetail;\n}\n\nexport interface MDCChipTrailingActionNavigationEvent extends Event {\n readonly detail: MDCChipTrailingActionNavigationEventDetail;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCCircularProgressAdapter {\n addClass(className: string): void;\n getDeterminateCircleAttribute(attributeName: string): string|null;\n hasClass(className: string): boolean;\n removeClass(className: string): void;\n removeAttribute(attributeName: string): void;\n setAttribute(attributeName: string, value: string): void;\n setDeterminateCircleAttribute(attributeName: string, value: string): void;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCProgressIndicator} from '@material/progress-indicator/component';\nimport {MDCCircularProgressAdapter} from './adapter';\nimport {MDCCircularProgressFoundation} from './foundation';\n\nexport class MDCCircularProgress extends\n MDCComponent implements\n MDCProgressIndicator {\n private determinateCircle!: HTMLElement;\n\n initialize() {\n this.determinateCircle = this.root.querySelector(\n MDCCircularProgressFoundation.strings.DETERMINATE_CIRCLE_SELECTOR)!;\n }\n\n static attachTo(root: Element) {\n return new MDCCircularProgress(root);\n }\n\n /**\n * Sets whether the progress indicator is in determinate mode.\n * @param isDeterminate Whether the indicator should be determinate.\n */\n set determinate(value: boolean) {\n this.foundation.setDeterminate(value);\n }\n\n /**\n * Sets the current progress value. In indeterminate mode, this has no\n * visual effect but will be reflected if the indicator is switched to\n * determinate mode.\n * @param value The current progress value, which must be between 0 and 1.\n */\n set progress(value: number) {\n this.foundation.setProgress(value);\n }\n\n /**\n * Whether the progress indicator is hidden.\n */\n get isClosed() {\n return this.foundation.isClosed();\n }\n\n /**\n * Shows the progress indicator.\n */\n open() {\n this.foundation.open();\n }\n\n /**\n * Hides the progress indicator.\n */\n close() {\n this.foundation.close();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCCircularProgressAdapter = {\n addClass: (className: string) => {\n this.root.classList.add(className);\n },\n getDeterminateCircleAttribute: (attributeName: string) =>\n this.determinateCircle.getAttribute(attributeName),\n hasClass: (className: string) => this.root.classList.contains(className),\n removeClass: (className: string) => {\n this.root.classList.remove(className);\n },\n removeAttribute: (attributeName: string) => {\n this.root.removeAttribute(attributeName);\n },\n setAttribute: (attributeName: string, value: string) => {\n this.root.setAttribute(attributeName, value);\n },\n setDeterminateCircleAttribute: (attributeName: string, value: string) => {\n this.determinateCircle.setAttribute(attributeName, value);\n },\n };\n return new MDCCircularProgressFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * CSS class names used in component.\n */\nexport const cssClasses = {\n INDETERMINATE_CLASS: 'mdc-circular-progress--indeterminate',\n CLOSED_CLASS: 'mdc-circular-progress--closed',\n};\n\n/**\n * Attributes and selectors used in component.\n */\nexport const strings = {\n ARIA_HIDDEN: 'aria-hidden',\n ARIA_VALUENOW: 'aria-valuenow',\n DETERMINATE_CIRCLE_SELECTOR: '.mdc-circular-progress__determinate-circle',\n RADIUS: 'r',\n STROKE_DASHOFFSET: 'stroke-dashoffset',\n};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCProgressIndicatorFoundation} from '@material/progress-indicator/foundation';\nimport {MDCCircularProgressAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCCircularProgressFoundation extends\n MDCFoundation implements\n MDCProgressIndicatorFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get defaultAdapter(): MDCCircularProgressAdapter {\n return {\n addClass: () => undefined,\n getDeterminateCircleAttribute: () => null,\n hasClass: () => false,\n removeClass: () => undefined,\n removeAttribute: () => undefined,\n setAttribute: () => undefined,\n setDeterminateCircleAttribute: () => undefined,\n };\n }\n\n private closed!: boolean;\n private determinate!: boolean;\n private progress!: number;\n private radius!: number;\n\n constructor(adapter?: Partial) {\n super({...MDCCircularProgressFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n this.closed = this.adapter.hasClass(cssClasses.CLOSED_CLASS);\n this.determinate = !this.adapter.hasClass(cssClasses.INDETERMINATE_CLASS);\n this.progress = 0;\n\n if (this.determinate) {\n this.adapter.setAttribute(\n strings.ARIA_VALUENOW, this.progress.toString());\n }\n\n this.radius =\n Number(this.adapter.getDeterminateCircleAttribute(strings.RADIUS));\n }\n\n /**\n * Sets whether the progress indicator is in determinate mode.\n * @param determinate Whether the indicator should be determinate.\n */\n setDeterminate(determinate: boolean) {\n this.determinate = determinate;\n\n if (this.determinate) {\n this.adapter.removeClass(cssClasses.INDETERMINATE_CLASS);\n this.setProgress(this.progress);\n } else {\n this.adapter.addClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.removeAttribute(strings.ARIA_VALUENOW);\n }\n }\n\n isDeterminate() {\n return this.determinate;\n }\n\n /**\n * Sets the current progress value. In indeterminate mode, this has no\n * visual effect but will be reflected if the indicator is switched to\n * determinate mode.\n * @param value The current progress value, which must be between 0 and 1.\n */\n setProgress(value: number) {\n this.progress = value;\n if (this.determinate) {\n const unfilledArcLength =\n (1 - this.progress) * (2 * Math.PI * this.radius);\n\n this.adapter.setDeterminateCircleAttribute(\n strings.STROKE_DASHOFFSET, `${unfilledArcLength}`);\n this.adapter.setAttribute(\n strings.ARIA_VALUENOW, this.progress.toString());\n }\n }\n\n getProgress() {\n return this.progress;\n }\n\n /**\n * Shows the progress indicator.\n */\n open() {\n this.closed = false;\n this.adapter.removeClass(cssClasses.CLOSED_CLASS);\n this.adapter.removeAttribute(strings.ARIA_HIDDEN);\n }\n\n /**\n * Hides the progress indicator\n */\n close() {\n this.closed = true;\n this.adapter.addClass(cssClasses.CLOSED_CLASS);\n this.adapter.setAttribute(strings.ARIA_HIDDEN, 'true');\n }\n\n /**\n * @return Returns whether the progress indicator is hidden.\n */\n isClosed() {\n return this.closed;\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCircularProgressFoundation;\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n\nimport {SortValue} from './constants';\nimport {MDCDataTableRowSelectionChangedEventDetail, ProgressIndicatorStyles, SortActionEventDetail} from './types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCDataTableAdapter {\n /**\n * Adds CSS class name to root element.\n *\n * @param className CSS class name to add to root element.\n */\n addClass(className: string): void;\n\n /**\n * Removes CSS class name from root element.\n *\n * @param className CSS class name to add to root element.\n */\n removeClass(className: string): void;\n\n /**\n * Adds a class name to row element at given row index excluding header row.\n *\n * @param rowIndex Index of row element excluding header row.\n * @param cssClasses CSS Class string to add.\n */\n addClassAtRowIndex(rowIndex: number, cssClasses: string): void;\n\n /**\n * @return Row count excluding header row.\n */\n getRowCount(): number;\n\n /**\n * @return Array of row elements excluding header row.\n */\n getRowElements(): Element[];\n\n /**\n * Returns row id of row element at given row index based on `data-row-id` attribute on row element `tr`.\n *\n * @param rowIndex Index of row element.\n * @return Row id of row element, returns `null` in absence of `data-row-id` attribute on row element.\n */\n getRowIdAtIndex(rowIndex: number): string | null;\n\n /**\n * Returns index of row element that contains give child element. Returns -1 if element is not child of any row\n * element.\n *\n * @param el Child element of row element.\n * @return Index of row element.\n */\n getRowIndexByChildElement(el: Element): number;\n\n /**\n * @return Selected row count.\n */\n getSelectedRowCount(): number;\n\n /**\n * @param rowIndex Index of row element.\n * @return True if row checkbox at given row index is checked.\n */\n isCheckboxAtRowIndexChecked(rowIndex: number): boolean;\n\n /**\n * @return True if header row checkbox is checked.\n */\n isHeaderRowCheckboxChecked(): boolean;\n\n /**\n * @return True if table rows are selectable.\n */\n isRowsSelectable(): boolean;\n\n /**\n * Notifies when row selection is changed.\n *\n * @param data Event detail data for row selection changed event.\n */\n notifyRowSelectionChanged(data: MDCDataTableRowSelectionChangedEventDetail): void;\n\n /**\n * Notifies when header row is checked.\n */\n notifySelectedAll(): void;\n\n /**\n * Notifies when header row is unchecked.\n */\n notifyUnselectedAll(): void;\n\n /**\n * Initializes header row checkbox. Destroys previous header row checkbox instance if any.\n * @return Can return Promise only if registering checkbox is asynchronous.\n */\n registerHeaderRowCheckbox(): Promise | void;\n\n /**\n * Initializes all row checkboxes. Destroys previous row checkbox instances if any. This is usually called when row\n * checkboxes are added or removed from table.\n * @return Can return Promise only if registering checkbox is asynchronous.\n */\n registerRowCheckboxes(): Promise | void;\n\n /**\n * Removes class name from row element at give row index.\n *\n * @param rowIndex Index of row element excluding header row element.\n * @param cssClasses Class name string.\n */\n removeClassAtRowIndex(rowIndex: number, cssClasses: string): void;\n\n /**\n * Sets attribute to row element at given row index.\n *\n * @param rowIndex Index of row element excluding header row element.\n * @param attr Name of attribute.\n * @param value Value of attribute.\n */\n setAttributeAtRowIndex(rowIndex: number, attr: string, value: string): void;\n\n /**\n * Sets header row checkbox checked or unchecked.\n *\n * @param checked True to set header row checkbox checked.\n */\n setHeaderRowCheckboxChecked(checked: boolean): void;\n\n /**\n * Sets header row checkbox to indeterminate.\n *\n * @param indeterminate True to set header row checkbox indeterminate.\n */\n setHeaderRowCheckboxIndeterminate(indeterminate: boolean): void;\n\n /**\n * Sets row checkbox to checked or unchecked at given row index.\n *\n * @param rowIndex Index of row element excluding header row element.\n * @param checked True to set checked.\n */\n setRowCheckboxCheckedAtIndex(rowIndex: number, checked: boolean): void;\n\n /**\n * @return Total count of header cells.\n */\n getHeaderCellCount(): number;\n\n /**\n * @return Array of header cell elements.\n */\n getHeaderCellElements(): Element[];\n\n /**\n * @return Attribute value for given header cell index.\n */\n getAttributeByHeaderCellIndex(columnIndex: number, attribute: string): string\n |null;\n\n /**\n * Sets attribute of a header cell by index.\n */\n setAttributeByHeaderCellIndex(\n columnIndex: number, attribute: string, value: string): void;\n\n /**\n * Sets class name of a header cell by index.\n */\n setClassNameByHeaderCellIndex(columnIndex: number, className: string): void;\n\n /**\n * Removes a class name of a header cell by index.\n */\n removeClassNameByHeaderCellIndex(columnIndex: number, className: string):\n void;\n\n /**\n * Notifies when column is sorted.\n */\n notifySortAction(data: SortActionEventDetail): void;\n\n /**\n * @return Returns computed styles height of table container element.\n */\n getTableContainerHeight(): number;\n\n /**\n * @return Returns computed styles height of table's header element.\n */\n getTableHeaderHeight(): number;\n\n /**\n * Sets progress indicator CSS styles to position it on top of table body.\n */\n setProgressIndicatorStyles(styles: ProgressIndicatorStyles): void;\n\n /**\n * Sets appropriate sort status label by header cell index. Skips setting sort\n * status label if header cell is not sortable.\n *\n * Example status label to set for sortValue:\n *\n * - `SortValue.ASCENDING`: 'Sorted in ascending order'\n * - `SortValue.DESCENDING`: 'Sorted in descending order'\n * - `SortValue.NONE`: '' (Empty string)\n */\n setSortStatusLabelByHeaderCellIndex(\n columnIndex: number, sortValue: SortValue): void;\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCCheckbox, MDCCheckboxFactory} from '@material/checkbox/component';\nimport {closest} from '@material/dom/ponyfill';\nimport {MDCLinearProgress} from '@material/linear-progress/component';\n\nimport {MDCDataTableAdapter} from './adapter';\nimport {cssClasses, dataAttributes, events, messages, selectors, SortValue} from './constants';\nimport {MDCDataTableFoundation} from './foundation';\nimport {MDCDataTableRowSelectionChangedEventDetail} from './types';\n\n/**\n * Implementation of `MDCDataTableFoundation`\n */\nexport class MDCDataTable extends MDCComponent {\n static attachTo(root: Element): MDCDataTable {\n return new MDCDataTable(root);\n }\n\n private headerRowCheckbox!: MDCCheckbox;\n private rowCheckboxList!: MDCCheckbox[];\n private checkboxFactory!: MDCCheckboxFactory;\n private linearProgress!: MDCLinearProgress;\n private headerRow!: HTMLElement;\n private content!: HTMLElement;\n private handleHeaderRowCheckboxChange!: SpecificEventListener<'change'>;\n private handleRowCheckboxChange!: SpecificEventListener<'change'>;\n private headerRowClickListener!:\n SpecificEventListener<'click'>; // Assigned in `initialSyncWithDOM()`\n\n initialize(checkboxFactory: MDCCheckboxFactory = (el: Element) => new MDCCheckbox(el)) {\n this.checkboxFactory = checkboxFactory;\n }\n\n initialSyncWithDOM() {\n this.headerRow =\n this.root.querySelector(`.${cssClasses.HEADER_ROW}`) as HTMLElement;\n this.handleHeaderRowCheckboxChange = () => {\n this.foundation.handleHeaderRowCheckboxChange();\n };\n this.headerRow.addEventListener(\n 'change', this.handleHeaderRowCheckboxChange);\n\n this.headerRowClickListener = (event) => {\n this.handleHeaderRowClick(event);\n };\n this.headerRow.addEventListener('click', this.headerRowClickListener);\n\n\n this.content =\n this.root.querySelector(`.${cssClasses.CONTENT}`) as HTMLElement;\n this.handleRowCheckboxChange = (event) => {\n this.foundation.handleRowCheckboxChange(event);\n };\n this.content.addEventListener('change', this.handleRowCheckboxChange);\n\n this.layout();\n }\n\n /**\n * Re-initializes header row checkbox and row checkboxes when selectable rows are added or removed from table.\n */\n layout() {\n this.foundation.layout();\n }\n\n /**\n * @return Returns array of header row cell elements.\n */\n getHeaderCells(): Element[] {\n return [].slice.call(this.root.querySelectorAll(selectors.HEADER_CELL));\n }\n\n /**\n * @return Returns array of row elements.\n */\n getRows(): Element[] {\n return this.foundation.getRows();\n }\n\n /**\n * @return Returns array of selected row ids.\n */\n getSelectedRowIds(): Array {\n return this.foundation.getSelectedRowIds();\n }\n\n /**\n * Sets selected row ids. Overwrites previously selected rows.\n * @param rowIds Array of row ids that needs to be selected.\n */\n setSelectedRowIds(rowIds: string[]) {\n this.foundation.setSelectedRowIds(rowIds);\n }\n\n /**\n * Shows progress indicator when data table is in loading state.\n */\n showProgress() {\n this.getLinearProgress().open();\n this.foundation.showProgress();\n }\n\n /**\n * Hides progress indicator after data table is finished loading.\n */\n hideProgress() {\n this.foundation.hideProgress();\n this.getLinearProgress().close();\n }\n\n destroy() {\n if (this.handleHeaderRowCheckboxChange) {\n this.headerRow.removeEventListener(\n 'change', this.handleHeaderRowCheckboxChange);\n }\n if (this.headerRowClickListener) {\n this.headerRow.removeEventListener('click', this.headerRowClickListener);\n }\n if (this.handleRowCheckboxChange) {\n this.content.removeEventListener('change', this.handleRowCheckboxChange);\n }\n\n if (this.headerRowCheckbox) {\n this.headerRowCheckbox.destroy();\n }\n if (this.rowCheckboxList) {\n for (const checkbox of this.rowCheckboxList) {\n checkbox.destroy();\n }\n }\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCDataTableAdapter = {\n addClass: (className) => {\n this.root.classList.add(className);\n },\n removeClass: (className) => {\n this.root.classList.remove(className);\n },\n getHeaderCellElements: () => this.getHeaderCells(),\n getHeaderCellCount: () => this.getHeaderCells().length,\n getAttributeByHeaderCellIndex: (index, attribute) => {\n return this.getHeaderCells()[index].getAttribute(attribute);\n },\n setAttributeByHeaderCellIndex: (index, attribute, value) => {\n this.getHeaderCells()[index].setAttribute(attribute, value);\n },\n setClassNameByHeaderCellIndex: (index, className) => {\n this.getHeaderCells()[index].classList.add(className);\n },\n removeClassNameByHeaderCellIndex: (index, className) => {\n this.getHeaderCells()[index].classList.remove(className);\n },\n notifySortAction: (data) => {\n this.emit(events.SORTED, data, /** shouldBubble */ true);\n },\n getTableContainerHeight: () => {\n const tableContainer = this.root.querySelector(\n `.${cssClasses.TABLE_CONTAINER}`);\n\n if (!tableContainer) {\n throw new Error('MDCDataTable: Table container element not found.');\n }\n\n return tableContainer.getBoundingClientRect().height;\n },\n getTableHeaderHeight: () => {\n const tableHeader =\n this.root.querySelector(selectors.HEADER_ROW);\n\n if (!tableHeader) {\n throw new Error('MDCDataTable: Table header element not found.');\n }\n\n return tableHeader.getBoundingClientRect().height;\n },\n setProgressIndicatorStyles: (styles) => {\n const progressIndicator =\n this.root.querySelector(selectors.PROGRESS_INDICATOR);\n\n if (!progressIndicator) {\n throw new Error(\n 'MDCDataTable: Progress indicator element not found.');\n }\n\n progressIndicator.style.setProperty('height', styles.height);\n progressIndicator.style.setProperty('top', styles.top);\n },\n addClassAtRowIndex: (rowIndex: number, className: string) => {\n this.getRows()[rowIndex].classList.add(className);\n },\n getRowCount: () => this.getRows().length,\n getRowElements:\n () => [].slice.call(this.root.querySelectorAll(selectors.ROW)),\n getRowIdAtIndex: (rowIndex: number) =>\n this.getRows()[rowIndex].getAttribute(dataAttributes.ROW_ID),\n getRowIndexByChildElement: (el: Element) => {\n return this.getRows().indexOf(\n (closest(el, selectors.ROW) as HTMLElement));\n },\n getSelectedRowCount: () =>\n this.root.querySelectorAll(selectors.ROW_SELECTED).length,\n isCheckboxAtRowIndexChecked: (rowIndex: number) =>\n this.rowCheckboxList[rowIndex].checked,\n isHeaderRowCheckboxChecked: () => this.headerRowCheckbox.checked,\n isRowsSelectable: () =>\n !!this.root.querySelector(selectors.ROW_CHECKBOX) ||\n !!this.root.querySelector(selectors.HEADER_ROW_CHECKBOX),\n notifyRowSelectionChanged:\n (data: MDCDataTableRowSelectionChangedEventDetail) => {\n this.emit(\n events.ROW_SELECTION_CHANGED, {\n row: this.getRowByIndex(data.rowIndex),\n rowId: this.getRowIdByIndex(data.rowIndex),\n rowIndex: data.rowIndex,\n selected: data.selected,\n },\n /** shouldBubble */ true);\n },\n notifySelectedAll: () => {\n this.emit(events.SELECTED_ALL, {}, /** shouldBubble */ true);\n },\n notifyUnselectedAll: () => {\n this.emit(events.UNSELECTED_ALL, {}, /** shouldBubble */ true);\n },\n registerHeaderRowCheckbox: () => {\n if (this.headerRowCheckbox) {\n this.headerRowCheckbox.destroy();\n }\n\n const checkboxEl =\n (this.root.querySelector(selectors.HEADER_ROW_CHECKBOX) as\n HTMLElement);\n this.headerRowCheckbox = this.checkboxFactory(checkboxEl);\n },\n registerRowCheckboxes: () => {\n if (this.rowCheckboxList) {\n this.rowCheckboxList.forEach((checkbox) => {\n checkbox.destroy();\n });\n }\n\n this.rowCheckboxList = [];\n this.getRows().forEach((rowEl) => {\n const checkbox = this.checkboxFactory(\n (rowEl.querySelector(selectors.ROW_CHECKBOX) as HTMLElement));\n this.rowCheckboxList.push(checkbox);\n });\n },\n removeClassAtRowIndex: (rowIndex: number, className: string) => {\n this.getRows()[rowIndex].classList.remove(className);\n },\n setAttributeAtRowIndex:\n (rowIndex: number, attr: string, value: string) => {\n this.getRows()[rowIndex].setAttribute(attr, value);\n },\n setHeaderRowCheckboxChecked: (checked: boolean) => {\n this.headerRowCheckbox.checked = checked;\n },\n setHeaderRowCheckboxIndeterminate: (indeterminate: boolean) => {\n this.headerRowCheckbox.indeterminate = indeterminate;\n },\n setRowCheckboxCheckedAtIndex: (rowIndex: number, checked: boolean) => {\n this.rowCheckboxList[rowIndex].checked = checked;\n },\n setSortStatusLabelByHeaderCellIndex: (\n columnIndex: number, sortValue: SortValue) => {\n const headerCell = this.getHeaderCells()[columnIndex];\n const sortStatusLabel =\n headerCell.querySelector(selectors.SORT_STATUS_LABEL);\n\n if (!sortStatusLabel) return;\n\n sortStatusLabel.textContent =\n this.getSortStatusMessageBySortValue(sortValue);\n },\n };\n return new MDCDataTableFoundation(adapter);\n }\n\n private getRowByIndex(index: number): Element {\n return this.getRows()[index];\n }\n\n private getRowIdByIndex(index: number): string|null {\n return this.getRowByIndex(index).getAttribute(dataAttributes.ROW_ID);\n }\n\n private handleHeaderRowClick(event: Event): void {\n const headerCell =\n closest(event.target as Element, selectors.HEADER_CELL_WITH_SORT) as\n HTMLElement;\n\n if (!headerCell) {\n return;\n }\n\n const columnId = headerCell.getAttribute(dataAttributes.COLUMN_ID);\n const columnIndex = this.getHeaderCells().indexOf(headerCell);\n if (columnIndex === -1) {\n return;\n }\n\n this.foundation.handleSortAction({columnId, columnIndex, headerCell});\n }\n\n private getSortStatusMessageBySortValue(sortValue: SortValue): string {\n switch (sortValue) {\n case SortValue.ASCENDING:\n return messages.SORTED_IN_ASCENDING;\n case SortValue.DESCENDING:\n return messages.SORTED_IN_DESCENDING;\n default:\n return '';\n }\n }\n\n private getLinearProgressElement(): HTMLElement {\n const el =\n this.root.querySelector(`.${cssClasses.LINEAR_PROGRESS}`);\n if (!el) {\n throw new Error('MDCDataTable: linear progress element is not found.');\n }\n\n return el;\n }\n\n private getLinearProgress(): MDCLinearProgress {\n if (!this.linearProgress) {\n const el = this.getLinearProgressElement();\n this.linearProgress = new MDCLinearProgress(el);\n }\n\n return this.linearProgress;\n }\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * CSS class names used in component.\n */\nexport const cssClasses = {\n CELL: 'mdc-data-table__cell',\n CELL_NUMERIC: 'mdc-data-table__cell--numeric',\n CONTENT: 'mdc-data-table__content',\n HEADER_CELL: 'mdc-data-table__header-cell',\n HEADER_CELL_LABEL: 'mdc-data-table__header-cell-label',\n HEADER_CELL_SORTED: 'mdc-data-table__header-cell--sorted',\n HEADER_CELL_SORTED_DESCENDING:\n 'mdc-data-table__header-cell--sorted-descending',\n HEADER_CELL_WITH_SORT: 'mdc-data-table__header-cell--with-sort',\n HEADER_CELL_WRAPPER: 'mdc-data-table__header-cell-wrapper',\n HEADER_ROW: 'mdc-data-table__header-row',\n HEADER_ROW_CHECKBOX: 'mdc-data-table__header-row-checkbox',\n IN_PROGRESS: 'mdc-data-table--in-progress',\n LINEAR_PROGRESS: 'mdc-data-table__linear-progress',\n PAGINATION_ROWS_PER_PAGE_LABEL:\n 'mdc-data-table__pagination-rows-per-page-label',\n PAGINATION_ROWS_PER_PAGE_SELECT:\n 'mdc-data-table__pagination-rows-per-page-select',\n PROGRESS_INDICATOR: 'mdc-data-table__progress-indicator',\n ROOT: 'mdc-data-table',\n ROW: 'mdc-data-table__row',\n ROW_CHECKBOX: 'mdc-data-table__row-checkbox',\n ROW_SELECTED: 'mdc-data-table__row--selected',\n SORT_ICON_BUTTON: 'mdc-data-table__sort-icon-button',\n SORT_STATUS_LABEL: 'mdc-data-table__sort-status-label',\n TABLE_CONTAINER: 'mdc-data-table__table-container',\n};\n\n/**\n * DOM attributes used in component.\n */\nexport const attributes = {\n ARIA_SELECTED: 'aria-selected',\n ARIA_SORT: 'aria-sort',\n};\n\n/**\n * List of data attributes used in component.\n */\nexport const dataAttributes = {\n COLUMN_ID: 'data-column-id',\n ROW_ID: 'data-row-id',\n};\n\n/**\n * CSS selectors used in component.\n */\nexport const selectors = {\n CONTENT: `.${cssClasses.CONTENT}`,\n HEADER_CELL: `.${cssClasses.HEADER_CELL}`,\n HEADER_CELL_WITH_SORT: `.${cssClasses.HEADER_CELL_WITH_SORT}`,\n HEADER_ROW: `.${cssClasses.HEADER_ROW}`,\n HEADER_ROW_CHECKBOX: `.${cssClasses.HEADER_ROW_CHECKBOX}`,\n PROGRESS_INDICATOR: `.${cssClasses.PROGRESS_INDICATOR}`,\n ROW: `.${cssClasses.ROW}`,\n ROW_CHECKBOX: `.${cssClasses.ROW_CHECKBOX}`,\n ROW_SELECTED: `.${cssClasses.ROW_SELECTED}`,\n SORT_ICON_BUTTON: `.${cssClasses.SORT_ICON_BUTTON}`,\n SORT_STATUS_LABEL: `.${cssClasses.SORT_STATUS_LABEL}`,\n};\n\n/**\n * Messages used in component.\n */\nexport const messages = {\n SORTED_IN_DESCENDING: 'Sorted in descending order',\n SORTED_IN_ASCENDING: 'Sorted in ascending order',\n};\n\n/**\n * Attributes and selectors used in component.\n * @deprecated Use `attributes`, `dataAttributes` and `selectors` instead.\n */\nexport const strings = {\n ARIA_SELECTED: attributes.ARIA_SELECTED,\n ARIA_SORT: attributes.ARIA_SORT,\n DATA_ROW_ID_ATTR: dataAttributes.ROW_ID,\n HEADER_ROW_CHECKBOX_SELECTOR: selectors.HEADER_ROW_CHECKBOX,\n ROW_CHECKBOX_SELECTOR: selectors.ROW_CHECKBOX,\n ROW_SELECTED_SELECTOR: selectors.ROW_SELECTED,\n ROW_SELECTOR: selectors.ROW,\n};\n\n/**\n * Sort values defined by ARIA.\n * See https://www.w3.org/WAI/PF/aria/states_and_properties#aria-sort\n */\nexport enum SortValue {\n // Items are sorted in ascending order by this column.\n ASCENDING = 'ascending',\n\n // Items are sorted in descending order by this column.\n DESCENDING = 'descending',\n\n // There is no defined sort applied to the column.\n NONE = 'none',\n\n // A sort algorithm other than ascending or descending has been applied.\n OTHER = 'other',\n}\n\n/**\n * Event names used in component.\n */\nexport const events = {\n ROW_SELECTION_CHANGED: 'MDCDataTable:rowSelectionChanged',\n SELECTED_ALL: 'MDCDataTable:selectedAll',\n UNSELECTED_ALL: 'MDCDataTable:unselectedAll',\n SORTED: 'MDCDataTable:sorted',\n};\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\n\nimport {MDCDataTableAdapter} from './adapter';\nimport {cssClasses, SortValue, strings} from './constants';\nimport {SortActionEventData} from './types';\n\n/**\n * The Foundation of data table component containing pure business logic, any\n * logic requiring DOM manipulation are delegated to adapter methods.\n */\nexport class MDCDataTableFoundation extends MDCFoundation {\n static get defaultAdapter(): MDCDataTableAdapter {\n return {\n addClass: () => undefined,\n addClassAtRowIndex: () => undefined,\n getAttributeByHeaderCellIndex: () => '',\n getHeaderCellCount: () => 0,\n getHeaderCellElements: () => [],\n getRowCount: () => 0,\n getRowElements: () => [],\n getRowIdAtIndex: () => '',\n getRowIndexByChildElement: () => 0,\n getSelectedRowCount: () => 0,\n getTableContainerHeight: () => 0,\n getTableHeaderHeight: () => 0,\n isCheckboxAtRowIndexChecked: () => false,\n isHeaderRowCheckboxChecked: () => false,\n isRowsSelectable: () => false,\n notifyRowSelectionChanged: () => undefined,\n notifySelectedAll: () => undefined,\n notifySortAction: () => undefined,\n notifyUnselectedAll: () => undefined,\n registerHeaderRowCheckbox: () => undefined,\n registerRowCheckboxes: () => undefined,\n removeClass: () => undefined,\n removeClassAtRowIndex: () => undefined,\n removeClassNameByHeaderCellIndex: () => undefined,\n setAttributeAtRowIndex: () => undefined,\n setAttributeByHeaderCellIndex: () => undefined,\n setClassNameByHeaderCellIndex: () => undefined,\n setHeaderRowCheckboxChecked: () => undefined,\n setHeaderRowCheckboxIndeterminate: () => undefined,\n setProgressIndicatorStyles: () => undefined,\n setRowCheckboxCheckedAtIndex: () => undefined,\n setSortStatusLabelByHeaderCellIndex: () => undefined,\n };\n }\n\n constructor(adapter?: Partial) {\n super({...MDCDataTableFoundation.defaultAdapter, ...adapter});\n }\n\n /**\n * Re-initializes header row checkbox and row checkboxes when selectable rows are added or removed from table.\n * Use this if registering checkbox is synchronous.\n */\n layout() {\n if (this.adapter.isRowsSelectable()) {\n this.adapter.registerHeaderRowCheckbox();\n this.adapter.registerRowCheckboxes();\n\n this.setHeaderRowCheckboxState();\n }\n }\n\n /**\n * Re-initializes header row checkbox and row checkboxes when selectable rows are added or removed from table.\n * Use this if registering checkbox is asynchronous.\n */\n async layoutAsync(): Promise {\n if (this.adapter.isRowsSelectable()) {\n await this.adapter.registerHeaderRowCheckbox();\n await this.adapter.registerRowCheckboxes();\n\n this.setHeaderRowCheckboxState();\n }\n }\n\n /**\n * @return Returns array of row elements.\n */\n getRows(): Element[] {\n return this.adapter.getRowElements();\n }\n\n /**\n * @return Array of header cell elements.\n */\n getHeaderCells(): Element[] {\n return this.adapter.getHeaderCellElements();\n }\n\n /**\n * Sets selected row ids. Overwrites previously selected rows.\n * @param rowIds Array of row ids that needs to be selected.\n */\n setSelectedRowIds(rowIds: string[]) {\n for (let rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n const rowId = this.adapter.getRowIdAtIndex(rowIndex);\n\n let isSelected = false;\n if (rowId && rowIds.indexOf(rowId) >= 0) {\n isSelected = true;\n }\n\n this.adapter.setRowCheckboxCheckedAtIndex(rowIndex, isSelected);\n this.selectRowAtIndex(rowIndex, isSelected);\n }\n\n this.setHeaderRowCheckboxState();\n }\n\n /**\n * @return Returns array of all row ids.\n */\n getRowIds(): Array {\n const rowIds = [];\n for (let rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n rowIds.push(this.adapter.getRowIdAtIndex(rowIndex));\n }\n\n return rowIds;\n }\n\n /**\n * @return Returns array of selected row ids.\n */\n getSelectedRowIds(): Array {\n const selectedRowIds: Array = [];\n for (let rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n if (this.adapter.isCheckboxAtRowIndexChecked(rowIndex)) {\n selectedRowIds.push(this.adapter.getRowIdAtIndex(rowIndex));\n }\n }\n\n return selectedRowIds;\n }\n\n /**\n * Handles header row checkbox change event.\n */\n handleHeaderRowCheckboxChange() {\n const isHeaderChecked = this.adapter.isHeaderRowCheckboxChecked();\n\n for (let rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n this.adapter.setRowCheckboxCheckedAtIndex(rowIndex, isHeaderChecked);\n this.selectRowAtIndex(rowIndex, isHeaderChecked);\n }\n\n if (isHeaderChecked) {\n this.adapter.notifySelectedAll();\n } else {\n this.adapter.notifyUnselectedAll();\n }\n }\n\n /**\n * Handles change event originated from row checkboxes.\n */\n handleRowCheckboxChange(event: Event) {\n const rowIndex = this.adapter.getRowIndexByChildElement(\n event.target as HTMLInputElement);\n\n if (rowIndex === -1) {\n return;\n }\n\n const selected = this.adapter.isCheckboxAtRowIndexChecked(rowIndex);\n\n this.selectRowAtIndex(rowIndex, selected);\n this.setHeaderRowCheckboxState();\n\n const rowId = this.adapter.getRowIdAtIndex(rowIndex);\n this.adapter.notifyRowSelectionChanged({rowId, rowIndex, selected});\n }\n\n /**\n * Handles sort action on sortable header cell.\n */\n handleSortAction(eventData: SortActionEventData) {\n const {columnId, columnIndex, headerCell} = eventData;\n\n // Reset sort attributes / classes on other header cells.\n for (let index = 0; index < this.adapter.getHeaderCellCount(); index++) {\n if (index === columnIndex) {\n continue;\n }\n\n this.adapter.removeClassNameByHeaderCellIndex(\n index, cssClasses.HEADER_CELL_SORTED);\n this.adapter.removeClassNameByHeaderCellIndex(\n index, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n this.adapter.setAttributeByHeaderCellIndex(\n index, strings.ARIA_SORT, SortValue.NONE);\n this.adapter.setSortStatusLabelByHeaderCellIndex(index, SortValue.NONE);\n }\n\n // Set appropriate sort attributes / classes on target header cell.\n this.adapter.setClassNameByHeaderCellIndex(\n columnIndex, cssClasses.HEADER_CELL_SORTED);\n\n const currentSortValue = this.adapter.getAttributeByHeaderCellIndex(\n columnIndex, strings.ARIA_SORT);\n let sortValue = SortValue.NONE;\n\n // Set to descending if sorted on ascending order.\n if (currentSortValue === SortValue.ASCENDING) {\n this.adapter.setClassNameByHeaderCellIndex(\n columnIndex, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n this.adapter.setAttributeByHeaderCellIndex(\n columnIndex, strings.ARIA_SORT, SortValue.DESCENDING);\n sortValue = SortValue.DESCENDING;\n // Set to ascending if sorted on descending order.\n } else if (currentSortValue === SortValue.DESCENDING) {\n this.adapter.removeClassNameByHeaderCellIndex(\n columnIndex, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n this.adapter.setAttributeByHeaderCellIndex(\n columnIndex, strings.ARIA_SORT, SortValue.ASCENDING);\n sortValue = SortValue.ASCENDING;\n } else {\n // Set to ascending by default when not sorted.\n this.adapter.setAttributeByHeaderCellIndex(\n columnIndex, strings.ARIA_SORT, SortValue.ASCENDING);\n sortValue = SortValue.ASCENDING;\n }\n\n this.adapter.setSortStatusLabelByHeaderCellIndex(columnIndex, sortValue);\n\n this.adapter.notifySortAction({\n columnId,\n columnIndex,\n headerCell,\n sortValue,\n });\n }\n\n /**\n * Shows progress indicator blocking only the table body content when in\n * loading state.\n */\n showProgress() {\n const tableHeaderHeight = this.adapter.getTableHeaderHeight();\n // Calculate the height of table content (Not scroll content) excluding\n // header row height.\n const height = this.adapter.getTableContainerHeight() - tableHeaderHeight;\n const top = tableHeaderHeight;\n\n this.adapter.setProgressIndicatorStyles({\n height: `${height}px`,\n top: `${top}px`,\n });\n this.adapter.addClass(cssClasses.IN_PROGRESS);\n }\n\n /**\n * Hides progress indicator when data table is finished loading.\n */\n hideProgress() {\n this.adapter.removeClass(cssClasses.IN_PROGRESS);\n }\n\n /**\n * Updates header row checkbox state based on number of rows selected.\n */\n private setHeaderRowCheckboxState() {\n if (this.adapter.getSelectedRowCount() === 0) {\n this.adapter.setHeaderRowCheckboxChecked(false);\n this.adapter.setHeaderRowCheckboxIndeterminate(false);\n } else if (\n this.adapter.getSelectedRowCount() === this.adapter.getRowCount()) {\n this.adapter.setHeaderRowCheckboxChecked(true);\n this.adapter.setHeaderRowCheckboxIndeterminate(false);\n } else {\n this.adapter.setHeaderRowCheckboxIndeterminate(true);\n this.adapter.setHeaderRowCheckboxChecked(false);\n }\n }\n\n /**\n * Sets the attributes of row element based on selection state.\n */\n private selectRowAtIndex(rowIndex: number, selected: boolean) {\n if (selected) {\n this.adapter.addClassAtRowIndex(rowIndex, cssClasses.ROW_SELECTED);\n this.adapter.setAttributeAtRowIndex(\n rowIndex, strings.ARIA_SELECTED, 'true');\n } else {\n this.adapter.removeClassAtRowIndex(rowIndex, cssClasses.ROW_SELECTED);\n this.adapter.setAttributeAtRowIndex(\n rowIndex, strings.ARIA_SELECTED, 'false');\n }\n }\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport * from './constants';\nexport * from './types';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {SortValue} from './constants';\n\nexport interface MDCDataTableRowSelectionChangedEventDetail {\n rowIndex: number;\n rowId: string | null;\n selected: boolean;\n}\n\n/**\n * Event data required for sort action callback - `handleSortAction()`.\n * Component must send this data to foundation when sort action triggered on\n * sortable header cell.\n */\nexport interface SortActionEventData {\n columnId: string|null;\n columnIndex: number;\n headerCell: HTMLElement;\n}\n\n/**\n * Event detail triggered by foundation on sort action. This event detail is\n * used to trigger DOM event by component.\n */\nexport interface SortActionEventDetail {\n columnId: string|null;\n columnIndex: number;\n headerCell: HTMLElement;\n sortValue: SortValue;\n}\n\n/**\n * Styles used to dynamically set dimensions of progress indicator based on\n * table header & body.\n */\nexport interface ProgressIndicatorStyles {\n height: string;\n top: string;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener, SpecificWindowEventListener, WindowEventType} from '@material/base/types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCDialogAdapter {\n addClass(className: string): void;\n removeClass(className: string): void;\n hasClass(className: string): boolean;\n addBodyClass(className: string): void;\n removeBodyClass(className: string): void;\n eventTargetMatches(target: EventTarget|null, selector: string): boolean;\n\n isContentScrollable(): boolean;\n areButtonsStacked(): boolean;\n getActionFromEvent(evt: Event): string|null;\n\n trapFocus(focusElement: HTMLElement|null): void;\n releaseFocus(): void;\n // Element to focus on after dialog has opened.\n getInitialFocusEl(): HTMLElement|null;\n clickDefaultButton(): void;\n reverseButtons(): void;\n\n notifyOpening(): void;\n notifyOpened(): void;\n notifyClosing(action: string): void;\n notifyClosed(action: string): void;\n\n /**\n * Registers an event listener on the dialog's content element (indicated\n * with the 'mdc-dialog__content' class).\n */\n registerContentEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener on the dialog's content element.\n */\n deregisterContentEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * @return true if the content has been scrolled (that is, for\n * scrollable content, if it is at the \"top\"). This is used in full-screen\n * dialogs, where the scroll divider is expected only to appear once the\n * content has been scrolled \"underneath\" the header bar.\n */\n isScrollableContentAtTop(): boolean;\n\n /**\n * @return true if the content has been scrolled all\n * the way to the bottom. This is used in full-screen dialogs, where the\n * footer scroll divider is expected only to appear when the content is\n * \"cut-off\" by the footer bar.\n */\n isScrollableContentAtBottom(): boolean;\n\n /**\n * Registers an event listener to the window.\n */\n registerWindowEventHandler(\n evtType: K, handler: SpecificWindowEventListener): void;\n\n /**\n * Deregisters an event listener to the window.\n */\n deregisterWindowEventHandler(\n evtType: K, handler: SpecificWindowEventListener): void;\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {FocusTrap} from '@material/dom/focus-trap';\nimport {closest, matches} from '@material/dom/ponyfill';\nimport {MDCRipple} from '@material/ripple/component';\nimport {MDCDialogAdapter} from './adapter';\nimport {MDCDialogFoundation} from './foundation';\nimport {MDCDialogCloseEventDetail} from './types';\nimport * as util from './util';\nimport {MDCDialogFocusTrapFactory} from './util';\n\nconst {strings} = MDCDialogFoundation;\n\nexport class MDCDialog extends MDCComponent {\n get isOpen() {\n return this.foundation.isOpen();\n }\n\n get escapeKeyAction() {\n return this.foundation.getEscapeKeyAction();\n }\n\n set escapeKeyAction(action) {\n this.foundation.setEscapeKeyAction(action);\n }\n\n get scrimClickAction() {\n return this.foundation.getScrimClickAction();\n }\n\n set scrimClickAction(action) {\n this.foundation.setScrimClickAction(action);\n }\n\n get autoStackButtons() {\n return this.foundation.getAutoStackButtons();\n }\n\n set autoStackButtons(autoStack) {\n this.foundation.setAutoStackButtons(autoStack);\n }\n\n static attachTo(root: Element) {\n return new MDCDialog(root);\n }\n\n private buttonRipples!: MDCRipple[]; // assigned in initialize()\n private buttons!: HTMLButtonElement[]; // assigned in initialize()\n private container!: HTMLElement; // assigned in initialize()\n private content!: HTMLElement|null; // assigned in initialize()\n private defaultButton!: HTMLButtonElement|null; // assigned in initialize()\n\n private focusTrap!: FocusTrap; // assigned in initialSyncWithDOM()\n private focusTrapFactory!:\n MDCDialogFocusTrapFactory; // assigned in initialize()\n\n private handleClick!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleKeydown!:\n SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleDocumentKeydown!:\n SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleOpening!: EventListener; // assigned in initialSyncWithDOM()\n private handleClosing!: () => void; // assigned in initialSyncWithDOM()\n\n initialize(\n focusTrapFactory: MDCDialogFocusTrapFactory = (el, focusOptions) => new FocusTrap(el, focusOptions),\n ) {\n const container =\n this.root.querySelector(strings.CONTAINER_SELECTOR);\n if (!container) {\n throw new Error(`Dialog component requires a ${strings.CONTAINER_SELECTOR} container element`);\n }\n this.container = container;\n this.content =\n this.root.querySelector(strings.CONTENT_SELECTOR);\n this.buttons = [].slice.call(\n this.root.querySelectorAll(strings.BUTTON_SELECTOR));\n this.defaultButton = this.root.querySelector(\n `[${strings.BUTTON_DEFAULT_ATTRIBUTE}]`);\n this.focusTrapFactory = focusTrapFactory;\n this.buttonRipples = [];\n\n for (const buttonEl of this.buttons) {\n this.buttonRipples.push(new MDCRipple(buttonEl));\n }\n }\n\n initialSyncWithDOM() {\n this.focusTrap = util.createFocusTrapInstance(\n this.container, this.focusTrapFactory,\n this.getInitialFocusEl() || undefined);\n\n this.handleClick = this.foundation.handleClick.bind(this.foundation);\n this.handleKeydown = this.foundation.handleKeydown.bind(this.foundation);\n this.handleDocumentKeydown =\n this.foundation.handleDocumentKeydown.bind(this.foundation);\n // this.handleLayout = this.layout.bind(this);\n\n this.handleOpening = () => {\n document.addEventListener('keydown', this.handleDocumentKeydown);\n };\n this.handleClosing = () => {\n document.removeEventListener('keydown', this.handleDocumentKeydown);\n };\n\n this.listen('click', this.handleClick);\n this.listen('keydown', this.handleKeydown);\n this.listen(strings.OPENING_EVENT, this.handleOpening);\n this.listen(strings.CLOSING_EVENT, this.handleClosing);\n }\n\n destroy() {\n this.unlisten('click', this.handleClick);\n this.unlisten('keydown', this.handleKeydown);\n this.unlisten(strings.OPENING_EVENT, this.handleOpening);\n this.unlisten(strings.CLOSING_EVENT, this.handleClosing);\n this.handleClosing();\n\n this.buttonRipples.forEach((ripple) => {\n ripple.destroy();\n });\n super.destroy();\n }\n\n layout() {\n this.foundation.layout();\n }\n\n open() {\n this.foundation.open();\n }\n\n close(action = '') {\n this.foundation.close(action);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCDialogAdapter = {\n addBodyClass: (className) => document.body.classList.add(className),\n addClass: (className) => this.root.classList.add(className),\n areButtonsStacked: () => util.areTopsMisaligned(this.buttons),\n clickDefaultButton: () => {\n if (this.defaultButton && !this.defaultButton.disabled) {\n this.defaultButton.click();\n }\n },\n eventTargetMatches: (target, selector) =>\n target ? matches(target as Element, selector) : false,\n getActionFromEvent: (evt: Event) => {\n if (!evt.target) {\n return '';\n }\n const element = closest(evt.target as Element, `[${strings.ACTION_ATTRIBUTE}]`);\n return element && element.getAttribute(strings.ACTION_ATTRIBUTE);\n },\n getInitialFocusEl: () => this.getInitialFocusEl(),\n hasClass: (className) => this.root.classList.contains(className),\n isContentScrollable: () => util.isScrollable(this.content),\n notifyClosed: (action) => this.emit(\n strings.CLOSED_EVENT, action ? {action} : {}),\n notifyClosing: (action) => this.emit(\n strings.CLOSING_EVENT, action ? {action} : {}),\n notifyOpened: () => this.emit(strings.OPENED_EVENT, {}),\n notifyOpening: () => this.emit(strings.OPENING_EVENT, {}),\n releaseFocus: () => {\n this.focusTrap.releaseFocus();\n },\n removeBodyClass: (className) => document.body.classList.remove(className),\n removeClass: (className) => this.root.classList.remove(className),\n reverseButtons: () => {\n this.buttons.reverse();\n this.buttons.forEach((button) => {\n button.parentElement!.appendChild(button);\n });\n },\n trapFocus: () => {\n this.focusTrap.trapFocus();\n },\n registerContentEventHandler: (evt, handler) => {\n if (this.content instanceof HTMLElement) {\n this.content.addEventListener(evt, handler);\n }\n },\n deregisterContentEventHandler: (evt, handler) => {\n if (this.content instanceof HTMLElement) {\n this.content.removeEventListener(evt, handler);\n }\n },\n isScrollableContentAtTop: () => {\n return util.isScrollAtTop(this.content);\n },\n isScrollableContentAtBottom: () => {\n return util.isScrollAtBottom(this.content);\n },\n registerWindowEventHandler: (evt, handler) => {\n window.addEventListener(evt, handler);\n },\n deregisterWindowEventHandler: (evt, handler) => {\n window.removeEventListener(evt, handler);\n },\n };\n return new MDCDialogFoundation(adapter);\n }\n\n private getInitialFocusEl(): HTMLElement|null {\n return this.root.querySelector(`[${strings.INITIAL_FOCUS_ATTRIBUTE}]`);\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n CLOSING: 'mdc-dialog--closing',\n OPEN: 'mdc-dialog--open',\n OPENING: 'mdc-dialog--opening',\n SCROLLABLE: 'mdc-dialog--scrollable',\n SCROLL_LOCK: 'mdc-dialog-scroll-lock',\n STACKED: 'mdc-dialog--stacked',\n FULLSCREEN: 'mdc-dialog--fullscreen',\n // Class for showing a scroll divider on full-screen dialog header element.\n // Should only be displayed on scrollable content, when the dialog content is\n // scrolled \"underneath\" the header.\n SCROLL_DIVIDER_HEADER: 'mdc-dialog-scroll-divider-header',\n // Class for showing a scroll divider on a full-screen dialog footer element.\n // Should only be displayed on scrolalble content, when the dialog content is\n // obscured \"underneath\" the footer.\n SCROLL_DIVIDER_FOOTER: 'mdc-dialog-scroll-divider-footer',\n // The \"surface scrim\" is a scrim covering only the surface of a dialog. This\n // is used in situations where a confirmation dialog is shown over an already\n // opened full-screen dialog. On larger screen-sizes, the full-screen dialog\n // is sized as a modal and so in these situations we display a \"surface scrim\"\n // to prevent a \"double scrim\" (where the scrim from the secondary\n // confirmation dialog would overlap with the scrim from the full-screen\n // dialog).\n SURFACE_SCRIM_SHOWN: 'mdc-dialog__surface-scrim--shown',\n // \"Showing\" animating class for the surface-scrim.\n SURFACE_SCRIM_SHOWING: 'mdc-dialog__surface-scrim--showing',\n // \"Hiding\" animating class for the surface-scrim.\n SURFACE_SCRIM_HIDING: 'mdc-dialog__surface-scrim--hiding',\n // Class to hide a dialog's scrim (used in conjunction with a surface-scrim).\n // Note that we only hide the original scrim rather than removing it entirely\n // to prevent interactions with the content behind this scrim, and to capture\n // scrim clicks.\n SCRIM_HIDDEN: 'mdc-dialog__scrim--hidden',\n};\n\nexport const strings = {\n ACTION_ATTRIBUTE: 'data-mdc-dialog-action',\n BUTTON_DEFAULT_ATTRIBUTE: 'data-mdc-dialog-button-default',\n BUTTON_SELECTOR: '.mdc-dialog__button',\n CLOSED_EVENT: 'MDCDialog:closed',\n CLOSE_ACTION: 'close',\n CLOSING_EVENT: 'MDCDialog:closing',\n CONTAINER_SELECTOR: '.mdc-dialog__container',\n CONTENT_SELECTOR: '.mdc-dialog__content',\n DESTROY_ACTION: 'destroy',\n INITIAL_FOCUS_ATTRIBUTE: 'data-mdc-dialog-initial-focus',\n OPENED_EVENT: 'MDCDialog:opened',\n OPENING_EVENT: 'MDCDialog:opening',\n SCRIM_SELECTOR: '.mdc-dialog__scrim',\n SUPPRESS_DEFAULT_PRESS_SELECTOR: [\n 'textarea',\n '.mdc-menu .mdc-list-item',\n '.mdc-menu .mdc-deprecated-list-item',\n ].join(', '),\n SURFACE_SELECTOR: '.mdc-dialog__surface',\n};\n\nexport const numbers = {\n DIALOG_ANIMATION_CLOSE_TIME_MS: 75,\n DIALOG_ANIMATION_OPEN_TIME_MS: 150,\n};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {AnimationFrame} from '@material/animation/animationframe';\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener, SpecificWindowEventListener} from '@material/base/types';\n\nimport {MDCDialogAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\nimport {DialogConfigOptions} from './types';\n\nenum AnimationKeys {\n POLL_SCROLL_POS = 'poll_scroll_position',\n POLL_LAYOUT_CHANGE = 'poll_layout_change'\n}\n\nexport class MDCDialogFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get numbers() {\n return numbers;\n }\n\n static get defaultAdapter(): MDCDialogAdapter {\n return {\n addBodyClass: () => undefined,\n addClass: () => undefined,\n areButtonsStacked: () => false,\n clickDefaultButton: () => undefined,\n eventTargetMatches: () => false,\n getActionFromEvent: () => '',\n getInitialFocusEl: () => null,\n hasClass: () => false,\n isContentScrollable: () => false,\n notifyClosed: () => undefined,\n notifyClosing: () => undefined,\n notifyOpened: () => undefined,\n notifyOpening: () => undefined,\n releaseFocus: () => undefined,\n removeBodyClass: () => undefined,\n removeClass: () => undefined,\n reverseButtons: () => undefined,\n trapFocus: () => undefined,\n registerContentEventHandler: () => undefined,\n deregisterContentEventHandler: () => undefined,\n isScrollableContentAtTop: () => false,\n isScrollableContentAtBottom: () => false,\n registerWindowEventHandler: () => undefined,\n deregisterWindowEventHandler: () => undefined,\n };\n }\n\n private dialogOpen = false;\n private isFullscreen = false;\n private animationFrame = 0;\n private animationTimer = 0;\n private escapeKeyAction = strings.CLOSE_ACTION;\n private scrimClickAction = strings.CLOSE_ACTION;\n private autoStackButtons = true;\n private areButtonsStacked = false;\n private suppressDefaultPressSelector =\n strings.SUPPRESS_DEFAULT_PRESS_SELECTOR;\n private readonly contentScrollHandler: SpecificEventListener<'scroll'>;\n private readonly animFrame: AnimationFrame;\n private readonly windowResizeHandler: SpecificWindowEventListener<'resize'>;\n private readonly windowOrientationChangeHandler:\n SpecificWindowEventListener<'orientationchange'>;\n\n constructor(adapter?: Partial) {\n super({...MDCDialogFoundation.defaultAdapter, ...adapter});\n\n this.animFrame = new AnimationFrame();\n this.contentScrollHandler = () => {\n this.handleScrollEvent();\n };\n\n this.windowResizeHandler = () => {\n this.layout();\n };\n\n this.windowOrientationChangeHandler = () => {\n this.layout();\n };\n }\n\n init() {\n if (this.adapter.hasClass(cssClasses.STACKED)) {\n this.setAutoStackButtons(false);\n }\n this.isFullscreen = this.adapter.hasClass(cssClasses.FULLSCREEN);\n }\n\n destroy() {\n if (this.animationTimer) {\n clearTimeout(this.animationTimer);\n this.handleAnimationTimerEnd();\n }\n\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler(\n 'scroll', this.contentScrollHandler);\n }\n\n this.animFrame.cancelAll();\n this.adapter.deregisterWindowEventHandler(\n 'resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler(\n 'orientationchange', this.windowOrientationChangeHandler);\n }\n\n open(dialogOptions?: DialogConfigOptions) {\n this.dialogOpen = true;\n this.adapter.notifyOpening();\n this.adapter.addClass(cssClasses.OPENING);\n if (this.isFullscreen) {\n // A scroll event listener is registered even if the dialog is not\n // scrollable on open, since the window resize event, or orientation\n // change may make the dialog scrollable after it is opened.\n this.adapter.registerContentEventHandler(\n 'scroll', this.contentScrollHandler);\n }\n if (dialogOptions && dialogOptions.isAboveFullscreenDialog) {\n this.adapter.addClass(cssClasses.SCRIM_HIDDEN);\n }\n\n this.adapter.registerWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.registerWindowEventHandler(\n 'orientationchange', this.windowOrientationChangeHandler);\n\n // Wait a frame once display is no longer \"none\", to establish basis for\n // animation\n this.runNextAnimationFrame(() => {\n this.adapter.addClass(cssClasses.OPEN);\n this.adapter.addBodyClass(cssClasses.SCROLL_LOCK);\n\n this.layout();\n\n this.animationTimer = setTimeout(() => {\n this.handleAnimationTimerEnd();\n this.adapter.trapFocus(this.adapter.getInitialFocusEl());\n this.adapter.notifyOpened();\n }, numbers.DIALOG_ANIMATION_OPEN_TIME_MS);\n });\n }\n\n close(action = '') {\n if (!this.dialogOpen) {\n // Avoid redundant close calls (and events), e.g. from keydown on elements\n // that inherently emit click\n return;\n }\n\n this.dialogOpen = false;\n this.adapter.notifyClosing(action);\n this.adapter.addClass(cssClasses.CLOSING);\n this.adapter.removeClass(cssClasses.OPEN);\n this.adapter.removeBodyClass(cssClasses.SCROLL_LOCK);\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler(\n 'scroll', this.contentScrollHandler);\n }\n this.adapter.deregisterWindowEventHandler(\n 'resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler(\n 'orientationchange', this.windowOrientationChangeHandler);\n\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(() => {\n this.adapter.releaseFocus();\n this.handleAnimationTimerEnd();\n this.adapter.notifyClosed(action);\n }, numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);\n }\n\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Shows the \"surface scrim\" displayed over the full-screen dialog.\n */\n showSurfaceScrim() {\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWING);\n this.runNextAnimationFrame(() => {\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWN);\n });\n }\n\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Hides the \"surface scrim\" displayed over the full-screen dialog.\n */\n hideSurfaceScrim() {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWN);\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_HIDING);\n }\n\n /**\n * Handles `transitionend` event triggered when surface scrim animation is\n * finished.\n */\n handleSurfaceScrimTransitionEnd() {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_HIDING);\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWING);\n }\n\n isOpen() {\n return this.dialogOpen;\n }\n\n getEscapeKeyAction(): string {\n return this.escapeKeyAction;\n }\n\n setEscapeKeyAction(action: string) {\n this.escapeKeyAction = action;\n }\n\n getScrimClickAction(): string {\n return this.scrimClickAction;\n }\n\n setScrimClickAction(action: string) {\n this.scrimClickAction = action;\n }\n\n getAutoStackButtons(): boolean {\n return this.autoStackButtons;\n }\n\n setAutoStackButtons(autoStack: boolean) {\n this.autoStackButtons = autoStack;\n }\n\n getSuppressDefaultPressSelector(): string {\n return this.suppressDefaultPressSelector;\n }\n\n setSuppressDefaultPressSelector(selector: string) {\n this.suppressDefaultPressSelector = selector;\n }\n\n layout() {\n this.animFrame.request(AnimationKeys.POLL_LAYOUT_CHANGE, () => {\n this.layoutInternal();\n });\n }\n\n /** Handles click on the dialog root element. */\n handleClick(evt: MouseEvent) {\n const isScrim =\n this.adapter.eventTargetMatches(evt.target, strings.SCRIM_SELECTOR);\n // Check for scrim click first since it doesn't require querying ancestors.\n if (isScrim && this.scrimClickAction !== '') {\n this.close(this.scrimClickAction);\n } else {\n const action = this.adapter.getActionFromEvent(evt);\n if (action) {\n this.close(action);\n }\n }\n }\n\n /** Handles keydown on the dialog root element. */\n handleKeydown(evt: KeyboardEvent) {\n const isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n if (!isEnter) {\n return;\n }\n const action = this.adapter.getActionFromEvent(evt);\n if (action) {\n // Action button callback is handled in `handleClick`,\n // since space/enter keydowns on buttons trigger click events.\n return;\n }\n\n // `composedPath` is used here, when available, to account for use cases\n // where a target meant to suppress the default press behaviour\n // may exist in a shadow root.\n // For example, a textarea inside a web component:\n // \n // \n // #shadow-root (open)\n // \n // #shadow-root (open)\n // \n // \n // \n // \n const target = evt.composedPath ? evt.composedPath()[0] : evt.target;\n const isDefault = this.suppressDefaultPressSelector ?\n !this.adapter.eventTargetMatches(\n target, this.suppressDefaultPressSelector) :\n true;\n if (isEnter && isDefault) {\n this.adapter.clickDefaultButton();\n }\n }\n\n /** Handles keydown on the document. */\n handleDocumentKeydown(evt: KeyboardEvent) {\n const isEscape = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscape && this.escapeKeyAction !== '') {\n this.close(this.escapeKeyAction);\n }\n }\n\n /**\n * Handles scroll event on the dialog's content element -- showing a scroll\n * divider on the header or footer based on the scroll position. This handler\n * should only be registered on full-screen dialogs with scrollable content.\n */\n private handleScrollEvent() {\n // Since scroll events can fire at a high rate, we throttle these events by\n // using requestAnimationFrame.\n this.animFrame.request(AnimationKeys.POLL_SCROLL_POS, () => {\n this.toggleScrollDividerHeader();\n this.toggleScrollDividerFooter();\n });\n }\n\n private layoutInternal() {\n if (this.autoStackButtons) {\n this.detectStackedButtons();\n }\n this.toggleScrollableClasses();\n }\n\n private handleAnimationTimerEnd() {\n this.animationTimer = 0;\n this.adapter.removeClass(cssClasses.OPENING);\n this.adapter.removeClass(cssClasses.CLOSING);\n }\n\n /**\n * Runs the given logic on the next animation frame, using setTimeout to\n * factor in Firefox reflow behavior.\n */\n private runNextAnimationFrame(callback: () => void) {\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(() => {\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(callback, 0);\n });\n }\n\n private detectStackedButtons() {\n // Remove the class first to let us measure the buttons' natural positions.\n this.adapter.removeClass(cssClasses.STACKED);\n\n const areButtonsStacked = this.adapter.areButtonsStacked();\n\n if (areButtonsStacked) {\n this.adapter.addClass(cssClasses.STACKED);\n }\n\n if (areButtonsStacked !== this.areButtonsStacked) {\n this.adapter.reverseButtons();\n this.areButtonsStacked = areButtonsStacked;\n }\n }\n\n private toggleScrollableClasses() {\n // Remove the class first to let us measure the natural height of the\n // content.\n this.adapter.removeClass(cssClasses.SCROLLABLE);\n if (this.adapter.isContentScrollable()) {\n this.adapter.addClass(cssClasses.SCROLLABLE);\n\n if (this.isFullscreen) {\n // If dialog is full-screen and scrollable, check if a scroll divider\n // should be shown.\n this.toggleScrollDividerHeader();\n this.toggleScrollDividerFooter();\n }\n }\n }\n\n private toggleScrollDividerHeader() {\n if (!this.adapter.isScrollableContentAtTop()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_HEADER);\n } else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_HEADER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_HEADER);\n }\n }\n\n private toggleScrollDividerFooter() {\n if (!this.adapter.isScrollableContentAtBottom()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n } else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_FOOTER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDialogFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport * as util from './util';\n\nexport {util};\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport interface MDCDialogCloseEventDetail {\n action?: string;\n}\n\n// Note: CustomEvent is not supported by Closure Compiler.\n\nexport interface MDCDialogCloseEvent extends Event {\n readonly detail: MDCDialogCloseEventDetail;\n}\n\n\n/**\n * Options for how to configure the dialog.\n */\nexport interface DialogConfigOptions {\n // Boolean indicating whether or not the dialog being opened is a confirmation\n // dialog opened on top of a full-screen dialog (the only time multiple\n // dialogs should be open on top of one another).\n isAboveFullscreenDialog?: boolean;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {FocusOptions, FocusTrap} from '@material/dom/focus-trap';\n\nexport type MDCDialogFocusTrapFactory = (\n element: HTMLElement,\n options: FocusOptions,\n) => FocusTrap;\n\nexport function createFocusTrapInstance(\n surfaceEl: HTMLElement,\n focusTrapFactory: MDCDialogFocusTrapFactory,\n initialFocusEl?: HTMLElement,\n): FocusTrap {\n return focusTrapFactory(surfaceEl, {initialFocusEl});\n}\n\nexport function isScrollable(el: HTMLElement | null): boolean {\n return el ? el.scrollHeight > el.offsetHeight : false;\n}\n\n/**\n * For scrollable content, returns true if the content has not been scrolled\n * (that is, the scroll content is as the \"top\"). This is used in full-screen\n * dialogs, where the scroll divider is expected only to appear once the\n * content has been scrolled \"underneath\" the header bar.\n */\nexport function isScrollAtTop(el: HTMLElement|null) {\n return el ? el.scrollTop === 0 : false;\n}\n\n/**\n * For scrollable content, returns true if the content has been scrolled all the\n * way to the bottom. This is used in full-screen dialogs, where the footer\n * scroll divider is expected only to appear when the content is \"cut-off\" by\n * the footer bar.\n */\nexport function isScrollAtBottom(el: HTMLElement|null) {\n return el ? Math.ceil(el.scrollHeight - el.scrollTop) === el.clientHeight :\n false;\n}\n\nexport function areTopsMisaligned(els: HTMLElement[]): boolean {\n const tops = new Set();\n [].forEach.call(els, (el: HTMLElement) => tops.add(el.offsetTop));\n return tops.size > 1;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Priorities for the announce function\n */\nexport enum AnnouncerPriority {\n POLITE = 'polite',\n ASSERTIVE = 'assertive',\n}\n\n/**\n * Data attribute added to live region element.\n */\nexport const DATA_MDC_DOM_ANNOUNCE = 'data-mdc-dom-announce';\n\n/**\n * Announces the given message with optional priority, defaulting to \"polite\"\n */\nexport function announce(message: string, priority?: AnnouncerPriority) {\n Announcer.getInstance().say(message, priority);\n}\n\nclass Announcer {\n private static instance: Announcer;\n private readonly liveRegions: Map;\n\n static getInstance(): Announcer {\n if (!Announcer.instance) {\n Announcer.instance = new Announcer();\n }\n\n return Announcer.instance;\n }\n\n // Constructor made private to ensure only the singleton is used\n private constructor() {\n this.liveRegions = new Map();\n }\n\n say(message: string, priority: AnnouncerPriority = AnnouncerPriority.POLITE) {\n const liveRegion = this.getLiveRegion(priority);\n // Reset the region to pick up the message, even if the message is the\n // exact same as before.\n liveRegion.textContent = '';\n // Timeout is necessary for screen readers like NVDA and VoiceOver.\n setTimeout(() => {\n liveRegion.textContent = message;\n document.addEventListener('click', clearLiveRegion);\n }, 1);\n\n function clearLiveRegion() {\n liveRegion.textContent = '';\n document.removeEventListener('click', clearLiveRegion);\n }\n }\n\n private getLiveRegion(priority: AnnouncerPriority): Element {\n const existingLiveRegion = this.liveRegions.get(priority);\n if (existingLiveRegion &&\n document.body.contains(existingLiveRegion as Node)) {\n return existingLiveRegion;\n }\n\n const liveRegion = this.createLiveRegion(priority);\n this.liveRegions.set(priority, liveRegion);\n return liveRegion;\n }\n\n private createLiveRegion(priority: AnnouncerPriority): Element {\n const el = document.createElement('div');\n el.style.position = 'absolute';\n el.style.top = '-9999px';\n el.style.left = '-9999px';\n el.style.height = '1px';\n el.style.overflow = 'hidden';\n el.setAttribute('aria-atomic', 'true');\n el.setAttribute('aria-live', priority);\n el.setAttribute(DATA_MDC_DOM_ANNOUNCE, 'true');\n document.body.appendChild(el);\n return el;\n }\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nexport function applyPassive(globalObj: Window = window):\n boolean | EventListenerOptions {\n return supportsPassiveOption(globalObj) ?\n {passive: true} as AddEventListenerOptions :\n false;\n}\n\nfunction supportsPassiveOption(globalObj: Window = window): boolean {\n // See\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n let passiveSupported = false;\n\n try {\n const options = {\n // This function will be called when the browser\n // attempts to access the passive property.\n get passive() {\n passiveSupported = true;\n return false;\n }\n };\n\n const handler = () => {};\n globalObj.document.addEventListener('test', handler, options);\n globalObj.document.removeEventListener(\n 'test', handler, options as EventListenerOptions);\n } catch (err) {\n passiveSupported = false;\n }\n\n return passiveSupported;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst FOCUS_SENTINEL_CLASS = 'mdc-dom-focus-sentinel';\n\n/**\n * Utility to trap focus in a given root element, e.g. for modal components such\n * as dialogs. The root should have at least one focusable child element,\n * for setting initial focus when trapping focus.\n * Also tracks the previously focused element, and restores focus to that\n * element when releasing focus.\n */\nexport class FocusTrap {\n // Previously focused element before trapping focus.\n private elFocusedBeforeTrapFocus: HTMLElement|null = null;\n\n constructor(\n private readonly root: HTMLElement,\n private readonly options: FocusOptions = {}) {}\n\n /**\n * Traps focus in `root`. Also focuses on either `initialFocusEl` if set;\n * otherwises sets initial focus to the first focusable child element.\n */\n trapFocus() {\n const focusableEls = this.getFocusableElements(this.root);\n if (focusableEls.length === 0) {\n throw new Error(\n 'FocusTrap: Element must have at least one focusable child.');\n }\n\n this.elFocusedBeforeTrapFocus =\n document.activeElement instanceof HTMLElement ? document.activeElement :\n null;\n this.wrapTabFocus(this.root);\n\n if (!this.options.skipInitialFocus) {\n this.focusInitialElement(focusableEls, this.options.initialFocusEl);\n }\n }\n\n /**\n * Releases focus from `root`. Also restores focus to the previously focused\n * element.\n */\n releaseFocus() {\n [].slice.call(this.root.querySelectorAll(`.${FOCUS_SENTINEL_CLASS}`))\n .forEach((sentinelEl: HTMLElement) => {\n sentinelEl.parentElement!.removeChild(sentinelEl);\n });\n\n if (!this.options.skipRestoreFocus && this.elFocusedBeforeTrapFocus) {\n this.elFocusedBeforeTrapFocus.focus();\n }\n }\n\n /**\n * Wraps tab focus within `el` by adding two hidden sentinel divs which are\n * used to mark the beginning and the end of the tabbable region. When\n * focused, these sentinel elements redirect focus to the first/last\n * children elements of the tabbable region, ensuring that focus is trapped\n * within that region.\n */\n private wrapTabFocus(el: HTMLElement) {\n const sentinelStart = this.createSentinel();\n const sentinelEnd = this.createSentinel();\n\n sentinelStart.addEventListener('focus', () => {\n const focusableEls = this.getFocusableElements(el);\n if (focusableEls.length > 0) {\n focusableEls[focusableEls.length - 1].focus();\n }\n });\n sentinelEnd.addEventListener('focus', () => {\n const focusableEls = this.getFocusableElements(el);\n if (focusableEls.length > 0) {\n focusableEls[0].focus();\n }\n });\n\n el.insertBefore(sentinelStart, el.children[0]);\n el.appendChild(sentinelEnd);\n }\n\n /**\n * Focuses on `initialFocusEl` if defined and a child of the root element.\n * Otherwise, focuses on the first focusable child element of the root.\n */\n private focusInitialElement(\n focusableEls: HTMLElement[], initialFocusEl?: HTMLElement) {\n let focusIndex = 0;\n if (initialFocusEl) {\n focusIndex = Math.max(focusableEls.indexOf(initialFocusEl), 0);\n }\n focusableEls[focusIndex].focus();\n }\n\n private getFocusableElements(root: HTMLElement): HTMLElement[] {\n const focusableEls =\n [].slice.call(root.querySelectorAll(\n '[autofocus], [tabindex], a, input, textarea, select, button')) as\n HTMLElement[];\n return focusableEls.filter((el) => {\n const isDisabledOrHidden = el.getAttribute('aria-disabled') === 'true' ||\n el.getAttribute('disabled') != null ||\n el.getAttribute('hidden') != null ||\n el.getAttribute('aria-hidden') === 'true';\n const isTabbableAndVisible = el.tabIndex >= 0 &&\n el.getBoundingClientRect().width > 0 &&\n !el.classList.contains(FOCUS_SENTINEL_CLASS) && !isDisabledOrHidden;\n\n let isProgrammaticallyHidden = false;\n if (isTabbableAndVisible) {\n const style = getComputedStyle(el);\n isProgrammaticallyHidden =\n style.display === 'none' || style.visibility === 'hidden';\n }\n return isTabbableAndVisible && !isProgrammaticallyHidden;\n });\n }\n\n private createSentinel() {\n const sentinel = document.createElement('div');\n sentinel.setAttribute('tabindex', '0');\n // Don't announce in screen readers.\n sentinel.setAttribute('aria-hidden', 'true');\n sentinel.classList.add(FOCUS_SENTINEL_CLASS);\n return sentinel;\n }\n}\n\n/** Customization options. */\nexport interface FocusOptions {\n // The element to focus initially when trapping focus.\n // Must be a child of the root element.\n initialFocusEl?: HTMLElement;\n\n // Whether to skip initially focusing on any element when trapping focus.\n // By default, focus is set on the first focusable child element of the root.\n // This is useful if the caller wants to handle setting initial focus.\n skipInitialFocus?: boolean;\n\n // Whether to restore focus on the previously focused element when releasing\n // focus. This is useful if the caller wants to handle restoring focus.\n skipRestoreFocus?: boolean;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport * as events from './events';\nimport * as focusTrap from './focus-trap';\nimport * as keyboard from './keyboard';\nimport * as ponyfill from './ponyfill';\n\nexport {events, focusTrap, keyboard, ponyfill};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * KEY provides normalized string values for keys.\n */\nexport const KEY = {\n UNKNOWN: 'Unknown',\n BACKSPACE: 'Backspace',\n ENTER: 'Enter',\n SPACEBAR: 'Spacebar',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n END: 'End',\n HOME: 'Home',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_UP: 'ArrowUp',\n ARROW_RIGHT: 'ArrowRight',\n ARROW_DOWN: 'ArrowDown',\n DELETE: 'Delete',\n ESCAPE: 'Escape',\n TAB: 'Tab',\n};\n\nconst normalizedKeys = new Set();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nnormalizedKeys.add(KEY.BACKSPACE);\nnormalizedKeys.add(KEY.ENTER);\nnormalizedKeys.add(KEY.SPACEBAR);\nnormalizedKeys.add(KEY.PAGE_UP);\nnormalizedKeys.add(KEY.PAGE_DOWN);\nnormalizedKeys.add(KEY.END);\nnormalizedKeys.add(KEY.HOME);\nnormalizedKeys.add(KEY.ARROW_LEFT);\nnormalizedKeys.add(KEY.ARROW_UP);\nnormalizedKeys.add(KEY.ARROW_RIGHT);\nnormalizedKeys.add(KEY.ARROW_DOWN);\nnormalizedKeys.add(KEY.DELETE);\nnormalizedKeys.add(KEY.ESCAPE);\nnormalizedKeys.add(KEY.TAB);\n\nconst KEY_CODE = {\n BACKSPACE: 8,\n ENTER: 13,\n SPACEBAR: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n DELETE: 46,\n ESCAPE: 27,\n TAB: 9,\n};\n\nconst mappedKeyCodes = new Map();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nmappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE);\nmappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER);\nmappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR);\nmappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP);\nmappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN);\nmappedKeyCodes.set(KEY_CODE.END, KEY.END);\nmappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME);\nmappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT);\nmappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP);\nmappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT);\nmappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN);\nmappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE);\nmappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE);\nmappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB);\n\nconst navigationKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this\n// by hand.\nnavigationKeys.add(KEY.PAGE_UP);\nnavigationKeys.add(KEY.PAGE_DOWN);\nnavigationKeys.add(KEY.END);\nnavigationKeys.add(KEY.HOME);\nnavigationKeys.add(KEY.ARROW_LEFT);\nnavigationKeys.add(KEY.ARROW_UP);\nnavigationKeys.add(KEY.ARROW_RIGHT);\nnavigationKeys.add(KEY.ARROW_DOWN);\n\n/**\n * normalizeKey returns the normalized string for a navigational action.\n */\nexport function normalizeKey(evt: KeyboardEvent): string {\n const {key} = evt;\n // If the event already has a normalized key, return it\n if (normalizedKeys.has(key)) {\n return key;\n }\n\n // tslint:disable-next-line:deprecation\n const mappedKey = mappedKeyCodes.get(evt.keyCode);\n if (mappedKey) {\n return mappedKey;\n }\n return KEY.UNKNOWN;\n}\n\n/**\n * isNavigationEvent returns whether the event is a navigation event\n */\nexport function isNavigationEvent(evt: KeyboardEvent): boolean {\n return navigationKeys.has(normalizeKey(evt));\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\n\nexport function closest(element: Element, selector: string): Element | null {\n if (element.closest) {\n return element.closest(selector);\n }\n\n let el: Element | null = element;\n while (el) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentElement;\n }\n return null;\n}\n\nexport function matches(element: Element, selector: string): boolean {\n const nativeMatches = element.matches\n || element.webkitMatchesSelector\n || (element as any).msMatchesSelector;\n return nativeMatches.call(element, selector);\n}\n\n/**\n * Used to compute the estimated scroll width of elements. When an element is\n * hidden due to display: none; being applied to a parent element, the width is\n * returned as 0. However, the element will have a true width once no longer\n * inside a display: none context. This method computes an estimated width when\n * the element is hidden or returns the true width when the element is visble.\n * @param {Element} element the element whose width to estimate\n */\nexport function estimateScrollWidth(element: Element): number {\n // Check the offsetParent. If the element inherits display: none from any\n // parent, the offsetParent property will be null (see\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).\n // This check ensures we only clone the node when necessary.\n const htmlEl = element as HTMLElement;\n if (htmlEl.offsetParent !== null) {\n return htmlEl.scrollWidth;\n }\n\n const clone = htmlEl.cloneNode(true) as HTMLElement;\n clone.style.setProperty('position', 'absolute');\n clone.style.setProperty('transform', 'translate(-9999px, -9999px)');\n document.documentElement.appendChild(clone);\n const scrollWidth = clone.scrollWidth;\n document.documentElement.removeChild(clone);\n return scrollWidth;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCDrawerAdapter {\n /**\n * Adds a class to the root Element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the root Element.\n */\n removeClass(className: string): void;\n\n /**\n * Returns true if the root Element contains the given class.\n */\n hasClass(className: string): boolean;\n\n /**\n * Returns true if the element contains the given class.\n * @param element target element to verify class name\n * @param className class name\n */\n elementHasClass(element: Element, className: string): boolean;\n\n /**\n * Saves the focus of currently active element.\n */\n saveFocus(): void;\n\n /**\n * Restores focus to element previously saved with 'saveFocus'.\n */\n restoreFocus(): void;\n\n /**\n * Focuses the active / selected navigation item.\n */\n focusActiveNavigationItem(): void;\n\n /**\n * Emits a custom event \"MDCDrawer:closed\" denoting the drawer has closed.\n */\n notifyClose(): void;\n\n /**\n * Emits a custom event \"MDCDrawer:opened\" denoting the drawer has opened.\n */\n notifyOpen(): void;\n\n /**\n * Traps focus on root element and focuses the active navigation element.\n */\n trapFocus(): void;\n\n /**\n * Releases focus trap from root element which was set by `trapFocus`\n * and restores focus to where it was prior to calling `trapFocus`.\n */\n releaseFocus(): void;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {FocusTrap} from '@material/dom/focus-trap';\nimport {MDCList, MDCListFactory} from '@material/list/component';\nimport {MDCDrawerAdapter} from './adapter';\nimport {MDCDismissibleDrawerFoundation} from './dismissible/foundation';\nimport {MDCModalDrawerFoundation} from './modal/foundation';\nimport * as util from './util';\nimport {MDCDrawerFocusTrapFactory} from './util';\n\nconst {cssClasses, strings} = MDCDismissibleDrawerFoundation;\n\n/**\n * @events `MDCDrawer:closed {}` Emits when the navigation drawer has closed.\n * @events `MDCDrawer:opened {}` Emits when the navigation drawer has opened.\n */\nexport class MDCDrawer extends MDCComponent {\n static attachTo(root: Element): MDCDrawer {\n return new MDCDrawer(root);\n }\n\n /**\n * @return boolean Proxies to the foundation's `open`/`close` methods.\n * Also returns true if drawer is in the open position.\n */\n get open(): boolean {\n return this.foundation.isOpen();\n }\n\n /**\n * Toggles the drawer open and closed.\n */\n set open(isOpen: boolean) {\n if (isOpen) {\n this.foundation.open();\n } else {\n this.foundation.close();\n }\n }\n\n private previousFocus?: Element|null;\n private scrim!: HTMLElement|null; // assigned in initialSyncWithDOM()\n private innerList?: MDCList; // assigned in initialize()\n\n private focusTrap?: FocusTrap; // assigned in initialSyncWithDOM()\n private focusTrapFactory!:\n MDCDrawerFocusTrapFactory; // assigned in initialize()\n\n private handleScrimClick?:\n SpecificEventListener<'click'>; // initialized in initialSyncWithDOM()\n private handleKeydown!:\n SpecificEventListener<'keydown'>; // initialized in initialSyncWithDOM()\n private handleTransitionEnd!:\n SpecificEventListener<'transitionend'>; // initialized in\n // initialSyncWithDOM()\n\n get list(): MDCList|undefined {\n return this.innerList;\n }\n\n initialize(\n focusTrapFactory: MDCDrawerFocusTrapFactory = (el) => new FocusTrap(el),\n listFactory: MDCListFactory = (el) => new MDCList(el),\n ) {\n const listEl = this.root.querySelector(strings.LIST_SELECTOR);\n if (listEl) {\n this.innerList = listFactory(listEl);\n this.innerList.wrapFocus = true;\n }\n this.focusTrapFactory = focusTrapFactory;\n }\n\n initialSyncWithDOM() {\n const {MODAL} = cssClasses;\n const {SCRIM_SELECTOR} = strings;\n\n this.scrim = (this.root.parentNode as Element)\n .querySelector(SCRIM_SELECTOR);\n\n if (this.scrim && this.root.classList.contains(MODAL)) {\n this.handleScrimClick = () =>\n (this.foundation as MDCModalDrawerFoundation).handleScrimClick();\n this.scrim.addEventListener('click', this.handleScrimClick);\n this.focusTrap = util.createFocusTrapInstance(\n this.root as HTMLElement, this.focusTrapFactory);\n }\n\n this.handleKeydown = (evt) => {\n this.foundation.handleKeydown(evt);\n };\n this.handleTransitionEnd = (evt) => {\n this.foundation.handleTransitionEnd(evt);\n };\n this.listen('keydown', this.handleKeydown);\n this.listen('transitionend', this.handleTransitionEnd);\n }\n\n destroy() {\n this.unlisten('keydown', this.handleKeydown);\n this.unlisten('transitionend', this.handleTransitionEnd);\n\n if (this.innerList) {\n this.innerList.destroy();\n }\n\n const {MODAL} = cssClasses;\n if (this.scrim && this.handleScrimClick &&\n this.root.classList.contains(MODAL)) {\n this.scrim.removeEventListener('click', this.handleScrimClick);\n // Ensure drawer is closed to hide scrim and release focus\n this.open = false;\n }\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCDrawerAdapter = {\n addClass: (className) => {\n this.root.classList.add(className);\n },\n removeClass: (className) => {\n this.root.classList.remove(className);\n },\n hasClass: (className) => this.root.classList.contains(className),\n elementHasClass: (element, className) =>\n element.classList.contains(className),\n saveFocus: () => {\n this.previousFocus = document.activeElement;\n },\n restoreFocus: () => {\n const previousFocus = this.previousFocus as HTMLOrSVGElement | null;\n if (previousFocus && previousFocus.focus &&\n this.root.contains(document.activeElement)) {\n previousFocus.focus();\n }\n },\n focusActiveNavigationItem: () => {\n const activeNavItemEl = this.root.querySelector(\n strings.LIST_ITEM_ACTIVATED_SELECTOR);\n if (activeNavItemEl) {\n activeNavItemEl.focus();\n }\n },\n notifyClose: () => {\n this.emit(strings.CLOSE_EVENT, {}, true /* shouldBubble */);\n },\n notifyOpen: () => {\n this.emit(strings.OPEN_EVENT, {}, true /* shouldBubble */);\n },\n trapFocus: () => {\n this.focusTrap!.trapFocus();\n },\n releaseFocus: () => {\n this.focusTrap!.releaseFocus();\n },\n };\n // tslint:enable:object-literal-sort-keys\n\n const {DISMISSIBLE, MODAL} = cssClasses;\n if (this.root.classList.contains(DISMISSIBLE)) {\n return new MDCDismissibleDrawerFoundation(adapter);\n } else if (this.root.classList.contains(MODAL)) {\n return new MDCModalDrawerFoundation(adapter);\n } else {\n throw new Error(\n `MDCDrawer: Failed to instantiate component. Supported variants are ${\n DISMISSIBLE} and ${MODAL}.`);\n }\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n ANIMATE: 'mdc-drawer--animate',\n CLOSING: 'mdc-drawer--closing',\n DISMISSIBLE: 'mdc-drawer--dismissible',\n MODAL: 'mdc-drawer--modal',\n OPEN: 'mdc-drawer--open',\n OPENING: 'mdc-drawer--opening',\n ROOT: 'mdc-drawer',\n};\n\nconst strings = {\n APP_CONTENT_SELECTOR: '.mdc-drawer-app-content',\n CLOSE_EVENT: 'MDCDrawer:closed',\n OPEN_EVENT: 'MDCDrawer:opened',\n SCRIM_SELECTOR: '.mdc-drawer-scrim',\n LIST_SELECTOR: '.mdc-list,.mdc-deprecated-list',\n LIST_ITEM_ACTIVATED_SELECTOR:\n '.mdc-list-item--activated,.mdc-deprecated-list-item--activated',\n};\n\nexport {cssClasses, strings};\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCDrawerAdapter} from '../adapter';\nimport {cssClasses, strings} from '../constants';\n\nexport class MDCDismissibleDrawerFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get defaultAdapter(): MDCDrawerAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n hasClass: () => false,\n elementHasClass: () => false,\n notifyClose: () => undefined,\n notifyOpen: () => undefined,\n saveFocus: () => undefined,\n restoreFocus: () => undefined,\n focusActiveNavigationItem: () => undefined,\n trapFocus: () => undefined,\n releaseFocus: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private animationFrame = 0;\n private animationTimer = 0;\n\n constructor(adapter?: Partial) {\n super({...MDCDismissibleDrawerFoundation.defaultAdapter, ...adapter});\n }\n\n destroy() {\n if (this.animationFrame) {\n cancelAnimationFrame(this.animationFrame);\n }\n if (this.animationTimer) {\n clearTimeout(this.animationTimer);\n }\n }\n\n /**\n * Opens the drawer from the closed state.\n */\n open() {\n if (this.isOpen() || this.isOpening() || this.isClosing()) {\n return;\n }\n\n this.adapter.addClass(cssClasses.OPEN);\n this.adapter.addClass(cssClasses.ANIMATE);\n\n // Wait a frame once display is no longer \"none\", to establish basis for animation\n this.runNextAnimationFrame(() => {\n this.adapter.addClass(cssClasses.OPENING);\n });\n\n this.adapter.saveFocus();\n }\n\n /**\n * Closes the drawer from the open state.\n */\n close() {\n if (!this.isOpen() || this.isOpening() || this.isClosing()) {\n return;\n }\n\n this.adapter.addClass(cssClasses.CLOSING);\n }\n\n /**\n * Returns true if the drawer is in the open position.\n * @return true if drawer is in open state.\n */\n isOpen(): boolean {\n return this.adapter.hasClass(cssClasses.OPEN);\n }\n\n /**\n * Returns true if the drawer is animating open.\n * @return true if drawer is animating open.\n */\n isOpening(): boolean {\n return this.adapter.hasClass(cssClasses.OPENING) ||\n this.adapter.hasClass(cssClasses.ANIMATE);\n }\n\n /**\n * Returns true if the drawer is animating closed.\n * @return true if drawer is animating closed.\n */\n isClosing(): boolean {\n return this.adapter.hasClass(cssClasses.CLOSING);\n }\n\n /**\n * Keydown handler to close drawer when key is escape.\n */\n handleKeydown(evt: KeyboardEvent) {\n const {keyCode, key} = evt;\n const isEscape = key === 'Escape' || keyCode === 27;\n if (isEscape) {\n this.close();\n }\n }\n\n /**\n * Handles the `transitionend` event when the drawer finishes opening/closing.\n */\n handleTransitionEnd(evt: TransitionEvent) {\n const {OPENING, CLOSING, OPEN, ANIMATE, ROOT} = cssClasses;\n\n // In Edge, transitionend on ripple pseudo-elements yields a target without classList, so check for Element first.\n const isRootElement = this.isElement(evt.target) &&\n this.adapter.elementHasClass(evt.target, ROOT);\n if (!isRootElement) {\n return;\n }\n\n if (this.isClosing()) {\n this.adapter.removeClass(OPEN);\n this.closed();\n this.adapter.restoreFocus();\n this.adapter.notifyClose();\n } else {\n this.adapter.focusActiveNavigationItem();\n this.opened();\n this.adapter.notifyOpen();\n }\n\n this.adapter.removeClass(ANIMATE);\n this.adapter.removeClass(OPENING);\n this.adapter.removeClass(CLOSING);\n }\n\n /**\n * Extension point for when drawer finishes open animation.\n */\n protected opened() {} // tslint:disable-line:no-empty\n\n /**\n * Extension point for when drawer finishes close animation.\n */\n protected closed() {} // tslint:disable-line:no-empty\n\n /**\n * Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.\n */\n private runNextAnimationFrame(callback: () => void) {\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(() => {\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(callback, 0);\n });\n }\n\n private isElement(element: unknown): element is Element {\n // In Edge, transitionend on ripple pseudo-elements yields a target without classList.\n return Boolean((element as Element).classList);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDismissibleDrawerFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport * as util from './util';\n\nexport {util};\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './dismissible/foundation';\nexport * from './modal/foundation';\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCDismissibleDrawerFoundation} from '../dismissible/foundation';\n\n/* istanbul ignore next: subclass is not a branch statement */\nexport class MDCModalDrawerFoundation extends MDCDismissibleDrawerFoundation {\n /**\n * Handles click event on scrim.\n */\n handleScrimClick() {\n this.close();\n }\n\n /**\n * Called when drawer finishes open animation.\n */\n protected opened() {\n this.adapter.trapFocus();\n }\n\n /**\n * Called when drawer finishes close animation.\n */\n protected closed() {\n this.adapter.releaseFocus();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCModalDrawerFoundation;\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {FocusOptions, FocusTrap} from '@material/dom/focus-trap';\n\nexport type MDCDrawerFocusTrapFactory = (\n element: HTMLElement,\n options: FocusOptions,\n) => FocusTrap;\n\nexport function createFocusTrapInstance(\n surfaceEl: HTMLElement,\n focusTrapFactory: MDCDrawerFocusTrapFactory,\n): FocusTrap {\n return focusTrapFactory(surfaceEl, {\n // Component handles focusing on active nav item.\n skipInitialFocus: true, \n });\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener} from '@material/base/types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCFloatingLabelAdapter {\n /**\n * Adds a class to the label element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the label element.\n */\n removeClass(className: string): void;\n\n /**\n * Returns the width of the label element.\n */\n getWidth(): number;\n\n /**\n * Registers an event listener on the root element for a given event.\n */\n registerInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener on the root element for a given event.\n */\n deregisterInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {estimateScrollWidth} from '@material/dom/ponyfill';\nimport {MDCFloatingLabelAdapter} from './adapter';\nimport {MDCFloatingLabelFoundation} from './foundation';\n\nexport type MDCFloatingLabelFactory = (el: Element, foundation?: MDCFloatingLabelFoundation) => MDCFloatingLabel;\n\nexport class MDCFloatingLabel extends MDCComponent {\n static attachTo(root: Element): MDCFloatingLabel {\n return new MDCFloatingLabel(root);\n }\n\n /**\n * Styles the label to produce the label shake for errors.\n * @param shouldShake If true, shakes the label by adding a CSS class; otherwise, stops shaking by removing the class.\n */\n shake(shouldShake: boolean) {\n this.foundation.shake(shouldShake);\n }\n\n /**\n * Styles the label to float/dock.\n * @param shouldFloat If true, floats the label by adding a CSS class; otherwise, docks it by removing the class.\n */\n float(shouldFloat: boolean) {\n this.foundation.float(shouldFloat);\n }\n\n /**\n * Styles the label as required.\n * @param isRequired If true, adds an asterisk to the label, indicating that it is required.\n */\n setRequired(isRequired: boolean) {\n this.foundation.setRequired(isRequired);\n }\n\n getWidth(): number {\n return this.foundation.getWidth();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCFloatingLabelAdapter = {\n addClass: (className) => this.root.classList.add(className),\n removeClass: (className) => this.root.classList.remove(className),\n getWidth: () => estimateScrollWidth(this.root),\n registerInteractionHandler: (evtType, handler) =>\n this.listen(evtType, handler),\n deregisterInteractionHandler: (evtType, handler) =>\n this.unlisten(evtType, handler),\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCFloatingLabelFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',\n LABEL_REQUIRED: 'mdc-floating-label--required',\n LABEL_SHAKE: 'mdc-floating-label--shake',\n ROOT: 'mdc-floating-label',\n};\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCFloatingLabelAdapter} from './adapter';\nimport {cssClasses} from './constants';\n\nexport class MDCFloatingLabelFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n /**\n * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCFloatingLabelAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n getWidth: () => 0,\n registerInteractionHandler: () => undefined,\n deregisterInteractionHandler: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private readonly shakeAnimationEndHandler:\n SpecificEventListener<'animationend'>;\n\n constructor(adapter?: Partial) {\n super({...MDCFloatingLabelFoundation.defaultAdapter, ...adapter});\n\n this.shakeAnimationEndHandler = () => {\n this.handleShakeAnimationEnd();\n };\n }\n\n init() {\n this.adapter.registerInteractionHandler(\n 'animationend', this.shakeAnimationEndHandler);\n }\n\n destroy() {\n this.adapter.deregisterInteractionHandler(\n 'animationend', this.shakeAnimationEndHandler);\n }\n\n /**\n * Returns the width of the label element.\n */\n getWidth(): number {\n return this.adapter.getWidth();\n }\n\n /**\n * Styles the label to produce a shake animation to indicate an error.\n * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.\n */\n shake(shouldShake: boolean) {\n const {LABEL_SHAKE} = MDCFloatingLabelFoundation.cssClasses;\n if (shouldShake) {\n this.adapter.addClass(LABEL_SHAKE);\n } else {\n this.adapter.removeClass(LABEL_SHAKE);\n }\n }\n\n /**\n * Styles the label to float or dock.\n * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.\n */\n float(shouldFloat: boolean) {\n const {LABEL_FLOAT_ABOVE, LABEL_SHAKE} = MDCFloatingLabelFoundation.cssClasses;\n if (shouldFloat) {\n this.adapter.addClass(LABEL_FLOAT_ABOVE);\n } else {\n this.adapter.removeClass(LABEL_FLOAT_ABOVE);\n this.adapter.removeClass(LABEL_SHAKE);\n }\n }\n\n /**\n * Styles the label as required.\n * @param isRequired If true, adds an asterisk to the label, indicating that it is required.\n */\n setRequired(isRequired: boolean) {\n const {LABEL_REQUIRED} = MDCFloatingLabelFoundation.cssClasses;\n if (isRequired) {\n this.adapter.addClass(LABEL_REQUIRED);\n } else {\n this.adapter.removeClass(LABEL_REQUIRED);\n }\n }\n\n private handleShakeAnimationEnd() {\n const {LABEL_SHAKE} = MDCFloatingLabelFoundation.cssClasses;\n this.adapter.removeClass(LABEL_SHAKE);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFloatingLabelFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener} from '@material/base/types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCFormFieldAdapter {\n activateInputRipple(): void;\n deactivateInputRipple(): void;\n deregisterInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n registerInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCRipple} from '@material/ripple/component';\nimport {MDCFormFieldAdapter} from './adapter';\nimport {MDCFormFieldFoundation} from './foundation';\n\nexport interface MDCFormFieldInput {\n readonly ripple: MDCRipple | undefined;\n}\n\nexport class MDCFormField extends MDCComponent {\n static attachTo(root: HTMLElement) {\n return new MDCFormField(root);\n }\n\n input?: MDCFormFieldInput;\n\n private labelEl(): Element|null {\n const {LABEL_SELECTOR} = MDCFormFieldFoundation.strings;\n return this.root.querySelector(LABEL_SELECTOR);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCFormFieldAdapter = {\n activateInputRipple: () => {\n if (this.input && this.input.ripple) {\n this.input.ripple.activate();\n }\n },\n deactivateInputRipple: () => {\n if (this.input && this.input.ripple) {\n this.input.ripple.deactivate();\n }\n },\n deregisterInteractionHandler: (evtType, handler) => {\n const labelEl = this.labelEl();\n if (labelEl) {\n (labelEl as HTMLElement).removeEventListener(evtType, handler);\n }\n },\n registerInteractionHandler: (evtType, handler) => {\n const labelEl = this.labelEl();\n if (labelEl) {\n (labelEl as HTMLElement).addEventListener(evtType, handler);\n }\n },\n };\n return new MDCFormFieldFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n ROOT: 'mdc-form-field',\n};\n\nexport const strings = {\n LABEL_SELECTOR: '.mdc-form-field > label',\n};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCFormFieldAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCFormFieldFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get defaultAdapter(): MDCFormFieldAdapter {\n return {\n activateInputRipple: () => undefined,\n deactivateInputRipple: () => undefined,\n deregisterInteractionHandler: () => undefined,\n registerInteractionHandler: () => undefined,\n };\n }\n\n private readonly click: () => void;\n\n constructor(adapter?: Partial) {\n super({...MDCFormFieldFoundation.defaultAdapter, ...adapter});\n\n this.click = () => {\n this.handleClick();\n };\n }\n\n init() {\n this.adapter.registerInteractionHandler('click', this.click);\n }\n\n destroy() {\n this.adapter.deregisterInteractionHandler('click', this.click);\n }\n\n private handleClick() {\n this.adapter.activateInputRipple();\n requestAnimationFrame(() => {\n this.adapter.deactivateInputRipple();\n });\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFormFieldFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCIconButtonToggleEventDetail} from './types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCIconButtonToggleAdapter {\n addClass(className: string): void;\n\n removeClass(className: string): void;\n\n hasClass(className: string): boolean;\n\n /** Returns the given attribute value on the root element. */\n getAttr(attrName: string): string|null;\n\n setAttr(attrName: string, attrValue: string): void;\n\n notifyChange(evtData: MDCIconButtonToggleEventDetail): void;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCRipple} from '@material/ripple/component';\nimport {MDCIconButtonToggleAdapter} from './adapter';\nimport {MDCIconButtonToggleFoundation} from './foundation';\nimport {MDCIconButtonToggleEventDetail} from './types';\n\nconst {strings} = MDCIconButtonToggleFoundation;\n\nexport class MDCIconButtonToggle extends MDCComponent {\n static attachTo(root: HTMLElement) {\n return new MDCIconButtonToggle(root);\n }\n\n private readonly rippleComponent: MDCRipple = this.createRipple();\n private handleClick!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n\n initialSyncWithDOM() {\n this.handleClick = () => {\n this.foundation.handleClick();\n };\n this.listen('click', this.handleClick);\n }\n\n destroy() {\n this.unlisten('click', this.handleClick);\n this.ripple.destroy();\n super.destroy();\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCIconButtonToggleAdapter = {\n addClass: (className) => this.root.classList.add(className),\n hasClass: (className) => this.root.classList.contains(className),\n notifyChange: (evtData) => {\n this.emit(\n strings.CHANGE_EVENT, evtData);\n },\n removeClass: (className) => this.root.classList.remove(className),\n getAttr: (attrName) => this.root.getAttribute(attrName),\n setAttr: (attrName, attrValue) =>\n this.root.setAttribute(attrName, attrValue),\n };\n return new MDCIconButtonToggleFoundation(adapter);\n }\n\n get ripple(): MDCRipple {\n return this.rippleComponent;\n }\n\n get on(): boolean {\n return this.foundation.isOn();\n }\n\n set on(isOn: boolean) {\n this.foundation.toggle(isOn);\n }\n\n private createRipple(): MDCRipple {\n const ripple = new MDCRipple(this.root);\n ripple.unbounded = true;\n return ripple;\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n ICON_BUTTON_ON: 'mdc-icon-button--on',\n ROOT: 'mdc-icon-button',\n};\n\nexport const strings = {\n ARIA_LABEL: 'aria-label',\n ARIA_PRESSED: 'aria-pressed',\n DATA_ARIA_LABEL_OFF: 'data-aria-label-off',\n DATA_ARIA_LABEL_ON: 'data-aria-label-on',\n CHANGE_EVENT: 'MDCIconButtonToggle:change',\n};\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCIconButtonToggleAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCIconButtonToggleFoundation extends MDCFoundation {\n /**\n * Whether the icon button has an aria label that changes depending on\n * toggled state.\n */\n private hasToggledAriaLabel: boolean = false;\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get defaultAdapter(): MDCIconButtonToggleAdapter {\n return {\n addClass: () => undefined,\n hasClass: () => false,\n notifyChange: () => undefined,\n removeClass: () => undefined,\n getAttr: () => null,\n setAttr: () => undefined,\n };\n }\n\n constructor(adapter?: Partial) {\n super({...MDCIconButtonToggleFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n const ariaLabelOn = this.adapter.getAttr(strings.DATA_ARIA_LABEL_ON);\n const ariaLabelOff = this.adapter.getAttr(strings.DATA_ARIA_LABEL_OFF);\n if (ariaLabelOn && ariaLabelOff) {\n if (this.adapter.getAttr(strings.ARIA_PRESSED) !== null) {\n throw new Error(\n 'MDCIconButtonToggleFoundation: Button should not set ' +\n '`aria-pressed` if it has a toggled aria label.');\n }\n\n this.hasToggledAriaLabel = true;\n } else {\n this.adapter.setAttr(strings.ARIA_PRESSED, String(this.isOn()));\n }\n }\n\n handleClick() {\n this.toggle();\n this.adapter.notifyChange({isOn: this.isOn()});\n }\n\n isOn(): boolean {\n return this.adapter.hasClass(cssClasses.ICON_BUTTON_ON);\n }\n\n toggle(isOn: boolean = !this.isOn()) {\n // Toggle UI based on state.\n if (isOn) {\n this.adapter.addClass(cssClasses.ICON_BUTTON_ON);\n } else {\n this.adapter.removeClass(cssClasses.ICON_BUTTON_ON);\n }\n\n // Toggle aria attributes based on state.\n if (this.hasToggledAriaLabel) {\n const ariaLabel = isOn ?\n this.adapter.getAttr(strings.DATA_ARIA_LABEL_ON) :\n this.adapter.getAttr(strings.DATA_ARIA_LABEL_OFF);\n this.adapter.setAttr(strings.ARIA_LABEL, ariaLabel || '');\n } else {\n this.adapter.setAttr(strings.ARIA_PRESSED, `${isOn}`);\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCIconButtonToggleFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport interface MDCIconButtonToggleEventDetail {\n isOn: boolean;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener} from '@material/base/types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCLineRippleAdapter {\n /**\n * Adds a class to the line ripple element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the line ripple element.\n */\n removeClass(className: string): void;\n\n hasClass(className: string): boolean;\n\n /**\n * Sets the style property with propertyName to value on the root element.\n */\n setStyle(propertyName: string, value: string): void;\n\n /**\n * Registers an event listener on the line ripple element for a given event.\n */\n registerEventHandler(evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener on the line ripple element for a given event.\n */\n deregisterEventHandler(evtType: K, handler: SpecificEventListener): void;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCLineRippleAdapter} from './adapter';\nimport {MDCLineRippleFoundation} from './foundation';\n\nexport type MDCLineRippleFactory = (el: Element, foundation?: MDCLineRippleFoundation) => MDCLineRipple;\n\nexport class MDCLineRipple extends MDCComponent {\n static attachTo(root: Element): MDCLineRipple {\n return new MDCLineRipple(root);\n }\n\n /**\n * Activates the line ripple\n */\n activate() {\n this.foundation.activate();\n }\n\n /**\n * Deactivates the line ripple\n */\n deactivate() {\n this.foundation.deactivate();\n }\n\n /**\n * Sets the transform origin given a user's click location.\n * The `rippleCenter` is the x-coordinate of the middle of the ripple.\n */\n setRippleCenter(xCoordinate: number) {\n this.foundation.setRippleCenter(xCoordinate);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCLineRippleAdapter = {\n addClass: (className) => this.root.classList.add(className),\n removeClass: (className) => this.root.classList.remove(className),\n hasClass: (className) => this.root.classList.contains(className),\n setStyle: (propertyName, value) => (this.root as HTMLElement).style.setProperty(propertyName, value),\n registerEventHandler: (evtType, handler) => this.listen(evtType, handler),\n deregisterEventHandler: (evtType, handler) => this.unlisten(evtType, handler),\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCLineRippleFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',\n LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',\n};\n\nexport {cssClasses};\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCLineRippleAdapter} from './adapter';\nimport {cssClasses} from './constants';\n\nexport class MDCLineRippleFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n /**\n * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCLineRippleAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n hasClass: () => false,\n setStyle: () => undefined,\n registerEventHandler: () => undefined,\n deregisterEventHandler: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private readonly transitionEndHandler: SpecificEventListener<'transitionend'>;\n\n constructor(adapter?: Partial) {\n super({...MDCLineRippleFoundation.defaultAdapter, ...adapter});\n\n this.transitionEndHandler = (evt) => {\n this.handleTransitionEnd(evt);\n };\n }\n\n init() {\n this.adapter.registerEventHandler(\n 'transitionend', this.transitionEndHandler);\n }\n\n destroy() {\n this.adapter.deregisterEventHandler(\n 'transitionend', this.transitionEndHandler);\n }\n\n activate() {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n this.adapter.addClass(cssClasses.LINE_RIPPLE_ACTIVE);\n }\n\n setRippleCenter(xCoordinate: number) {\n this.adapter.setStyle('transform-origin', `${xCoordinate}px center`);\n }\n\n deactivate() {\n this.adapter.addClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n }\n\n handleTransitionEnd(evt: TransitionEvent) {\n // Wait for the line ripple to be either transparent or opaque\n // before emitting the animation end event\n const isDeactivating =\n this.adapter.hasClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n\n if (evt.propertyName === 'opacity') {\n if (isDeactivating) {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_ACTIVE);\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n }\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCLineRippleFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\n\nimport {MDCResizeObserver, MDCResizeObserverCallback} from './types';\n\nexport interface MDCLinearProgressAdapter {\n addClass(className: string): void;\n /**\n * If available, creates a `ResizeObserver` object, invokes the `#observe`\n * method on the root element. This is used for an optional performance gains\n * for the indeterminate animation on modern browsers.\n *\n * @param callback The callback to apply to the constructor of the\n * `ResizeObserver`\n * @return Returns a `ResizeObserver` that has had `observe` called on the\n * root element with the given callback. `null` if `ResizeObserver` is not\n * implemented or polyfilled.\n */\n attachResizeObserver(callback: MDCResizeObserverCallback): MDCResizeObserver\n |null;\n forceLayout(): void;\n setBufferBarStyle(styleProperty: string, value: string): void;\n setPrimaryBarStyle(styleProperty: string, value: string): void;\n /**\n * Sets the inline style on the root element.\n * @param styleProperty The style property to set.\n * @param value The value the style property should be set to.\n */\n setStyle(styleProperty: string, value: string): void;\n /**\n * @return The width of the root element.\n */\n getWidth(): number;\n hasClass(className: string): boolean;\n removeClass(className: string): void;\n removeAttribute(name: string): void;\n setAttribute(name: string, value: string): void;\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCProgressIndicator} from '@material/progress-indicator/component';\nimport {MDCLinearProgressAdapter} from './adapter';\nimport {MDCLinearProgressFoundation} from './foundation';\nimport {WithMDCResizeObserver} from './types';\n\nexport class MDCLinearProgress extends\n MDCComponent implements MDCProgressIndicator {\n static attachTo(root: Element) {\n return new MDCLinearProgress(root);\n }\n\n set determinate(value: boolean) {\n this.foundation.setDeterminate(value);\n }\n\n set progress(value: number) {\n this.foundation.setProgress(value);\n }\n\n set buffer(value: number) {\n this.foundation.setBuffer(value);\n }\n\n open() {\n this.foundation.open();\n }\n\n close() {\n this.foundation.close();\n }\n\n initialSyncWithDOM() {\n this.root.addEventListener('transitionend', () => {\n this.foundation.handleTransitionEnd();\n });\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCLinearProgressAdapter = {\n addClass: (className: string) => {\n this.root.classList.add(className);\n },\n forceLayout: () => {\n this.root.getBoundingClientRect();\n },\n setBufferBarStyle: (styleProperty: string, value: string) => {\n const bufferBar = this.root.querySelector(\n MDCLinearProgressFoundation.strings.BUFFER_BAR_SELECTOR);\n if (bufferBar) {\n bufferBar.style.setProperty(styleProperty, value);\n }\n },\n setPrimaryBarStyle: (styleProperty: string, value: string) => {\n const primaryBar = this.root.querySelector(\n MDCLinearProgressFoundation.strings.PRIMARY_BAR_SELECTOR);\n if (primaryBar) {\n primaryBar.style.setProperty(styleProperty, value);\n }\n },\n hasClass: (className: string) => this.root.classList.contains(className),\n removeAttribute: (attributeName: string) => {\n this.root.removeAttribute(attributeName);\n },\n removeClass: (className: string) => {\n this.root.classList.remove(className);\n },\n setAttribute: (attributeName: string, value: string) => {\n this.root.setAttribute(attributeName, value);\n },\n setStyle: (name: string, value: string) => {\n (this.root as HTMLElement).style.setProperty(name, value);\n },\n attachResizeObserver: (callback) => {\n const RO = (window as unknown as WithMDCResizeObserver).ResizeObserver;\n if (RO) {\n const ro = new RO(callback);\n ro.observe(this.root);\n return ro;\n }\n\n return null;\n },\n getWidth: () => (this.root as HTMLElement).offsetWidth,\n };\n return new MDCLinearProgressFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n CLOSED_CLASS: 'mdc-linear-progress--closed',\n CLOSED_ANIMATION_OFF_CLASS: 'mdc-linear-progress--closed-animation-off',\n INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate',\n REVERSED_CLASS: 'mdc-linear-progress--reversed',\n ANIMATION_READY_CLASS: 'mdc-linear-progress--animation-ready',\n};\n\nexport const strings = {\n ARIA_HIDDEN: 'aria-hidden',\n ARIA_VALUEMAX: 'aria-valuemax',\n ARIA_VALUEMIN: 'aria-valuemin',\n ARIA_VALUENOW: 'aria-valuenow',\n BUFFER_BAR_SELECTOR: '.mdc-linear-progress__buffer-bar',\n FLEX_BASIS: 'flex-basis',\n PRIMARY_BAR_SELECTOR: '.mdc-linear-progress__primary-bar',\n};\n\n// these are percentages pulled from keyframes.scss\nexport const animationDimensionPercentages = {\n PRIMARY_HALF: .8367142,\n PRIMARY_FULL: 2.00611057,\n SECONDARY_QUARTER: .37651913,\n SECONDARY_HALF: .84386165,\n SECONDARY_FULL: 1.60277782,\n};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {getCorrectPropertyName} from '@material/animation/util';\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCProgressIndicatorFoundation} from '@material/progress-indicator/foundation';\n\nimport {MDCLinearProgressAdapter} from './adapter';\nimport {animationDimensionPercentages as percents, cssClasses, strings} from './constants';\nimport {MDCResizeObserver} from './types';\n\nexport class MDCLinearProgressFoundation extends\n MDCFoundation implements\n MDCProgressIndicatorFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get defaultAdapter(): MDCLinearProgressAdapter {\n return {\n addClass: () => undefined,\n attachResizeObserver: () => null,\n forceLayout: () => undefined,\n getWidth: () => 0,\n hasClass: () => false,\n setBufferBarStyle: () => null,\n setPrimaryBarStyle: () => null,\n setStyle: () => undefined,\n removeAttribute: () => undefined,\n removeClass: () => undefined,\n setAttribute: () => undefined,\n };\n }\n\n private determinate!: boolean;\n private progress!: number;\n private buffer!: number;\n private observer: MDCResizeObserver|null = null;\n\n constructor(adapter?: Partial) {\n super({...MDCLinearProgressFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n this.determinate = !this.adapter.hasClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.addClass(cssClasses.ANIMATION_READY_CLASS);\n this.progress = 0;\n this.buffer = 1;\n\n this.observer = this.adapter.attachResizeObserver((entries) => {\n if (this.determinate) {\n return;\n }\n\n for (const entry of entries) {\n if (entry.contentRect) {\n this.calculateAndSetDimensions(entry.contentRect.width);\n }\n }\n });\n\n if (!this.determinate && this.observer) {\n this.calculateAndSetDimensions(this.adapter.getWidth());\n }\n }\n\n setDeterminate(isDeterminate: boolean) {\n this.determinate = isDeterminate;\n\n if (this.determinate) {\n this.adapter.removeClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.setAttribute(\n strings.ARIA_VALUENOW, this.progress.toString());\n this.adapter.setAttribute(strings.ARIA_VALUEMAX, '1');\n this.adapter.setAttribute(strings.ARIA_VALUEMIN, '0');\n this.setPrimaryBarProgress(this.progress);\n this.setBufferBarProgress(this.buffer);\n\n return;\n }\n\n if (this.observer) {\n this.calculateAndSetDimensions(this.adapter.getWidth());\n }\n\n this.adapter.addClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.removeAttribute(strings.ARIA_VALUENOW);\n this.adapter.removeAttribute(strings.ARIA_VALUEMAX);\n this.adapter.removeAttribute(strings.ARIA_VALUEMIN);\n this.setPrimaryBarProgress(1);\n this.setBufferBarProgress(1);\n }\n\n isDeterminate() {\n return this.determinate;\n }\n\n setProgress(value: number) {\n this.progress = value;\n if (this.determinate) {\n this.setPrimaryBarProgress(value);\n this.adapter.setAttribute(strings.ARIA_VALUENOW, value.toString());\n }\n }\n\n getProgress() {\n return this.progress;\n }\n\n setBuffer(value: number) {\n this.buffer = value;\n if (this.determinate) {\n this.setBufferBarProgress(value);\n }\n }\n\n getBuffer() {\n return this.buffer;\n }\n\n open() {\n this.adapter.removeClass(cssClasses.CLOSED_CLASS);\n this.adapter.removeClass(cssClasses.CLOSED_ANIMATION_OFF_CLASS);\n this.adapter.removeAttribute(strings.ARIA_HIDDEN);\n }\n\n close() {\n this.adapter.addClass(cssClasses.CLOSED_CLASS);\n this.adapter.setAttribute(strings.ARIA_HIDDEN, 'true');\n }\n\n isClosed() {\n return this.adapter.hasClass(cssClasses.CLOSED_CLASS);\n }\n\n /**\n * Handles the transitionend event emitted after `close()` is called and the\n * opacity fades out. This is so that animations are removed only after the\n * progress indicator is completely hidden.\n */\n handleTransitionEnd() {\n if (this.adapter.hasClass(cssClasses.CLOSED_CLASS)) {\n this.adapter.addClass(cssClasses.CLOSED_ANIMATION_OFF_CLASS);\n }\n }\n\n destroy() {\n super.destroy();\n\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n restartAnimation() {\n this.adapter.removeClass(cssClasses.ANIMATION_READY_CLASS);\n this.adapter.forceLayout();\n this.adapter.addClass(cssClasses.ANIMATION_READY_CLASS);\n }\n\n private setPrimaryBarProgress(progressValue: number) {\n const value = `scaleX(${progressValue})`;\n\n // Accessing `window` without a `typeof` check will throw on Node\n // environments.\n const transformProp = typeof window !== 'undefined' ?\n getCorrectPropertyName(window, 'transform') :\n 'transform';\n this.adapter.setPrimaryBarStyle(transformProp, value);\n }\n\n private setBufferBarProgress(progressValue: number) {\n const value = `${progressValue * 100}%`;\n this.adapter.setBufferBarStyle(strings.FLEX_BASIS, value);\n }\n\n private calculateAndSetDimensions(width: number) {\n const primaryHalf = width * percents.PRIMARY_HALF;\n const primaryFull = width * percents.PRIMARY_FULL;\n const secondaryQuarter = width * percents.SECONDARY_QUARTER;\n const secondaryHalf = width * percents.SECONDARY_HALF;\n const secondaryFull = width * percents.SECONDARY_FULL;\n\n this.adapter.setStyle(\n '--mdc-linear-progress-primary-half', `${primaryHalf}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-primary-half-neg', `${- primaryHalf}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-primary-full', `${primaryFull}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-primary-full-neg', `${- primaryFull}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-quarter', `${secondaryQuarter}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-quarter-neg',\n `${- secondaryQuarter}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-half', `${secondaryHalf}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-half-neg', `${- secondaryHalf}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-full', `${secondaryFull}px`);\n this.adapter.setStyle(\n '--mdc-linear-progress-secondary-full-neg', `${- secondaryFull}px`);\n\n // need to restart animation for custom props to apply to keyframes\n this.restartAnimation();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCLinearProgressFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\n","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Opt-in resize observer types\n\nexport interface MDCResizeObserverEntry {\n contentRect: DOMRectReadOnly;\n}\n\nexport interface MDCResizeObserver {\n new(callback: MDCResizeObserverCallback): MDCResizeObserver;\n disconnect(): void;\n observe(target: Element): void;\n}\n\nexport interface WithMDCResizeObserver {\n ResizeObserver: MDCResizeObserver;\n}\n\nexport type MDCResizeObserverCallback =\n (entries: MDCResizeObserverEntry[], observer: MDCResizeObserver) => void;\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCListAdapter {\n /**\n * Returns the attribute value of list item at given `index`.\n */\n getAttributeForElementIndex(index: number, attr: string): string | null;\n\n getListItemCount(): number;\n\n getFocusedElementIndex(): number;\n\n setAttributeForElementIndex(index: number, attribute: string, value: string): void;\n\n addClassForElementIndex(index: number, className: string): void;\n\n removeClassForElementIndex(index: number, className: string): void;\n\n /**\n * Focuses list item at the index specified.\n */\n focusItemAtIndex(index: number): void;\n\n /**\n * Sets the tabindex to the value specified for all button/a element children of\n * the list item at the index specified.\n */\n setTabIndexForListItemChildren(listItemIndex: number, tabIndexValue: string): void;\n\n /**\n * @return true if radio button is present at given list item index.\n */\n hasRadioAtIndex(index: number): boolean;\n\n /**\n * @return true if checkbox is present at given list item index.\n */\n hasCheckboxAtIndex(index: number): boolean;\n\n /**\n * @return true if checkbox inside a list item is checked.\n */\n isCheckboxCheckedAtIndex(index: number): boolean;\n\n /**\n * @return true if root element is focused.\n */\n isRootFocused(): boolean;\n\n /**\n * @param index list item index.\n * @param className the name of the class whose presence is to be checked.\n * @return true if list item at `index` has class `className`.\n */\n listItemAtIndexHasClass(index: number, className: string): boolean;\n\n /**\n * Sets the checked status of checkbox or radio at given list item index.\n */\n setCheckedCheckboxOrRadioAtIndex(index: number, isChecked: boolean): void;\n\n /**\n * Notifies user action on list item.\n */\n notifyAction(index: number): void;\n\n /**\n * @return true when the current focused element is inside list root.\n */\n isFocusInsideList(): boolean;\n\n /**\n * @return the primary text content of the list item at index.\n */\n getPrimaryTextAtIndex(index: number): string;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {closest, matches} from '@material/dom/ponyfill';\nimport {MDCListAdapter} from './adapter';\nimport {cssClasses, deprecatedClassNameMap, evolutionAttribute, evolutionClassNameMap, numbers, strings} from './constants';\nimport {MDCListFoundation} from './foundation';\nimport {MDCListActionEventDetail, MDCListIndex} from './types';\n\nexport type MDCListFactory = (el: Element, foundation?: MDCListFoundation) =>\n MDCList;\n\nexport class MDCList extends MDCComponent {\n set vertical(value: boolean) {\n this.foundation.setVerticalOrientation(value);\n }\n\n get listElements(): Element[] {\n return Array.from(this.root.querySelectorAll(\n `.${this.classNameMap[cssClasses.LIST_ITEM_CLASS]}`));\n }\n\n set wrapFocus(value: boolean) {\n this.foundation.setWrapFocus(value);\n }\n\n /**\n * @return Whether typeahead is currently matching a user-specified prefix.\n */\n get typeaheadInProgress(): boolean {\n return this.foundation.isTypeaheadInProgress();\n }\n\n /**\n * Sets whether typeahead functionality is enabled on the list.\n * @param hasTypeahead Whether typeahead is enabled.\n */\n set hasTypeahead(hasTypeahead: boolean) {\n this.foundation.setHasTypeahead(hasTypeahead);\n }\n\n set singleSelection(isSingleSelectionList: boolean) {\n this.foundation.setSingleSelection(isSingleSelectionList);\n }\n\n get selectedIndex(): MDCListIndex {\n return this.foundation.getSelectedIndex();\n }\n\n set selectedIndex(index: MDCListIndex) {\n this.foundation.setSelectedIndex(index);\n }\n\n static attachTo(root: Element) {\n return new MDCList(root);\n }\n\n // The follow are assigned in initialSyncWithDOM().\n private handleKeydown!: SpecificEventListener<'keydown'>;\n private handleClick!: SpecificEventListener<'click'>;\n private focusInEventListener!: SpecificEventListener<'focus'>;\n private focusOutEventListener!: SpecificEventListener<'focus'>;\n\n // This mapping provides a layer of indirection from legacy classes to\n // evolution classes, since there are some inconsistencies between the\n // two.\n // TODO(b/176814973): remove this map when evolution is launched.\n private classNameMap!: {[className: string]: string};\n private isEvolutionEnabled!: boolean;\n private isInteractive!: boolean;\n\n initialSyncWithDOM() {\n this.isEvolutionEnabled =\n evolutionAttribute in (this.root as HTMLElement).dataset;\n\n if (this.isEvolutionEnabled) {\n this.classNameMap = evolutionClassNameMap;\n } else if (matches(this.root, strings.DEPRECATED_SELECTOR)) {\n this.classNameMap = deprecatedClassNameMap;\n } else {\n this.classNameMap =\n Object.values(cssClasses)\n .reduce((obj: {[className: string]: string}, className) => {\n obj[className] = className;\n return obj;\n }, {});\n }\n\n this.handleClick = this.handleClickEvent.bind(this);\n this.handleKeydown = this.handleKeydownEvent.bind(this);\n this.focusInEventListener = this.handleFocusInEvent.bind(this);\n this.focusOutEventListener = this.handleFocusOutEvent.bind(this);\n this.listen('keydown', this.handleKeydown);\n this.listen('click', this.handleClick);\n this.listen('focusin', this.focusInEventListener);\n this.listen('focusout', this.focusOutEventListener);\n this.layout();\n this.initializeListType();\n this.ensureFocusable();\n }\n\n destroy() {\n this.unlisten('keydown', this.handleKeydown);\n this.unlisten('click', this.handleClick);\n this.unlisten('focusin', this.focusInEventListener);\n this.unlisten('focusout', this.focusOutEventListener);\n }\n\n layout() {\n const direction = this.root.getAttribute(strings.ARIA_ORIENTATION);\n this.vertical = direction !== strings.ARIA_ORIENTATION_HORIZONTAL;\n\n const itemSelector =\n `.${this.classNameMap[cssClasses.LIST_ITEM_CLASS]}:not([tabindex])`;\n const childSelector = strings.FOCUSABLE_CHILD_ELEMENTS;\n\n // List items need to have at least tabindex=-1 to be focusable.\n const itemEls = this.root.querySelectorAll(itemSelector);\n if (itemEls.length) {\n Array.prototype.forEach.call(itemEls, (el: Element) => {\n el.setAttribute('tabindex', '-1');\n });\n }\n\n // Child button/a elements are not tabbable until the list item is focused.\n const focusableChildEls = this.root.querySelectorAll(childSelector);\n if (focusableChildEls.length) {\n Array.prototype.forEach.call(focusableChildEls, (el: Element) => {\n el.setAttribute('tabindex', '-1');\n });\n }\n\n if (this.isEvolutionEnabled) {\n this.foundation.setUseSelectedAttribute(true);\n }\n this.foundation.layout();\n }\n\n /**\n * Extracts the primary text from a list item.\n * @param item The list item element.\n * @return The primary text in the element.\n */\n getPrimaryText(item: Element): string {\n const primaryText = item.querySelector(\n `.${this.classNameMap[cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS]}`);\n if (this.isEvolutionEnabled || primaryText) {\n return primaryText?.textContent ?? '';\n }\n\n const singleLineText = item.querySelector(\n `.${this.classNameMap[cssClasses.LIST_ITEM_TEXT_CLASS]}`);\n return (singleLineText && singleLineText.textContent) || '';\n }\n\n /**\n * Initialize selectedIndex value based on pre-selected list items.\n */\n initializeListType() {\n this.isInteractive =\n matches(this.root, strings.ARIA_INTERACTIVE_ROLES_SELECTOR);\n\n if (this.isEvolutionEnabled && this.isInteractive) {\n const selection = Array.from(\n this.root.querySelectorAll(strings.SELECTED_ITEM_SELECTOR),\n (listItem: Element) => this.listElements.indexOf(listItem));\n\n if (matches(this.root, strings.ARIA_MULTI_SELECTABLE_SELECTOR)) {\n this.selectedIndex = selection;\n } else if (selection.length > 0) {\n this.selectedIndex = selection[0];\n }\n return;\n }\n\n const checkboxListItems =\n this.root.querySelectorAll(strings.ARIA_ROLE_CHECKBOX_SELECTOR);\n const radioSelectedListItem =\n this.root.querySelector(strings.ARIA_CHECKED_RADIO_SELECTOR);\n\n if (checkboxListItems.length) {\n const preselectedItems =\n this.root.querySelectorAll(strings.ARIA_CHECKED_CHECKBOX_SELECTOR);\n this.selectedIndex = Array.from(\n preselectedItems,\n (listItem: Element) => this.listElements.indexOf(listItem));\n } else if (radioSelectedListItem) {\n this.selectedIndex = this.listElements.indexOf(radioSelectedListItem);\n }\n }\n\n /**\n * Updates the list item at itemIndex to the desired isEnabled state.\n * @param itemIndex Index of the list item\n * @param isEnabled Sets the list item to enabled or disabled.\n */\n setEnabled(itemIndex: number, isEnabled: boolean) {\n this.foundation.setEnabled(itemIndex, isEnabled);\n }\n\n /**\n * Given the next desired character from the user, adds it to the typeahead\n * buffer. Then, attempts to find the next option matching the buffer. Wraps\n * around if at the end of options.\n *\n * @param nextChar The next character to add to the prefix buffer.\n * @param startingIndex The index from which to start matching. Defaults to\n * the currently focused index.\n * @return The index of the matched item.\n */\n typeaheadMatchItem(nextChar: string, startingIndex?: number): number {\n return this.foundation.typeaheadMatchItem(\n nextChar, startingIndex, /** skipFocus */ true);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take\n // a Partial. To ensure we don't accidentally omit any\n // methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCListAdapter = {\n addClassForElementIndex: (index, className) => {\n const element = this.listElements[index];\n if (element) {\n element.classList.add(this.classNameMap[className]);\n }\n },\n focusItemAtIndex: (index) => {\n const element = this.listElements[index] as HTMLElement | undefined;\n if (element) {\n element.focus();\n }\n },\n getAttributeForElementIndex: (index, attr) =>\n this.listElements[index].getAttribute(attr),\n getFocusedElementIndex: () =>\n this.listElements.indexOf(document.activeElement!),\n getListItemCount: () => this.listElements.length,\n getPrimaryTextAtIndex: (index) =>\n this.getPrimaryText(this.listElements[index]),\n hasCheckboxAtIndex: (index) => {\n const listItem = this.listElements[index];\n return !!listItem.querySelector(strings.CHECKBOX_SELECTOR);\n },\n hasRadioAtIndex: (index) => {\n const listItem = this.listElements[index];\n return !!listItem.querySelector(strings.RADIO_SELECTOR);\n },\n isCheckboxCheckedAtIndex: (index) => {\n const listItem = this.listElements[index];\n const toggleEl =\n listItem.querySelector(strings.CHECKBOX_SELECTOR);\n return toggleEl!.checked;\n },\n isFocusInsideList: () => {\n return this.root !== document.activeElement &&\n this.root.contains(document.activeElement);\n },\n isRootFocused: () => document.activeElement === this.root,\n listItemAtIndexHasClass: (index, className) =>\n this.listElements[index].classList.contains(\n this.classNameMap[className]),\n notifyAction: (index) => {\n this.emit(\n strings.ACTION_EVENT, {index}, /** shouldBubble */ true);\n },\n removeClassForElementIndex: (index, className) => {\n const element = this.listElements[index];\n if (element) {\n element.classList.remove(this.classNameMap[className]);\n }\n },\n setAttributeForElementIndex: (index, attr, value) => {\n const element = this.listElements[index];\n if (element) {\n element.setAttribute(attr, value);\n }\n },\n setCheckedCheckboxOrRadioAtIndex: (index, isChecked) => {\n const listItem = this.listElements[index];\n const toggleEl = listItem.querySelector(\n strings.CHECKBOX_RADIO_SELECTOR);\n toggleEl!.checked = isChecked;\n\n const event = document.createEvent('Event');\n event.initEvent('change', true, true);\n toggleEl!.dispatchEvent(event);\n },\n setTabIndexForListItemChildren: (listItemIndex, tabIndexValue) => {\n const element = this.listElements[listItemIndex];\n const selector = strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;\n Array.prototype.forEach.call(\n element.querySelectorAll(selector), (el: Element) => {\n el.setAttribute('tabindex', tabIndexValue);\n });\n },\n };\n return new MDCListFoundation(adapter);\n }\n\n /**\n * Ensures that at least one item is focusable if the list is interactive and\n * doesn't specify a suitable tabindex.\n */\n private ensureFocusable() {\n if (this.isEvolutionEnabled && this.isInteractive) {\n if (!this.root.querySelector(`.${\n this.classNameMap[cssClasses.LIST_ITEM_CLASS]}[tabindex=\"0\"]`)) {\n const index = this.initialFocusIndex();\n if (index !== -1) {\n (this.listElements[index] as HTMLElement).tabIndex = 0;\n }\n }\n }\n }\n\n private initialFocusIndex(): number {\n if (this.selectedIndex instanceof Array && this.selectedIndex.length > 0) {\n return this.selectedIndex[0];\n }\n if (typeof this.selectedIndex === 'number' &&\n this.selectedIndex !== numbers.UNSET_INDEX) {\n return this.selectedIndex;\n }\n const el = this.root.querySelector(\n `.${this.classNameMap[cssClasses.LIST_ITEM_CLASS]}:not(.${\n this.classNameMap[cssClasses.LIST_ITEM_DISABLED_CLASS]})`);\n if (el === null) {\n return -1;\n }\n return this.getListItemIndex(el);\n }\n\n /**\n * Used to figure out which list item this event is targetting. Or returns -1\n * if there is no list item\n */\n private getListItemIndex(el: Element) {\n const nearestParent = closest(\n el,\n `.${this.classNameMap[cssClasses.LIST_ITEM_CLASS]}, .${\n this.classNameMap[cssClasses.ROOT]}`);\n\n // Get the index of the element if it is a list item.\n if (nearestParent &&\n matches(\n nearestParent,\n `.${this.classNameMap[cssClasses.LIST_ITEM_CLASS]}`)) {\n return this.listElements.indexOf(nearestParent);\n }\n\n return -1;\n }\n\n /**\n * Used to figure out which element was clicked before sending the event to\n * the foundation.\n */\n private handleFocusInEvent(evt: FocusEvent) {\n const index = this.getListItemIndex(evt.target as Element);\n this.foundation.handleFocusIn(index);\n }\n\n /**\n * Used to figure out which element was clicked before sending the event to\n * the foundation.\n */\n private handleFocusOutEvent(evt: FocusEvent) {\n const index = this.getListItemIndex(evt.target as Element);\n this.foundation.handleFocusOut(index);\n }\n\n /**\n * Used to figure out which element was focused when keydown event occurred\n * before sending the event to the foundation.\n */\n private handleKeydownEvent(evt: KeyboardEvent) {\n const index = this.getListItemIndex(evt.target as Element);\n const target = evt.target as Element;\n this.foundation.handleKeydown(\n evt,\n target.classList.contains(\n this.classNameMap[cssClasses.LIST_ITEM_CLASS]),\n index);\n }\n\n /**\n * Used to figure out which element was clicked before sending the event to\n * the foundation.\n */\n private handleClickEvent(evt: MouseEvent) {\n const index = this.getListItemIndex(evt.target as Element);\n const target = evt.target as Element;\n // Toggle the checkbox only if it's not the target of the event, or the\n // checkbox will have 2 change events.\n const toggleCheckbox = !matches(target, strings.CHECKBOX_RADIO_SELECTOR);\n this.foundation.handleClick(index, toggleCheckbox);\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated',\n LIST_ITEM_CLASS: 'mdc-list-item',\n LIST_ITEM_DISABLED_CLASS: 'mdc-list-item--disabled',\n LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected',\n LIST_ITEM_TEXT_CLASS: 'mdc-list-item__text',\n LIST_ITEM_PRIMARY_TEXT_CLASS: 'mdc-list-item__primary-text',\n ROOT: 'mdc-list',\n};\n\nconst evolutionClassNameMap = {\n [`${cssClasses.LIST_ITEM_ACTIVATED_CLASS}`]: 'mdc-list-item--activated',\n [`${cssClasses.LIST_ITEM_CLASS}`]: 'mdc-list-item',\n [`${cssClasses.LIST_ITEM_DISABLED_CLASS}`]: 'mdc-list-item--disabled',\n [`${cssClasses.LIST_ITEM_SELECTED_CLASS}`]: 'mdc-list-item--selected',\n [`${cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS}`]: 'mdc-list-item__primary-text',\n [`${cssClasses.ROOT}`]: 'mdc-list',\n};\n\nconst deprecatedClassNameMap = {\n [`${cssClasses.LIST_ITEM_ACTIVATED_CLASS}`]:\n 'mdc-deprecated-list-item--activated',\n [`${cssClasses.LIST_ITEM_CLASS}`]: 'mdc-deprecated-list-item',\n [`${cssClasses.LIST_ITEM_DISABLED_CLASS}`]:\n 'mdc-deprecated-list-item--disabled',\n [`${cssClasses.LIST_ITEM_SELECTED_CLASS}`]:\n 'mdc-deprecated-list-item--selected',\n [`${cssClasses.LIST_ITEM_TEXT_CLASS}`]: 'mdc-deprecated-list-item__text',\n [`${cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS}`]:\n 'mdc-deprecated-list-item__primary-text',\n [`${cssClasses.ROOT}`]: 'mdc-deprecated-list',\n};\n\nconst strings = {\n ACTION_EVENT: 'MDCList:action',\n ARIA_CHECKED: 'aria-checked',\n ARIA_CHECKED_CHECKBOX_SELECTOR: '[role=\"checkbox\"][aria-checked=\"true\"]',\n ARIA_CHECKED_RADIO_SELECTOR: '[role=\"radio\"][aria-checked=\"true\"]',\n ARIA_CURRENT: 'aria-current',\n ARIA_DISABLED: 'aria-disabled',\n ARIA_ORIENTATION: 'aria-orientation',\n ARIA_ORIENTATION_HORIZONTAL: 'horizontal',\n ARIA_ROLE_CHECKBOX_SELECTOR: '[role=\"checkbox\"]',\n ARIA_SELECTED: 'aria-selected',\n ARIA_INTERACTIVE_ROLES_SELECTOR: '[role=\"listbox\"], [role=\"menu\"]',\n ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable=\"true\"]',\n CHECKBOX_RADIO_SELECTOR: 'input[type=\"checkbox\"], input[type=\"radio\"]',\n CHECKBOX_SELECTOR: 'input[type=\"checkbox\"]',\n CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: `\n .${cssClasses.LIST_ITEM_CLASS} button:not(:disabled),\n .${cssClasses.LIST_ITEM_CLASS} a,\n .${\n deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS]} button:not(:disabled),\n .${deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS]} a\n `,\n DEPRECATED_SELECTOR: '.mdc-deprecated-list',\n FOCUSABLE_CHILD_ELEMENTS: `\n .${cssClasses.LIST_ITEM_CLASS} button:not(:disabled),\n .${cssClasses.LIST_ITEM_CLASS} a,\n .${cssClasses.LIST_ITEM_CLASS} input[type=\"radio\"]:not(:disabled),\n .${cssClasses.LIST_ITEM_CLASS} input[type=\"checkbox\"]:not(:disabled),\n .${\n deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS]} button:not(:disabled),\n .${deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS]} a,\n .${\n deprecatedClassNameMap\n [cssClasses.LIST_ITEM_CLASS]} input[type=\"radio\"]:not(:disabled),\n .${\n deprecatedClassNameMap\n [cssClasses.LIST_ITEM_CLASS]} input[type=\"checkbox\"]:not(:disabled)\n `,\n RADIO_SELECTOR: 'input[type=\"radio\"]',\n SELECTED_ITEM_SELECTOR: '[aria-selected=\"true\"], [aria-current=\"true\"]',\n};\n\nconst numbers = {\n UNSET_INDEX: -1,\n TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300\n};\n\nconst evolutionAttribute = 'evolution';\n\nexport {\n strings,\n cssClasses,\n numbers,\n deprecatedClassNameMap,\n evolutionAttribute,\n evolutionClassNameMap\n};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select'];\n\n/**\n * Ensures that preventDefault is only called if the containing element\n * doesn't consume the event, and it will cause an unintended scroll.\n *\n * @param evt keyboard event to be prevented.\n */\nexport const preventDefaultEvent = (evt: KeyboardEvent) => {\n const target = evt.target as Element;\n if (!target) {\n return;\n }\n const tagName = `${target.tagName}`.toLowerCase();\n if (ELEMENTS_KEY_ALLOWED_IN.indexOf(tagName) === -1) {\n evt.preventDefault();\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {normalizeKey} from '@material/dom/keyboard';\n\nimport {MDCListAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\nimport {preventDefaultEvent} from './events';\nimport * as typeahead from './typeahead';\nimport {MDCListIndex, MDCListTextAndIndex} from './types';\n\nfunction isNumberArray(selectedIndex: MDCListIndex): selectedIndex is number[] {\n return selectedIndex instanceof Array;\n}\n\nexport class MDCListFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get numbers() {\n return numbers;\n }\n\n static get defaultAdapter(): MDCListAdapter {\n return {\n addClassForElementIndex: () => undefined,\n focusItemAtIndex: () => undefined,\n getAttributeForElementIndex: () => null,\n getFocusedElementIndex: () => 0,\n getListItemCount: () => 0,\n hasCheckboxAtIndex: () => false,\n hasRadioAtIndex: () => false,\n isCheckboxCheckedAtIndex: () => false,\n isFocusInsideList: () => false,\n isRootFocused: () => false,\n listItemAtIndexHasClass: () => false,\n notifyAction: () => undefined,\n removeClassForElementIndex: () => undefined,\n setAttributeForElementIndex: () => undefined,\n setCheckedCheckboxOrRadioAtIndex: () => undefined,\n setTabIndexForListItemChildren: () => undefined,\n getPrimaryTextAtIndex: () => '',\n };\n }\n\n private wrapFocus = false;\n private isVertical = true;\n private isSingleSelectionList = false;\n private selectedIndex: MDCListIndex = numbers.UNSET_INDEX;\n private focusedItemIndex = numbers.UNSET_INDEX;\n private useActivatedClass = false;\n private useSelectedAttr = false;\n private ariaCurrentAttrValue: string|null = null;\n private isCheckboxList = false;\n private isRadioList = false;\n\n private hasTypeahead = false;\n // Transiently holds current typeahead prefix from user.\n private readonly typeaheadState = typeahead.initState();\n private sortedIndexByFirstChar = new Map();\n\n constructor(adapter?: Partial) {\n super({...MDCListFoundation.defaultAdapter, ...adapter});\n }\n\n layout() {\n if (this.adapter.getListItemCount() === 0) {\n return;\n }\n\n // TODO(b/172274142): consider all items when determining the list's type.\n if (this.adapter.hasCheckboxAtIndex(0)) {\n this.isCheckboxList = true;\n } else if (this.adapter.hasRadioAtIndex(0)) {\n this.isRadioList = true;\n } else {\n this.maybeInitializeSingleSelection();\n }\n\n if (this.hasTypeahead) {\n this.sortedIndexByFirstChar = this.typeaheadInitSortedIndex();\n }\n }\n\n /** Returns the index of the item that was last focused. */\n getFocusedItemIndex() {\n return this.focusedItemIndex;\n }\n\n /**\n * Sets the private wrapFocus variable.\n */\n setWrapFocus(value: boolean) {\n this.wrapFocus = value;\n }\n\n /**\n * Sets the isVertical private variable.\n */\n setVerticalOrientation(value: boolean) {\n this.isVertical = value;\n }\n\n /**\n * Sets the isSingleSelectionList private variable.\n */\n setSingleSelection(value: boolean) {\n this.isSingleSelectionList = value;\n if (value) {\n this.maybeInitializeSingleSelection();\n }\n }\n\n /**\n * Automatically determines whether the list is single selection list. If so,\n * initializes the internal state to match the selected item.\n */\n private maybeInitializeSingleSelection() {\n const listItemsCount = this.adapter.getListItemCount();\n for (let i = 0; i < listItemsCount; i++) {\n const hasSelectedClass = this.adapter.listItemAtIndexHasClass(\n i, cssClasses.LIST_ITEM_SELECTED_CLASS);\n const hasActivatedClass = this.adapter.listItemAtIndexHasClass(\n i, cssClasses.LIST_ITEM_ACTIVATED_CLASS);\n if (!(hasSelectedClass || hasActivatedClass)) {\n continue;\n }\n\n if (hasActivatedClass) {\n this.setUseActivatedClass(true);\n }\n\n this.isSingleSelectionList = true;\n this.selectedIndex = i;\n return;\n }\n }\n\n /**\n * Sets whether typeahead is enabled on the list.\n * @param hasTypeahead Whether typeahead is enabled.\n */\n setHasTypeahead(hasTypeahead: boolean) {\n this.hasTypeahead = hasTypeahead;\n if (hasTypeahead) {\n this.sortedIndexByFirstChar = this.typeaheadInitSortedIndex();\n }\n }\n\n /**\n * @return Whether typeahead is currently matching a user-specified prefix.\n */\n isTypeaheadInProgress(): boolean {\n return this.hasTypeahead &&\n typeahead.isTypingInProgress(this.typeaheadState);\n }\n\n /**\n * Sets the useActivatedClass private variable.\n */\n setUseActivatedClass(useActivated: boolean) {\n this.useActivatedClass = useActivated;\n }\n\n /**\n * Sets the useSelectedAttr private variable.\n */\n setUseSelectedAttribute(useSelected: boolean) {\n this.useSelectedAttr = useSelected;\n }\n\n getSelectedIndex(): MDCListIndex {\n return this.selectedIndex;\n }\n\n setSelectedIndex(index: MDCListIndex, {forceUpdate}: {forceUpdate?:\n boolean} = {}) {\n if (!this.isIndexValid(index)) {\n return;\n }\n\n if (this.isCheckboxList) {\n this.setCheckboxAtIndex(index as number[]);\n } else if (this.isRadioList) {\n this.setRadioAtIndex(index as number);\n } else {\n this.setSingleSelectionAtIndex(index as number, {forceUpdate});\n }\n }\n\n /**\n * Focus in handler for the list items.\n */\n handleFocusIn(listItemIndex: number) {\n if (listItemIndex >= 0) {\n this.focusedItemIndex = listItemIndex;\n this.adapter.setAttributeForElementIndex(listItemIndex, 'tabindex', '0');\n this.adapter.setTabIndexForListItemChildren(listItemIndex, '0');\n }\n }\n\n /**\n * Focus out handler for the list items.\n */\n handleFocusOut(listItemIndex: number) {\n if (listItemIndex >= 0) {\n this.adapter.setAttributeForElementIndex(listItemIndex, 'tabindex', '-1');\n this.adapter.setTabIndexForListItemChildren(listItemIndex, '-1');\n }\n\n /**\n * Between Focusout & Focusin some browsers do not have focus on any\n * element. Setting a delay to wait till the focus is moved to next element.\n */\n setTimeout(() => {\n if (!this.adapter.isFocusInsideList()) {\n this.setTabindexToFirstSelectedOrFocusedItem();\n }\n }, 0);\n }\n\n /**\n * Key handler for the list.\n */\n handleKeydown(\n event: KeyboardEvent, isRootListItem: boolean, listItemIndex: number) {\n const isArrowLeft = normalizeKey(event) === 'ArrowLeft';\n const isArrowUp = normalizeKey(event) === 'ArrowUp';\n const isArrowRight = normalizeKey(event) === 'ArrowRight';\n const isArrowDown = normalizeKey(event) === 'ArrowDown';\n const isHome = normalizeKey(event) === 'Home';\n const isEnd = normalizeKey(event) === 'End';\n const isEnter = normalizeKey(event) === 'Enter';\n const isSpace = normalizeKey(event) === 'Spacebar';\n\n // Have to check both upper and lower case, because having caps lock on\n // affects the value.\n const isLetterA = event.key === 'A' || event.key === 'a';\n\n if (this.adapter.isRootFocused()) {\n if (isArrowUp || isEnd) {\n event.preventDefault();\n this.focusLastElement();\n } else if (isArrowDown || isHome) {\n event.preventDefault();\n this.focusFirstElement();\n }\n\n if (this.hasTypeahead) {\n const handleKeydownOpts: typeahead.HandleKeydownOpts = {\n event,\n focusItemAtIndex: (index) => {\n this.focusItemAtIndex(index);\n },\n focusedItemIndex: -1,\n isTargetListItem: isRootListItem,\n sortedIndexByFirstChar: this.sortedIndexByFirstChar,\n isItemAtIndexDisabled: (index) =>\n this.adapter.listItemAtIndexHasClass(\n index, cssClasses.LIST_ITEM_DISABLED_CLASS),\n };\n\n typeahead.handleKeydown(handleKeydownOpts, this.typeaheadState);\n }\n\n return;\n }\n\n let currentIndex = this.adapter.getFocusedElementIndex();\n if (currentIndex === -1) {\n currentIndex = listItemIndex;\n if (currentIndex < 0) {\n // If this event doesn't have a mdc-list-item ancestor from the\n // current list (not from a sublist), return early.\n return;\n }\n }\n\n if ((this.isVertical && isArrowDown) ||\n (!this.isVertical && isArrowRight)) {\n preventDefaultEvent(event);\n this.focusNextElement(currentIndex);\n } else if (\n (this.isVertical && isArrowUp) || (!this.isVertical && isArrowLeft)) {\n preventDefaultEvent(event);\n this.focusPrevElement(currentIndex);\n } else if (isHome) {\n preventDefaultEvent(event);\n this.focusFirstElement();\n } else if (isEnd) {\n preventDefaultEvent(event);\n this.focusLastElement();\n } else if (isLetterA && event.ctrlKey && this.isCheckboxList) {\n event.preventDefault();\n this.toggleAll(\n this.selectedIndex === numbers.UNSET_INDEX ?\n [] :\n this.selectedIndex as number[]);\n } else if (isEnter || isSpace) {\n if (isRootListItem) {\n // Return early if enter key is pressed on anchor element which triggers\n // synthetic MouseEvent event.\n const target = event.target as Element | null;\n if (target && target.tagName === 'A' && isEnter) {\n return;\n }\n preventDefaultEvent(event);\n\n if (this.adapter.listItemAtIndexHasClass(\n currentIndex, cssClasses.LIST_ITEM_DISABLED_CLASS)) {\n return;\n }\n\n if (!this.isTypeaheadInProgress()) {\n if (this.isSelectableList()) {\n this.setSelectedIndexOnAction(currentIndex);\n }\n this.adapter.notifyAction(currentIndex);\n }\n }\n }\n\n if (this.hasTypeahead) {\n const handleKeydownOpts: typeahead.HandleKeydownOpts = {\n event,\n focusItemAtIndex: (index) => {\n this.focusItemAtIndex(index)\n },\n focusedItemIndex: this.focusedItemIndex,\n isTargetListItem: isRootListItem,\n sortedIndexByFirstChar: this.sortedIndexByFirstChar,\n isItemAtIndexDisabled: (index) => this.adapter.listItemAtIndexHasClass(\n index, cssClasses.LIST_ITEM_DISABLED_CLASS),\n };\n\n typeahead.handleKeydown(handleKeydownOpts, this.typeaheadState);\n }\n }\n\n /**\n * Click handler for the list.\n */\n handleClick(index: number, toggleCheckbox: boolean) {\n if (index === numbers.UNSET_INDEX) {\n return;\n }\n\n if (this.adapter.listItemAtIndexHasClass(\n index, cssClasses.LIST_ITEM_DISABLED_CLASS)) {\n return;\n }\n if (this.isSelectableList()) {\n this.setSelectedIndexOnAction(index, toggleCheckbox);\n }\n\n this.adapter.notifyAction(index);\n }\n\n /**\n * Focuses the next element on the list.\n */\n focusNextElement(index: number) {\n const count = this.adapter.getListItemCount();\n let nextIndex = index + 1;\n if (nextIndex >= count) {\n if (this.wrapFocus) {\n nextIndex = 0;\n } else {\n // Return early because last item is already focused.\n return index;\n }\n }\n this.focusItemAtIndex(nextIndex);\n\n return nextIndex;\n }\n\n /**\n * Focuses the previous element on the list.\n */\n focusPrevElement(index: number) {\n let prevIndex = index - 1;\n if (prevIndex < 0) {\n if (this.wrapFocus) {\n prevIndex = this.adapter.getListItemCount() - 1;\n } else {\n // Return early because first item is already focused.\n return index;\n }\n }\n this.focusItemAtIndex(prevIndex);\n return prevIndex;\n }\n\n focusFirstElement() {\n this.focusItemAtIndex(0);\n return 0;\n }\n\n focusLastElement() {\n const lastIndex = this.adapter.getListItemCount() - 1;\n this.focusItemAtIndex(lastIndex);\n return lastIndex;\n }\n\n focusInitialElement() {\n const initialIndex = this.getFirstSelectedOrFocusedItemIndex();\n this.focusItemAtIndex(initialIndex);\n return initialIndex;\n }\n\n /**\n * @param itemIndex Index of the list item\n * @param isEnabled Sets the list item to enabled or disabled.\n */\n setEnabled(itemIndex: number, isEnabled: boolean): void {\n if (!this.isIndexValid(itemIndex)) {\n return;\n }\n\n if (isEnabled) {\n this.adapter.removeClassForElementIndex(\n itemIndex, cssClasses.LIST_ITEM_DISABLED_CLASS);\n this.adapter.setAttributeForElementIndex(\n itemIndex, strings.ARIA_DISABLED, 'false');\n } else {\n this.adapter.addClassForElementIndex(\n itemIndex, cssClasses.LIST_ITEM_DISABLED_CLASS);\n this.adapter.setAttributeForElementIndex(\n itemIndex, strings.ARIA_DISABLED, 'true');\n }\n }\n\n private setSingleSelectionAtIndex(index: number, {forceUpdate}: {\n forceUpdate?: boolean\n } = {}) {\n if (this.selectedIndex === index && !forceUpdate) {\n return;\n }\n\n let selectedClassName = cssClasses.LIST_ITEM_SELECTED_CLASS;\n if (this.useActivatedClass) {\n selectedClassName = cssClasses.LIST_ITEM_ACTIVATED_CLASS;\n }\n\n if (this.selectedIndex !== numbers.UNSET_INDEX) {\n this.adapter.removeClassForElementIndex(\n this.selectedIndex as number, selectedClassName);\n }\n\n this.setAriaForSingleSelectionAtIndex(index);\n this.setTabindexAtIndex(index);\n if (index !== numbers.UNSET_INDEX) {\n this.adapter.addClassForElementIndex(index, selectedClassName);\n }\n\n this.selectedIndex = index;\n }\n\n /**\n * Sets aria attribute for single selection at given index.\n */\n private setAriaForSingleSelectionAtIndex(index: number) {\n // Detect the presence of aria-current and get the value only during list\n // initialization when it is in unset state.\n if (this.selectedIndex === numbers.UNSET_INDEX) {\n this.ariaCurrentAttrValue =\n this.adapter.getAttributeForElementIndex(index, strings.ARIA_CURRENT);\n }\n\n const isAriaCurrent = this.ariaCurrentAttrValue !== null;\n const ariaAttribute =\n isAriaCurrent ? strings.ARIA_CURRENT : strings.ARIA_SELECTED;\n\n if (this.selectedIndex !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(\n this.selectedIndex as number, ariaAttribute, 'false');\n }\n\n if (index !== numbers.UNSET_INDEX) {\n const ariaAttributeValue =\n isAriaCurrent ? this.ariaCurrentAttrValue : 'true';\n this.adapter.setAttributeForElementIndex(\n index, ariaAttribute, ariaAttributeValue as string);\n }\n }\n\n /**\n * Returns the attribute to use for indicating selection status.\n */\n private getSelectionAttribute(): string {\n return this.useSelectedAttr ? strings.ARIA_SELECTED : strings.ARIA_CHECKED;\n }\n\n /**\n * Toggles radio at give index. Radio doesn't change the checked state if it\n * is already checked.\n */\n private setRadioAtIndex(index: number) {\n const selectionAttribute = this.getSelectionAttribute();\n this.adapter.setCheckedCheckboxOrRadioAtIndex(index, true);\n\n if (this.selectedIndex !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(\n this.selectedIndex as number, selectionAttribute, 'false');\n }\n\n this.adapter.setAttributeForElementIndex(index, selectionAttribute, 'true');\n\n this.selectedIndex = index;\n }\n\n private setCheckboxAtIndex(index: number[]) {\n const selectionAttribute = this.getSelectionAttribute();\n for (let i = 0; i < this.adapter.getListItemCount(); i++) {\n let isChecked = false;\n if (index.indexOf(i) >= 0) {\n isChecked = true;\n }\n\n this.adapter.setCheckedCheckboxOrRadioAtIndex(i, isChecked);\n this.adapter.setAttributeForElementIndex(\n i, selectionAttribute, isChecked ? 'true' : 'false');\n }\n\n this.selectedIndex = index;\n }\n\n private setTabindexAtIndex(index: number) {\n if (this.focusedItemIndex === numbers.UNSET_INDEX && index !== 0) {\n // If some list item was selected set first list item's tabindex to -1.\n // Generally, tabindex is set to 0 on first list item of list that has no\n // preselected items.\n this.adapter.setAttributeForElementIndex(0, 'tabindex', '-1');\n } else if (this.focusedItemIndex >= 0 && this.focusedItemIndex !== index) {\n this.adapter.setAttributeForElementIndex(\n this.focusedItemIndex, 'tabindex', '-1');\n }\n\n // Set the previous selection's tabindex to -1. We need this because\n // in selection menus that are not visible, programmatically setting an\n // option will not change focus but will change where tabindex should be 0.\n if (!(this.selectedIndex instanceof Array) &&\n this.selectedIndex !== index) {\n this.adapter.setAttributeForElementIndex(\n this.selectedIndex, 'tabindex', '-1');\n }\n\n if (index !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(index, 'tabindex', '0');\n }\n }\n\n /**\n * @return Return true if it is single selectin list, checkbox list or radio\n * list.\n */\n private isSelectableList() {\n return this.isSingleSelectionList || this.isCheckboxList ||\n this.isRadioList;\n }\n\n private setTabindexToFirstSelectedOrFocusedItem() {\n const targetIndex = this.getFirstSelectedOrFocusedItemIndex();\n this.setTabindexAtIndex(targetIndex);\n }\n\n private getFirstSelectedOrFocusedItemIndex(): number {\n // Action lists retain focus on the most recently focused item.\n if (!this.isSelectableList()) {\n return Math.max(this.focusedItemIndex, 0);\n }\n\n // Single-selection lists focus the selected item.\n if (typeof this.selectedIndex === 'number' &&\n this.selectedIndex !== numbers.UNSET_INDEX) {\n return this.selectedIndex;\n }\n\n // Multiple-selection lists focus the first selected item.\n if (isNumberArray(this.selectedIndex) && this.selectedIndex.length > 0) {\n return this.selectedIndex.reduce(\n (minIndex, currentIndex) => Math.min(minIndex, currentIndex));\n }\n\n // Selection lists without a selection focus the first item.\n return 0;\n }\n\n private isIndexValid(index: MDCListIndex) {\n if (index instanceof Array) {\n if (!this.isCheckboxList) {\n throw new Error(\n 'MDCListFoundation: Array of index is only supported for checkbox based list');\n }\n\n if (index.length === 0) {\n return true;\n } else {\n return index.some((i) => this.isIndexInRange(i));\n }\n } else if (typeof index === 'number') {\n if (this.isCheckboxList) {\n throw new Error(\n `MDCListFoundation: Expected array of index for checkbox based list but got number: ${\n index}`);\n }\n return this.isIndexInRange(index) ||\n this.isSingleSelectionList && index === numbers.UNSET_INDEX;\n } else {\n return false;\n }\n }\n\n private isIndexInRange(index: number) {\n const listSize = this.adapter.getListItemCount();\n return index >= 0 && index < listSize;\n }\n\n /**\n * Sets selected index on user action, toggles checkbox / radio based on\n * toggleCheckbox value. User interaction should not toggle list item(s) when\n * disabled.\n */\n private setSelectedIndexOnAction(index: number, toggleCheckbox = true) {\n if (this.isCheckboxList) {\n this.toggleCheckboxAtIndex(index, toggleCheckbox);\n } else {\n this.setSelectedIndex(index);\n }\n }\n\n private toggleCheckboxAtIndex(index: number, toggleCheckbox: boolean) {\n const selectionAttribute = this.getSelectionAttribute();\n let isChecked = this.adapter.isCheckboxCheckedAtIndex(index);\n\n if (toggleCheckbox) {\n isChecked = !isChecked;\n this.adapter.setCheckedCheckboxOrRadioAtIndex(index, isChecked);\n }\n\n this.adapter.setAttributeForElementIndex(\n index, selectionAttribute, isChecked ? 'true' : 'false');\n\n // If none of the checkbox items are selected and selectedIndex is not\n // initialized then provide a default value.\n let selectedIndexes = this.selectedIndex === numbers.UNSET_INDEX ?\n [] :\n (this.selectedIndex as number[]).slice();\n\n if (isChecked) {\n selectedIndexes.push(index);\n } else {\n selectedIndexes = selectedIndexes.filter((i) => i !== index);\n }\n\n this.selectedIndex = selectedIndexes;\n }\n\n private focusItemAtIndex(index: number) {\n this.adapter.focusItemAtIndex(index);\n this.focusedItemIndex = index;\n }\n\n private toggleAll(currentlySelectedIndexes: number[]) {\n const count = this.adapter.getListItemCount();\n\n // If all items are selected, deselect everything.\n if (currentlySelectedIndexes.length === count) {\n this.setCheckboxAtIndex([]);\n } else {\n // Otherwise select all enabled options.\n const allIndexes: number[] = [];\n for (let i = 0; i < count; i++) {\n if (!this.adapter.listItemAtIndexHasClass(\n i, cssClasses.LIST_ITEM_DISABLED_CLASS) ||\n currentlySelectedIndexes.indexOf(i) > -1) {\n allIndexes.push(i);\n }\n }\n this.setCheckboxAtIndex(allIndexes);\n }\n }\n\n /**\n * Given the next desired character from the user, adds it to the typeahead\n * buffer. Then, attempts to find the next option matching the buffer. Wraps\n * around if at the end of options.\n *\n * @param nextChar The next character to add to the prefix buffer.\n * @param startingIndex The index from which to start matching. Only relevant\n * when starting a new match sequence. To start a new match sequence,\n * clear the buffer using `clearTypeaheadBuffer`, or wait for the buffer\n * to clear after a set interval defined in list foundation. Defaults to\n * the currently focused index.\n * @return The index of the matched item, or -1 if no match.\n */\n typeaheadMatchItem(\n nextChar: string, startingIndex?: number, skipFocus = false) {\n const opts: typeahead.TypeaheadMatchItemOpts = {\n focusItemAtIndex: (index) => {\n this.focusItemAtIndex(index);\n },\n focusedItemIndex: startingIndex ? startingIndex : this.focusedItemIndex,\n nextChar,\n sortedIndexByFirstChar: this.sortedIndexByFirstChar,\n skipFocus,\n isItemAtIndexDisabled: (index) => this.adapter.listItemAtIndexHasClass(\n index, cssClasses.LIST_ITEM_DISABLED_CLASS)\n };\n return typeahead.matchItem(opts, this.typeaheadState);\n }\n\n /**\n * Initializes the MDCListTextAndIndex data structure by indexing the current\n * list items by primary text.\n *\n * @return The primary texts of all the list items sorted by first character.\n */\n private typeaheadInitSortedIndex() {\n return typeahead.initSortedIndex(\n this.adapter.getListItemCount(), this.adapter.getPrimaryTextAtIndex);\n }\n\n /**\n * Clears the typeahead buffer.\n */\n clearTypeaheadBuffer() {\n typeahead.clearBuffer(this.typeaheadState);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCListFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {normalizeKey} from '@material/dom/keyboard';\n\nimport {numbers} from './constants';\nimport {preventDefaultEvent} from './events';\nimport {MDCListTextAndIndex} from './types';\n\n/**\n * State of a typeahead instance.\n */\nexport interface TypeaheadState {\n typeaheadBuffer: string;\n currentFirstChar: string;\n sortedIndexCursor: number;\n bufferClearTimeout: number;\n}\n\n/**\n * Initializes a state object for typeahead. Use the same reference for calls to\n * typeahead functions.\n *\n * @return The current state of the typeahead process. Each state reference\n * represents a typeahead instance as the reference is typically mutated\n * in-place.\n */\nexport function initState(): TypeaheadState {\n const state: TypeaheadState = {\n bufferClearTimeout: 0,\n currentFirstChar: '',\n sortedIndexCursor: 0,\n typeaheadBuffer: '',\n };\n return state;\n}\n\n/**\n * Initializes typeahead state by indexing the current list items by primary\n * text into the sortedIndexByFirstChar data structure.\n *\n * @param listItemCount numer of items in the list\n * @param getPrimaryTextByItemIndex function that returns the primary text at a\n * given index\n *\n * @return Map that maps the first character of the primary text to the full\n * list text and it's index\n */\nexport function initSortedIndex(\n listItemCount: number,\n getPrimaryTextByItemIndex: (index: number) =>\n string): Map {\n const sortedIndexByFirstChar = new Map();\n\n // Aggregate item text to index mapping\n for (let i = 0; i < listItemCount; i++) {\n const primaryText = getPrimaryTextByItemIndex(i).trim();\n if (!primaryText) {\n continue;\n }\n\n const firstChar = primaryText[0].toLowerCase();\n if (!sortedIndexByFirstChar.has(firstChar)) {\n sortedIndexByFirstChar.set(firstChar, []);\n }\n sortedIndexByFirstChar.get(firstChar)!.push(\n {text: primaryText.toLowerCase(), index: i});\n }\n\n // Sort the mapping\n // TODO(b/157162694): Investigate replacing forEach with Map.values()\n sortedIndexByFirstChar.forEach((values) => {\n values.sort((first: MDCListTextAndIndex, second: MDCListTextAndIndex) => {\n return first.index - second.index;\n });\n });\n\n return sortedIndexByFirstChar;\n}\n\n/**\n * Arguments for matchItem\n */\nexport interface TypeaheadMatchItemOpts {\n focusItemAtIndex: (index: number) => void;\n nextChar: string;\n focusedItemIndex: number;\n sortedIndexByFirstChar: Map;\n skipFocus: boolean;\n isItemAtIndexDisabled: (index: number) => boolean;\n}\n\n/**\n * Given the next desired character from the user, it attempts to find the next\n * list option matching the buffer. Wraps around if at the end of options.\n *\n * @param opts Options and accessors\n * - nextChar - the next character to match against items\n * - sortedIndexByFirstChar - output of `initSortedIndex(...)`\n * - focusedItemIndex - the index of the currently focused item\n * - focusItemAtIndex - function that focuses a list item at given index\n * - skipFocus - whether or not to focus the matched item\n * - isItemAtIndexDisabled - function that determines whether an item at a\n * given index is disabled\n * @param state The typeahead state instance. See `initState`.\n *\n * @return The index of the matched item, or -1 if no match.\n */\nexport function matchItem(\n opts: TypeaheadMatchItemOpts, state: TypeaheadState): number {\n const {\n nextChar,\n focusItemAtIndex,\n sortedIndexByFirstChar,\n focusedItemIndex,\n skipFocus,\n isItemAtIndexDisabled,\n } = opts;\n\n clearTimeout(state.bufferClearTimeout);\n\n state.bufferClearTimeout = setTimeout(() => {\n clearBuffer(state);\n }, numbers.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS);\n\n state.typeaheadBuffer = state.typeaheadBuffer + nextChar;\n\n let index: number;\n if (state.typeaheadBuffer.length === 1) {\n index = matchFirstChar(\n sortedIndexByFirstChar, focusedItemIndex, isItemAtIndexDisabled, state);\n } else {\n index = matchAllChars(sortedIndexByFirstChar, isItemAtIndexDisabled, state);\n }\n\n if (index !== -1 && !skipFocus) {\n focusItemAtIndex(index);\n }\n return index;\n}\n\n/**\n * Matches the user's single input character in the buffer to the\n * next option that begins with such character. Wraps around if at\n * end of options. Returns -1 if no match is found.\n */\nfunction matchFirstChar(\n sortedIndexByFirstChar: Map,\n focusedItemIndex: number, isItemAtIndexDisabled: (index: number) => boolean,\n state: TypeaheadState): number {\n const firstChar = state.typeaheadBuffer[0];\n const itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar);\n if (!itemsMatchingFirstChar) {\n return -1;\n }\n\n // Has the same firstChar been recently matched?\n // Also, did starting index remain the same between key presses?\n // If both hold true, simply increment index.\n if (firstChar === state.currentFirstChar &&\n itemsMatchingFirstChar[state.sortedIndexCursor].index ===\n focusedItemIndex) {\n state.sortedIndexCursor =\n (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length;\n\n const newIndex = itemsMatchingFirstChar[state.sortedIndexCursor].index;\n if (!isItemAtIndexDisabled(newIndex)) {\n return newIndex;\n }\n }\n\n // If we're here, it means one of the following happened:\n // - either firstChar or startingIndex has changed, invalidating the\n // cursor.\n // - The next item of typeahead is disabled, so we have to look further.\n state.currentFirstChar = firstChar;\n\n let newCursorPosition = -1;\n let cursorPosition;\n // Find the first non-disabled item as a fallback.\n for (cursorPosition = 0; cursorPosition < itemsMatchingFirstChar.length;\n cursorPosition++) {\n if (!isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) {\n newCursorPosition = cursorPosition;\n break;\n }\n }\n\n // Advance cursor to first item matching the firstChar that is positioned\n // after starting item. Cursor is unchanged from fallback if there's no\n // such item.\n for (; cursorPosition < itemsMatchingFirstChar.length; cursorPosition++) {\n if (itemsMatchingFirstChar[cursorPosition].index > focusedItemIndex &&\n !isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) {\n newCursorPosition = cursorPosition;\n break;\n }\n }\n\n if (newCursorPosition !== -1) {\n state.sortedIndexCursor = newCursorPosition;\n return itemsMatchingFirstChar[state.sortedIndexCursor].index;\n }\n\n return -1;\n}\n\n/**\n * Attempts to find the next item that matches all of the typeahead buffer.\n * Wraps around if at end of options. Returns -1 if no match is found.\n */\nfunction matchAllChars(\n sortedIndexByFirstChar: Map,\n isItemAtIndexDisabled: (index: number) => boolean,\n state: TypeaheadState): number {\n const firstChar = state.typeaheadBuffer[0];\n const itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar);\n if (!itemsMatchingFirstChar) {\n return -1;\n }\n\n // Do nothing if text already matches\n const startingItem = itemsMatchingFirstChar[state.sortedIndexCursor];\n if (startingItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0 &&\n !isItemAtIndexDisabled(startingItem.index)) {\n return startingItem.index;\n }\n\n // Find next item that matches completely; if no match, we'll eventually\n // loop around to same position\n let cursorPosition =\n (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length;\n let nextCursorPosition = -1;\n while (cursorPosition !== state.sortedIndexCursor) {\n const currentItem = itemsMatchingFirstChar[cursorPosition];\n\n const matches =\n currentItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0;\n const isEnabled = !isItemAtIndexDisabled(currentItem.index);\n if (matches && isEnabled) {\n nextCursorPosition = cursorPosition;\n break;\n }\n\n cursorPosition = (cursorPosition + 1) % itemsMatchingFirstChar.length;\n }\n\n if (nextCursorPosition !== -1) {\n state.sortedIndexCursor = nextCursorPosition;\n return itemsMatchingFirstChar[state.sortedIndexCursor].index;\n }\n\n return -1;\n}\n\n/**\n * Whether or not the given typeahead instaance state is currently typing.\n *\n * @param state The typeahead state instance. See `initState`.\n */\nexport function isTypingInProgress(state: TypeaheadState) {\n return state.typeaheadBuffer.length > 0;\n}\n\n/**\n * Options for handleKeydown.\n */\nexport interface HandleKeydownOpts {\n event: KeyboardEvent;\n isTargetListItem: boolean;\n focusItemAtIndex: (index: number) => void;\n focusedItemIndex: number;\n sortedIndexByFirstChar: Map;\n isItemAtIndexDisabled: (index: number) => boolean;\n}\n\n/**\n * Clears the typeahaed buffer so that it resets item matching to the first\n * character.\n *\n * @param state The typeahead state instance. See `initState`.\n */\nexport function clearBuffer(state: TypeaheadState) {\n state.typeaheadBuffer = '';\n}\n\n/**\n * Given a keydown event, it calculates whether or not to automatically focus a\n * list item depending on what was typed mimicing the typeahead functionality of\n * a standard ` element, or an object with the same shape.\n * Note that this method can return null, which the foundation will handle gracefully.\n */\n getNativeInput(): MDCTextFieldNativeInputElement | null;\n\n /**\n * Sets the specified attribute to the specified value on the input element.\n */\n setInputAttr(attr: string, value: string): void;\n\n /**\n * Removes the specified attribute from the input element.\n */\n removeInputAttr(attr: string): void;\n\n /**\n * @return true if the textfield is focused. We achieve this via `document.activeElement === this.root`.\n */\n isFocused(): boolean;\n\n /**\n * Registers an event listener on the native input element for a given event.\n */\n registerInputInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener on the native input element for a given event.\n */\n deregisterInputInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n}\n\nexport interface MDCTextFieldLabelAdapter {\n /**\n * Only implement if label exists.\n * Shakes label if shouldShake is true.\n */\n shakeLabel(shouldShake: boolean): void;\n\n /**\n * Only implement if label exists.\n * Floats the label above the input element if shouldFloat is true.\n */\n floatLabel(shouldFloat: boolean): void;\n\n /**\n * @return true if label element exists, false if it doesn't.\n */\n hasLabel(): boolean;\n\n /**\n * Only implement if label exists.\n * @return width of label in pixels.\n */\n getLabelWidth(): number;\n\n /**\n * Only implement if label exists.\n * Styles the label as required.\n */\n setLabelRequired(isRequired: boolean): void;\n}\n\nexport interface MDCTextFieldLineRippleAdapter {\n /**\n * Activates the line ripple.\n */\n activateLineRipple(): void;\n\n /**\n * Deactivates the line ripple.\n */\n deactivateLineRipple(): void;\n\n /**\n * Sets the transform origin of the line ripple.\n */\n setLineRippleTransformOrigin(normalizedX: number): void;\n}\n\nexport interface MDCTextFieldOutlineAdapter {\n /**\n * @return true if outline element exists, false if it doesn't.\n */\n hasOutline(): boolean;\n\n /**\n * Only implement if outline element exists.\n */\n notchOutline(labelWidth: number): void;\n\n /**\n * Only implement if outline element exists.\n * Closes notch in outline element.\n */\n closeOutline(): void;\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCTextFieldCharacterCounterAdapter {\n /**\n * Sets the text content of character counter element.\n */\n setContent(content: string): void;\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCTextFieldCharacterCounterAdapter} from './adapter';\nimport {MDCTextFieldCharacterCounterFoundation} from './foundation';\n\nexport type MDCTextFieldCharacterCounterFactory =\n (el: Element, foundation?: MDCTextFieldCharacterCounterFoundation) => MDCTextFieldCharacterCounter;\n\nexport class MDCTextFieldCharacterCounter extends MDCComponent {\n static attachTo(root: Element): MDCTextFieldCharacterCounter {\n return new MDCTextFieldCharacterCounter(root);\n }\n\n // Provided for access by MDCTextField component\n get foundationForTextField(): MDCTextFieldCharacterCounterFoundation {\n return this.foundation;\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n const adapter: MDCTextFieldCharacterCounterAdapter = {\n setContent: (content) => {\n this.root.textContent = content;\n },\n };\n return new MDCTextFieldCharacterCounterFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n ROOT: 'mdc-text-field-character-counter',\n};\n\nconst strings = {\n ROOT_SELECTOR: `.${cssClasses.ROOT}`,\n};\n\nexport {strings, cssClasses};\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCTextFieldCharacterCounterAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCTextFieldCharacterCounterFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n /**\n * See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCTextFieldCharacterCounterAdapter {\n return {\n setContent: () => undefined,\n };\n }\n\n constructor(adapter?: Partial) {\n super({...MDCTextFieldCharacterCounterFoundation.defaultAdapter, ...adapter});\n }\n\n setCounterValue(currentLength: number, maxLength: number) {\n currentLength = Math.min(currentLength, maxLength);\n this.adapter.setContent(`${currentLength} / ${maxLength}`);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldCharacterCounterFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport {cssClasses as characterCountCssClasses, strings as characterCountStrings} from './constants';\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {applyPassive} from '@material/dom/events';\nimport * as ponyfill from '@material/dom/ponyfill';\nimport {MDCFloatingLabel, MDCFloatingLabelFactory} from '@material/floating-label/component';\nimport {MDCLineRipple, MDCLineRippleFactory} from '@material/line-ripple/component';\nimport {MDCNotchedOutline, MDCNotchedOutlineFactory} from '@material/notched-outline/component';\nimport {MDCRippleAdapter} from '@material/ripple/adapter';\nimport {MDCRipple, MDCRippleFactory} from '@material/ripple/component';\nimport {MDCRippleFoundation} from '@material/ripple/foundation';\nimport {MDCRippleCapableSurface} from '@material/ripple/types';\n\nimport {MDCTextFieldAdapter, MDCTextFieldInputAdapter, MDCTextFieldLabelAdapter, MDCTextFieldLineRippleAdapter, MDCTextFieldOutlineAdapter, MDCTextFieldRootAdapter} from './adapter';\nimport {MDCTextFieldCharacterCounter, MDCTextFieldCharacterCounterFactory} from './character-counter/component';\nimport {MDCTextFieldCharacterCounterFoundation} from './character-counter/foundation';\nimport {cssClasses, strings} from './constants';\nimport {MDCTextFieldFoundation} from './foundation';\nimport {MDCTextFieldHelperText, MDCTextFieldHelperTextFactory} from './helper-text/component';\nimport {MDCTextFieldHelperTextFoundation} from './helper-text/foundation';\nimport {MDCTextFieldIcon, MDCTextFieldIconFactory} from './icon/component';\nimport {MDCTextFieldFoundationMap} from './types';\n\nexport class MDCTextField extends MDCComponent implements MDCRippleCapableSurface {\n static attachTo(root: Element): MDCTextField {\n return new MDCTextField(root);\n }\n\n ripple!: MDCRipple | null; // assigned in initialize()\n\n // The only required sub-element.\n private input!: HTMLInputElement; // assigned in initialize()\n\n // Optional sub-elements.\n private characterCounter!: MDCTextFieldCharacterCounter|\n null; // assigned in initialize()\n private helperText!: MDCTextFieldHelperText|null; // assigned in initialize()\n private label!: MDCFloatingLabel|null; // assigned in initialize()\n private leadingIcon!: MDCTextFieldIcon|null; // assigned in initialize()\n private lineRipple!: MDCLineRipple|null; // assigned in initialize()\n private outline!: MDCNotchedOutline|null; // assigned in initialize()\n private trailingIcon!: MDCTextFieldIcon|null; // assigned in initialize()\n private prefix!: Element|null; // assigned in initialize()\n private suffix!: Element|null; // assigned in initialize()\n\n initialize(\n rippleFactory: MDCRippleFactory = (el, foundation) => new MDCRipple(el, foundation),\n lineRippleFactory: MDCLineRippleFactory = (el) => new MDCLineRipple(el),\n helperTextFactory: MDCTextFieldHelperTextFactory = (el) => new MDCTextFieldHelperText(el),\n characterCounterFactory: MDCTextFieldCharacterCounterFactory = (el) => new MDCTextFieldCharacterCounter(el),\n iconFactory: MDCTextFieldIconFactory = (el) => new MDCTextFieldIcon(el),\n labelFactory: MDCFloatingLabelFactory = (el) => new MDCFloatingLabel(el),\n outlineFactory: MDCNotchedOutlineFactory = (el) => new MDCNotchedOutline(el),\n ) {\n this.input =\n this.root.querySelector(strings.INPUT_SELECTOR)!;\n\n const labelElement = this.root.querySelector(strings.LABEL_SELECTOR);\n this.label = labelElement ? labelFactory(labelElement) : null;\n\n const lineRippleElement = this.root.querySelector(strings.LINE_RIPPLE_SELECTOR);\n this.lineRipple =\n lineRippleElement ? lineRippleFactory(lineRippleElement) : null;\n\n const outlineElement = this.root.querySelector(strings.OUTLINE_SELECTOR);\n this.outline = outlineElement ? outlineFactory(outlineElement) : null;\n\n // Helper text\n const helperTextStrings = MDCTextFieldHelperTextFoundation.strings;\n const nextElementSibling = this.root.nextElementSibling;\n const hasHelperLine = (nextElementSibling && nextElementSibling.classList.contains(cssClasses.HELPER_LINE));\n const helperTextEl =\n hasHelperLine && nextElementSibling && nextElementSibling.querySelector(helperTextStrings.ROOT_SELECTOR);\n this.helperText = helperTextEl ? helperTextFactory(helperTextEl) : null;\n\n // Character counter\n const characterCounterStrings = MDCTextFieldCharacterCounterFoundation.strings;\n let characterCounterEl = this.root.querySelector(characterCounterStrings.ROOT_SELECTOR);\n // If character counter is not found in root element search in sibling element.\n if (!characterCounterEl && hasHelperLine && nextElementSibling) {\n characterCounterEl = nextElementSibling.querySelector(characterCounterStrings.ROOT_SELECTOR);\n }\n this.characterCounter =\n characterCounterEl ? characterCounterFactory(characterCounterEl) : null;\n\n // Leading icon\n const leadingIconEl =\n this.root.querySelector(strings.LEADING_ICON_SELECTOR);\n this.leadingIcon = leadingIconEl ? iconFactory(leadingIconEl) : null;\n\n // Trailing icon\n const trailingIconEl =\n this.root.querySelector(strings.TRAILING_ICON_SELECTOR);\n this.trailingIcon = trailingIconEl ? iconFactory(trailingIconEl) : null;\n\n // Prefix and Suffix\n this.prefix = this.root.querySelector(strings.PREFIX_SELECTOR);\n this.suffix = this.root.querySelector(strings.SUFFIX_SELECTOR);\n\n this.ripple = this.createRipple(rippleFactory);\n }\n\n destroy() {\n if (this.ripple) {\n this.ripple.destroy();\n }\n if (this.lineRipple) {\n this.lineRipple.destroy();\n }\n if (this.helperText) {\n this.helperText.destroy();\n }\n if (this.characterCounter) {\n this.characterCounter.destroy();\n }\n if (this.leadingIcon) {\n this.leadingIcon.destroy();\n }\n if (this.trailingIcon) {\n this.trailingIcon.destroy();\n }\n if (this.label) {\n this.label.destroy();\n }\n if (this.outline) {\n this.outline.destroy();\n }\n super.destroy();\n }\n\n /**\n * Initializes the Text Field's internal state based on the environment's\n * state.\n */\n initialSyncWithDOM() {\n this.disabled = this.input.disabled;\n }\n\n get value(): string {\n return this.foundation.getValue();\n }\n\n /**\n * @param value The value to set on the input.\n */\n set value(value: string) {\n this.foundation.setValue(value);\n }\n\n get disabled(): boolean {\n return this.foundation.isDisabled();\n }\n\n /**\n * @param disabled Sets the Text Field disabled or enabled.\n */\n set disabled(disabled: boolean) {\n this.foundation.setDisabled(disabled);\n }\n\n get valid(): boolean {\n return this.foundation.isValid();\n }\n\n /**\n * @param valid Sets the Text Field valid or invalid.\n */\n set valid(valid: boolean) {\n this.foundation.setValid(valid);\n }\n\n get required(): boolean {\n return this.input.required;\n }\n\n /**\n * @param required Sets the Text Field to required.\n */\n set required(required: boolean) {\n this.input.required = required;\n }\n\n get pattern(): string {\n return this.input.pattern;\n }\n\n /**\n * @param pattern Sets the input element's validation pattern.\n */\n set pattern(pattern: string) {\n this.input.pattern = pattern;\n }\n\n get minLength(): number {\n return this.input.minLength;\n }\n\n /**\n * @param minLength Sets the input element's minLength.\n */\n set minLength(minLength: number) {\n this.input.minLength = minLength;\n }\n\n get maxLength(): number {\n return this.input.maxLength;\n }\n\n /**\n * @param maxLength Sets the input element's maxLength.\n */\n set maxLength(maxLength: number) {\n // Chrome throws exception if maxLength is set to a value less than zero\n if (maxLength < 0) {\n this.input.removeAttribute('maxLength');\n } else {\n this.input.maxLength = maxLength;\n }\n }\n\n get min(): string {\n return this.input.min;\n }\n\n /**\n * @param min Sets the input element's min.\n */\n set min(min: string) {\n this.input.min = min;\n }\n\n get max(): string {\n return this.input.max;\n }\n\n /**\n * @param max Sets the input element's max.\n */\n set max(max: string) {\n this.input.max = max;\n }\n\n get step(): string {\n return this.input.step;\n }\n\n /**\n * @param step Sets the input element's step.\n */\n set step(step: string) {\n this.input.step = step;\n }\n\n /**\n * Sets the helper text element content.\n */\n set helperTextContent(content: string) {\n this.foundation.setHelperTextContent(content);\n }\n\n /**\n * Sets the aria label of the leading icon.\n */\n set leadingIconAriaLabel(label: string) {\n this.foundation.setLeadingIconAriaLabel(label);\n }\n\n /**\n * Sets the text content of the leading icon.\n */\n set leadingIconContent(content: string) {\n this.foundation.setLeadingIconContent(content);\n }\n\n /**\n * Sets the aria label of the trailing icon.\n */\n set trailingIconAriaLabel(label: string) {\n this.foundation.setTrailingIconAriaLabel(label);\n }\n\n /**\n * Sets the text content of the trailing icon.\n */\n set trailingIconContent(content: string) {\n this.foundation.setTrailingIconContent(content);\n }\n\n /**\n * Enables or disables the use of native validation. Use this for custom validation.\n * @param useNativeValidation Set this to false to ignore native input validation.\n */\n set useNativeValidation(useNativeValidation: boolean) {\n this.foundation.setUseNativeValidation(useNativeValidation);\n }\n\n /**\n * Gets the text content of the prefix, or null if it does not exist.\n */\n get prefixText(): string|null {\n return this.prefix ? this.prefix.textContent : null;\n }\n\n /**\n * Sets the text content of the prefix, if it exists.\n */\n set prefixText(prefixText: string|null) {\n if (this.prefix) {\n this.prefix.textContent = prefixText;\n }\n }\n\n /**\n * Gets the text content of the suffix, or null if it does not exist.\n */\n get suffixText(): string|null {\n return this.suffix ? this.suffix.textContent : null;\n }\n\n /**\n * Sets the text content of the suffix, if it exists.\n */\n set suffixText(suffixText: string|null) {\n if (this.suffix) {\n this.suffix.textContent = suffixText;\n }\n }\n\n /**\n * Focuses the input element.\n */\n focus() {\n this.input.focus();\n }\n\n /**\n * Recomputes the outline SVG path for the outline element.\n */\n layout() {\n const openNotch = this.foundation.shouldFloat;\n this.foundation.notchOutline(openNotch);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCTextFieldAdapter = {\n ...this.getRootAdapterMethods(),\n ...this.getInputAdapterMethods(),\n ...this.getLabelAdapterMethods(),\n ...this.getLineRippleAdapterMethods(),\n ...this.getOutlineAdapterMethods(),\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCTextFieldFoundation(adapter, this.getFoundationMap());\n }\n\n private getRootAdapterMethods(): MDCTextFieldRootAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: (className) => this.root.classList.add(className),\n removeClass: (className) => this.root.classList.remove(className),\n hasClass: (className) => this.root.classList.contains(className),\n registerTextFieldInteractionHandler: (evtType, handler) => {\n this.listen(evtType, handler);\n },\n deregisterTextFieldInteractionHandler: (evtType, handler) => {\n this.unlisten(evtType, handler);\n },\n registerValidationAttributeChangeHandler: (handler) => {\n const getAttributesList = (mutationsList: MutationRecord[]): string[] => {\n return mutationsList\n .map((mutation) => mutation.attributeName)\n .filter((attributeName) => attributeName) as string[];\n };\n const observer = new MutationObserver((mutationsList) => handler(getAttributesList(mutationsList)));\n const config = {attributes: true};\n observer.observe(this.input, config);\n return observer;\n },\n deregisterValidationAttributeChangeHandler: (observer) => {\n observer.disconnect();\n },\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private getInputAdapterMethods(): MDCTextFieldInputAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n getNativeInput: () => this.input,\n setInputAttr: (attr, value) => {\n this.input.setAttribute(attr, value);\n },\n removeInputAttr: (attr) => {\n this.input.removeAttribute(attr);\n },\n isFocused: () => document.activeElement === this.input,\n registerInputInteractionHandler: (evtType, handler) => {\n this.input.addEventListener(evtType, handler, applyPassive());\n },\n deregisterInputInteractionHandler: (evtType, handler) => {\n this.input.removeEventListener(evtType, handler, applyPassive());\n },\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private getLabelAdapterMethods(): MDCTextFieldLabelAdapter {\n return {\n floatLabel: (shouldFloat) => {\n this.label && this.label.float(shouldFloat);\n },\n getLabelWidth: () => this.label ? this.label.getWidth() : 0,\n hasLabel: () => Boolean(this.label),\n shakeLabel: (shouldShake) => {\n this.label && this.label.shake(shouldShake);\n },\n setLabelRequired: (isRequired) => {\n this.label && this.label.setRequired(isRequired);\n },\n };\n }\n\n private getLineRippleAdapterMethods(): MDCTextFieldLineRippleAdapter {\n return {\n activateLineRipple: () => {\n if (this.lineRipple) {\n this.lineRipple.activate();\n }\n },\n deactivateLineRipple: () => {\n if (this.lineRipple) {\n this.lineRipple.deactivate();\n }\n },\n setLineRippleTransformOrigin: (normalizedX) => {\n if (this.lineRipple) {\n this.lineRipple.setRippleCenter(normalizedX);\n }\n },\n };\n }\n\n private getOutlineAdapterMethods(): MDCTextFieldOutlineAdapter {\n return {\n closeOutline: () => {\n this.outline && this.outline.closeNotch();\n },\n hasOutline: () => Boolean(this.outline),\n notchOutline: (labelWidth) => {\n this.outline && this.outline.notch(labelWidth);\n },\n };\n }\n\n /**\n * @return A map of all subcomponents to subfoundations.\n */\n private getFoundationMap(): Partial {\n return {\n characterCounter: this.characterCounter ?\n this.characterCounter.foundationForTextField :\n undefined,\n helperText: this.helperText ? this.helperText.foundationForTextField :\n undefined,\n leadingIcon: this.leadingIcon ? this.leadingIcon.foundationForTextField :\n undefined,\n trailingIcon: this.trailingIcon ?\n this.trailingIcon.foundationForTextField :\n undefined,\n };\n }\n\n private createRipple(rippleFactory: MDCRippleFactory): MDCRipple|null {\n const isTextArea = this.root.classList.contains(cssClasses.TEXTAREA);\n const isOutlined = this.root.classList.contains(cssClasses.OUTLINED);\n\n if (isTextArea || isOutlined) {\n return null;\n }\n\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCRippleAdapter = {\n ...MDCRipple.createAdapter(this),\n isSurfaceActive: () => ponyfill.matches(this.input, ':active'),\n registerInteractionHandler: (evtType, handler) => {\n this.input.addEventListener(evtType, handler, applyPassive());\n },\n deregisterInteractionHandler: (evtType, handler) => {\n this.input.removeEventListener(evtType, handler, applyPassive());\n },\n };\n // tslint:enable:object-literal-sort-keys\n return rippleFactory(this.root, new MDCRippleFoundation(adapter));\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst strings = {\n ARIA_CONTROLS: 'aria-controls',\n ARIA_DESCRIBEDBY: 'aria-describedby',\n INPUT_SELECTOR: '.mdc-text-field__input',\n LABEL_SELECTOR: '.mdc-floating-label',\n LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',\n LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',\n OUTLINE_SELECTOR: '.mdc-notched-outline',\n PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',\n SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',\n TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'\n};\n\nconst cssClasses = {\n DISABLED: 'mdc-text-field--disabled',\n FOCUSED: 'mdc-text-field--focused',\n HELPER_LINE: 'mdc-text-field-helper-line',\n INVALID: 'mdc-text-field--invalid',\n LABEL_FLOATING: 'mdc-text-field--label-floating',\n NO_LABEL: 'mdc-text-field--no-label',\n OUTLINED: 'mdc-text-field--outlined',\n ROOT: 'mdc-text-field',\n TEXTAREA: 'mdc-text-field--textarea',\n WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',\n WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',\n};\n\nconst numbers = {\n LABEL_SCALE: 0.75,\n};\n\n/**\n * Whitelist based off of https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n * under the \"Validation-related attributes\" section.\n */\nconst VALIDATION_ATTR_WHITELIST = [\n 'pattern', 'min', 'max', 'required', 'step', 'minlength', 'maxlength',\n];\n\n/**\n * Label should always float for these types as they show some UI even if value is empty.\n */\nconst ALWAYS_FLOAT_TYPES = [\n 'color', 'date', 'datetime-local', 'month', 'range', 'time', 'week',\n];\n\nexport {cssClasses, strings, numbers, VALIDATION_ATTR_WHITELIST, ALWAYS_FLOAT_TYPES};\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCTextFieldAdapter} from './adapter';\nimport {MDCTextFieldCharacterCounterFoundation} from './character-counter/foundation';\nimport {ALWAYS_FLOAT_TYPES, cssClasses, numbers, strings, VALIDATION_ATTR_WHITELIST} from './constants';\nimport {MDCTextFieldHelperTextFoundation} from './helper-text/foundation';\nimport {MDCTextFieldIconFoundation} from './icon/foundation';\nimport {MDCTextFieldFoundationMap, MDCTextFieldNativeInputElement} from './types';\n\ntype PointerDownEventType = 'mousedown'|'touchstart';\ntype InteractionEventType = 'click'|'keydown';\n\nconst POINTERDOWN_EVENTS: PointerDownEventType[] = ['mousedown', 'touchstart'];\nconst INTERACTION_EVENTS: InteractionEventType[] = ['click', 'keydown'];\n\nexport class MDCTextFieldFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get numbers() {\n return numbers;\n }\n\n private get shouldAlwaysFloat(): boolean {\n const type = this.getNativeInput().type;\n return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;\n }\n\n get shouldFloat(): boolean {\n return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||\n this.isBadInput();\n }\n\n get shouldShake(): boolean {\n return !this.isFocused && !this.isValid() && !!this.getValue();\n }\n\n /**\n * See {@link MDCTextFieldAdapter} for typing information on parameters and\n * return types.\n */\n static get defaultAdapter(): MDCTextFieldAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n hasClass: () => true,\n setInputAttr: () => undefined,\n removeInputAttr: () => undefined,\n registerTextFieldInteractionHandler: () => undefined,\n deregisterTextFieldInteractionHandler: () => undefined,\n registerInputInteractionHandler: () => undefined,\n deregisterInputInteractionHandler: () => undefined,\n registerValidationAttributeChangeHandler: () =>\n new MutationObserver(() => undefined),\n deregisterValidationAttributeChangeHandler: () => undefined,\n getNativeInput: () => null,\n isFocused: () => false,\n activateLineRipple: () => undefined,\n deactivateLineRipple: () => undefined,\n setLineRippleTransformOrigin: () => undefined,\n shakeLabel: () => undefined,\n floatLabel: () => undefined,\n setLabelRequired: () => undefined,\n hasLabel: () => false,\n getLabelWidth: () => 0,\n hasOutline: () => false,\n notchOutline: () => undefined,\n closeOutline: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private isFocused = false;\n private receivedUserInput = false;\n private valid = true;\n private useNativeValidation = true;\n private validateOnValueChange = true;\n\n private readonly inputFocusHandler: () => void;\n private readonly inputBlurHandler: SpecificEventListener<'blur'>;\n private readonly inputInputHandler: SpecificEventListener<'input'>;\n private readonly setPointerXOffset:\n SpecificEventListener;\n private readonly textFieldInteractionHandler:\n SpecificEventListener;\n private readonly validationAttributeChangeHandler:\n (attributesList: string[]) => void;\n private validationObserver!: MutationObserver; // assigned in init()\n\n private readonly helperText?: MDCTextFieldHelperTextFoundation;\n private readonly characterCounter?: MDCTextFieldCharacterCounterFoundation;\n private readonly leadingIcon?: MDCTextFieldIconFoundation;\n private readonly trailingIcon?: MDCTextFieldIconFoundation;\n\n /**\n * @param adapter\n * @param foundationMap Map from subcomponent names to their subfoundations.\n */\n constructor(\n adapter?: Partial,\n foundationMap: Partial = {}) {\n super({...MDCTextFieldFoundation.defaultAdapter, ...adapter});\n\n this.helperText = foundationMap.helperText;\n this.characterCounter = foundationMap.characterCounter;\n this.leadingIcon = foundationMap.leadingIcon;\n this.trailingIcon = foundationMap.trailingIcon;\n\n this.inputFocusHandler = () => {\n this.activateFocus();\n };\n this.inputBlurHandler = () => {\n this.deactivateFocus();\n };\n this.inputInputHandler = () => {\n this.handleInput();\n };\n this.setPointerXOffset = (evt) => {\n this.setTransformOrigin(evt);\n };\n this.textFieldInteractionHandler = () => {\n this.handleTextFieldInteraction();\n };\n this.validationAttributeChangeHandler = (attributesList) => {\n this.handleValidationAttributeChange(attributesList);\n };\n }\n\n init() {\n if (this.adapter.hasLabel() && this.getNativeInput().required) {\n this.adapter.setLabelRequired(true);\n }\n\n if (this.adapter.isFocused()) {\n this.inputFocusHandler();\n } else if (this.adapter.hasLabel() && this.shouldFloat) {\n this.notchOutline(true);\n this.adapter.floatLabel(true);\n this.styleFloating(true);\n }\n\n this.adapter.registerInputInteractionHandler(\n 'focus', this.inputFocusHandler);\n this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.registerInputInteractionHandler(\n 'input', this.inputInputHandler);\n for (const evtType of POINTERDOWN_EVENTS) {\n this.adapter.registerInputInteractionHandler(\n evtType, this.setPointerXOffset);\n }\n for (const evtType of INTERACTION_EVENTS) {\n this.adapter.registerTextFieldInteractionHandler(\n evtType, this.textFieldInteractionHandler);\n }\n this.validationObserver =\n this.adapter.registerValidationAttributeChangeHandler(\n this.validationAttributeChangeHandler);\n this.setcharacterCounter(this.getValue().length);\n }\n\n destroy() {\n this.adapter.deregisterInputInteractionHandler(\n 'focus', this.inputFocusHandler);\n this.adapter.deregisterInputInteractionHandler(\n 'blur', this.inputBlurHandler);\n this.adapter.deregisterInputInteractionHandler(\n 'input', this.inputInputHandler);\n for (const evtType of POINTERDOWN_EVENTS) {\n this.adapter.deregisterInputInteractionHandler(\n evtType, this.setPointerXOffset);\n }\n for (const evtType of INTERACTION_EVENTS) {\n this.adapter.deregisterTextFieldInteractionHandler(\n evtType, this.textFieldInteractionHandler);\n }\n this.adapter.deregisterValidationAttributeChangeHandler(\n this.validationObserver);\n }\n\n /**\n * Handles user interactions with the Text Field.\n */\n handleTextFieldInteraction() {\n const nativeInput = this.adapter.getNativeInput();\n if (nativeInput && nativeInput.disabled) {\n return;\n }\n this.receivedUserInput = true;\n }\n\n /**\n * Handles validation attribute changes\n */\n handleValidationAttributeChange(attributesList: string[]): void {\n attributesList.some((attributeName) => {\n if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {\n this.styleValidity(true);\n this.adapter.setLabelRequired(this.getNativeInput().required);\n return true;\n }\n return false;\n });\n\n if (attributesList.indexOf('maxlength') > -1) {\n this.setcharacterCounter(this.getValue().length);\n }\n }\n\n /**\n * Opens/closes the notched outline.\n */\n notchOutline(openNotch: boolean) {\n if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {\n return;\n }\n\n if (openNotch) {\n const labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;\n this.adapter.notchOutline(labelWidth);\n } else {\n this.adapter.closeOutline();\n }\n }\n\n /**\n * Activates the text field focus state.\n */\n activateFocus() {\n this.isFocused = true;\n this.styleFocused(this.isFocused);\n this.adapter.activateLineRipple();\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (this.helperText &&\n (this.helperText.isPersistent() || !this.helperText.isValidation() ||\n !this.valid)) {\n this.helperText.showToScreenReader();\n }\n }\n\n /**\n * Sets the line ripple's transform origin, so that the line ripple activate\n * animation will animate out from the user's click location.\n */\n setTransformOrigin(evt: TouchEvent|MouseEvent): void {\n if (this.isDisabled() || this.adapter.hasOutline()) {\n return;\n }\n\n const touches = (evt as TouchEvent).touches;\n const targetEvent = touches ? touches[0] : evt;\n const targetClientRect =\n (targetEvent.target as Element).getBoundingClientRect();\n const normalizedX =\n (targetEvent as MouseEvent).clientX - targetClientRect.left;\n this.adapter.setLineRippleTransformOrigin(normalizedX);\n }\n\n /**\n * Handles input change of text input and text area.\n */\n handleInput() {\n this.autoCompleteFocus();\n this.setcharacterCounter(this.getValue().length);\n }\n\n /**\n * Activates the Text Field's focus state in cases when the input value\n * changes without user input (e.g. programmatically).\n */\n autoCompleteFocus() {\n if (!this.receivedUserInput) {\n this.activateFocus();\n }\n }\n\n /**\n * Deactivates the Text Field's focus state.\n */\n deactivateFocus() {\n this.isFocused = false;\n this.adapter.deactivateLineRipple();\n const isValid = this.isValid();\n this.styleValidity(isValid);\n this.styleFocused(this.isFocused);\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (!this.shouldFloat) {\n this.receivedUserInput = false;\n }\n }\n\n getValue(): string {\n return this.getNativeInput().value;\n }\n\n /**\n * @param value The value to set on the input Element.\n */\n setValue(value: string): void {\n // Prevent Safari from moving the caret to the end of the input when the\n // value has not changed.\n if (this.getValue() !== value) {\n this.getNativeInput().value = value;\n }\n this.setcharacterCounter(value.length);\n if (this.validateOnValueChange) {\n const isValid = this.isValid();\n this.styleValidity(isValid);\n }\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n if (this.validateOnValueChange) {\n this.adapter.shakeLabel(this.shouldShake);\n }\n }\n }\n\n /**\n * @return The custom validity state, if set; otherwise, the result of a\n * native validity check.\n */\n isValid(): boolean {\n return this.useNativeValidation ? this.isNativeInputValid() : this.valid;\n }\n\n /**\n * @param isValid Sets the custom validity state of the Text Field.\n */\n setValid(isValid: boolean): void {\n this.valid = isValid;\n this.styleValidity(isValid);\n\n const shouldShake = !isValid && !this.isFocused && !!this.getValue();\n if (this.adapter.hasLabel()) {\n this.adapter.shakeLabel(shouldShake);\n }\n }\n\n /**\n * @param shouldValidate Whether or not validity should be updated on\n * value change.\n */\n setValidateOnValueChange(shouldValidate: boolean): void {\n this.validateOnValueChange = shouldValidate;\n }\n\n /**\n * @return Whether or not validity should be updated on value change. `true`\n * by default.\n */\n getValidateOnValueChange(): boolean {\n return this.validateOnValueChange;\n }\n\n /**\n * Enables or disables the use of native validation. Use this for custom\n * validation.\n * @param useNativeValidation Set this to false to ignore native input\n * validation.\n */\n setUseNativeValidation(useNativeValidation: boolean): void {\n this.useNativeValidation = useNativeValidation;\n }\n\n isDisabled(): boolean {\n return this.getNativeInput().disabled;\n }\n\n /**\n * @param disabled Sets the text-field disabled or enabled.\n */\n setDisabled(disabled: boolean): void {\n this.getNativeInput().disabled = disabled;\n this.styleDisabled(disabled);\n }\n\n /**\n * @param content Sets the content of the helper text.\n */\n setHelperTextContent(content: string): void {\n if (this.helperText) {\n this.helperText.setContent(content);\n }\n }\n\n /**\n * Sets the aria label of the leading icon.\n */\n setLeadingIconAriaLabel(label: string): void {\n if (this.leadingIcon) {\n this.leadingIcon.setAriaLabel(label);\n }\n }\n\n /**\n * Sets the text content of the leading icon.\n */\n setLeadingIconContent(content: string): void {\n if (this.leadingIcon) {\n this.leadingIcon.setContent(content);\n }\n }\n\n /**\n * Sets the aria label of the trailing icon.\n */\n setTrailingIconAriaLabel(label: string): void {\n if (this.trailingIcon) {\n this.trailingIcon.setAriaLabel(label);\n }\n }\n\n /**\n * Sets the text content of the trailing icon.\n */\n setTrailingIconContent(content: string): void {\n if (this.trailingIcon) {\n this.trailingIcon.setContent(content);\n }\n }\n\n /**\n * Sets character counter values that shows characters used and the total\n * character limit.\n */\n private setcharacterCounter(currentLength: number): void {\n if (!this.characterCounter) {\n return;\n }\n\n const maxLength = this.getNativeInput().maxLength;\n if (maxLength === -1) {\n throw new Error(\n 'MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');\n }\n\n this.characterCounter.setCounterValue(currentLength, maxLength);\n }\n\n /**\n * @return True if the Text Field input fails in converting the user-supplied\n * value.\n */\n private isBadInput(): boolean {\n // The badInput property is not supported in IE 11 💩.\n return this.getNativeInput().validity.badInput || false;\n }\n\n /**\n * @return The result of native validity checking (ValidityState.valid).\n */\n private isNativeInputValid(): boolean {\n return this.getNativeInput().validity.valid;\n }\n\n /**\n * Styles the component based on the validity state.\n */\n private styleValidity(isValid: boolean): void {\n const {INVALID} = MDCTextFieldFoundation.cssClasses;\n if (isValid) {\n this.adapter.removeClass(INVALID);\n } else {\n this.adapter.addClass(INVALID);\n }\n if (this.helperText) {\n this.helperText.setValidity(isValid);\n\n // We dynamically set or unset aria-describedby for validation helper text\n // only, based on whether the field is valid\n const helperTextValidation = this.helperText.isValidation();\n if (!helperTextValidation) {\n return;\n }\n\n const helperTextVisible = this.helperText.isVisible();\n const helperTextId = this.helperText.getId();\n\n if (helperTextVisible && helperTextId) {\n this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId);\n } else {\n this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY);\n }\n }\n }\n\n /**\n * Styles the component based on the focused state.\n */\n private styleFocused(isFocused: boolean): void {\n const {FOCUSED} = MDCTextFieldFoundation.cssClasses;\n if (isFocused) {\n this.adapter.addClass(FOCUSED);\n } else {\n this.adapter.removeClass(FOCUSED);\n }\n }\n\n /**\n * Styles the component based on the disabled state.\n */\n private styleDisabled(isDisabled: boolean): void {\n const {DISABLED, INVALID} = MDCTextFieldFoundation.cssClasses;\n if (isDisabled) {\n this.adapter.addClass(DISABLED);\n this.adapter.removeClass(INVALID);\n } else {\n this.adapter.removeClass(DISABLED);\n }\n\n if (this.leadingIcon) {\n this.leadingIcon.setDisabled(isDisabled);\n }\n\n if (this.trailingIcon) {\n this.trailingIcon.setDisabled(isDisabled);\n }\n }\n\n /**\n * Styles the component based on the label floating state.\n */\n private styleFloating(isFloating: boolean): void {\n const {LABEL_FLOATING} = MDCTextFieldFoundation.cssClasses;\n if (isFloating) {\n this.adapter.addClass(LABEL_FLOATING);\n } else {\n this.adapter.removeClass(LABEL_FLOATING);\n }\n }\n\n /**\n * @return The native text input element from the host environment, or an\n * object with the same shape for unit tests.\n */\n private getNativeInput(): MDCTextFieldNativeInputElement {\n // this.adapter may be undefined in foundation unit tests. This happens when\n // testdouble is creating a mock object and invokes the\n // shouldShake/shouldFloat getters (which in turn call getValue(), which\n // calls this method) before init() has been called from the MDCTextField\n // constructor. To work around that issue, we return a dummy object.\n const nativeInput = this.adapter ? this.adapter.getNativeInput() : null;\n return nativeInput || {\n disabled: false,\n maxLength: -1,\n required: false,\n type: 'input',\n validity: {\n badInput: false,\n valid: true,\n },\n value: '',\n };\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldFoundation;\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCTextFieldHelperTextAdapter {\n /**\n * Adds a class to the helper text element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the helper text element.\n */\n removeClass(className: string): void;\n\n /**\n * Returns whether or not the helper text element contains the given class.\n */\n hasClass(className: string): boolean;\n\n /**\n * @return the specified attribute's value on the helper text element.\n */\n getAttr(attr: string): string|null;\n\n /**\n * Sets an attribute with a given value on the helper text element.\n */\n setAttr(attr: string, value: string): void;\n\n /**\n * Removes an attribute from the helper text element.\n */\n removeAttr(attr: string): void;\n\n /**\n * Sets the text content for the helper text element.\n */\n setContent(content: string): void;\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCTextFieldHelperTextAdapter} from './adapter';\nimport {MDCTextFieldHelperTextFoundation} from './foundation';\n\nexport type MDCTextFieldHelperTextFactory =\n (el: Element, foundation?: MDCTextFieldHelperTextFoundation) => MDCTextFieldHelperText;\n\nexport class MDCTextFieldHelperText extends MDCComponent {\n static attachTo(root: Element): MDCTextFieldHelperText {\n return new MDCTextFieldHelperText(root);\n }\n\n // Provided for access by MDCTextField component\n get foundationForTextField(): MDCTextFieldHelperTextFoundation {\n return this.foundation;\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCTextFieldHelperTextAdapter = {\n addClass: (className) => this.root.classList.add(className),\n removeClass: (className) => this.root.classList.remove(className),\n hasClass: (className) => this.root.classList.contains(className),\n getAttr: (attr) => this.root.getAttribute(attr),\n setAttr: (attr, value) => this.root.setAttribute(attr, value),\n removeAttr: (attr) => this.root.removeAttribute(attr),\n setContent: (content) => {\n this.root.textContent = content;\n },\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCTextFieldHelperTextFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n HELPER_TEXT_PERSISTENT: 'mdc-text-field-helper-text--persistent',\n HELPER_TEXT_VALIDATION_MSG: 'mdc-text-field-helper-text--validation-msg',\n ROOT: 'mdc-text-field-helper-text',\n};\n\nconst strings = {\n ARIA_HIDDEN: 'aria-hidden',\n ROLE: 'role',\n ROOT_SELECTOR: `.${cssClasses.ROOT}`,\n};\n\nexport {strings, cssClasses};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCTextFieldHelperTextAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\nexport class MDCTextFieldHelperTextFoundation extends MDCFoundation {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n /**\n * See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCTextFieldHelperTextAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n hasClass: () => false,\n getAttr: () => null,\n setAttr: () => undefined,\n removeAttr: () => undefined,\n setContent: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n constructor(adapter?: Partial) {\n super({...MDCTextFieldHelperTextFoundation.defaultAdapter, ...adapter});\n }\n\n\n getId(): string|null {\n return this.adapter.getAttr('id');\n }\n\n isVisible(): boolean {\n return this.adapter.getAttr(strings.ARIA_HIDDEN) !== 'true';\n }\n\n /**\n * Sets the content of the helper text field.\n */\n setContent(content: string) {\n this.adapter.setContent(content);\n }\n\n isPersistent(): boolean {\n return this.adapter.hasClass(cssClasses.HELPER_TEXT_PERSISTENT);\n }\n\n /**\n * @param isPersistent Sets the persistency of the helper text.\n */\n setPersistent(isPersistent: boolean) {\n if (isPersistent) {\n this.adapter.addClass(cssClasses.HELPER_TEXT_PERSISTENT);\n } else {\n this.adapter.removeClass(cssClasses.HELPER_TEXT_PERSISTENT);\n }\n }\n\n /**\n * @return whether the helper text acts as an error validation message.\n */\n isValidation(): boolean {\n return this.adapter.hasClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n }\n\n /**\n * @param isValidation True to make the helper text act as an error validation message.\n */\n setValidation(isValidation: boolean) {\n if (isValidation) {\n this.adapter.addClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n } else {\n this.adapter.removeClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n }\n }\n\n /**\n * Makes the helper text visible to the screen reader.\n */\n showToScreenReader() {\n this.adapter.removeAttr(strings.ARIA_HIDDEN);\n }\n\n /**\n * Sets the validity of the helper text based on the input validity.\n */\n setValidity(inputIsValid: boolean) {\n const helperTextIsPersistent = this.adapter.hasClass(cssClasses.HELPER_TEXT_PERSISTENT);\n const helperTextIsValidationMsg = this.adapter.hasClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n const validationMsgNeedsDisplay = helperTextIsValidationMsg && !inputIsValid;\n\n if (validationMsgNeedsDisplay) {\n this.showToScreenReader();\n this.adapter.setAttr(strings.ROLE, 'alert');\n } else {\n this.adapter.removeAttr(strings.ROLE);\n }\n\n if (!helperTextIsPersistent && !validationMsgNeedsDisplay) {\n this.hide();\n }\n }\n\n /**\n * Hides the help text from screen readers.\n */\n private hide() {\n this.adapter.setAttr(strings.ARIA_HIDDEN, 'true');\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldHelperTextFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport {cssClasses as helperTextCssClasses, strings as helperTextStrings} from './constants';\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener} from '@material/base/types';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCTextFieldIconAdapter {\n /**\n * Gets the value of an attribute on the icon element.\n */\n getAttr(attr: string): string | null;\n\n /**\n * Sets an attribute on the icon element.\n */\n setAttr(attr: string, value: string): void;\n\n /**\n * Removes an attribute from the icon element.\n */\n removeAttr(attr: string): void;\n\n /**\n * Sets the text content of the icon element.\n */\n setContent(content: string): void;\n\n /**\n * Registers an event listener on the icon element for a given event.\n */\n registerInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener on the icon element for a given event.\n */\n deregisterInteractionHandler(evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Emits a custom event \"MDCTextField:icon\" denoting a user has clicked the icon.\n */\n notifyIconAction(): void;\n}\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCTextFieldIconAdapter} from './adapter';\nimport {MDCTextFieldIconFoundation} from './foundation';\n\nexport type MDCTextFieldIconFactory = (el: Element, foundation?: MDCTextFieldIconFoundation) => MDCTextFieldIcon;\n\nexport class MDCTextFieldIcon extends MDCComponent {\n static attachTo(root: Element): MDCTextFieldIcon {\n return new MDCTextFieldIcon(root);\n }\n\n // Provided for access by MDCTextField component\n get foundationForTextField(): MDCTextFieldIconFoundation {\n return this.foundation;\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCTextFieldIconAdapter = {\n getAttr: (attr) => this.root.getAttribute(attr),\n setAttr: (attr, value) => this.root.setAttribute(attr, value),\n removeAttr: (attr) => this.root.removeAttribute(attr),\n setContent: (content) => {\n this.root.textContent = content;\n },\n registerInteractionHandler: (evtType, handler) => this.listen(evtType, handler),\n deregisterInteractionHandler: (evtType, handler) => this.unlisten(evtType, handler),\n notifyIconAction: () => this.emit(\n MDCTextFieldIconFoundation.strings.ICON_EVENT, {} /* evtData */, true /* shouldBubble */),\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCTextFieldIconFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst strings = {\n ICON_EVENT: 'MDCTextField:icon',\n ICON_ROLE: 'button',\n};\n\nconst cssClasses = {\n ROOT: 'mdc-text-field__icon',\n};\n\nexport {strings, cssClasses};\n","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCTextFieldIconAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\n\ntype InteractionEventType = 'click' | 'keydown';\n\nconst INTERACTION_EVENTS: InteractionEventType[] = ['click', 'keydown'];\n\nexport class MDCTextFieldIconFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n /**\n * See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCTextFieldIconAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n getAttr: () => null,\n setAttr: () => undefined,\n removeAttr: () => undefined,\n setContent: () => undefined,\n registerInteractionHandler: () => undefined,\n deregisterInteractionHandler: () => undefined,\n notifyIconAction: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private savedTabIndex: string|null = null;\n private readonly interactionHandler:\n SpecificEventListener;\n\n constructor(adapter?: Partial) {\n super({...MDCTextFieldIconFoundation.defaultAdapter, ...adapter});\n\n this.interactionHandler = (evt) => {\n this.handleInteraction(evt);\n };\n }\n\n init() {\n this.savedTabIndex = this.adapter.getAttr('tabindex');\n\n for (const evtType of INTERACTION_EVENTS) {\n this.adapter.registerInteractionHandler(evtType, this.interactionHandler);\n }\n }\n\n destroy() {\n for (const evtType of INTERACTION_EVENTS) {\n this.adapter.deregisterInteractionHandler(\n evtType, this.interactionHandler);\n }\n }\n\n setDisabled(disabled: boolean) {\n if (!this.savedTabIndex) {\n return;\n }\n\n if (disabled) {\n this.adapter.setAttr('tabindex', '-1');\n this.adapter.removeAttr('role');\n } else {\n this.adapter.setAttr('tabindex', this.savedTabIndex);\n this.adapter.setAttr('role', strings.ICON_ROLE);\n }\n }\n\n setAriaLabel(label: string) {\n this.adapter.setAttr('aria-label', label);\n }\n\n setContent(content: string) {\n this.adapter.setContent(content);\n }\n\n handleInteraction(evt: MouseEvent | KeyboardEvent) {\n const isEnterKey = (evt as KeyboardEvent).key === 'Enter' || (evt as KeyboardEvent).keyCode === 13;\n if (evt.type === 'click' || isEnterKey) {\n evt.preventDefault(); // stop click from causing host label to focus\n // input\n this.adapter.notifyIconAction();\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldIconFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport {cssClasses as iconCssClasses, strings as iconStrings} from './constants';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\nexport * from './character-counter/index';\nexport * from './helper-text/index';\nexport * from './icon/index';\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCTextFieldCharacterCounterFoundation} from './character-counter/foundation';\nimport {MDCTextFieldHelperTextFoundation} from './helper-text/foundation';\nimport {MDCTextFieldIconFoundation} from './icon/foundation';\n\nexport type MDCTextFieldNativeInputElement = Pick & {\n validity: Pick;\n};\n\nexport interface MDCTextFieldFoundationMap {\n helperText: MDCTextFieldHelperTextFoundation;\n characterCounter: MDCTextFieldCharacterCounterFoundation;\n leadingIcon: MDCTextFieldIconFoundation;\n trailingIcon: MDCTextFieldIconFoundation;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {EventType, SpecificEventListener} from '@material/base/types';\nimport {CssClasses} from './constants';\n\n/**\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCTooltipAdapter {\n /**\n * @return the attribute string if present on the root element, null\n * otherwise.\n */\n getAttribute(attr: string): string|null;\n\n /**\n * Sets an attribute on the root element.\n */\n setAttribute(attr: string, value: string): void;\n\n /**\n * Adds a class onto the root element.\n */\n addClass(className: CssClasses): void;\n\n /**\n * @return whether or not the root element has the provided className.\n */\n hasClass(className: CssClasses): boolean;\n\n /**\n * Removes a class from the root element.\n */\n removeClass(className: CssClasses): void;\n\n /**\n * @return the value of the given computed style property on the root element.\n */\n getComputedStyleProperty(propertyName: string): string;\n\n /**\n * Sets the property value of the given style property on the root element.\n */\n setStyleProperty(propertyName: string, value: string): void;\n\n /**\n * Sets the property value of the given style property on the tooltip's\n * surface-animation element (indicated by the\n * \"mdc-tooltip__surface-animation\" class).\n */\n setSurfaceAnimationStyleProperty(propertyName: string, value: string): void;\n\n /**\n * @return the width of the viewport.\n */\n getViewportWidth(): number;\n\n /**\n * @return the height of the viewport.\n */\n getViewportHeight(): number;\n\n /**\n * @return the width and height of the tooltip element.\n */\n getTooltipSize(): {width: number, height: number};\n\n /**\n * @return the ClientRect for the anchor element.\n */\n getAnchorBoundingRect(): ClientRect|null;\n\n /**\n * @return the ClientRect for the parent of the tooltip element.\n */\n getParentBoundingRect(): ClientRect|null;\n\n /**\n * @return the attribute string if present on the anchor element, null\n * otherwise.\n */\n getAnchorAttribute(attr: string): string|null;\n\n /**\n * Sets an attribute on the anchor element.\n */\n setAnchorAttribute(attr: string, value: string): void;\n\n /**\n * @return true if the text direction is right-to-left.\n */\n isRTL(): boolean;\n\n /**\n * Checks if element is contained within the anchor element.\n */\n anchorContainsElement(element: HTMLElement): boolean;\n\n /**\n * Checks if element is contained within the tooltip element.\n */\n tooltipContainsElement(element: HTMLElement): boolean;\n\n /**\n * Sets focus on the anchor element.\n */\n focusAnchorElement(): void;\n\n /**\n * Registers an event listener to the root element.\n */\n registerEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener to the root element.\n */\n deregisterEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Registers an event listener to the anchor element.\n */\n registerAnchorEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener to the anchor element.\n */\n deregisterAnchorEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Registers an event listener to the document body.\n */\n registerDocumentEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener to the document body.\n */\n deregisterDocumentEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Registers an event listener to the window.\n */\n registerWindowEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Deregisters an event listener to the window.\n */\n deregisterWindowEventHandler(\n evtType: K, handler: SpecificEventListener): void;\n\n /**\n * Notification that the tooltip element has been fully hidden. Typically used\n * to wait for the hide animation to complete.\n */\n notifyHidden(): void;\n\n /**\n * @return the ClientRect for the caret element.\n */\n getTooltipCaretBoundingRect(): ClientRect|null;\n\n /**\n * Sets the property value of the given style property on both the caret-top\n * and caret-bottom elements.\n */\n setTooltipCaretStyle(propertyName: string, value: string): void;\n\n /**\n * Clears all inline styles set on the caret-top and caret-bottom elements.\n */\n clearTooltipCaretStyles(): void;\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {EventType, SpecificEventListener} from '@material/base/types';\n\nimport {MDCTooltipAdapter} from './adapter';\nimport {AnchorBoundaryType, CssClasses, events, PositionWithCaret, XPosition, YPosition} from './constants';\nimport {MDCTooltipFoundation} from './foundation';\n\nexport class MDCTooltip extends MDCComponent {\n static attachTo(root: Element) {\n return new MDCTooltip(root);\n }\n\n private anchorElem!: HTMLElement; // assigned in initialize\n private isTooltipRich!: boolean; // assigned in initialSyncWithDOM\n private isTooltipPersistent!: boolean; // assigned in initialSyncWithDOM\n\n private handleMouseEnter!: SpecificEventListener<'mouseenter'>;\n private handleFocus!: SpecificEventListener<'focus'>;\n private handleMouseLeave!: SpecificEventListener<'mouseleave'>;\n private handleTransitionEnd!: SpecificEventListener<'transitionend'>;\n private handleClick!: SpecificEventListener<'click'>;\n private handleTouchstart!: SpecificEventListener<'touchstart'>;\n private handleTouchend!: SpecificEventListener<'touchend'>;\n\n initialize() {\n const tooltipId = this.root.getAttribute('id');\n if (!tooltipId) {\n throw new Error('MDCTooltip: Tooltip component must have an id.');\n }\n\n const anchorElem = document.querySelector(\n `[data-tooltip-id=\"${tooltipId}\"]`) ||\n document.querySelector(\n `[aria-describedby=\"${tooltipId}\"]`);\n if (!anchorElem) {\n throw new Error(\n 'MDCTooltip: Tooltip component requires an anchor element annotated with [aria-describedby] or [data-tooltip-id].');\n }\n this.anchorElem = anchorElem;\n }\n\n initialSyncWithDOM() {\n this.isTooltipRich = this.foundation.isRich();\n this.isTooltipPersistent = this.foundation.isPersistent();\n\n this.handleMouseEnter = () => {\n this.foundation.handleAnchorMouseEnter();\n };\n\n this.handleFocus = (evt) => {\n this.foundation.handleAnchorFocus(evt);\n };\n\n this.handleMouseLeave = () => {\n this.foundation.handleAnchorMouseLeave();\n };\n\n this.handleTransitionEnd = () => {\n this.foundation.handleTransitionEnd();\n };\n\n this.handleClick = () => {\n this.foundation.handleAnchorClick();\n };\n\n this.handleTouchstart = () => {\n this.foundation.handleAnchorTouchstart();\n };\n\n this.handleTouchend = () => {\n this.foundation.handleAnchorTouchend();\n };\n\n if (this.isTooltipRich && this.isTooltipPersistent) {\n this.anchorElem.addEventListener('click', this.handleClick);\n } else {\n this.anchorElem.addEventListener('mouseenter', this.handleMouseEnter);\n // TODO(b/157075286): Listening for a 'focus' event is too broad.\n this.anchorElem.addEventListener('focus', this.handleFocus);\n this.anchorElem.addEventListener('mouseleave', this.handleMouseLeave);\n this.anchorElem.addEventListener('touchstart', this.handleTouchstart);\n this.anchorElem.addEventListener('touchend', this.handleTouchend);\n }\n\n this.listen('transitionend', this.handleTransitionEnd);\n }\n\n destroy() {\n if (this.anchorElem) {\n if (this.isTooltipRich && this.isTooltipPersistent) {\n this.anchorElem.removeEventListener('click', this.handleClick);\n } else {\n this.anchorElem.removeEventListener(\n 'mouseenter', this.handleMouseEnter);\n this.anchorElem.removeEventListener('focus', this.handleFocus);\n this.anchorElem.removeEventListener(\n 'mouseleave', this.handleMouseLeave);\n this.anchorElem.removeEventListener(\n 'touchstart', this.handleTouchstart);\n this.anchorElem.removeEventListener('touchend', this.handleTouchend);\n }\n }\n\n this.unlisten('transitionend', this.handleTransitionEnd);\n super.destroy();\n }\n\n setTooltipPosition(position: {\n xPos?: XPosition,\n yPos?: YPosition,\n withCaretPos?: PositionWithCaret\n }) {\n this.foundation.setTooltipPosition(position);\n }\n\n setAnchorBoundaryType(type: AnchorBoundaryType) {\n this.foundation.setAnchorBoundaryType(type);\n }\n\n setShowDelay(delayMs: number) {\n this.foundation.setShowDelay(delayMs);\n }\n\n setHideDelay(delayMs: number) {\n this.foundation.setHideDelay(delayMs);\n }\n\n hide() {\n this.foundation.hide();\n }\n\n isShown() {\n this.foundation.isShown();\n }\n\n /**\n * Method that allows user to specify additional elements that should have a\n * scroll event listener attached to it. This should be used in instances\n * where the anchor element is placed inside a scrollable container (that is\n * not the body element), and will ensure that the tooltip will stay attached\n * to the anchor on scroll.\n */\n attachScrollHandler(\n addEventListenerFn: (\n event: K, handler: SpecificEventListener) => void) {\n this.foundation.attachScrollHandler(addEventListenerFn);\n }\n\n /**\n * Must be used in conjunction with #attachScrollHandler. Removes the scroll\n * event handler from elements on the page.\n */\n removeScrollHandler(\n removeEventHandlerFn: (\n event: K, handler: SpecificEventListener) => void) {\n this.foundation.removeScrollHandler(removeEventHandlerFn);\n }\n\n getDefaultFoundation() {\n const adapter: MDCTooltipAdapter = {\n getAttribute: (attr) => this.root.getAttribute(attr),\n setAttribute: (attr, value) => {\n this.root.setAttribute(attr, value);\n },\n addClass: (className) => {\n this.root.classList.add(className);\n },\n hasClass: (className) => this.root.classList.contains(className),\n removeClass: (className) => {\n this.root.classList.remove(className);\n },\n getComputedStyleProperty: (propertyName) => {\n return window.getComputedStyle(this.root).getPropertyValue(\n propertyName);\n },\n setStyleProperty: (propertyName, value) => {\n (this.root as HTMLElement).style.setProperty(propertyName, value);\n },\n setSurfaceAnimationStyleProperty: (propertyName, value) => {\n const surface = this.root.querySelector(\n `.${CssClasses.SURFACE_ANIMATION}`);\n surface?.style.setProperty(propertyName, value);\n },\n getViewportWidth: () => window.innerWidth,\n getViewportHeight: () => window.innerHeight,\n getTooltipSize: () => {\n return {\n width: (this.root as HTMLElement).offsetWidth,\n height: (this.root as HTMLElement).offsetHeight\n };\n },\n getAnchorBoundingRect: () => {\n return this.anchorElem ? this.anchorElem.getBoundingClientRect() : null;\n },\n getParentBoundingRect: () => {\n return this.root.parentElement?.getBoundingClientRect() ?? null;\n },\n getAnchorAttribute: (attr) => {\n return this.anchorElem ? this.anchorElem.getAttribute(attr) : null;\n },\n setAnchorAttribute: (attr, value) => {\n this.anchorElem?.setAttribute(attr, value);\n },\n isRTL: () => getComputedStyle(this.root).direction === 'rtl',\n anchorContainsElement: (element) => {\n return !!this.anchorElem?.contains(element);\n },\n tooltipContainsElement: (element) => {\n return this.root.contains(element);\n },\n focusAnchorElement: () => {\n this.anchorElem?.focus();\n },\n registerEventHandler: (evt, handler) => {\n if (this.root instanceof HTMLElement) {\n this.root.addEventListener(evt, handler);\n }\n },\n deregisterEventHandler: (evt, handler) => {\n if (this.root instanceof HTMLElement) {\n this.root.removeEventListener(evt, handler);\n }\n },\n registerAnchorEventHandler: (evt, handler) => {\n this.anchorElem?.addEventListener(evt, handler);\n },\n deregisterAnchorEventHandler: (evt, handler) => {\n this.anchorElem?.removeEventListener(evt, handler);\n },\n registerDocumentEventHandler: (evt, handler) => {\n document.body.addEventListener(evt, handler);\n },\n deregisterDocumentEventHandler: (evt, handler) => {\n document.body.removeEventListener(evt, handler);\n },\n registerWindowEventHandler: (evt, handler) => {\n window.addEventListener(evt, handler);\n },\n deregisterWindowEventHandler: (evt, handler) => {\n window.removeEventListener(evt, handler);\n },\n notifyHidden: () => {\n this.emit(events.HIDDEN, {});\n },\n getTooltipCaretBoundingRect: () => {\n const caret = this.root.querySelector(\n `.${CssClasses.TOOLTIP_CARET_TOP}`);\n if (!caret) {\n return null;\n }\n return caret.getBoundingClientRect();\n },\n setTooltipCaretStyle: (propertyName, value) => {\n const topCaret = this.root.querySelector(\n `.${CssClasses.TOOLTIP_CARET_TOP}`);\n const bottomCaret = this.root.querySelector(\n `.${CssClasses.TOOLTIP_CARET_BOTTOM}`);\n\n if (!topCaret || !bottomCaret) {\n return;\n }\n\n topCaret.style.setProperty(propertyName, value);\n bottomCaret.style.setProperty(propertyName, value);\n },\n clearTooltipCaretStyles: () => {\n const topCaret = this.root.querySelector(\n `.${CssClasses.TOOLTIP_CARET_TOP}`);\n const bottomCaret = this.root.querySelector(\n `.${CssClasses.TOOLTIP_CARET_BOTTOM}`);\n\n if (!topCaret || !bottomCaret) {\n return;\n }\n topCaret.removeAttribute('style');\n bottomCaret.removeAttribute('style');\n },\n };\n\n //tslint:enable:object-literal-sort-keys\n return new MDCTooltipFoundation(adapter);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nenum CssClasses {\n RICH = 'mdc-tooltip--rich',\n SHOWN = 'mdc-tooltip--shown',\n SHOWING = 'mdc-tooltip--showing',\n SHOWING_TRANSITION = 'mdc-tooltip--showing-transition',\n HIDE = 'mdc-tooltip--hide',\n HIDE_TRANSITION = 'mdc-tooltip--hide-transition',\n MULTILINE_TOOLTIP = 'mdc-tooltip--multiline',\n SURFACE = 'mdc-tooltip__surface',\n SURFACE_ANIMATION = 'mdc-tooltip__surface-animation',\n TOOLTIP_CARET_TOP = 'mdc-tooltip__caret-surface-top',\n TOOLTIP_CARET_BOTTOM = 'mdc-tooltip__caret-surface-bottom',\n}\n\nconst numbers = {\n BOUNDED_ANCHOR_GAP: 4,\n UNBOUNDED_ANCHOR_GAP: 8,\n MIN_VIEWPORT_TOOLTIP_THRESHOLD: 8,\n HIDE_DELAY_MS: 600,\n SHOW_DELAY_MS: 500,\n // LINT.IfChange(tooltip-dimensions)\n MIN_HEIGHT: 24,\n MAX_WIDTH: 200,\n // LINT.ThenChange(_tooltip.scss:tooltip-dimensions)\n CARET_INDENTATION: 24,\n // LINT.IfChange(tooltip-anim-scale)\n ANIMATION_SCALE: 0.8,\n // LINT.ThenChange(_tooltip.scss:tooltip-anim-scale)\n};\n\nconst attributes = {\n ARIA_EXPANDED: 'aria-expanded',\n ARIA_HASPOPUP: 'aria-haspopup',\n PERSISTENT: 'data-mdc-tooltip-persistent',\n SCROLLABLE_ANCESTOR: 'tooltip-scrollable-ancestor',\n HAS_CARET: 'data-mdc-tooltip-has-caret',\n};\n\nconst events = {\n HIDDEN: 'MDCTooltip:hidden',\n};\n\n/** Enum for possible tooltip positioning relative to its anchor element. */\nenum XPosition {\n DETECTED = 0,\n START = 1,\n // Note: CENTER is not valid for rich tooltips.\n CENTER = 2,\n END = 3,\n}\n\nenum YPosition {\n DETECTED = 0,\n ABOVE = 1,\n BELOW = 2,\n}\n\n/**\n * Enum for possible anchor boundary types. This determines the gap between the\n * bottom of the anchor and the tooltip element.\n * Bounded anchors have an identifiable boundary (e.g. buttons).\n * Unbounded anchors don't have a visually declared boundary (e.g. plain text).\n */\nenum AnchorBoundaryType {\n BOUNDED = 0,\n UNBOUNDED = 1,\n}\n\nconst strings = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n TOP: 'top',\n BOTTOM: 'bottom'\n};\n\n/**\n * Enum for possible positions of a tooltip with caret (this specifies the\n * positioning of the tooltip relative to the anchor -- the position of the\n * caret will follow that of the tooltip). This can NOT be combined with the\n * above X/YPosition options. Naming for the enums follows: (vertical\n * placement)_(horizontal placement).\n */\nenum PositionWithCaret {\n DETECTED = 0,\n\n ABOVE_START = 1,\n ABOVE_CENTER = 2,\n ABOVE_END = 3,\n\n TOP_SIDE_START = 4,\n CENTER_SIDE_START = 5,\n BOTTOM_SIDE_START = 6,\n\n TOP_SIDE_END = 7,\n CENTER_SIDE_END = 8,\n BOTTOM_SIDE_END = 9,\n\n BELOW_START = 10,\n BELOW_CENTER = 11,\n BELOW_END = 12,\n}\n\nenum YPositionWithCaret {\n ABOVE = 1,\n BELOW = 2,\n SIDE_TOP = 3,\n SIDE_CENTER = 4,\n SIDE_BOTTOM = 5,\n}\n\nenum XPositionWithCaret {\n START = 1,\n CENTER = 2,\n END = 3,\n SIDE_START = 4,\n SIDE_END = 5,\n}\n\nexport {\n CssClasses,\n numbers,\n attributes,\n events,\n XPosition,\n AnchorBoundaryType,\n YPosition,\n strings,\n PositionWithCaret,\n YPositionWithCaret,\n XPositionWithCaret\n};\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {AnimationFrame} from '@material/animation/animationframe';\nimport {getCorrectPropertyName} from '@material/animation/util';\nimport {MDCFoundation} from '@material/base/foundation';\nimport {EventType, SpecificEventListener} from '@material/base/types';\nimport {KEY, normalizeKey} from '@material/dom/keyboard';\n\nimport {MDCTooltipAdapter} from './adapter';\nimport {AnchorBoundaryType, attributes, CssClasses, numbers, PositionWithCaret, strings, XPosition, XPositionWithCaret, YPosition, YPositionWithCaret} from './constants';\nimport {ShowTooltipOptions} from './types';\n\nconst {\n RICH,\n SHOWN,\n SHOWING,\n SHOWING_TRANSITION,\n HIDE,\n HIDE_TRANSITION,\n MULTILINE_TOOLTIP\n} = CssClasses;\n\nenum AnimationKeys {\n POLL_ANCHOR = 'poll_anchor'\n}\n\n// Accessing `window` without a `typeof` check will throw on Node environments.\nconst HAS_WINDOW = typeof window !== 'undefined';\n\nexport class MDCTooltipFoundation extends MDCFoundation {\n static get defaultAdapter(): MDCTooltipAdapter {\n return {\n getAttribute: () => null,\n setAttribute: () => undefined,\n addClass: () => undefined,\n hasClass: () => false,\n removeClass: () => undefined,\n getComputedStyleProperty: () => '',\n setStyleProperty: () => undefined,\n setSurfaceAnimationStyleProperty: () => undefined,\n getViewportWidth: () => 0,\n getViewportHeight: () => 0,\n getTooltipSize: () => ({width: 0, height: 0}),\n getAnchorBoundingRect: () =>\n ({top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0}),\n getParentBoundingRect: () =>\n ({top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0}),\n getAnchorAttribute: () => null,\n setAnchorAttribute: () => null,\n isRTL: () => false,\n anchorContainsElement: () => false,\n tooltipContainsElement: () => false,\n focusAnchorElement: () => undefined,\n registerEventHandler: () => undefined,\n deregisterEventHandler: () => undefined,\n registerAnchorEventHandler: () => undefined,\n deregisterAnchorEventHandler: () => undefined,\n registerDocumentEventHandler: () => undefined,\n deregisterDocumentEventHandler: () => undefined,\n registerWindowEventHandler: () => undefined,\n deregisterWindowEventHandler: () => undefined,\n notifyHidden: () => undefined,\n getTooltipCaretBoundingRect: () =>\n ({top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0}),\n setTooltipCaretStyle: () => undefined,\n clearTooltipCaretStyles: () => undefined,\n };\n }\n\n private interactiveTooltip!: boolean; // assigned in init()\n private richTooltip!: boolean; // assigned in init()\n private persistentTooltip!: boolean; // assigned in init()\n private hasCaret!: boolean; // assigned in init()\n private tooltipShown = false;\n private anchorGap = numbers.BOUNDED_ANCHOR_GAP;\n private xTooltipPos = XPosition.DETECTED;\n private yTooltipPos = YPosition.DETECTED;\n private tooltipPositionWithCaret = PositionWithCaret.DETECTED;\n // Minimum threshold distance needed between the tooltip and the viewport.\n private readonly minViewportTooltipThreshold =\n numbers.MIN_VIEWPORT_TOOLTIP_THRESHOLD;\n private hideDelayMs = numbers.HIDE_DELAY_MS;\n private showDelayMs = numbers.SHOW_DELAY_MS;\n\n private anchorRect: ClientRect|null = null;\n private parentRect: ClientRect|null = null;\n private frameId: number|null = null;\n private hideTimeout: number|null = null;\n private showTimeout: number|null = null;\n private readonly animFrame: AnimationFrame;\n private readonly anchorBlurHandler: SpecificEventListener<'blur'>;\n private readonly documentClickHandler: SpecificEventListener<'click'>;\n private readonly documentKeydownHandler: SpecificEventListener<'keydown'>;\n private readonly tooltipMouseEnterHandler:\n SpecificEventListener<'mouseenter'>;\n private readonly tooltipMouseLeaveHandler:\n SpecificEventListener<'mouseleave'>;\n private readonly richTooltipFocusOutHandler:\n SpecificEventListener<'focusout'>;\n private readonly windowScrollHandler: SpecificEventListener<'scroll'>;\n private readonly windowResizeHandler: SpecificEventListener<'resize'>;\n\n private readonly addAncestorScrollEventListeners = new Array<() => void>();\n private readonly removeAncestorScrollEventListeners = new Array<() => void>();\n\n constructor(adapter?: Partial) {\n super({...MDCTooltipFoundation.defaultAdapter, ...adapter});\n this.animFrame = new AnimationFrame();\n\n this.anchorBlurHandler = (evt) => {\n this.handleAnchorBlur(evt);\n };\n\n this.documentClickHandler = (evt) => {\n this.handleDocumentClick(evt);\n };\n\n this.documentKeydownHandler = (evt) => {\n this.handleKeydown(evt);\n };\n\n this.tooltipMouseEnterHandler = () => {\n this.handleTooltipMouseEnter();\n };\n\n this.tooltipMouseLeaveHandler = () => {\n this.handleTooltipMouseLeave();\n };\n\n this.richTooltipFocusOutHandler = (evt) => {\n this.handleRichTooltipFocusOut(evt);\n };\n\n this.windowScrollHandler = () => {\n this.handleWindowChangeEvent();\n };\n\n this.windowResizeHandler = () => {\n this.handleWindowChangeEvent();\n };\n }\n\n init() {\n this.richTooltip = this.adapter.hasClass(RICH);\n this.persistentTooltip =\n this.adapter.getAttribute(attributes.PERSISTENT) === 'true';\n this.interactiveTooltip =\n !!this.adapter.getAnchorAttribute(attributes.ARIA_EXPANDED) &&\n this.adapter.getAnchorAttribute(attributes.ARIA_HASPOPUP) === 'dialog';\n this.hasCaret = this.richTooltip &&\n this.adapter.getAttribute(attributes.HAS_CARET) === 'true';\n }\n\n isShown() {\n return this.tooltipShown;\n }\n\n isRich() {\n return this.richTooltip;\n }\n\n isPersistent() {\n return this.persistentTooltip;\n }\n\n handleAnchorMouseEnter() {\n if (this.tooltipShown) {\n // Covers the instance where a user hovers over the anchor to reveal the\n // tooltip, and then quickly navigates away and then back to the anchor.\n // The tooltip should stay visible without animating out and then back in\n // again.\n this.show();\n } else {\n // clearHideTimeout here since handleAnchorMouseLeave sets a hideTimeout\n // and that can execute before the showTimeout executes, resulting in hide\n // being called and the showTimeout set below to be cleared.\n this.clearHideTimeout();\n this.showTimeout = setTimeout(() => {\n this.show();\n }, this.showDelayMs);\n }\n }\n\n handleAnchorTouchstart() {\n this.showTimeout = setTimeout(() => {\n this.show();\n }, this.showDelayMs);\n // Prevent a context menu from appearing if user is long-pressing on a\n // tooltip anchor.\n this.adapter.registerWindowEventHandler(\n 'contextmenu', this.preventContextMenuOnLongTouch);\n }\n\n private preventContextMenuOnLongTouch(evt: MouseEvent) {\n evt.preventDefault();\n }\n\n handleAnchorTouchend() {\n this.clearShowTimeout();\n\n // Only remove the 'contextmenu' listener if the tooltip is not shown. When\n // the tooltip *is* shown, listener is removed in the close method.\n if (!this.isShown()) {\n this.adapter.deregisterWindowEventHandler(\n 'contextmenu', this.preventContextMenuOnLongTouch);\n }\n }\n\n handleAnchorFocus(evt: FocusEvent) {\n // TODO(b/157075286): Need to add some way to distinguish keyboard\n // navigation focus events from other focus events, and only show the\n // tooltip on the former of these events.\n const {relatedTarget} = evt;\n const tooltipContainsRelatedTarget = relatedTarget instanceof HTMLElement &&\n this.adapter.tooltipContainsElement(relatedTarget);\n // Do not show tooltip if the previous focus was on a tooltip element. This\n // occurs when a rich tooltip is closed and focus is restored to the anchor\n // or when user tab-navigates back into the anchor from the rich tooltip.\n if (tooltipContainsRelatedTarget) {\n return;\n }\n this.showTimeout = setTimeout(() => {\n this.show();\n }, this.showDelayMs);\n }\n\n handleAnchorMouseLeave() {\n this.clearShowTimeout();\n this.hideTimeout = setTimeout(() => {\n this.hide();\n }, this.hideDelayMs);\n }\n\n handleAnchorClick() {\n if (this.tooltipShown) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n handleDocumentClick(evt: MouseEvent) {\n const anchorOrTooltipContainsTargetElement =\n evt.target instanceof HTMLElement &&\n (this.adapter.anchorContainsElement(evt.target) ||\n this.adapter.tooltipContainsElement(evt.target));\n // For persistent rich tooltips, we will not hide if:\n // - The click target is within the anchor element. Otherwise, both\n // the anchor element's click handler and this handler will handle the\n // click (due to event propagation), resulting in a shown tooltip\n // being immediately hidden if the tooltip was initially hidden.\n // - The click target is within the tooltip element, since clicks\n // on the tooltip do not close the tooltip.\n if (this.richTooltip && this.persistentTooltip &&\n anchorOrTooltipContainsTargetElement) {\n return;\n }\n // Hide the tooltip immediately on click.\n this.hide();\n }\n\n handleKeydown(evt: KeyboardEvent) {\n // Hide the tooltip immediately on ESC key.\n const key = normalizeKey(evt);\n if (key === KEY.ESCAPE) {\n const tooltipContainsActiveElement =\n document.activeElement instanceof HTMLElement &&\n this.adapter.tooltipContainsElement(document.activeElement);\n if (tooltipContainsActiveElement) {\n this.adapter.focusAnchorElement();\n }\n this.hide();\n }\n }\n\n private handleAnchorBlur(evt: FocusEvent) {\n if (this.richTooltip) {\n const tooltipContainsRelatedTargetElement =\n evt.relatedTarget instanceof HTMLElement &&\n this.adapter.tooltipContainsElement(evt.relatedTarget);\n // If focus changed to the tooltip element, don't hide the tooltip.\n if (tooltipContainsRelatedTargetElement) {\n return;\n }\n }\n // Hide tooltip immediately on focus change.\n this.hide();\n }\n\n private handleTooltipMouseEnter() {\n this.show();\n }\n\n private handleTooltipMouseLeave() {\n this.clearShowTimeout();\n this.hideTimeout = setTimeout(() => {\n this.hide();\n }, this.hideDelayMs);\n }\n\n private handleRichTooltipFocusOut(evt: FocusEvent) {\n const anchorOrTooltipContainsRelatedTargetElement =\n evt.relatedTarget instanceof HTMLElement &&\n (this.adapter.anchorContainsElement(evt.relatedTarget) ||\n this.adapter.tooltipContainsElement(evt.relatedTarget));\n // If the focus is still within the anchor or the tooltip, do not hide the\n // tooltip.\n if (anchorOrTooltipContainsRelatedTargetElement) {\n return;\n }\n this.hide();\n }\n\n /**\n * On window resize or scroll, check the anchor position and size and\n * repostion tooltip if necessary.\n */\n private handleWindowChangeEvent() {\n // Since scroll and resize events can fire at a high rate, we throttle\n // the potential re-positioning of tooltip component using\n // requestAnimationFrame.\n this.animFrame.request(AnimationKeys.POLL_ANCHOR, () => {\n this.repositionTooltipOnAnchorMove();\n });\n }\n\n show() {\n this.clearHideTimeout();\n this.clearShowTimeout();\n\n if (this.tooltipShown) {\n return;\n }\n\n this.tooltipShown = true;\n const showTooltipOptions = this.parseShowTooltipOptions();\n if (!showTooltipOptions.hideFromScreenreader) {\n this.adapter.setAttribute('aria-hidden', 'false');\n }\n\n if (this.richTooltip) {\n if (this.interactiveTooltip) {\n this.adapter.setAnchorAttribute('aria-expanded', 'true');\n }\n this.adapter.registerEventHandler(\n 'focusout', this.richTooltipFocusOutHandler);\n }\n\n if (!this.persistentTooltip) {\n this.adapter.registerEventHandler(\n 'mouseenter', this.tooltipMouseEnterHandler);\n this.adapter.registerEventHandler(\n 'mouseleave', this.tooltipMouseLeaveHandler);\n }\n\n this.adapter.removeClass(HIDE);\n this.adapter.addClass(SHOWING);\n if (this.isTooltipMultiline() && !this.richTooltip) {\n this.adapter.addClass(MULTILINE_TOOLTIP);\n }\n this.anchorRect = this.adapter.getAnchorBoundingRect();\n this.parentRect = this.adapter.getParentBoundingRect();\n this.richTooltip ? this.positionRichTooltip() : this.positionPlainTooltip();\n\n this.adapter.registerAnchorEventHandler('blur', this.anchorBlurHandler);\n this.adapter.registerDocumentEventHandler(\n 'click', this.documentClickHandler);\n this.adapter.registerDocumentEventHandler(\n 'keydown', this.documentKeydownHandler);\n\n this.adapter.registerWindowEventHandler('scroll', this.windowScrollHandler);\n this.adapter.registerWindowEventHandler('resize', this.windowResizeHandler);\n // Register any additional scroll handlers\n for (const fn of this.addAncestorScrollEventListeners) {\n fn();\n }\n\n this.frameId = requestAnimationFrame(() => {\n this.clearAllAnimationClasses();\n this.adapter.addClass(SHOWN);\n this.adapter.addClass(SHOWING_TRANSITION);\n });\n }\n\n hide() {\n this.clearHideTimeout();\n this.clearShowTimeout();\n\n if (!this.tooltipShown) {\n return;\n }\n\n if (this.frameId) {\n cancelAnimationFrame(this.frameId);\n }\n\n this.tooltipShown = false;\n this.adapter.setAttribute('aria-hidden', 'true');\n this.adapter.deregisterEventHandler(\n 'focusout', this.richTooltipFocusOutHandler);\n if (this.richTooltip) {\n if (this.interactiveTooltip) {\n this.adapter.setAnchorAttribute('aria-expanded', 'false');\n }\n }\n\n if (!this.persistentTooltip) {\n this.adapter.deregisterEventHandler(\n 'mouseenter', this.tooltipMouseEnterHandler);\n this.adapter.deregisterEventHandler(\n 'mouseleave', this.tooltipMouseLeaveHandler);\n }\n\n this.clearAllAnimationClasses();\n this.adapter.addClass(HIDE);\n this.adapter.addClass(HIDE_TRANSITION);\n this.adapter.removeClass(SHOWN);\n\n this.adapter.deregisterAnchorEventHandler('blur', this.anchorBlurHandler);\n this.adapter.deregisterDocumentEventHandler(\n 'click', this.documentClickHandler);\n this.adapter.deregisterDocumentEventHandler(\n 'keydown', this.documentKeydownHandler);\n this.adapter.deregisterWindowEventHandler(\n 'scroll', this.windowScrollHandler);\n this.adapter.deregisterWindowEventHandler(\n 'resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler(\n 'contextmenu', this.preventContextMenuOnLongTouch);\n\n // Deregister any additional scroll handlers\n for (const fn of this.removeAncestorScrollEventListeners) {\n fn();\n }\n }\n\n handleTransitionEnd() {\n const isHidingTooltip = this.adapter.hasClass(HIDE);\n\n this.adapter.removeClass(SHOWING);\n this.adapter.removeClass(SHOWING_TRANSITION);\n this.adapter.removeClass(HIDE);\n this.adapter.removeClass(HIDE_TRANSITION);\n\n // If handleTransitionEnd is called after hiding the tooltip, the tooltip\n // will have the HIDE class (before calling the adapter removeClass method).\n // If tooltip is now hidden, send a notification that the animation has\n // completed and the tooltip is no longer visible.\n if (isHidingTooltip) {\n this.adapter.notifyHidden();\n }\n }\n\n private clearAllAnimationClasses() {\n this.adapter.removeClass(SHOWING_TRANSITION);\n this.adapter.removeClass(HIDE_TRANSITION);\n }\n\n setTooltipPosition(position: {\n xPos?: XPosition,\n yPos?: YPosition,\n withCaretPos?: PositionWithCaret\n }) {\n const {xPos, yPos, withCaretPos} = position;\n if (this.hasCaret && withCaretPos) {\n this.tooltipPositionWithCaret = withCaretPos;\n return;\n }\n\n if (xPos) {\n this.xTooltipPos = xPos;\n }\n\n if (yPos) {\n this.yTooltipPos = yPos;\n }\n }\n\n setAnchorBoundaryType(type: AnchorBoundaryType) {\n if (type === AnchorBoundaryType.UNBOUNDED) {\n this.anchorGap = numbers.UNBOUNDED_ANCHOR_GAP;\n } else {\n this.anchorGap = numbers.BOUNDED_ANCHOR_GAP;\n }\n }\n\n setShowDelay(delayMs: number) {\n this.showDelayMs = delayMs;\n }\n\n setHideDelay(delayMs: number) {\n this.hideDelayMs = delayMs;\n }\n\n private parseShowTooltipOptions(): ShowTooltipOptions {\n const hideFromScreenreader =\n Boolean(this.adapter.getAnchorAttribute('data-tooltip-id'));\n return {hideFromScreenreader};\n }\n\n private isTooltipMultiline() {\n const tooltipSize = this.adapter.getTooltipSize();\n return tooltipSize.height > numbers.MIN_HEIGHT &&\n tooltipSize.width >= numbers.MAX_WIDTH;\n }\n\n private positionPlainTooltip() {\n // A plain tooltip has `fixed` positioning and is placed as an immediate\n // child of the document body. Its positioning is calculated with respect to\n // the viewport.\n const {top, yTransformOrigin, left, xTransformOrigin} =\n this.calculateTooltipStyles(this.anchorRect);\n\n const transformProperty =\n HAS_WINDOW ? getCorrectPropertyName(window, 'transform') : 'transform';\n this.adapter.setSurfaceAnimationStyleProperty(\n `${transformProperty}-origin`,\n `${xTransformOrigin} ${yTransformOrigin}`);\n this.adapter.setStyleProperty('top', `${top}px`);\n this.adapter.setStyleProperty('left', `${left}px`);\n }\n\n private positionRichTooltip() {\n // TODO(b/177686782): Remove width setting when max-content is used to style\n // the rich tooltip.\n\n // getComputedStyleProperty is used instead of getTooltipSize since\n // getTooltipSize returns the offSetWidth, which includes the border and\n // padding. What we need is the width of the tooltip without border and\n // padding.\n const width = this.adapter.getComputedStyleProperty('width');\n // When rich tooltips are positioned within their parent containers, the\n // tooltip width might be shrunk if it collides with the edge of the parent\n // container. We set the width of the tooltip to prevent this.\n this.adapter.setStyleProperty('width', width);\n\n const {top, yTransformOrigin, left, xTransformOrigin} = this.hasCaret ?\n this.calculateTooltipWithCaretStyles(this.anchorRect) :\n this.calculateTooltipStyles(this.anchorRect);\n\n const transformProperty =\n HAS_WINDOW ? getCorrectPropertyName(window, 'transform') : 'transform';\n this.adapter.setSurfaceAnimationStyleProperty(\n `${transformProperty}-origin`,\n `${xTransformOrigin} ${yTransformOrigin}`);\n // A rich tooltip has `absolute` positioning and is placed as a sibling to\n // the anchor element. Its positioning is calculated with respect to the\n // parent element, and so the values need to be adjusted against the parent\n // element.\n const leftAdjustment = left - (this.parentRect?.left ?? 0);\n const topAdjustment = top - (this.parentRect?.top ?? 0);\n this.adapter.setStyleProperty('top', `${topAdjustment}px`);\n this.adapter.setStyleProperty('left', `${leftAdjustment}px`);\n }\n\n /**\n * Calculates the position of the tooltip. A tooltip will be placed beneath\n * the anchor element and aligned either with the 'start'/'end' edge of the\n * anchor element or the 'center'.\n *\n * Tooltip alignment is selected such that the tooltip maintains a threshold\n * distance away from the viewport (defaulting to 'center' alignment). If the\n * placement of the anchor prevents this threshold distance from being\n * maintained, the tooltip is positioned so that it does not collide with the\n * viewport.\n *\n * Users can specify an alignment, however, if this alignment results in the\n * tooltip colliding with the viewport, this specification is overwritten.\n */\n private calculateTooltipStyles(anchorRect: ClientRect|null) {\n if (!anchorRect) {\n return {top: 0, left: 0};\n }\n\n const tooltipSize = this.adapter.getTooltipSize();\n const top = this.calculateYTooltipDistance(anchorRect, tooltipSize.height);\n const left = this.calculateXTooltipDistance(anchorRect, tooltipSize.width);\n\n return {\n top: top.distance,\n yTransformOrigin: top.yTransformOrigin,\n left: left.distance,\n xTransformOrigin: left.xTransformOrigin\n };\n }\n\n /**\n * Calculates the `left` distance for the tooltip.\n * Returns the distance value and a string indicating the x-axis transform-\n * origin that should be used when animating the tooltip.\n */\n private calculateXTooltipDistance(\n anchorRect: ClientRect,\n tooltipWidth: number): ({distance: number, xTransformOrigin: string}) {\n const isLTR = !this.adapter.isRTL();\n let startPos, endPos, centerPos: number|undefined;\n let startTransformOrigin, endTransformOrigin: string;\n if (this.richTooltip) {\n startPos = isLTR ? anchorRect.left - tooltipWidth : anchorRect.right;\n endPos = isLTR ? anchorRect.right : anchorRect.left - tooltipWidth;\n\n startTransformOrigin = isLTR ? strings.RIGHT : strings.LEFT;\n endTransformOrigin = isLTR ? strings.LEFT : strings.RIGHT;\n } else {\n startPos = isLTR ? anchorRect.left : anchorRect.right - tooltipWidth;\n endPos = isLTR ? anchorRect.right - tooltipWidth : anchorRect.left;\n centerPos = anchorRect.left + (anchorRect.width - tooltipWidth) / 2;\n\n startTransformOrigin = isLTR ? strings.LEFT : strings.RIGHT;\n endTransformOrigin = isLTR ? strings.RIGHT : strings.LEFT;\n }\n\n const positionOptions = this.richTooltip ?\n this.determineValidPositionOptions(startPos, endPos) :\n // For plain tooltips, centerPos is defined\n this.determineValidPositionOptions(centerPos!, startPos, endPos);\n\n if (this.xTooltipPos === XPosition.START && positionOptions.has(startPos)) {\n return {distance: startPos, xTransformOrigin: startTransformOrigin};\n }\n if (this.xTooltipPos === XPosition.END && positionOptions.has(endPos)) {\n return {distance: endPos, xTransformOrigin: endTransformOrigin};\n }\n if (this.xTooltipPos === XPosition.CENTER &&\n positionOptions.has(centerPos)) {\n // This code path is only executed if calculating the distance for plain\n // tooltips. In this instance, centerPos will always be defined, so we can\n // safely assert that the returned value is non-null/undefined.\n return {distance: centerPos!, xTransformOrigin: strings.CENTER};\n }\n\n // If no user position is supplied, rich tooltips default to end pos, then\n // start position. Plain tooltips default to center, start, then end.\n const possiblePositions = this.richTooltip ?\n [\n {distance: endPos, xTransformOrigin: endTransformOrigin},\n {distance: startPos, xTransformOrigin: startTransformOrigin}\n ] :\n [\n {distance: centerPos!, xTransformOrigin: strings.CENTER},\n {distance: startPos, xTransformOrigin: startTransformOrigin},\n {distance: endPos, xTransformOrigin: endTransformOrigin}\n ];\n\n const validPosition =\n possiblePositions.find(({distance}) => positionOptions.has(distance));\n if (validPosition) {\n return validPosition;\n }\n\n // Indicates that all potential positions would result in the tooltip\n // colliding with the viewport. This would only occur when the anchor\n // element itself collides with the viewport, or the viewport is very\n // narrow. In this case, we allow the tooltip to be mis-aligned from the\n // anchor element.\n if (anchorRect.left < 0) {\n return {\n distance: this.minViewportTooltipThreshold,\n xTransformOrigin: strings.LEFT\n };\n } else {\n const viewportWidth = this.adapter.getViewportWidth();\n const distance =\n viewportWidth - (tooltipWidth + this.minViewportTooltipThreshold);\n return {distance, xTransformOrigin: strings.RIGHT};\n }\n }\n\n /**\n * Given the values for the horizontal alignments of the tooltip, calculates\n * which of these options would result in the tooltip maintaining the required\n * threshold distance vs which would result in the tooltip staying within the\n * viewport.\n *\n * A Set of values is returned holding the distances that would honor the\n * above requirements. Following the logic for determining the tooltip\n * position, if all alignments violate the threshold, then the returned Set\n * contains values that keep the tooltip within the viewport.\n */\n private determineValidPositionOptions(...positions: number[]) {\n const posWithinThreshold = new Set();\n const posWithinViewport = new Set();\n\n for (const position of positions) {\n if (this.positionHonorsViewportThreshold(position)) {\n posWithinThreshold.add(position);\n } else if (this.positionDoesntCollideWithViewport(position)) {\n posWithinViewport.add(position);\n }\n }\n\n return posWithinThreshold.size ? posWithinThreshold : posWithinViewport;\n }\n\n private positionHonorsViewportThreshold(leftPos: number) {\n const viewportWidth = this.adapter.getViewportWidth();\n const tooltipWidth = this.adapter.getTooltipSize().width;\n\n return leftPos + tooltipWidth <=\n viewportWidth - this.minViewportTooltipThreshold &&\n leftPos >= this.minViewportTooltipThreshold;\n }\n\n private positionDoesntCollideWithViewport(leftPos: number) {\n const viewportWidth = this.adapter.getViewportWidth();\n const tooltipWidth = this.adapter.getTooltipSize().width;\n\n return leftPos + tooltipWidth <= viewportWidth && leftPos >= 0;\n }\n\n /**\n * Calculates the `top` distance for the tooltip.\n * Returns the distance value and a string indicating the y-axis transform-\n * origin that should be used when animating the tooltip.\n */\n private calculateYTooltipDistance(\n anchorRect: ClientRect, tooltipHeight: number) {\n const belowYPos = anchorRect.bottom + this.anchorGap;\n const aboveYPos = anchorRect.top - (this.anchorGap + tooltipHeight);\n const yPositionOptions =\n this.determineValidYPositionOptions(aboveYPos, belowYPos);\n\n if (this.yTooltipPos === YPosition.ABOVE &&\n yPositionOptions.has(aboveYPos)) {\n return {distance: aboveYPos, yTransformOrigin: strings.BOTTOM};\n } else if (\n this.yTooltipPos === YPosition.BELOW &&\n yPositionOptions.has(belowYPos)) {\n return {distance: belowYPos, yTransformOrigin: strings.TOP};\n }\n\n if (yPositionOptions.has(belowYPos)) {\n return {distance: belowYPos, yTransformOrigin: strings.TOP};\n }\n\n if (yPositionOptions.has(aboveYPos)) {\n return {distance: aboveYPos, yTransformOrigin: strings.BOTTOM};\n }\n\n // Indicates that all potential positions would result in the tooltip\n // colliding with the viewport. This would only occur when the viewport is\n // very short.\n return {distance: belowYPos, yTransformOrigin: strings.TOP};\n }\n\n /**\n * Given the values for above/below alignment of the tooltip, calculates\n * which of these options would result in the tooltip maintaining the required\n * threshold distance vs which would result in the tooltip staying within the\n * viewport.\n *\n * A Set of values is returned holding the distances that would honor the\n * above requirements. Following the logic for determining the tooltip\n * position, if all possible alignments violate the threshold, then the\n * returned Set contains values that keep the tooltip within the viewport.\n */\n private determineValidYPositionOptions(\n aboveAnchorPos: number, belowAnchorPos: number) {\n const posWithinThreshold = new Set();\n const posWithinViewport = new Set();\n\n if (this.yPositionHonorsViewportThreshold(aboveAnchorPos)) {\n posWithinThreshold.add(aboveAnchorPos);\n } else if (this.yPositionDoesntCollideWithViewport(aboveAnchorPos)) {\n posWithinViewport.add(aboveAnchorPos);\n }\n\n if (this.yPositionHonorsViewportThreshold(belowAnchorPos)) {\n posWithinThreshold.add(belowAnchorPos);\n } else if (this.yPositionDoesntCollideWithViewport(belowAnchorPos)) {\n posWithinViewport.add(belowAnchorPos);\n }\n\n return posWithinThreshold.size ? posWithinThreshold : posWithinViewport;\n }\n\n private yPositionHonorsViewportThreshold(yPos: number) {\n const viewportHeight = this.adapter.getViewportHeight();\n const tooltipHeight = this.adapter.getTooltipSize().height;\n\n return yPos + tooltipHeight + this.minViewportTooltipThreshold <=\n viewportHeight &&\n yPos >= this.minViewportTooltipThreshold;\n }\n\n private yPositionDoesntCollideWithViewport(yPos: number) {\n const viewportHeight = this.adapter.getViewportHeight();\n const tooltipHeight = this.adapter.getTooltipSize().height;\n\n return yPos + tooltipHeight <= viewportHeight && yPos >= 0;\n }\n\n private calculateTooltipWithCaretStyles(anchorRect: ClientRect|null) {\n // Prior to grabbing the caret bounding rect, we clear all styles set on the\n // caret. This will ensure the width/height is consistent (since we rotate\n // the caret 90deg in some positions which would result in the height and\n // width bounding rect measurements flipping).\n this.adapter.clearTooltipCaretStyles();\n const caretSize = this.adapter.getTooltipCaretBoundingRect();\n if (!anchorRect || !caretSize) {\n return {position: PositionWithCaret.DETECTED, top: 0, left: 0};\n }\n\n // The caret for the rich tooltip is created by rotating/skewing/scaling\n // square div into a diamond shape and then hiding half of it so it looks\n // like a triangle. We use the boundingClientRect to calculate the\n // width/height of the element after the transforms (to the caret) have been\n // applied. Since the full tooltip is scaled by 0.8 for the entrance\n // animation, we divide by this value to retrieve the actual caret\n // dimensions.\n const caretWidth = caretSize.width / numbers.ANIMATION_SCALE;\n // Since we hide half of caret, we divide the returned ClientRect height\n // by 2.\n const caretHeight = (caretSize.height / numbers.ANIMATION_SCALE) / 2;\n const tooltipSize = this.adapter.getTooltipSize();\n\n const yOptions = this.calculateYWithCaretDistanceOptions(\n anchorRect, tooltipSize.height, {caretWidth, caretHeight});\n const xOptions = this.calculateXWithCaretDistanceOptions(\n anchorRect, tooltipSize.width, {caretWidth, caretHeight});\n\n let positionOptions =\n this.validateTooltipWithCaretDistances(yOptions, xOptions);\n if (positionOptions.size < 1) {\n positionOptions = this.generateBackupPositionOption(\n anchorRect, tooltipSize, {caretWidth, caretHeight});\n }\n\n const {position, xDistance, yDistance} =\n this.determineTooltipWithCaretDistance(positionOptions);\n\n // After determining the position of the tooltip relative to the anchor,\n // place the caret in the corresponding position and retrieve the necessary\n // x/y transform origins needed to properly animate the tooltip entrance.\n const {yTransformOrigin, xTransformOrigin} =\n this.setCaretPositionStyles(position, {caretWidth, caretHeight});\n\n return {\n yTransformOrigin,\n xTransformOrigin,\n top: yDistance,\n left: xDistance\n };\n }\n\n private calculateXWithCaretDistanceOptions(\n anchorRect: ClientRect, tooltipWidth: number,\n caretSize: {caretHeight: number, caretWidth: number}):\n Map {\n const {caretWidth, caretHeight} = caretSize;\n const isLTR = !this.adapter.isRTL();\n const anchorMidpoint = anchorRect.left + anchorRect.width / 2;\n\n const sideLeftAligned =\n anchorRect.left - (tooltipWidth + this.anchorGap + caretHeight);\n const sideRightAligned = anchorRect.right + this.anchorGap + caretHeight;\n const sideStartPos = isLTR ? sideLeftAligned : sideRightAligned;\n const sideEndPos = isLTR ? sideRightAligned : sideLeftAligned;\n\n const verticalLeftAligned =\n anchorMidpoint - (numbers.CARET_INDENTATION + caretWidth / 2);\n const verticalRightAligned = anchorMidpoint -\n (tooltipWidth - numbers.CARET_INDENTATION - caretWidth / 2);\n const verticalStartPos = isLTR ? verticalLeftAligned : verticalRightAligned;\n const verticalEndPos = isLTR ? verticalRightAligned : verticalLeftAligned;\n const verticalCenterPos = anchorMidpoint - tooltipWidth / 2;\n\n const possiblePositionsMap = new Map([\n [XPositionWithCaret.START, verticalStartPos],\n [XPositionWithCaret.CENTER, verticalCenterPos],\n [XPositionWithCaret.END, verticalEndPos],\n [XPositionWithCaret.SIDE_END, sideEndPos],\n [XPositionWithCaret.SIDE_START, sideStartPos],\n ]);\n return possiblePositionsMap;\n }\n\n private calculateYWithCaretDistanceOptions(\n anchorRect: ClientRect, tooltipHeight: number,\n caretSize: {caretHeight: number, caretWidth: number}):\n Map {\n const {caretWidth, caretHeight} = caretSize;\n const anchorMidpoint = anchorRect.top + anchorRect.height / 2;\n\n const belowYPos = anchorRect.bottom + this.anchorGap + caretHeight;\n const aboveYPos =\n anchorRect.top - (this.anchorGap + tooltipHeight + caretHeight);\n const sideTopYPos =\n anchorMidpoint - (numbers.CARET_INDENTATION + caretWidth / 2);\n const sideCenterYPos = anchorMidpoint - (tooltipHeight / 2);\n const sideBottomYPos = anchorMidpoint -\n (tooltipHeight - numbers.CARET_INDENTATION - caretWidth / 2);\n\n const possiblePositionsMap = new Map([\n [YPositionWithCaret.ABOVE, aboveYPos],\n [YPositionWithCaret.BELOW, belowYPos],\n [YPositionWithCaret.SIDE_TOP, sideTopYPos],\n [YPositionWithCaret.SIDE_CENTER, sideCenterYPos],\n [YPositionWithCaret.SIDE_BOTTOM, sideBottomYPos],\n ]);\n\n return possiblePositionsMap;\n }\n\n private repositionTooltipOnAnchorMove() {\n const newAnchorRect = this.adapter.getAnchorBoundingRect();\n if (!newAnchorRect || !this.anchorRect) return;\n\n if (newAnchorRect.top !== this.anchorRect.top ||\n newAnchorRect.left !== this.anchorRect.left ||\n newAnchorRect.height !== this.anchorRect.height ||\n newAnchorRect.width !== this.anchorRect.width) {\n this.anchorRect = newAnchorRect;\n this.parentRect = this.adapter.getParentBoundingRect();\n this.richTooltip ? this.positionRichTooltip() :\n this.positionPlainTooltip();\n }\n }\n\n /**\n * Given a list of x/y position options for a rich tooltip with caret, checks\n * if valid x/y combinations of these position options are either within the\n * viewport threshold, or simply within the viewport. Returns a map with the\n * valid x/y position combinations that all either honor the viewport\n * threshold or are simply inside within the viewport.\n */\n private validateTooltipWithCaretDistances(\n yOptions: Map,\n xOptions: Map) {\n const posWithinThreshold =\n new Map();\n const posWithinViewport =\n new Map();\n\n // If a tooltip has a caret, not all combinations of YPositionWithCarets and\n // XPositionWithCarets are possible. Because of this we only check the\n // validity of a given XPositionWithCaret if a potential corresponding\n // YPositionWithCaret is valid.\n const validMappings = new Map([\n [\n YPositionWithCaret.ABOVE,\n [\n XPositionWithCaret.START, XPositionWithCaret.CENTER,\n XPositionWithCaret.END\n ]\n ],\n [\n YPositionWithCaret.BELOW,\n [\n XPositionWithCaret.START, XPositionWithCaret.CENTER,\n XPositionWithCaret.END\n ]\n ],\n [\n YPositionWithCaret.SIDE_TOP,\n [XPositionWithCaret.SIDE_START, XPositionWithCaret.SIDE_END]\n ],\n [\n YPositionWithCaret.SIDE_CENTER,\n [XPositionWithCaret.SIDE_START, XPositionWithCaret.SIDE_END]\n ],\n [\n YPositionWithCaret.SIDE_BOTTOM,\n [XPositionWithCaret.SIDE_START, XPositionWithCaret.SIDE_END]\n ],\n ]);\n\n for (const y of validMappings.keys()) {\n const yDistance = yOptions.get(y)!;\n if (this.yPositionHonorsViewportThreshold(yDistance)) {\n for (const x of validMappings.get(y)!) {\n const xDistance = xOptions.get(x)!;\n if (this.positionHonorsViewportThreshold(xDistance)) {\n const caretPositionName = this.caretPositionOptionsMapping(x, y);\n posWithinThreshold.set(caretPositionName, {xDistance, yDistance});\n }\n }\n } else if (this.yPositionDoesntCollideWithViewport(yDistance)) {\n for (const x of validMappings.get(y)!) {\n const xDistance = xOptions.get(x)!;\n if (this.positionDoesntCollideWithViewport(xDistance)) {\n const caretPositionName = this.caretPositionOptionsMapping(x, y);\n posWithinViewport.set(caretPositionName, {xDistance, yDistance});\n }\n }\n }\n }\n\n return posWithinThreshold.size ? posWithinThreshold : posWithinViewport;\n }\n\n /**\n * Method for generating a horizontal and vertical position for the tooltip if\n * all other calculated values are considered invalid. This would only happen\n * in situations of very small viewports/large tooltips.\n */\n private generateBackupPositionOption(\n anchorRect: ClientRect, tooltipSize: {width: number, height: number},\n caretSize: {caretHeight: number, caretWidth: number}) {\n const isLTR = !this.adapter.isRTL();\n let xDistance: number;\n let xPos: XPositionWithCaret;\n if (anchorRect.left < 0) {\n xDistance = this.minViewportTooltipThreshold + caretSize.caretHeight;\n xPos = isLTR ? XPositionWithCaret.END : XPositionWithCaret.START;\n } else {\n const viewportWidth = this.adapter.getViewportWidth();\n xDistance = viewportWidth -\n (tooltipSize.width + this.minViewportTooltipThreshold +\n caretSize.caretHeight);\n xPos = isLTR ? XPositionWithCaret.START : XPositionWithCaret.END;\n }\n\n let yDistance: number;\n let yPos: YPositionWithCaret;\n if (anchorRect.top < 0) {\n yDistance = this.minViewportTooltipThreshold + caretSize.caretHeight;\n yPos = YPositionWithCaret.BELOW;\n } else {\n const viewportHeight = this.adapter.getViewportHeight();\n yDistance = viewportHeight -\n (tooltipSize.height + this.minViewportTooltipThreshold +\n caretSize.caretHeight);\n yPos = YPositionWithCaret.ABOVE;\n }\n\n const caretPositionName = this.caretPositionOptionsMapping(xPos, yPos);\n return new Map(\n [[caretPositionName, {xDistance, yDistance}]]);\n }\n\n /**\n * Given a list of valid position options for a rich tooltip with caret,\n * returns the option that should be used.\n */\n private determineTooltipWithCaretDistance(\n options: Map):\n {position: PositionWithCaret, xDistance: number, yDistance: number} {\n if (options.has(this.tooltipPositionWithCaret)) {\n const tooltipPos = options.get(this.tooltipPositionWithCaret)!;\n return {\n position: this.tooltipPositionWithCaret,\n xDistance: tooltipPos.xDistance,\n yDistance: tooltipPos.yDistance,\n };\n }\n\n const orderPref = [\n PositionWithCaret.ABOVE_START, PositionWithCaret.ABOVE_CENTER,\n PositionWithCaret.ABOVE_END, PositionWithCaret.TOP_SIDE_START,\n PositionWithCaret.CENTER_SIDE_START, PositionWithCaret.BOTTOM_SIDE_START,\n PositionWithCaret.TOP_SIDE_END, PositionWithCaret.CENTER_SIDE_END,\n PositionWithCaret.BOTTOM_SIDE_END, PositionWithCaret.BELOW_START,\n PositionWithCaret.BELOW_CENTER, PositionWithCaret.BELOW_END\n ];\n\n // Before calling this method we check whether or not the \"options\" param\n // is empty and invoke a different method. We, therefore, can be certain\n // that \"validPosition\" will always be defined.\n const validPosition = orderPref.find((pos) => options.has(pos))!;\n const pos = options.get(validPosition)!;\n return {\n position: validPosition,\n xDistance: pos.xDistance,\n yDistance: pos.yDistance,\n };\n }\n\n /**\n * Returns the corresponding PositionWithCaret enum for the proivded\n * XPositionWithCaret and YPositionWithCaret enums. This mapping exists so our\n * public API accepts only PositionWithCaret enums (as all combinations of\n * XPositionWithCaret and YPositionWithCaret are not valid), but internally we\n * can calculate the X and Y positions of a rich tooltip with caret\n * separately.\n */\n private caretPositionOptionsMapping(\n xPos: XPositionWithCaret, yPos: YPositionWithCaret): PositionWithCaret {\n switch (yPos) {\n case YPositionWithCaret.ABOVE:\n if (xPos === XPositionWithCaret.START) {\n return PositionWithCaret.ABOVE_START;\n } else if (xPos === XPositionWithCaret.CENTER) {\n return PositionWithCaret.ABOVE_CENTER;\n } else if (xPos === XPositionWithCaret.END) {\n return PositionWithCaret.ABOVE_END;\n }\n break;\n case YPositionWithCaret.BELOW:\n if (xPos === XPositionWithCaret.START) {\n return PositionWithCaret.BELOW_START;\n } else if (xPos === XPositionWithCaret.CENTER) {\n return PositionWithCaret.BELOW_CENTER;\n } else if (xPos === XPositionWithCaret.END) {\n return PositionWithCaret.BELOW_END;\n }\n break;\n case YPositionWithCaret.SIDE_TOP:\n if (xPos === XPositionWithCaret.SIDE_START) {\n return PositionWithCaret.TOP_SIDE_START;\n } else if (xPos === XPositionWithCaret.SIDE_END) {\n return PositionWithCaret.TOP_SIDE_END;\n }\n break;\n case YPositionWithCaret.SIDE_CENTER:\n if (xPos === XPositionWithCaret.SIDE_START) {\n return PositionWithCaret.CENTER_SIDE_START;\n } else if (xPos === XPositionWithCaret.SIDE_END) {\n return PositionWithCaret.CENTER_SIDE_END;\n }\n break;\n case YPositionWithCaret.SIDE_BOTTOM:\n if (xPos === XPositionWithCaret.SIDE_START) {\n return PositionWithCaret.BOTTOM_SIDE_START;\n } else if (xPos === XPositionWithCaret.SIDE_END) {\n return PositionWithCaret.BOTTOM_SIDE_END;\n }\n break;\n default:\n break;\n }\n throw new Error(\n `MDCTooltipFoundation: Invalid caret position of ${xPos}, ${yPos}`);\n }\n\n /**\n * Given a PositionWithCaret, applies the correct styles to the caret element\n * so that it is positioned properly on the rich tooltip.\n * Returns the x and y positions of the caret, to be used as the\n * transform-origin on the tooltip itself for entrance animations.\n */\n private setCaretPositionStyles(position: PositionWithCaret, caretSize: {\n caretWidth: number,\n caretHeight: number\n }) {\n const values = this.calculateCaretPositionOnTooltip(position, caretSize);\n if (!values) {\n return {yTransformOrigin: 0, xTransformOrigin: 0};\n }\n // Prior to setting the caret position styles, clear any previous styles\n // set. This is necessary as all position options do not use the same\n // properties (e.g. using 'left' or 'right') and so old style properties\n // might not get overridden, causing misplaced carets.\n this.adapter.clearTooltipCaretStyles();\n\n this.adapter.setTooltipCaretStyle(values.yAlignment, values.yAxisPx);\n this.adapter.setTooltipCaretStyle(values.xAlignment, values.xAxisPx);\n // Value of scaleX is cos(skew), Math.cos() expects radians though, so we\n // must first convert the skew value (which is in degrees) to radians.\n const skewRadians = values.skew * (Math.PI / 180);\n const scaleX = Math.cos(skewRadians);\n\n this.adapter.setTooltipCaretStyle(\n 'transform',\n `rotate(${values.rotation}deg) skewY(${values.skew}deg) scaleX(${\n scaleX})`);\n this.adapter.setTooltipCaretStyle(\n 'transform-origin', `${values.xAlignment} ${values.yAlignment}`);\n return {\n yTransformOrigin: values.yTransformOrigin,\n xTransformOrigin: values.xTransformOrigin\n };\n }\n\n /**\n * Given a PositionWithCaret, determines the correct styles to position the\n * caret properly on the rich tooltip.\n */\n private calculateCaretPositionOnTooltip(\n tooltipPos: PositionWithCaret,\n caretSize: {caretWidth: number, caretHeight: number}) {\n const isLTR = !this.adapter.isRTL();\n const tooltipWidth = this.adapter.getComputedStyleProperty('width');\n const tooltipHeight = this.adapter.getComputedStyleProperty('height');\n if (!tooltipWidth || !tooltipHeight || !caretSize) {\n return;\n }\n\n const midpointWidth =\n `calc((${tooltipWidth} - ${caretSize.caretWidth}px) / 2)`;\n const midpointHeight =\n `calc((${tooltipHeight} - ${caretSize.caretWidth}px) / 2)`;\n const flushWithEdge = '0';\n const indentedFromEdge = `${numbers.CARET_INDENTATION}px`;\n const indentedFromWidth = `calc(${tooltipWidth} - ${indentedFromEdge})`;\n const indentedFromHeight = `calc(${tooltipHeight} - ${indentedFromEdge})`;\n const verticalRotation = 35;\n const horizontalRotation = Math.abs(90 - verticalRotation);\n const skewDeg = 20;\n\n switch (tooltipPos) {\n case PositionWithCaret.BELOW_CENTER:\n return {\n yAlignment: strings.TOP,\n xAlignment: strings.LEFT,\n yAxisPx: flushWithEdge,\n xAxisPx: midpointWidth,\n rotation: -1 * verticalRotation,\n skew: -1 * skewDeg,\n xTransformOrigin: midpointWidth,\n yTransformOrigin: flushWithEdge,\n };\n case PositionWithCaret.BELOW_END:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.RIGHT : strings.LEFT,\n yAxisPx: flushWithEdge,\n xAxisPx: indentedFromEdge,\n rotation: isLTR ? verticalRotation : -1 * verticalRotation,\n skew: isLTR ? skewDeg : -1 * skewDeg,\n xTransformOrigin: isLTR ? indentedFromWidth : indentedFromEdge,\n yTransformOrigin: flushWithEdge,\n };\n case PositionWithCaret.BELOW_START:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.LEFT : strings.RIGHT,\n yAxisPx: flushWithEdge,\n xAxisPx: indentedFromEdge,\n rotation: isLTR ? -1 * verticalRotation : verticalRotation,\n skew: isLTR ? -1 * skewDeg : skewDeg,\n xTransformOrigin: isLTR ? indentedFromEdge : indentedFromWidth,\n yTransformOrigin: flushWithEdge,\n };\n\n case PositionWithCaret.TOP_SIDE_END:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.LEFT : strings.RIGHT,\n yAxisPx: indentedFromEdge,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? horizontalRotation : -1 * horizontalRotation,\n skew: isLTR ? -1 * skewDeg : skewDeg,\n xTransformOrigin: isLTR ? flushWithEdge : tooltipWidth,\n yTransformOrigin: indentedFromEdge,\n };\n case PositionWithCaret.CENTER_SIDE_END:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.LEFT : strings.RIGHT,\n yAxisPx: midpointHeight,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? horizontalRotation : -1 * horizontalRotation,\n skew: isLTR ? -1 * skewDeg : skewDeg,\n xTransformOrigin: isLTR ? flushWithEdge : tooltipWidth,\n yTransformOrigin: midpointHeight,\n };\n case PositionWithCaret.BOTTOM_SIDE_END:\n return {\n yAlignment: strings.BOTTOM,\n xAlignment: isLTR ? strings.LEFT : strings.RIGHT,\n yAxisPx: indentedFromEdge,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? -1 * horizontalRotation : horizontalRotation,\n skew: isLTR ? skewDeg : -1 * skewDeg,\n xTransformOrigin: isLTR ? flushWithEdge : tooltipWidth,\n yTransformOrigin: indentedFromHeight,\n };\n\n case PositionWithCaret.TOP_SIDE_START:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.RIGHT : strings.LEFT,\n yAxisPx: indentedFromEdge,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? -1 * horizontalRotation : horizontalRotation,\n skew: isLTR ? skewDeg : -1 * skewDeg,\n xTransformOrigin: isLTR ? tooltipWidth : flushWithEdge,\n yTransformOrigin: indentedFromEdge,\n };\n case PositionWithCaret.CENTER_SIDE_START:\n return {\n yAlignment: strings.TOP,\n xAlignment: isLTR ? strings.RIGHT : strings.LEFT,\n yAxisPx: midpointHeight,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? -1 * horizontalRotation : horizontalRotation,\n skew: isLTR ? skewDeg : -1 * skewDeg,\n xTransformOrigin: isLTR ? tooltipWidth : flushWithEdge,\n yTransformOrigin: midpointHeight,\n };\n case PositionWithCaret.BOTTOM_SIDE_START:\n return {\n yAlignment: strings.BOTTOM,\n xAlignment: isLTR ? strings.RIGHT : strings.LEFT,\n yAxisPx: indentedFromEdge,\n xAxisPx: flushWithEdge,\n rotation: isLTR ? horizontalRotation : -1 * horizontalRotation,\n skew: isLTR ? -1 * skewDeg : skewDeg,\n xTransformOrigin: isLTR ? tooltipWidth : flushWithEdge,\n yTransformOrigin: indentedFromHeight,\n };\n\n case PositionWithCaret.ABOVE_CENTER:\n return {\n yAlignment: strings.BOTTOM,\n xAlignment: strings.LEFT,\n yAxisPx: flushWithEdge,\n xAxisPx: midpointWidth,\n rotation: verticalRotation,\n skew: skewDeg,\n xTransformOrigin: midpointWidth,\n yTransformOrigin: tooltipHeight,\n };\n case PositionWithCaret.ABOVE_END:\n return {\n yAlignment: strings.BOTTOM,\n xAlignment: isLTR ? strings.RIGHT : strings.LEFT,\n yAxisPx: flushWithEdge,\n xAxisPx: indentedFromEdge,\n rotation: isLTR ? -1 * verticalRotation : verticalRotation,\n skew: isLTR ? -1 * skewDeg : skewDeg,\n xTransformOrigin: isLTR ? indentedFromWidth : indentedFromEdge,\n yTransformOrigin: tooltipHeight,\n };\n default:\n case PositionWithCaret.ABOVE_START:\n return {\n yAlignment: strings.BOTTOM,\n xAlignment: isLTR ? strings.LEFT : strings.RIGHT,\n yAxisPx: flushWithEdge,\n xAxisPx: indentedFromEdge,\n rotation: isLTR ? verticalRotation : -1 * verticalRotation,\n skew: isLTR ? skewDeg : -1 * skewDeg,\n xTransformOrigin: isLTR ? indentedFromEdge : indentedFromWidth,\n yTransformOrigin: tooltipHeight,\n };\n }\n }\n\n private clearShowTimeout() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = null;\n }\n }\n\n private clearHideTimeout() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = null;\n }\n }\n\n /**\n * Method that allows user to specify additional elements that should have a\n * scroll event listener attached to it. This should be used in instances\n * where the anchor element is placed inside a scrollable container, and will\n * ensure that the tooltip will stay attached to the anchor on scroll.\n */\n attachScrollHandler(\n addEventListenerFn: (\n event: K, handler: SpecificEventListener) => void) {\n this.addAncestorScrollEventListeners.push(() => {\n addEventListenerFn('scroll', this.windowScrollHandler);\n });\n }\n\n /**\n * Must be used in conjunction with #attachScrollHandler. Removes the scroll\n * event handler from elements on the page.\n */\n removeScrollHandler(\n removeEventHandlerFn: (\n event: K, handler: SpecificEventListener) => void) {\n this.removeAncestorScrollEventListeners.push(() => {\n removeEventHandlerFn('scroll', this.windowScrollHandler);\n });\n }\n\n\n destroy() {\n if (this.frameId) {\n cancelAnimationFrame(this.frameId);\n this.frameId = null;\n }\n\n this.clearHideTimeout();\n this.clearShowTimeout();\n\n this.adapter.removeClass(SHOWN);\n this.adapter.removeClass(SHOWING_TRANSITION);\n this.adapter.removeClass(SHOWING);\n this.adapter.removeClass(HIDE);\n this.adapter.removeClass(HIDE_TRANSITION);\n\n if (this.richTooltip) {\n this.adapter.deregisterEventHandler(\n 'focusout', this.richTooltipFocusOutHandler);\n }\n\n if (!this.persistentTooltip) {\n this.adapter.deregisterEventHandler(\n 'mouseenter', this.tooltipMouseEnterHandler);\n this.adapter.deregisterEventHandler(\n 'mouseleave', this.tooltipMouseLeaveHandler);\n }\n\n this.adapter.deregisterAnchorEventHandler('blur', this.anchorBlurHandler);\n\n this.adapter.deregisterDocumentEventHandler(\n 'click', this.documentClickHandler);\n this.adapter.deregisterDocumentEventHandler(\n 'keydown', this.documentKeydownHandler);\n\n this.adapter.deregisterWindowEventHandler(\n 'scroll', this.windowScrollHandler);\n this.adapter.deregisterWindowEventHandler(\n 'resize', this.windowResizeHandler);\n for (const fn of this.removeAncestorScrollEventListeners) {\n fn();\n }\n\n this.animFrame.cancelAll();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTooltipFoundation;\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './foundation';\nexport * from './constants';\nexport * from './types';\n","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Available options for how the tooltip element should be shown.\n */\nexport interface ShowTooltipOptions {\n readonly hideFromScreenreader: boolean;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCTopAppBarAdapter {\n /**\n * Adds a class to the root Element.\n */\n addClass(className: string): void;\n\n /**\n * Removes a class from the root Element.\n */\n removeClass(className: string): void;\n\n /**\n * Returns true if the root Element contains the given class.\n */\n hasClass(className: string): boolean;\n\n /**\n * Sets the specified inline style property on the root Element to the given value.\n */\n setStyle(property: string, value: string): void;\n\n /**\n * Gets the height of the top app bar.\n */\n getTopAppBarHeight(): number;\n\n getViewportScrollY(): number;\n\n getTotalActionItems(): number;\n\n /**\n * Emits an event when the navigation icon is clicked.\n */\n notifyNavigationIconClicked(): void;\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCRipple, MDCRippleFactory} from '@material/ripple/component';\nimport {MDCTopAppBarAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\nimport {MDCFixedTopAppBarFoundation} from './fixed/foundation';\nimport {MDCTopAppBarBaseFoundation} from './foundation';\nimport {MDCShortTopAppBarFoundation} from './short/foundation';\nimport {MDCTopAppBarFoundation} from './standard/foundation';\n\nexport class MDCTopAppBar extends MDCComponent {\n static attachTo(root: Element): MDCTopAppBar {\n return new MDCTopAppBar(root);\n }\n\n private handleNavigationClick!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleWindowResize!:\n SpecificEventListener<'resize'>; // assigned in initialSyncWithDOM()\n private handleTargetScroll!:\n SpecificEventListener<'scroll'>; // assigned in initialSyncWithDOM()\n private navIcon!: Element|null;\n private iconRipples!: MDCRipple[];\n private scrollTarget!: EventTarget;\n\n initialize(rippleFactory: MDCRippleFactory = (el) => MDCRipple.attachTo(el)) {\n this.navIcon = this.root.querySelector(strings.NAVIGATION_ICON_SELECTOR);\n\n // Get all icons in the toolbar and instantiate the ripples\n const icons: Element[] =\n [].slice.call(this.root.querySelectorAll(strings.ACTION_ITEM_SELECTOR));\n if (this.navIcon) {\n icons.push(this.navIcon);\n }\n\n this.iconRipples = icons.map((icon) => {\n const ripple = rippleFactory(icon);\n ripple.unbounded = true;\n return ripple;\n });\n\n this.scrollTarget = window;\n }\n\n initialSyncWithDOM() {\n this.handleNavigationClick =\n this.foundation.handleNavigationClick.bind(this.foundation);\n this.handleWindowResize =\n this.foundation.handleWindowResize.bind(this.foundation);\n this.handleTargetScroll =\n this.foundation.handleTargetScroll.bind(this.foundation);\n\n this.scrollTarget.addEventListener(\n 'scroll', this.handleTargetScroll as EventListener);\n\n if (this.navIcon) {\n this.navIcon.addEventListener(\n 'click', this.handleNavigationClick as EventListener);\n }\n\n const isFixed = this.root.classList.contains(cssClasses.FIXED_CLASS);\n const isShort = this.root.classList.contains(cssClasses.SHORT_CLASS);\n if (!isShort && !isFixed) {\n window.addEventListener(\n 'resize', this.handleWindowResize as EventListener);\n }\n }\n\n destroy() {\n for (const iconRipple of this.iconRipples) {\n iconRipple.destroy();\n }\n this.scrollTarget.removeEventListener(\n 'scroll', this.handleTargetScroll as EventListener);\n if (this.navIcon) {\n this.navIcon.removeEventListener(\n 'click', this.handleNavigationClick as EventListener);\n }\n const isFixed = this.root.classList.contains(cssClasses.FIXED_CLASS);\n const isShort = this.root.classList.contains(cssClasses.SHORT_CLASS);\n if (!isShort && !isFixed) {\n window.removeEventListener(\n 'resize', this.handleWindowResize as EventListener);\n }\n super.destroy();\n }\n\n setScrollTarget(target: EventTarget) {\n // Remove scroll handler from the previous scroll target\n this.scrollTarget.removeEventListener(\n 'scroll', this.handleTargetScroll as EventListener);\n\n this.scrollTarget = target;\n\n // Initialize scroll handler on the new scroll target\n this.handleTargetScroll =\n this.foundation.handleTargetScroll.bind(this.foundation);\n this.scrollTarget.addEventListener(\n 'scroll', this.handleTargetScroll as EventListener);\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCTopAppBarAdapter = {\n hasClass: (className) => this.root.classList.contains(className),\n addClass: (className) => this.root.classList.add(className),\n removeClass: (className) => this.root.classList.remove(className),\n setStyle: (property, value) =>\n (this.root as HTMLElement).style.setProperty(property, value),\n getTopAppBarHeight: () => this.root.clientHeight,\n notifyNavigationIconClicked: () =>\n this.emit(strings.NAVIGATION_EVENT, {}),\n getViewportScrollY: () => {\n const win = this.scrollTarget as Window;\n const el = this.scrollTarget as Element;\n return win.pageYOffset !== undefined ? win.pageYOffset : el.scrollTop;\n },\n getTotalActionItems: () =>\n this.root.querySelectorAll(strings.ACTION_ITEM_SELECTOR).length,\n };\n // tslint:enable:object-literal-sort-keys\n\n let foundation: MDCTopAppBarBaseFoundation;\n if (this.root.classList.contains(cssClasses.SHORT_CLASS)) {\n foundation = new MDCShortTopAppBarFoundation(adapter);\n } else if (this.root.classList.contains(cssClasses.FIXED_CLASS)) {\n foundation = new MDCFixedTopAppBarFoundation(adapter);\n } else {\n foundation = new MDCTopAppBarFoundation(adapter);\n }\n\n return foundation;\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst cssClasses = {\n FIXED_CLASS: 'mdc-top-app-bar--fixed',\n FIXED_SCROLLED_CLASS: 'mdc-top-app-bar--fixed-scrolled',\n SHORT_CLASS: 'mdc-top-app-bar--short',\n SHORT_COLLAPSED_CLASS: 'mdc-top-app-bar--short-collapsed',\n SHORT_HAS_ACTION_ITEM_CLASS: 'mdc-top-app-bar--short-has-action-item',\n};\n\nconst numbers = {\n DEBOUNCE_THROTTLE_RESIZE_TIME_MS: 100,\n MAX_TOP_APP_BAR_HEIGHT: 128,\n};\n\nconst strings = {\n ACTION_ITEM_SELECTOR: '.mdc-top-app-bar__action-item',\n NAVIGATION_EVENT: 'MDCTopAppBar:nav',\n NAVIGATION_ICON_SELECTOR: '.mdc-top-app-bar__navigation-icon',\n ROOT_SELECTOR: '.mdc-top-app-bar',\n TITLE_SELECTOR: '.mdc-top-app-bar__title',\n};\n\nexport {cssClasses, numbers, strings};\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {cssClasses} from '../constants';\nimport {MDCTopAppBarFoundation} from '../standard/foundation';\n\nexport class MDCFixedTopAppBarFoundation extends MDCTopAppBarFoundation {\n /**\n * State variable for the previous scroll iteration top app bar state\n */\n private wasScrolled = false;\n\n /**\n * Scroll handler for applying/removing the modifier class on the fixed top app bar.\n * @override\n */\n handleTargetScroll() {\n const currentScroll = this.adapter.getViewportScrollY();\n\n if (currentScroll <= 0) {\n if (this.wasScrolled) {\n this.adapter.removeClass(cssClasses.FIXED_SCROLLED_CLASS);\n this.wasScrolled = false;\n }\n } else {\n if (!this.wasScrolled) {\n this.adapter.addClass(cssClasses.FIXED_SCROLLED_CLASS);\n this.wasScrolled = true;\n }\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFixedTopAppBarFoundation;\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCTopAppBarAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\n\nexport class MDCTopAppBarBaseFoundation extends MDCFoundation {\n static get strings() {\n return strings;\n }\n\n static get cssClasses() {\n return cssClasses;\n }\n\n static get numbers() {\n return numbers;\n }\n\n /**\n * See {@link MDCTopAppBarAdapter} for typing information on parameters and return types.\n */\n static get defaultAdapter(): MDCTopAppBarAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: () => undefined,\n removeClass: () => undefined,\n hasClass: () => false,\n setStyle: () => undefined,\n getTopAppBarHeight: () => 0,\n notifyNavigationIconClicked: () => undefined,\n getViewportScrollY: () => 0,\n getTotalActionItems: () => 0,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n /* istanbul ignore next: optional argument is not a branch statement */\n constructor(adapter?: Partial) {\n super({...MDCTopAppBarBaseFoundation.defaultAdapter, ...adapter});\n }\n\n /** Other variants of TopAppBar foundation overrides this method */\n handleTargetScroll() {} // tslint:disable-line:no-empty\n /** Other variants of TopAppBar foundation overrides this method */\n handleWindowResize() {} // tslint:disable-line:no-empty\n\n handleNavigationClick() {\n this.adapter.notifyNavigationIconClicked();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTopAppBarBaseFoundation;\n","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './fixed/foundation';\nexport * from './short/foundation';\nexport * from './standard/foundation';\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCTopAppBarAdapter} from '../adapter';\nimport {cssClasses} from '../constants';\nimport {MDCTopAppBarBaseFoundation} from '../foundation';\n\nexport class MDCShortTopAppBarFoundation extends MDCTopAppBarBaseFoundation {\n // Public visibility for backward compatibility.\n get isCollapsed(): boolean {\n return this.collapsed;\n }\n\n private collapsed = false;\n\n private isAlwaysCollapsed = false;\n\n /* istanbul ignore next: optional argument is not a branch statement */\n constructor(adapter?: Partial) {\n super(adapter);\n }\n\n init() {\n super.init();\n\n if (this.adapter.getTotalActionItems() > 0) {\n this.adapter.addClass(cssClasses.SHORT_HAS_ACTION_ITEM_CLASS);\n }\n\n // If initialized with SHORT_COLLAPSED_CLASS, the bar should always be collapsed\n this.setAlwaysCollapsed(\n this.adapter.hasClass(cssClasses.SHORT_COLLAPSED_CLASS));\n }\n\n /**\n * Set if the short top app bar should always be collapsed.\n *\n * @param value When `true`, bar will always be collapsed. When `false`, bar may collapse or expand based on scroll.\n */\n setAlwaysCollapsed(value: boolean) {\n this.isAlwaysCollapsed = !!value;\n if (this.isAlwaysCollapsed) {\n this.collapse();\n } else {\n // let maybeCollapseBar determine if the bar should be collapsed\n this.maybeCollapseBar();\n }\n }\n\n getAlwaysCollapsed() {\n return this.isAlwaysCollapsed;\n }\n\n /**\n * Scroll handler for applying/removing the collapsed modifier class on the short top app bar.\n * @override\n */\n handleTargetScroll() {\n this.maybeCollapseBar();\n }\n\n private maybeCollapseBar() {\n if (this.isAlwaysCollapsed) {\n return;\n }\n const currentScroll = this.adapter.getViewportScrollY();\n\n if (currentScroll <= 0) {\n if (this.collapsed) {\n this.uncollapse();\n }\n } else {\n if (!this.collapsed) {\n this.collapse();\n }\n }\n }\n\n private uncollapse() {\n this.adapter.removeClass(cssClasses.SHORT_COLLAPSED_CLASS);\n this.collapsed = false;\n }\n\n private collapse() {\n this.adapter.addClass(cssClasses.SHORT_COLLAPSED_CLASS);\n this.collapsed = true;\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCShortTopAppBarFoundation;\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCTopAppBarAdapter} from '../adapter';\nimport {numbers} from '../constants';\nimport {MDCTopAppBarBaseFoundation} from '../foundation';\n\nconst INITIAL_VALUE = 0;\n\nexport class MDCTopAppBarFoundation extends MDCTopAppBarBaseFoundation {\n /**\n * Indicates if the top app bar was docked in the previous scroll handler iteration.\n */\n private wasDocked = true;\n\n /**\n * Indicates if the top app bar is docked in the fully shown position.\n */\n private isDockedShowing = true;\n\n /**\n * Variable for current scroll position of the top app bar\n */\n private currentAppBarOffsetTop = 0;\n\n /**\n * Used to prevent the top app bar from being scrolled out of view during resize events\n */\n private isCurrentlyBeingResized = false;\n\n /**\n * The timeout that's used to throttle the resize events\n */\n private resizeThrottleId = INITIAL_VALUE;\n\n /**\n * Used for diffs of current scroll position vs previous scroll position\n */\n private lastScrollPosition: number;\n\n /**\n * Used to verify when the top app bar is completely showing or completely hidden\n */\n private topAppBarHeight: number;\n\n /**\n * The timeout that's used to debounce toggling the isCurrentlyBeingResized\n * variable after a resize\n */\n private resizeDebounceId = INITIAL_VALUE;\n\n /* istanbul ignore next: optional argument is not a branch statement */\n constructor(adapter?: Partial) {\n super(adapter);\n\n this.lastScrollPosition = this.adapter.getViewportScrollY();\n this.topAppBarHeight = this.adapter.getTopAppBarHeight();\n }\n\n destroy() {\n super.destroy();\n this.adapter.setStyle('top', '');\n }\n\n /**\n * Scroll handler for the default scroll behavior of the top app bar.\n * @override\n */\n handleTargetScroll() {\n const currentScrollPosition = Math.max(this.adapter.getViewportScrollY(), 0);\n const diff = currentScrollPosition - this.lastScrollPosition;\n this.lastScrollPosition = currentScrollPosition;\n\n // If the window is being resized the lastScrollPosition needs to be updated\n // but the current scroll of the top app bar should stay in the same\n // position.\n if (!this.isCurrentlyBeingResized) {\n this.currentAppBarOffsetTop -= diff;\n\n if (this.currentAppBarOffsetTop > 0) {\n this.currentAppBarOffsetTop = 0;\n } else if (Math.abs(this.currentAppBarOffsetTop) > this.topAppBarHeight) {\n this.currentAppBarOffsetTop = -this.topAppBarHeight;\n }\n\n this.moveTopAppBar();\n }\n }\n\n /**\n * Top app bar resize handler that throttle/debounce functions that execute updates.\n * @override\n */\n handleWindowResize() {\n // Throttle resize events 10 p/s\n if (!this.resizeThrottleId) {\n this.resizeThrottleId = setTimeout(() => {\n this.resizeThrottleId = INITIAL_VALUE;\n this.throttledResizeHandler();\n }, numbers.DEBOUNCE_THROTTLE_RESIZE_TIME_MS);\n }\n\n this.isCurrentlyBeingResized = true;\n\n if (this.resizeDebounceId) {\n clearTimeout(this.resizeDebounceId);\n }\n\n this.resizeDebounceId = setTimeout(() => {\n this.handleTargetScroll();\n this.isCurrentlyBeingResized = false;\n this.resizeDebounceId = INITIAL_VALUE;\n }, numbers.DEBOUNCE_THROTTLE_RESIZE_TIME_MS);\n }\n\n /**\n * Function to determine if the DOM needs to update.\n */\n private checkForUpdate(): boolean {\n const offscreenBoundaryTop = -this.topAppBarHeight;\n const hasAnyPixelsOffscreen = this.currentAppBarOffsetTop < 0;\n const hasAnyPixelsOnscreen =\n this.currentAppBarOffsetTop > offscreenBoundaryTop;\n const partiallyShowing = hasAnyPixelsOffscreen && hasAnyPixelsOnscreen;\n\n // If it's partially showing, it can't be docked.\n if (partiallyShowing) {\n this.wasDocked = false;\n } else {\n // Not previously docked and not partially showing, it's now docked.\n if (!this.wasDocked) {\n this.wasDocked = true;\n return true;\n } else if (this.isDockedShowing !== hasAnyPixelsOnscreen) {\n this.isDockedShowing = hasAnyPixelsOnscreen;\n return true;\n }\n }\n\n return partiallyShowing;\n }\n\n /**\n * Function to move the top app bar if needed.\n */\n private moveTopAppBar() {\n if (this.checkForUpdate()) {\n // Once the top app bar is fully hidden we use the max potential top app bar height as our offset\n // so the top app bar doesn't show if the window resizes and the new height > the old height.\n let offset = this.currentAppBarOffsetTop;\n if (Math.abs(offset) >= this.topAppBarHeight) {\n offset = -numbers.MAX_TOP_APP_BAR_HEIGHT;\n }\n\n this.adapter.setStyle('top', offset + 'px');\n }\n }\n\n /**\n * Throttled function that updates the top app bar scrolled values if the\n * top app bar height changes.\n */\n private throttledResizeHandler() {\n const currentHeight = this.adapter.getTopAppBarHeight();\n if (this.topAppBarHeight !== currentHeight) {\n this.wasDocked = false;\n\n // Since the top app bar has a different height depending on the screen width, this\n // will ensure that the top app bar remains in the correct location if\n // completely hidden and a resize makes the top app bar a different height.\n this.currentAppBarOffsetTop -= this.topAppBarHeight - currentHeight;\n this.topAppBarHeight = currentHeight;\n }\n this.handleTargetScroll();\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTopAppBarFoundation;\n"],"sourceRoot":""}