{"version":3,"sources":["webpack://mdc/webpack/universalModuleDefinition","webpack://mdc/webpack/bootstrap","webpack://mdc/./packages/material-components-web/index.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-base/component.ts","webpack://mdc/./packages/mdc-base/foundation.ts","webpack://mdc/./packages/mdc-base/index.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/chip-set/component.ts","webpack://mdc/./packages/mdc-chips/chip-set/constants.ts","webpack://mdc/./packages/mdc-chips/chip-set/foundation.ts","webpack://mdc/./packages/mdc-chips/chip-set/index.ts","webpack://mdc/./packages/mdc-chips/chip/component.ts","webpack://mdc/./packages/mdc-chips/chip/constants.ts","webpack://mdc/./packages/mdc-chips/chip/foundation.ts","webpack://mdc/./packages/mdc-chips/chip/index.ts","webpack://mdc/./packages/mdc-chips/index.ts","webpack://mdc/./packages/mdc-chips/trailingaction/component.ts","webpack://mdc/./packages/mdc-chips/trailingaction/constants.ts","webpack://mdc/./packages/mdc-chips/trailingaction/foundation.ts","webpack://mdc/./packages/mdc-chips/trailingaction/index.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/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-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/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/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/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/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/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-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/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-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-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/util.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-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/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/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/util.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/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/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-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-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/util.ts","webpack://mdc/./packages/mdc-switch/component.ts","webpack://mdc/./packages/mdc-switch/constants.ts","webpack://mdc/./packages/mdc-switch/foundation.ts","webpack://mdc/./packages/mdc-switch/index.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-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/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/util.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-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/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/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-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;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;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,YAAQ,KAAiB,qBAAkB,eAAE;AACvC,iBAAW,aAAS;AAE2D;AACb;AACK;AACvE,iBAAwB,2BAAQ,KAAiB,mBAAiB;AAClE,iBAAiB,mBAAiB;AACvC;AACG,aACN;AAAC;AACH,WAAC;AAAA,EAnK2C,aAmK3C;AAnKY,iCAAsB;AAqK8E;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 from '@material/auto-init/index';\nimport * as base from '@material/base/index';\nimport * as checkbox from '@material/checkbox/index';\nimport * as chips from '@material/chips/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 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 topAppBar from '@material/top-app-bar/index';\n\n// Register all components\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('MDCSelect', select.MDCSelect);\nautoInit.register('MDCSlider', slider.MDCSlider);\nautoInit.register('MDCSnackbar', snackbar.MDCSnackbar);\nautoInit.register('MDCSwitch', switchControl.MDCSwitch);\nautoInit.register('MDCTabBar', tabBar.MDCTabBar);\nautoInit.register('MDCTextField', textField.MDCTextField);\nautoInit.register('MDCTopAppBar', topAppBar.MDCTopAppBar);\n\n// Export all components.\nexport {\n autoInit,\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 select,\n slider,\n snackbar,\n switchControl,\n tab,\n tabBar,\n tabIndicator,\n tabScroller,\n textField,\n topAppBar,\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 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 default param so that\n // this.root_ is defined and can be used within the 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// 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 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.ripple_;\n }\n\n get checked(): boolean {\n return this.nativeControl_.checked;\n }\n\n set checked(checked: boolean) {\n this.nativeControl_.checked = checked;\n }\n\n get indeterminate(): boolean {\n return this.nativeControl_.indeterminate;\n }\n\n set indeterminate(indeterminate: boolean) {\n this.nativeControl_.indeterminate = indeterminate;\n }\n\n get disabled(): boolean {\n return this.nativeControl_.disabled;\n }\n\n set disabled(disabled: boolean) {\n this.foundation.setDisabled(disabled);\n }\n\n get value(): string {\n return this.nativeControl_.value;\n }\n\n set value(value: string) {\n this.nativeControl_.value = value;\n }\n\n private readonly ripple_: MDCRipple = this.createRipple_();\n private handleChange_!: EventListener; // assigned in initialSyncWithDOM()\n private handleAnimationEnd_!: EventListener; // assigned in initialSyncWithDOM()\n\n initialize() {\n const {DATA_INDETERMINATE_ATTR} = strings;\n this.nativeControl_.indeterminate =\n this.nativeControl_.getAttribute(DATA_INDETERMINATE_ATTR) === 'true';\n this.nativeControl_.removeAttribute(DATA_INDETERMINATE_ATTR);\n }\n\n initialSyncWithDOM() {\n this.handleChange_ = () => this.foundation.handleChange();\n this.handleAnimationEnd_ = () => this.foundation.handleAnimationEnd();\n this.nativeControl_.addEventListener('change', this.handleChange_);\n this.listen(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd_);\n this.installPropertyChangeHooks_();\n }\n\n destroy() {\n this.ripple_.destroy();\n this.nativeControl_.removeEventListener('change', this.handleChange_);\n this.unlisten(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.nativeControl_,\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.nativeControl_.removeAttribute(attr);\n },\n setNativeControlAttr: (attr, value) => {\n this.nativeControl_.setAttribute(attr, value);\n },\n setNativeControlDisabled: (disabled) => {\n this.nativeControl_.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) => this.nativeControl_.removeEventListener(\n evtType, handler, applyPassive()),\n isSurfaceActive: () => matches(this.nativeControl_, ':active'),\n isUnbounded: () => true,\n registerInteractionHandler: (evtType, handler) => this.nativeControl_.addEventListener(\n evtType, handler, applyPassive()),\n };\n return new MDCRipple(this.root, new MDCRippleFoundation(adapter));\n }\n\n private installPropertyChangeHooks_() {\n const nativeCb = this.nativeControl_;\n const cbProto = Object.getPrototypeOf(nativeCb);\n\n CB_PROTO_PROPS.forEach((controlState) => {\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.nativeControl_;\n const cbProto = Object.getPrototypeOf(nativeCb);\n\n CB_PROTO_PROPS.forEach((controlState) => {\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 get nativeControl_(): 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_ = 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): 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 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.chips_.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 chips_!: MDCChip[]; // assigned in initialize()\n private chipFactory_!: (el: Element) => MDCChip; // assigned in initialize()\n private handleChipInteraction_!: (evt: MDCChipInteractionEvent) => void; // assigned in initialSyncWithDOM()\n private handleChipSelection_!: (evt: MDCChipSelectionEvent) => void; // assigned in initialSyncWithDOM()\n private handleChipRemoval_!: (evt: MDCChipRemovalEvent) => void; // assigned in initialSyncWithDOM()\n private handleChipNavigation_!: (evt: MDCChipNavigationEvent) => 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.chips_ = this.instantiateChips_(this.chipFactory_);\n }\n\n initialSyncWithDOM() {\n this.chips_.forEach((chip) => {\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 this.chips_.forEach((chip) => {\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.chips_.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.chips_[index].focusPrimaryAction();\n },\n focusChipTrailingActionAtIndex: (index) => {\n this.chips_[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.chips_[index].destroy();\n this.chips_[index].remove();\n this.chips_.splice(index, 1);\n }\n },\n removeFocusFromChipAtIndex: (index) => {\n this.chips_[index].removeFocus();\n },\n selectChipAtIndex: (index, selected, shouldNotifyClients) => {\n if (index >= 0 && index < this.chips_.length) {\n this.chips_[index].setSelectedFromChipSet(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.chips_[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.select_(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.deselect_(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 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 deselect_(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.deselect_(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.select_(chipId, true);\n }\n\n private select_(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 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.ripple_;\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 ripple_!: 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_!: SpecificEventListener<'transitionend'>; // assigned in initialSyncWithDOM()\n private handleClick_!:\n SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleKeydown_!: 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.ripple_ =\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.ripple_.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.setSelected_(selected);\n this.notifySelection_(selected);\n }\n\n setSelectedFromChipSet(selected: boolean, shouldNotifyClients: boolean) {\n this.setSelected_(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 return 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 return this.adapter.notifyNavigation(key, source);\n }\n\n if (source === EventSource.PRIMARY && dir === Direction.RIGHT) {\n return this.focusTrailingAction();\n }\n\n if (source === EventSource.TRAILING && dir === Direction.LEFT) {\n return this.focusPrimaryAction();\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 setSelected_(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\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 {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.ripple_;\n }\n\n static attachTo(root: Element) {\n return new MDCChipTrailingAction(root);\n }\n\n private ripple_!: 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.ripple_ =\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.ripple_.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 {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) => this.root.classList.add(className),\n getDeterminateCircleAttribute: (attributeName: string) =>\n this.determinateCircle_.getAttribute(attributeName),\n hasClass: (className: string) => this.root.classList.contains(className),\n removeClass: (className: string) => this.root.classList.remove(className),\n removeAttribute: (attributeName: string) =>\n this.root.removeAttribute(attributeName),\n setAttribute: (attributeName: string, value: string) =>\n this.root.setAttribute(attributeName, value),\n setDeterminateCircleAttribute: (attributeName: string, value: string) =>\n this.determinateCircle_.setAttribute(attributeName, value),\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 DETERMINATE_CIRCLE_SELECTOR: '.mdc-circular-progress__determinate-circle',\n ARIA_VALUENOW: 'aria-valuenow',\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 isClosed_!: boolean;\n private isDeterminate_!: 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.isClosed_ = this.adapter.hasClass(cssClasses.CLOSED_CLASS);\n this.isDeterminate_ =\n !this.adapter.hasClass(cssClasses.INDETERMINATE_CLASS);\n this.progress_ = 0;\n\n if (this.isDeterminate_) {\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 isDeterminate() {\n return this.isDeterminate_;\n }\n\n getProgress() {\n return this.progress_;\n }\n\n /**\n * @return Returns whether the progress indicator is hidden.\n */\n isClosed() {\n return this.isClosed_;\n }\n\n /**\n * Sets whether the progress indicator is in determinate mode.\n * @param isDeterminate Whether the indicator should be determinate.\n */\n setDeterminate(isDeterminate: boolean) {\n this.isDeterminate_ = isDeterminate;\n\n if (this.isDeterminate_) {\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 /**\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.isDeterminate_) {\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 /**\n * Shows the progress indicator.\n */\n open() {\n this.isClosed_ = false;\n this.adapter.removeClass(cssClasses.CLOSED_CLASS);\n }\n\n /**\n * Hides the progress indicator\n */\n close() {\n this.isClosed_ = true;\n this.adapter.addClass(cssClasses.CLOSED_CLASS);\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\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';\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 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 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 this.content =\n this.root.querySelector(`.${cssClasses.CONTENT}`) as HTMLElement;\n this.handleRowCheckboxChange = (event) =>\n this.foundation.handleRowCheckboxChange(event);\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 destroy() {\n this.headerRow.removeEventListener(\n 'change', this.handleHeaderRowCheckboxChange);\n this.headerRow.removeEventListener('click', this.headerRowClickListener);\n this.content.removeEventListener('change', this.handleRowCheckboxChange);\n\n this.headerRowCheckbox.destroy();\n this.rowCheckboxList.forEach((checkbox) => {\n checkbox.destroy();\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 getTableBodyHeight: () => {\n const tableBody =\n this.root.querySelector(selectors.CONTENT);\n\n if (!tableBody) {\n throw new Error('MDCDataTable: Table body element not found.');\n }\n\n return `${tableBody.getBoundingClientRect().height}px`;\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}px`;\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 Object.assign(progressIndicator.style, styles);\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: () => !!this.root.querySelector(selectors.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","/**\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 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 PAGINATION_ROWS_PER_PAGE_SELECT:\n 'mdc-data-table__pagination-rows-per-page-select',\n PAGINATION_ROWS_PER_PAGE_LABEL:\n 'mdc-data-table__pagination-rows-per-page-label',\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 getTableBodyHeight: () => '',\n getTableHeaderHeight: () => '',\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 height = this.adapter.getTableBodyHeight();\n const top = this.adapter.getTableHeaderHeight();\n\n this.adapter.setProgressIndicatorStyles({\n height,\n top,\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() === this.adapter.getRowCount()) {\n this.adapter.setHeaderRowCheckboxChecked(true);\n this.adapter.setHeaderRowCheckboxIndeterminate(false);\n } else if (this.adapter.getSelectedRowCount() === 0) {\n this.adapter.setHeaderRowCheckboxIndeterminate(false);\n this.adapter.setHeaderRowCheckboxChecked(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 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_!: HTMLElement[]; // assigned in initialize()\n private container_!: HTMLElement; // assigned in initialize()\n private content_!: HTMLElement | null; // assigned in initialize()\n private defaultButton_!: HTMLElement | null; // assigned in initialize()\n\n private focusTrap_!: FocusTrap; // assigned in initialSyncWithDOM()\n private focusTrapFactory_!: MDCDialogFocusTrapFactory; // assigned in initialize()\n\n private handleClick_!: SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private handleKeydown_!: SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleDocumentKeydown_!: SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleLayout_!: EventListener; // 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_, 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 const LAYOUT_EVENTS = ['resize', 'orientationchange'];\n this.handleOpening_ = () => {\n LAYOUT_EVENTS.forEach((evtType) => window.addEventListener(evtType, this.handleLayout_));\n document.addEventListener('keydown', this.handleDocumentKeydown_);\n };\n this.handleClosing_ = () => {\n LAYOUT_EVENTS.forEach((evtType) => window.removeEventListener(evtType, this.handleLayout_));\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) => ripple.destroy());\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 this.defaultButton_ && this.defaultButton_.click(),\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: () => this.focusTrap_.releaseFocus(),\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: () => this.focusTrap_.trapFocus(),\n };\n return new MDCDialogFoundation(adapter);\n }\n\n private getInitialFocusEl_(): HTMLElement|null {\n return document.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};\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 ].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 {MDCFoundation} from '@material/base/foundation';\nimport {MDCDialogAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\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 };\n }\n\n private isOpen_ = false;\n private animationFrame_ = 0;\n private animationTimer_ = 0;\n private layoutFrame_ = 0;\n private escapeKeyAction_ = strings.CLOSE_ACTION;\n private scrimClickAction_ = strings.CLOSE_ACTION;\n private autoStackButtons_ = true;\n private areButtonsStacked_ = false;\n\n constructor(adapter?: Partial) {\n super({...MDCDialogFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n if (this.adapter.hasClass(cssClasses.STACKED)) {\n this.setAutoStackButtons(false);\n }\n }\n\n destroy() {\n if (this.isOpen_) {\n this.close(strings.DESTROY_ACTION);\n }\n\n if (this.animationTimer_) {\n clearTimeout(this.animationTimer_);\n this.handleAnimationTimerEnd_();\n }\n\n if (this.layoutFrame_) {\n cancelAnimationFrame(this.layoutFrame_);\n this.layoutFrame_ = 0;\n }\n }\n\n open() {\n this.isOpen_ = true;\n this.adapter.notifyOpening();\n this.adapter.addClass(cssClasses.OPENING);\n\n // Wait a frame once display is no longer \"none\", to establish basis for 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.isOpen_) {\n // Avoid redundant close calls (and events), e.g. from keydown on elements that inherently emit click\n return;\n }\n\n this.isOpen_ = 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\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 isOpen() {\n return this.isOpen_;\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 layout() {\n if (this.layoutFrame_) {\n cancelAnimationFrame(this.layoutFrame_);\n }\n this.layoutFrame_ = requestAnimationFrame(() => {\n this.layoutInternal_();\n this.layoutFrame_ = 0;\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 const isDefault = !this.adapter.eventTargetMatches(\n evt.target, strings.SUPPRESS_DEFAULT_PRESS_SELECTOR);\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 private layoutInternal_() {\n if (this.autoStackButtons_) {\n this.detectStackedButtons_();\n }\n this.detectScrollableContent_();\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 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 detectScrollableContent_() {\n // Remove the class first to let us measure the natural height of the content.\n this.adapter.removeClass(cssClasses.SCROLLABLE);\n if (this.adapter.isContentScrollable()) {\n this.adapter.addClass(cssClasses.SCROLLABLE);\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 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\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 * 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 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, focusableEls);\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.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, focusableEls: HTMLElement[]) {\n const sentinelStart = this.createSentinel();\n const sentinelEnd = this.createSentinel();\n\n sentinelStart.addEventListener('focus', () => {\n if (focusableEls.length > 0) {\n focusableEls[focusableEls.length - 1].focus();\n }\n });\n sentinelEnd.addEventListener('focus', () => {\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","/**\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};\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);\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};\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);\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.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 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 {MDCListFoundation} from '@material/list/foundation';\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 list_?: MDCList; // assigned in initialize()\n\n private focusTrap_?: FocusTrap; // assigned in initialSyncWithDOM()\n private focusTrapFactory_!: MDCDrawerFocusTrapFactory; // assigned in initialize()\n\n private handleScrimClick_?: SpecificEventListener<'click'>; // initialized in initialSyncWithDOM()\n private handleKeydown_!: SpecificEventListener<'keydown'>; // initialized in initialSyncWithDOM()\n private handleTransitionEnd_!: SpecificEventListener<'transitionend'>; // initialized in initialSyncWithDOM()\n\n get list(): MDCList | undefined {\n return this.list_;\n }\n\n initialize(\n focusTrapFactory: MDCDrawerFocusTrapFactory = (el) => new FocusTrap(el),\n listFactory: MDCListFactory = (el) => new MDCList(el),\n ) {\n const listEl =\n this.root.querySelector(`.${MDCListFoundation.cssClasses.ROOT}`);\n if (listEl) {\n this.list_ = listFactory(listEl);\n this.list_.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) => this.foundation.handleKeydown(evt);\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.list_) {\n this.list_.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 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: MDCDrawerAdapter = {\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 elementHasClass: (element, className) =>\n element.classList.contains(className),\n saveFocus: () => this.previousFocus_ = document.activeElement,\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 `.${MDCListFoundation.cssClasses.LIST_ITEM_ACTIVATED_CLASS}`);\n if (activeNavItemEl) {\n activeNavItemEl.focus();\n }\n },\n notifyClose: () =>\n this.emit(strings.CLOSE_EVENT, {}, true /* shouldBubble */),\n notifyOpen: () =>\n this.emit(strings.OPEN_EVENT, {}, true /* shouldBubble */),\n trapFocus: () => this.focusTrap_!.trapFocus(),\n releaseFocus: () => this.focusTrap_!.releaseFocus(),\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 ${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};\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 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_: SpecificEventListener<'animationend'>;\n\n constructor(adapter?: Partial) {\n super({...MDCFloatingLabelFoundation.defaultAdapter, ...adapter});\n\n this.shakeAnimationEndHandler_ = () => this.handleShakeAnimationEnd_();\n }\n\n init() {\n this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler_);\n }\n\n destroy() {\n this.adapter.deregisterInteractionHandler('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 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 {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 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) => this.handleTransitionEnd(evt);\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 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';\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 set reverse(value: boolean) {\n this.foundation.setReverse(value);\n }\n\n open() {\n this.foundation.open();\n }\n\n close() {\n this.foundation.close();\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: 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 };\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 INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate',\n REVERSED_CLASS: 'mdc-linear-progress--reversed',\n};\n\nexport const strings = {\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 * @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';\nimport {MDCLinearProgressAdapter} from './adapter';\nimport {cssClasses, strings} from './constants';\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 forceLayout: () => undefined,\n setBufferBarStyle: () => null,\n setPrimaryBarStyle: () => null,\n hasClass: () => false,\n removeAttribute: () => undefined,\n removeClass: () => undefined,\n setAttribute: () => undefined,\n };\n }\n\n private isDeterminate!: boolean;\n private isReversed!: boolean;\n private progress!: number;\n private buffer!: number;\n\n constructor(adapter?: Partial) {\n super({...MDCLinearProgressFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n this.isDeterminate = !this.adapter.hasClass(cssClasses.INDETERMINATE_CLASS);\n this.isReversed = this.adapter.hasClass(cssClasses.REVERSED_CLASS);\n this.progress = 0;\n this.buffer = 1;\n }\n\n setDeterminate(isDeterminate: boolean) {\n this.isDeterminate = isDeterminate;\n\n if (this.isDeterminate) {\n this.adapter.removeClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.setAttribute(\n strings.ARIA_VALUENOW, this.progress.toString());\n this.setPrimaryBarProgress(this.progress);\n this.setBufferBarProgress(this.buffer);\n\n return;\n }\n\n if (this.isReversed) {\n // Adding/removing REVERSED_CLASS starts a translate animation, while\n // adding INDETERMINATE_CLASS starts a scale animation. Here, we reset\n // the translate animation in order to keep it in sync with the new\n // scale animation that will start from adding INDETERMINATE_CLASS\n // below.\n this.adapter.removeClass(cssClasses.REVERSED_CLASS);\n this.adapter.forceLayout();\n this.adapter.addClass(cssClasses.REVERSED_CLASS);\n }\n\n this.adapter.addClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.removeAttribute(strings.ARIA_VALUENOW);\n this.setPrimaryBarProgress(1);\n this.setBufferBarProgress(1);\n }\n\n getDeterminate() {\n return this.isDeterminate;\n }\n\n setProgress(value: number) {\n this.progress = value;\n if (this.isDeterminate) {\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.isDeterminate) {\n this.setBufferBarProgress(value);\n }\n }\n\n setReverse(isReversed: boolean) {\n this.isReversed = isReversed;\n\n if (!this.isDeterminate) {\n // Adding INDETERMINATE_CLASS starts a scale animation, while\n // adding/removing REVERSED_CLASS starts a translate animation. Here, we\n // reset the scale animation in order to keep it in sync with the new\n // translate animation that will start from adding/removing REVERSED_CLASS\n // below.\n this.adapter.removeClass(cssClasses.INDETERMINATE_CLASS);\n this.adapter.forceLayout();\n this.adapter.addClass(cssClasses.INDETERMINATE_CLASS);\n }\n\n if (this.isReversed) {\n this.adapter.addClass(cssClasses.REVERSED_CLASS);\n return;\n }\n\n this.adapter.removeClass(cssClasses.REVERSED_CLASS);\n }\n\n open() {\n this.adapter.removeClass(cssClasses.CLOSED_CLASS);\n }\n\n close() {\n this.adapter.addClass(cssClasses.CLOSED_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 environments.\n const transformProp = typeof window !== 'undefined' ?\n getCorrectPropertyName(window, 'transform') : '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\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';\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, strings} from './constants';\nimport {MDCListFoundation} from './foundation';\nimport {MDCListActionEventDetail, MDCListIndex} from './types';\n\nexport type MDCListFactory = (el: Element, foundation?: MDCListFoundation) => 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 [].slice.call(\n this.root.querySelectorAll(`.${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 private handleKeydown_!: SpecificEventListener<'keydown'>; // assigned in initialSyncWithDOM()\n private handleClick_!: SpecificEventListener<'click'>; // assigned in initialSyncWithDOM()\n private focusInEventListener_!: SpecificEventListener<'focus'>; // assigned in initialSyncWithDOM()\n private focusOutEventListener_!: SpecificEventListener<'focus'>; // assigned in initialSyncWithDOM()\n\n initialSyncWithDOM() {\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 }\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 // List items need to have at least tabindex=-1 to be focusable.\n [].slice.call(this.root.querySelectorAll('.mdc-list-item:not([tabindex])'))\n .forEach((el: Element) => {\n el.setAttribute('tabindex', '-1');\n });\n\n // Child button/a elements are not tabbable until the list item is focused.\n [].slice.call(this.root.querySelectorAll(strings.FOCUSABLE_CHILD_ELEMENTS))\n .forEach((el: Element) => el.setAttribute('tabindex', '-1'));\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 =\n item.querySelector(`.${cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS}`);\n if (primaryText) {\n return primaryText.textContent || '';\n }\n\n const singleLineText =\n item.querySelector(`.${cssClasses.LIST_ITEM_TEXT_CLASS}`);\n return (singleLineText && singleLineText.textContent) || '';\n }\n\n /**\n * Initialize selectedIndex value based on pre-selected checkbox list items, single selection or radio.\n */\n initializeListType() {\n const checkboxListItems =\n this.root.querySelectorAll(strings.ARIA_ROLE_CHECKBOX_SELECTOR);\n const singleSelectedListItem = this.root.querySelector(`\n .${cssClasses.LIST_ITEM_ACTIVATED_CLASS},\n .${cssClasses.LIST_ITEM_SELECTED_CLASS}\n `);\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 =\n [].map.call(preselectedItems, (listItem: Element) => this.listElements.indexOf(listItem)) as number[];\n } else if (singleSelectedListItem) {\n if (singleSelectedListItem.classList.contains(cssClasses.LIST_ITEM_ACTIVATED_CLASS)) {\n this.foundation.setUseActivatedClass(true);\n }\n\n this.singleSelection = true;\n this.selectedIndex = this.listElements.indexOf(singleSelectedListItem);\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 a Partial.\n // To ensure we don't accidentally omit any 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(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 = listItem.querySelector(strings.CHECKBOX_SELECTOR);\n return toggleEl!.checked;\n },\n isFocusInsideList: () => {\n return this.root.contains(document.activeElement);\n },\n isRootFocused: () => document.activeElement === this.root,\n listItemAtIndexHasClass: (index, className) =>\n this.listElements[index].classList.contains(className),\n notifyAction: (index) => {\n this.emit(strings.ACTION_EVENT, {index}, /** shouldBubble */ true);\n },\n removeClassForElementIndex: (index, className) => {\n const element = this.listElements[index];\n if (element) {\n element.classList.remove(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(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 listItemChildren: Element[] =\n [].slice.call(element.querySelectorAll(strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX));\n listItemChildren.forEach((el) => el.setAttribute('tabindex', tabIndexValue));\n },\n };\n return new MDCListFoundation(adapter);\n }\n\n /**\n * Used to figure out which list item this event is targetting. Or returns -1 if\n * there is no list item\n */\n private getListItemIndex_(evt: Event) {\n const eventTarget = evt.target as Element;\n const nearestParent = closest(eventTarget, `.${cssClasses.LIST_ITEM_CLASS}, .${cssClasses.ROOT}`);\n\n // Get the index of the element if it is a list item.\n if (nearestParent && matches(nearestParent, `.${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 the foundation.\n */\n private handleFocusInEvent_(evt: FocusEvent) {\n const index = this.getListItemIndex_(evt);\n this.foundation.handleFocusIn(evt, index);\n }\n\n /**\n * Used to figure out which element was clicked before sending the event to the foundation.\n */\n private handleFocusOutEvent_(evt: FocusEvent) {\n const index = this.getListItemIndex_(evt);\n this.foundation.handleFocusOut(evt, index);\n }\n\n /**\n * Used to figure out which element was focused when keydown event occurred before sending the event to the\n * foundation.\n */\n private handleKeydownEvent_(evt: KeyboardEvent) {\n const index = this.getListItemIndex_(evt);\n const target = evt.target as Element;\n this.foundation.handleKeydown(\n evt, target.classList.contains(cssClasses.LIST_ITEM_CLASS), index);\n }\n\n /**\n * Used to figure out which element was clicked before sending the event to the foundation.\n */\n private handleClickEvent_(evt: MouseEvent) {\n const index = this.getListItemIndex_(evt);\n const target = evt.target as Element;\n\n // Toggle the checkbox only if it's not the target of the event, or the 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 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 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 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 RADIO_SELECTOR: 'input[type=\"radio\"]',\n};\n\nconst numbers = {\n UNSET_INDEX: -1,\n TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300\n};\n\nexport {strings, cssClasses, numbers};\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 * as typeahead from './typeahead';\nimport {MDCListIndex, MDCListTextAndIndex} from './types';\nimport {preventDefaultEvent} from './events';\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 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 if (this.adapter.hasCheckboxAtIndex(0)) {\n this.isCheckboxList_ = true;\n } else if (this.adapter.hasRadioAtIndex(0)) {\n this.isRadioList_ = true;\n }\n\n if (this.hasTypeahead) {\n this.sortedIndexByFirstChar = this.typeaheadInitSortedIndex();\n }\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 }\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 getSelectedIndex(): MDCListIndex {\n return this.selectedIndex_;\n }\n\n setSelectedIndex(index: MDCListIndex) {\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);\n }\n }\n\n /**\n * Focus in handler for the list items.\n */\n handleFocusIn(_: FocusEvent, listItemIndex: number) {\n if (listItemIndex >= 0) {\n this.focusedItemIndex = listItemIndex;\n this.adapter.setTabIndexForListItemChildren(listItemIndex, '0');\n }\n }\n\n /**\n * Focus out handler for the list items.\n */\n handleFocusOut(_: FocusEvent, listItemIndex: number) {\n if (listItemIndex >= 0) {\n this.adapter.setTabIndexForListItemChildren(listItemIndex, '-1');\n }\n\n /**\n * Between Focusout & Focusin some browsers do not have focus on any element. Setting a delay to wait till the focus\n * is moved to next element.\n */\n setTimeout(() => {\n if (!this.adapter.isFocusInsideList()) {\n this.setTabindexToFirstSelectedItem_();\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 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) || (!this.isVertical_ && isArrowRight)) {\n preventDefaultEvent(event);\n this.focusNextElement(currentIndex);\n } else if ((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 (isEnter || isSpace) {\n if (isRootListItem) {\n // Return early if enter key is pressed on anchor element which triggers 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 this.setTabindexAtIndex_(index);\n this.focusedItemIndex = index;\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 /**\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\n private setSingleSelectionAtIndex_(index: number) {\n if (this.selectedIndex_ === index) {\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 this.adapter.addClassForElementIndex(index, selectedClassName);\n this.setAriaForSingleSelectionAtIndex_(index);\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 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 = 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 const ariaAttributeValue = isAriaCurrent ? this.ariaCurrentAttrValue_ : 'true';\n this.adapter.setAttributeForElementIndex(\n index, ariaAttribute, ariaAttributeValue as string);\n }\n\n /**\n * Toggles radio at give index. Radio doesn't change the checked state if it is already checked.\n */\n private setRadioAtIndex_(index: number) {\n this.adapter.setCheckedCheckboxOrRadioAtIndex(index, true);\n\n if (this.selectedIndex_ !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(\n this.selectedIndex_ as number, strings.ARIA_CHECKED, 'false');\n }\n\n this.adapter.setAttributeForElementIndex(\n index, strings.ARIA_CHECKED, 'true');\n\n this.selectedIndex_ = index;\n }\n\n private setCheckboxAtIndex_(index: number[]) {\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, strings.ARIA_CHECKED, 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 no 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 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 this.adapter.setAttributeForElementIndex(index, 'tabindex', '0');\n }\n\n /**\n * @return Return true if it is single selectin list, checkbox list or radio list.\n */\n private isSelectableList_() {\n return this.isSingleSelectionList_ || this.isCheckboxList_ || this.isRadioList_;\n }\n\n private setTabindexToFirstSelectedItem_() {\n let targetIndex = 0;\n\n if (this.isSelectableList_()) {\n if (typeof this.selectedIndex_ === 'number' && this.selectedIndex_ !== numbers.UNSET_INDEX) {\n targetIndex = this.selectedIndex_;\n } else if (isNumberArray(this.selectedIndex_) && this.selectedIndex_.length > 0) {\n targetIndex = this.selectedIndex_.reduce((currentIndex, minIndex) => Math.min(currentIndex, minIndex));\n }\n }\n\n this.setTabindexAtIndex_(targetIndex);\n }\n\n private isIndexValid_(index: MDCListIndex) {\n if (index instanceof Array) {\n if (!this.isCheckboxList_) {\n throw new Error('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('MDCListFoundation: Expected array of index for checkbox based list but got number: ' + index);\n }\n return this.isIndexInRange_(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 toggleCheckbox value.\n * User interaction should not toggle list item(s) when 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 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, strings.ARIA_CHECKED, isChecked ? 'true' : 'false');\n\n // If none of the checkbox items are selected and selectedIndex is not initialized then provide a default value.\n let selectedIndexes = this.selectedIndex_ === numbers.UNSET_INDEX ? [] : (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.setTabindexAtIndex_(index);\n this.adapter.focusItemAtIndex(index);\n this.focusedItemIndex = index;\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