From d56ffd46a0edd65d08c002dfeb5ec16f3d631047 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 6 Apr 2023 23:25:14 +0000 Subject: [PATCH 01/12] Attempt to use mapbox --- .devcontainer/devcontainer.json | 2 +- dist/bom-radar-card.js | 10741 +++++++++++++++++++++++++++++- elements/formfield.js | 20 +- elements/ignore/select.js | 16 +- elements/ignore/switch.js | 2 +- elements/ignore/textfield.js | 2 +- elements/select.js | 106 +- elements/slider.js | 34 +- elements/switch.js | 34 +- elements/textfield.js | 36 +- package.json | 12 +- rollup-plugins/ignore.js | 48 +- rollup.config.dev.js | 6 +- rollup.config.js | 7 +- src/bom-radar-card.ts | 1316 ++-- src/const.ts | 2 +- src/editor.ts | 14 +- tsconfig.json | 9 +- 18 files changed, 11346 insertions(+), 1061 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e0bcf96..054c7d4 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ // See https://aka.ms/vscode-remote/devcontainer.json for format details. { "name": "BOM Radar Card Development", - "image": "ludeeus/container:monster", + "image": "mcr.microsoft.com/devcontainers/typescript-node", "context": "..", "appPort": ["5124:5000", "9124:8123"], "postCreateCommand": "npm install", diff --git a/dist/bom-radar-card.js b/dist/bom-radar-card.js index ca16e2c..4403ded 100644 --- a/dist/bom-radar-card.js +++ b/dist/bom-radar-card.js @@ -1,78 +1,156 @@ -var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};function t(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0;d--)(r=e[d])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function r(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")} +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const a=window,o=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),l=new WeakMap;class s{constructor(e,t,i){if(this._$cssResult$=!0,i!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(o&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=l.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[n+1]),e[0]);return new s(i,e,d)},m=(e,t)=>{o?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const i=document.createElement("style"),n=a.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=t.cssText,e.appendChild(i)}))},p=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new s("string"==typeof e?e:e+"",void 0,d))(t)})(e):e + */ +const t$4=window,e$a=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$4=Symbol(),n$4=new WeakMap;class o$6{constructor(t,e,n){if(this._$cssResult$=!0,n!==s$4)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$a&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n$4.set(s,t));}return t}toString(){return this.cssText}}const r$3=t=>new o$6("string"==typeof t?t:t+"",void 0,s$4),i$5=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[n+1]),t[0]);return new o$6(n,t,s$4)},S$1=(s,n)=>{e$a?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t$4.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n);}));},c$1=e$a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t; + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;var h;const u=window,f=u.trustedTypes,g=f?f.emptyScript:"",b=u.reactiveElementPolyfillSupport,v={toAttribute(e,t){switch(t){case Boolean:e=e?g:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},x=(e,t)=>t!==e&&(t==t||e==e),_={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:x};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;null!==(t=this.h)&&void 0!==t||(this.h=[]),this.h.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const n=this._$Ep(i,t);void 0!==n&&(this._$Ev.set(n,i),e.push(n))})),e}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const r=this[e];this[t]=n,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(p(e))}else void 0!==e&&t.push(p(e));return t}static _$Ep(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return m(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=_){var n;const r=this.constructor._$Ep(e,i);if(void 0!==r&&!0===i.reflect){const a=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:v).toAttribute(t,i.type);this._$El=e,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,r=n._$Ev.get(e);if(void 0!==r&&this._$El!==r){const e=n.getPropertyOptions(r),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(i=e.converter)||void 0===i?void 0:i.fromAttribute)?e.converter:v;this._$El=r,this[r]=a.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||x)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}} + */var s$3;const e$9=window,r$2=e$9.trustedTypes,h$1=r$2?r$2.emptyScript:"",o$5=e$9.reactiveElementPolyfillSupport,n$3={toAttribute(t,i){switch(i){case Boolean:t=t?h$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t);}catch(t){s=null;}}return s}},a$1=(t,i)=>i!==t&&(i==i||t==t),l$5={attribute:!0,type:String,converter:n$3,reflect:!1,hasChanged:a$1};class d$1 extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u();}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t);}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e));})),t}static createProperty(t,i=l$5){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e);}}static getPropertyDescriptor(t,i,s){return {get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l$5}static finalize(){if(this.hasOwnProperty("finalized"))return !1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s]);}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(c$1(i));}else void 0!==i&&s.push(c$1(i));return s}static _$Ep(t,i){const s=i.attribute;return !1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)));}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t));}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i]);}));}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return S$1(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}));}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}));}attributeChangedCallback(t,i,s){this._$AK(t,s);}_$EO(t,i,s=l$5){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n$3).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null;}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n$3;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null;}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a$1)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej());}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek();}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s);}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return !0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}}d$1.finalized=!0,d$1.elementProperties=new Map,d$1.elementStyles=[],d$1.shadowRootOptions={mode:"open"},null==o$5||o$5({ReactiveElement:d$1}),(null!==(s$3=e$9.reactiveElementVersions)&&void 0!==s$3?s$3:e$9.reactiveElementVersions=[]).push("1.6.1"); + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var w;y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==b||b({ReactiveElement:y}),(null!==(h=u.reactiveElementVersions)&&void 0!==h?h:u.reactiveElementVersions=[]).push("1.4.1");const E=window,T=E.trustedTypes,I=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,C="?"+A,S=`<${C}>`,R=document,k=(e="")=>R.createComment(e),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,L=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,$=/>/g,M=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),N=/'/g,B=/"/g,H=/^(?:script|style|textarea|title)$/i,P=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),z=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),U=new WeakMap,X=R.createTreeWalker(R,129,null,!1),W=(e,t)=>{const i=e.length-1,n=[];let r,a=2===t?"":"",o=F;for(let t=0;t"===l[0]?(o=null!=r?r:F,s=-1):void 0===l[1]?s=-2:(s=o.lastIndex-l[2].length,d=l[1],o=void 0===l[3]?M:'"'===l[3]?B:N):o===B||o===N?o=M:o===D||o===$?o=F:(o=M,r=void 0);const m=o===M&&e[t+1].startsWith("/>")?" ":"";a+=o===F?i+S:s>=0?(n.push(d),i.slice(0,s)+"$lit$"+i.slice(s)+A+m):i+A+(-2===s?(n.push(void 0),t):m)}const d=a+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(d):d,n]};class j{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let r=0,a=0;const o=e.length-1,d=this.parts,[l,s]=W(e,t);if(this.el=j.createElement(l,i),X.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=X.nextNode())&&d.length0){n.textContent=T?T.emptyScript:"";for(let i=0;iL(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.O(e):this.$(e)}S(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}$(e){this._$AH!==V&&O(this._$AH)?this._$AA.nextSibling.data=e:this.k(R.createTextNode(e)),this._$AH=e}T(e){var t;const{values:i,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=j.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(i);else{const e=new q(r,this),t=e.p(this.options);e.m(i),this.k(t),this._$AH=e}}_$AC(e){let t=U.get(e.strings);return void 0===t&&U.set(e.strings,t=new j(e)),t}O(e){L(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const r of e)n===t.length?t.push(i=new Y(this.S(k()),this.S(k()),this,this.options)):i=t[n],i._$AI(r),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const r=this.strings;let a=!1;if(void 0===r)e=G(this,e,t,0),a=!O(e)||e!==this._$AH&&e!==z,a&&(this._$AH=e);else{const n=e;let o,d;for(e=r[0],o=0;ot}):void 0,o$4="$lit$",n$2=`lit$${(Math.random()+"").slice(9)}$`,l$4="?"+n$2,h=`<${l$4}>`,r$1=document,d=()=>r$1.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r$1.createTreeWalker(r$1,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"":"",u=f$1;for(let i=0;i"===c[0]?(u=null!=r?r:f$1,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f$1:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f$1?s+h:v>=0?(l.push(e),s.slice(0,v)+o$4+s.slice(v)+n$2+w):s+n$2+(-2===v?(l.push(void 0),i):w);}const c=d+(t[s]||"")+(2===i?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return [void 0!==e$8?e$8.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes);}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s$2?s$2.emptyScript:"";for(let s=0;s2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else {const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new M(i.insertBefore(d(),t),t,void 0,null!=s?s:{});}return l._$AI(t),l}; + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -var ne,re;null==ie||ie(j,Y),(null!==(w=E.litHtmlVersions)&&void 0!==w?w:E.litHtmlVersions=[]).push("2.3.1");class ae extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{var n,r;const a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:t;let o=a._$litPart$;if(void 0===o){const e=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;a._$litPart$=o=new Y(t.insertBefore(k(),e),e,void 0,null!=i?i:{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return z}}ae.finalized=!0,ae._$litElement$=!0,null===(ne=globalThis.litElementHydrateSupport)||void 0===ne||ne.call(globalThis,{LitElement:ae});const oe=globalThis.litElementPolyfillSupport;null==oe||oe({LitElement:ae}),(null!==(re=globalThis.litElementVersions)&&void 0!==re?re:globalThis.litElementVersions=[]).push("3.2.2"); + */var l$3,o$3;class s$1 extends d$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return T}}s$1.finalized=!0,s$1._$litElement$=!0,null===(l$3=globalThis.litElementHydrateSupport)||void 0===l$3||l$3.call(globalThis,{LitElement:s$1});const n$1=globalThis.litElementPolyfillSupport;null==n$1||n$1({LitElement:s$1});(null!==(o$3=globalThis.litElementVersions)&&void 0!==o$3?o$3:globalThis.litElementVersions=[]).push("3.3.0"); + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const de=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:n}=t;return{kind:i,elements:n,finisher(t){customElements.define(e,t)}}})(e,t) +const e$7=e=>n=>"function"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return {kind:t,elements:s,finisher(n){customElements.define(e,n);}}})(e,n); + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,le=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}};function se(e){return(t,i)=>void 0!==i?((e,t,i)=>{t.constructor.createProperty(i,e)})(e,t,i):le(e,t) + */ +const i$3=(i,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i);}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this));},finisher(n){n.createProperty(e.key,i);}};function e$6(e){return (n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i);})(e,n,t):i$3(e,n)} + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */}function ce(e){return se({...e,state:!0})} + */function t$2(t){return e$6({...t,state:!0})} + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const me=({finisher:e,descriptor:t})=>(i,n)=>{var r;if(void 0===n){const n=null!==(r=i.originalKey)&&void 0!==r?r:i.key,a=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(i.key)}:{...i,key:n};return null!=e&&(a.finisher=function(t){e(t,n)}),a}{const r=i.constructor;void 0!==t&&Object.defineProperty(i,n,t(n)),null==e||e(r,n)}} + */ +const o$2=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n);}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n);}}; + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;function pe(e){return me({finisher:(t,i)=>{Object.assign(t.prototype[i],e)}})} + */function e$5(e){return o$2({finisher:(r,t)=>{Object.assign(r.prototype[t],e);}})} + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function he(e,t){return me({descriptor:i=>{const n={get(){var t,i;return null!==(i=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[t]&&(this[t]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(e))&&void 0!==n?n:null),this[t]}}return n}})} + */function i$2(i,n){return o$2({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n="symbol"==typeof o?Symbol():"__"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]};}return t}})} + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function ue(e){return me({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})} + */ +function e$4(e){return o$2({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})} + /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var fe;const ge=null!=(null===(fe=window.HTMLSlotElement)||void 0===fe?void 0:fe.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE)); + */var n;const e$3=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l$2(n){const{slot:l,selector:t}=null!=n?n:{};return o$2({descriptor:o=>({get(){var o;const r="slot"+(l?`[name=${l}]`:":not([name])"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e$3(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})} + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -function be(e,t,i){let n,r=e;return"object"==typeof e?(r=e.slot,n=e):n={flatten:t},i?function(e){const{slot:t,selector:i}=null!=e?e:{};return me({descriptor:n=>({get(){var n;const r="slot"+(t?`[name=${t}]`:":not([name])"),a=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(r),o=null!=a?ge(a,e):[];return i?o.filter((e=>e.matches(i))):o},enumerable:!0,configurable:!0})})}({slot:r,flatten:t,selector:i}):me({descriptor:e=>({get(){var e,t;const i="slot"+(r?`[name=${r}]`:":not([name])"),a=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(i);return null!==(t=null==a?void 0:a.assignedNodes(n))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}var ve,xe;!function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(ve||(ve={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(xe||(xe={}));var _e=function(e,t,i,n){n=n||{},i=null==i?{}:i;var r=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return r.detail=i,e.dispatchEvent(r),r + */function o$1(o,n,r){let l,s=o;return "object"==typeof o?(s=o.slot,l=o):l={flatten:n},r?l$2({slot:s,flatten:n,selector:r}):o$2({descriptor:e=>({get(){var e,t;const o="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})} + +var t$1,r;!function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none";}(t$1||(t$1={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24";}(r||(r={}));var ne=function(e,t,r,n){n=n||{},r=null==r?{}:r;var i=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return i.detail=r,e.dispatchEvent(i),i}; + /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */}; + */function e$2(e){return class extends e{createRenderRoot(){const e=this.constructor,{registry:s,elementDefinitions:n,shadowRootOptions:o}=e;n&&!s&&(e.registry=new CustomElementRegistry,Object.entries(n).forEach((([t,s])=>e.registry.define(t,s))));const i=this.renderOptions.creationScope=this.attachShadow({...o,customElements:e.registry});return S$1(i,this.constructor.elementStyles),i}}} + /** * @license * Copyright 2016 Google Inc. @@ -95,7 +173,86 @@ function be(e,t,i){let n,r=e;return"object"==typeof e?(r=e.slot,n=e):n={flatten: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var ye=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),we={ROOT:"mdc-form-field"},Ee={LABEL_SELECTOR:".mdc-form-field > label"},Te=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.click=function(){r.handleClick()},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return we},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Ee},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},n.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},n}(ye); +var MDCFoundation = /** @class */ (function () { + function MDCFoundation(adapter) { + if (adapter === void 0) { adapter = {}; } + this.adapter = adapter; + } + Object.defineProperty(MDCFoundation, "cssClasses", { + get: function () { + // Classes extending MDCFoundation should implement this method to return an object which exports every + // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'} + return {}; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCFoundation, "strings", { + get: function () { + // Classes extending MDCFoundation should implement this method to return an object which exports all + // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'} + return {}; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCFoundation, "numbers", { + get: function () { + // Classes extending MDCFoundation should implement this method to return an object which exports all + // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350} + return {}; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCFoundation, "defaultAdapter", { + get: function () { + // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient + // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter + // validation. + return {}; + }, + enumerable: false, + configurable: true + }); + MDCFoundation.prototype.init = function () { + // Subclasses should override this method to perform initialization routines (registering events, etc.) + }; + MDCFoundation.prototype.destroy = function () { + // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.) + }; + return MDCFoundation; +}()); + +/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var cssClasses$b = { + ROOT: 'mdc-form-field', +}; +var strings$8 = { + LABEL_SELECTOR: '.mdc-form-field > label', +}; + /** * @license * Copyright 2017 Google Inc. @@ -118,55 +275,401 @@ var ye=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +var MDCFormFieldFoundation = /** @class */ (function (_super) { + __extends(MDCFormFieldFoundation, _super); + function MDCFormFieldFoundation(adapter) { + var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this; + _this.click = function () { + _this.handleClick(); + }; + return _this; + } + Object.defineProperty(MDCFormFieldFoundation, "cssClasses", { + get: function () { + return cssClasses$b; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCFormFieldFoundation, "strings", { + get: function () { + return strings$8; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCFormFieldFoundation, "defaultAdapter", { + get: function () { + return { + activateInputRipple: function () { return undefined; }, + deactivateInputRipple: function () { return undefined; }, + deregisterInteractionHandler: function () { return undefined; }, + registerInteractionHandler: function () { return undefined; }, + }; + }, + enumerable: false, + configurable: true + }); + MDCFormFieldFoundation.prototype.init = function () { + this.adapter.registerInteractionHandler('click', this.click); + }; + MDCFormFieldFoundation.prototype.destroy = function () { + this.adapter.deregisterInteractionHandler('click', this.click); + }; + MDCFormFieldFoundation.prototype.handleClick = function () { + var _this = this; + this.adapter.activateInputRipple(); + requestAnimationFrame(function () { + _this.adapter.deactivateInputRipple(); + }); + }; + return MDCFormFieldFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCFormFieldFoundation$1 = MDCFormFieldFoundation; + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const Ie=e=>e.nodeType===Node.ELEMENT_NODE;function Ae(e){return{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)}}const Ce=()=>{},Se={get passive(){return!1}};document.addEventListener("x",Ce,Se),document.removeEventListener("x",Ce);const Re=(e=window.document)=>{let t=e.activeElement;const i=[];if(!t)return i;for(;t&&(i.push(t),t.shadowRoot);)t=t.shadowRoot.activeElement;return i},ke=e=>{const t=Re();if(!t.length)return!1;const i=t[t.length-1],n=new Event("check-if-focused",{bubbles:!0,composed:!0});let r=[];const a=e=>{r=e.composedPath()};return document.body.addEventListener("check-if-focused",a),i.dispatchEvent(n),document.body.removeEventListener("check-if-focused",a),-1!==r.indexOf(e)}; +// Style preference for leading underscores. +// tslint:disable:strip-private-property-underscore +/** + * Determines whether a node is an element. + * + * @param node Node to check + */ +const isNodeElement = (node) => { + return node.nodeType === Node.ELEMENT_NODE; +}; +function addHasRemoveClass(element) { + return { + addClass: (className) => { + element.classList.add(className); + }, + removeClass: (className) => { + element.classList.remove(className); + }, + hasClass: (className) => element.classList.contains(className), + }; +} +const fn = () => { }; +const optionsBlock = { + get passive() { + return false; + } +}; +document.addEventListener('x', fn, optionsBlock); +document.removeEventListener('x', fn); +const deepActiveElementPath = (doc = window.document) => { + let activeElement = doc.activeElement; + const path = []; + if (!activeElement) { + return path; + } + while (activeElement) { + path.push(activeElement); + if (activeElement.shadowRoot) { + activeElement = activeElement.shadowRoot.activeElement; + } + else { + break; + } + } + return path; +}; +const doesElementContainFocus = (element) => { + const activePath = deepActiveElementPath(); + if (!activePath.length) { + return false; + } + const deepActiveElement = activePath[activePath.length - 1]; + const focusEv = new Event('check-if-focused', { bubbles: true, composed: true }); + let composedPath = []; + const listener = (ev) => { + composedPath = ev.composedPath(); + }; + document.body.addEventListener('check-if-focused', listener); + deepActiveElement.dispatchEvent(focusEv); + document.body.removeEventListener('check-if-focused', listener); + return composedPath.indexOf(element) !== -1; +}; + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class Oe extends ae{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}} +/** @soyCompatible */ +class BaseElement extends s$1 { + click() { + if (this.mdcRoot) { + this.mdcRoot.focus(); + this.mdcRoot.click(); + return; + } + super.click(); + } + /** + * Create and attach the MDC Foundation to the instance + */ + createFoundation() { + if (this.mdcFoundation !== undefined) { + this.mdcFoundation.destroy(); + } + if (this.mdcFoundationClass) { + this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter()); + this.mdcFoundation.init(); + } + } + firstUpdated() { + this.createFoundation(); + } +} + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */var Le,Fe;const De=null!==(Fe=null===(Le=window.ShadyDOM)||void 0===Le?void 0:Le.inUse)&&void 0!==Fe&&Fe;class $e extends Oe{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||De)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}$e.shadowRootOptions={mode:"open",delegatesFocus:!0},n([se({type:Boolean})],$e.prototype,"disabled",void 0); + */ +var _a$1, _b$1; +// ShadyDOM should submit elements in component internals +const USING_SHADY_DOM = (_b$1 = (_a$1 = window.ShadyDOM) === null || _a$1 === void 0 ? void 0 : _a$1.inUse) !== null && _b$1 !== void 0 ? _b$1 : false; +/** @soyCompatible */ +class FormElement extends BaseElement { + constructor() { + super(...arguments); + /** + * Disabled state for the component. When `disabled` is set to `true`, the + * component will not be added to form submission. + */ + this.disabled = false; + /** + * Form element that contains this element + */ + this.containingForm = null; + this.formDataListener = (ev) => { + if (!this.disabled) { + this.setFormData(ev.formData); + } + }; + } + findFormElement() { + // If the component internals are not in Shadow DOM, subscribing to form + // data events could lead to duplicated data, which may not work correctly + // on the server side. + if (!this.shadowRoot || USING_SHADY_DOM) { + return null; + } + const root = this.getRootNode(); + const forms = root.querySelectorAll('form'); + for (const form of Array.from(forms)) { + if (form.contains(this)) { + return form; + } + } + return null; + } + connectedCallback() { + var _a; + super.connectedCallback(); + this.containingForm = this.findFormElement(); + (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.formDataListener); + } + disconnectedCallback() { + var _a; + super.disconnectedCallback(); + (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.formDataListener); + this.containingForm = null; + } + click() { + if (this.formElement && !this.disabled) { + this.formElement.focus(); + this.formElement.click(); + } + } + firstUpdated() { + super.firstUpdated(); + if (this.shadowRoot) { + this.mdcRoot.addEventListener('change', (e) => { + this.dispatchEvent(new Event('change', e)); + }); + } + } +} +FormElement.shadowRootOptions = { mode: 'open', delegatesFocus: true }; +__decorate([ + e$6({ type: Boolean }) +], FormElement.prototype, "disabled", void 0); + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const Me=e=>(t,i)=>{if(t.constructor._observers){if(!t.constructor.hasOwnProperty("_observers")){const e=t.constructor._observers;t.constructor._observers=new Map,e.forEach(((e,i)=>t.constructor._observers.set(i,e)))}}else{t.constructor._observers=new Map;const e=t.updated;t.updated=function(t){e.call(this,t),t.forEach(((e,t)=>{const i=this.constructor._observers.get(t);void 0!==i&&i.call(this,this[t],e)}))}}t.constructor._observers.set(i,e)} +/** + * Specifies an observer callback that is run when the decorated property + * changes. The observer receives the current and old value as arguments. + */ +const observer = (observer) => +// eslint-disable-next-line @typescript-eslint/no-explicit-any +(proto, propName) => { + // if we haven't wrapped `updated` in this class, do so + if (!proto.constructor + ._observers) { + proto.constructor._observers = new Map(); + const userUpdated = proto.updated; + proto.updated = function (changedProperties) { + userUpdated.call(this, changedProperties); + changedProperties.forEach((v, k) => { + const observers = this.constructor + ._observers; + const observer = observers.get(k); + if (observer !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + observer.call(this, this[k], v); + } + }); + }; + // clone any existing observers (superclasses) + // eslint-disable-next-line no-prototype-builtins + } + else if (!proto.constructor.hasOwnProperty('_observers')) { + const observers = proto.constructor._observers; + proto.constructor._observers = new Map(); + observers.forEach( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (v, k) => proto.constructor._observers.set(k, v)); + } + // set this method + proto.constructor._observers.set(propName, observer); +}; + /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,Ne=1,Be=3,He=4,Pe=e=>(...t)=>({_$litDirective$:e,values:t});class ze{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}} + */ +const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i$1{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ve=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var i,n;if(void 0===this.nt){this.nt=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(i=this.st)||void 0===i?void 0:i.has(e))&&this.nt.add(e);return this.render(t)}const r=e.element.classList;this.nt.forEach((e=>{e in t||(r.remove(e),this.nt.delete(e))}));for(const e in t){const i=!!t[e];i===this.nt.has(e)||(null===(n=this.st)||void 0===n?void 0:n.has(e))||(i?(r.add(e),this.nt.add(e)):(r.remove(e),this.nt.delete(e)))}return z}}); + */const o=e$1(class extends i$1{constructor(t$1){var i;if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||(null===(i=t$1.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(i,[s]){var r,o;if(void 0===this.nt){this.nt=new Set,void 0!==i.strings&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.st)||void 0===r?void 0:r.has(t))&&this.nt.add(t);return this.render(s)}const e=i.element.classList;this.nt.forEach((t=>{t in s||(e.remove(t),this.nt.delete(t));}));for(const t in s){const i=!!s[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.delete(t)));}return T}}); + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class Ue extends Oe{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=Te}createAdapter(){return{registerInteractionHandler:(e,t)=>{this.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.labelEl.removeEventListener(e,t)},activateInputRipple:async()=>{const e=this.input;if(e instanceof $e){const t=await e.ripple;t&&t.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof $e){const t=await e.ripple;t&&t.endPress()}}}}get input(){var e,t;return null!==(t=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==t?t:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return P` -
+ */ +class FormfieldBase extends BaseElement { + constructor() { + super(...arguments); + this.alignEnd = false; + this.spaceBetween = false; + this.nowrap = false; + this.label = ''; + this.mdcFoundationClass = MDCFormFieldFoundation$1; + } + createAdapter() { + return { + registerInteractionHandler: (type, handler) => { + this.labelEl.addEventListener(type, handler); + }, + deregisterInteractionHandler: (type, handler) => { + this.labelEl.removeEventListener(type, handler); + }, + activateInputRipple: async () => { + const input = this.input; + if (input instanceof FormElement) { + const ripple = await input.ripple; + if (ripple) { + ripple.startPress(); + } + } + }, + deactivateInputRipple: async () => { + const input = this.input; + if (input instanceof FormElement) { + const ripple = await input.ripple; + if (ripple) { + ripple.endPress(); + } + } + }, + }; + } + get input() { + var _a, _b; + return (_b = (_a = this.slottedInputs) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null; + } + render() { + const classes = { + 'mdc-form-field--align-end': this.alignEnd, + 'mdc-form-field--space-between': this.spaceBetween, + 'mdc-form-field--nowrap': this.nowrap + }; + return x ` +
-
`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}n([se({type:Boolean})],Ue.prototype,"alignEnd",void 0),n([se({type:Boolean})],Ue.prototype,"spaceBetween",void 0),n([se({type:Boolean})],Ue.prototype,"nowrap",void 0),n([se({type:String}),Me((async function(e){var t;null===(t=this.input)||void 0===t||t.setAttribute("aria-label",e)}))],Ue.prototype,"label",void 0),n([he(".mdc-form-field")],Ue.prototype,"mdcRoot",void 0),n([be("",!0,"*")],Ue.prototype,"slottedInputs",void 0),n([he("label")],Ue.prototype,"labelEl",void 0); +
`; + } + click() { + this._labelClick(); + } + _labelClick() { + const input = this.input; + if (input) { + input.focus(); + input.click(); + } + } +} +__decorate([ + e$6({ type: Boolean }) +], FormfieldBase.prototype, "alignEnd", void 0); +__decorate([ + e$6({ type: Boolean }) +], FormfieldBase.prototype, "spaceBetween", void 0); +__decorate([ + e$6({ type: Boolean }) +], FormfieldBase.prototype, "nowrap", void 0); +__decorate([ + e$6({ type: String }), + observer(async function (label) { + var _a; + (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-label', label); + }) +], FormfieldBase.prototype, "label", void 0); +__decorate([ + i$2('.mdc-form-field') +], FormfieldBase.prototype, "mdcRoot", void 0); +__decorate([ + o$1('', true, '*') +], FormfieldBase.prototype, "slottedInputs", void 0); +__decorate([ + i$2('label') +], FormfieldBase.prototype, "labelEl", void 0); + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const Xe=c`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`,We={"mwc-formfield":class extends Ue{static get styles(){return Xe}}}; +const styles$a = i$5 `.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`; + +const formfieldDefinition = { + 'mwc-formfield': class extends FormfieldBase { + static get styles() { + return styles$a; + } + } +}; + /** * @license * Copyright 2020 Google Inc. @@ -189,7 +692,104 @@ const Xe=c`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smooth * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var je="Unknown",Ge="Backspace",qe="Enter",Ye="Spacebar",Ke="PageUp",Ze="PageDown",Qe="End",Je="Home",et="ArrowLeft",tt="ArrowUp",it="ArrowRight",nt="ArrowDown",rt="Delete",at="Escape",ot="Tab",dt=new Set;dt.add(Ge),dt.add(qe),dt.add(Ye),dt.add(Ke),dt.add(Ze),dt.add(Qe),dt.add(Je),dt.add(et),dt.add(tt),dt.add(it),dt.add(nt),dt.add(rt),dt.add(at),dt.add(ot);var lt=8,st=13,ct=32,mt=33,pt=34,ht=35,ut=36,ft=37,gt=38,bt=39,vt=40,xt=46,_t=27,yt=9,wt=new Map;wt.set(lt,Ge),wt.set(st,qe),wt.set(ct,Ye),wt.set(mt,Ke),wt.set(pt,Ze),wt.set(ht,Qe),wt.set(ut,Je),wt.set(ft,et),wt.set(gt,tt),wt.set(bt,it),wt.set(vt,nt),wt.set(xt,rt),wt.set(_t,at),wt.set(yt,ot);var Et,Tt,It=new Set;function At(e){var t=e.key;if(dt.has(t))return t;var i=wt.get(e.keyCode);return i||je} +/** + * KEY provides normalized string values for keys. + */ +var KEY = { + UNKNOWN: 'Unknown', + BACKSPACE: 'Backspace', + ENTER: 'Enter', + SPACEBAR: 'Spacebar', + PAGE_UP: 'PageUp', + PAGE_DOWN: 'PageDown', + END: 'End', + HOME: 'Home', + ARROW_LEFT: 'ArrowLeft', + ARROW_UP: 'ArrowUp', + ARROW_RIGHT: 'ArrowRight', + ARROW_DOWN: 'ArrowDown', + DELETE: 'Delete', + ESCAPE: 'Escape', + TAB: 'Tab', +}; +var normalizedKeys = new Set(); +// IE11 has no support for new Map with iterable so we need to initialize this +// by hand. +normalizedKeys.add(KEY.BACKSPACE); +normalizedKeys.add(KEY.ENTER); +normalizedKeys.add(KEY.SPACEBAR); +normalizedKeys.add(KEY.PAGE_UP); +normalizedKeys.add(KEY.PAGE_DOWN); +normalizedKeys.add(KEY.END); +normalizedKeys.add(KEY.HOME); +normalizedKeys.add(KEY.ARROW_LEFT); +normalizedKeys.add(KEY.ARROW_UP); +normalizedKeys.add(KEY.ARROW_RIGHT); +normalizedKeys.add(KEY.ARROW_DOWN); +normalizedKeys.add(KEY.DELETE); +normalizedKeys.add(KEY.ESCAPE); +normalizedKeys.add(KEY.TAB); +var KEY_CODE = { + BACKSPACE: 8, + ENTER: 13, + SPACEBAR: 32, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + ARROW_LEFT: 37, + ARROW_UP: 38, + ARROW_RIGHT: 39, + ARROW_DOWN: 40, + DELETE: 46, + ESCAPE: 27, + TAB: 9, +}; +var mappedKeyCodes = new Map(); +// IE11 has no support for new Map with iterable so we need to initialize this +// by hand. +mappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE); +mappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER); +mappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR); +mappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP); +mappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN); +mappedKeyCodes.set(KEY_CODE.END, KEY.END); +mappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME); +mappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT); +mappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP); +mappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT); +mappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN); +mappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE); +mappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE); +mappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB); +var navigationKeys = new Set(); +// IE11 has no support for new Set with iterable so we need to initialize this +// by hand. +navigationKeys.add(KEY.PAGE_UP); +navigationKeys.add(KEY.PAGE_DOWN); +navigationKeys.add(KEY.END); +navigationKeys.add(KEY.HOME); +navigationKeys.add(KEY.ARROW_LEFT); +navigationKeys.add(KEY.ARROW_UP); +navigationKeys.add(KEY.ARROW_RIGHT); +navigationKeys.add(KEY.ARROW_DOWN); +/** + * normalizeKey returns the normalized string for a navigational action. + */ +function normalizeKey(evt) { + var key = evt.key; + // If the event already has a normalized key, return it + if (normalizedKeys.has(key)) { + return key; + } + // tslint:disable-next-line:deprecation + var mappedKey = mappedKeyCodes.get(evt.keyCode); + if (mappedKey) { + return mappedKey; + } + return KEY.UNKNOWN; +} + /** * @license * Copyright 2018 Google Inc. @@ -211,7 +811,381 @@ var je="Unknown",Ge="Backspace",qe="Enter",Ye="Spacebar",Ke="PageUp",Ze="PageDow * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */It.add(Ke),It.add(Ze),It.add(Qe),It.add(Je),It.add(et),It.add(tt),It.add(it),It.add(nt);var Ct="mdc-list-item--activated",St="mdc-list-item",Rt="mdc-list-item--disabled",kt="mdc-list-item--selected",Ot="mdc-list-item__text",Lt="mdc-list-item__primary-text",Ft="mdc-list";(Et={})[""+Ct]="mdc-list-item--activated",Et[""+St]="mdc-list-item",Et[""+Rt]="mdc-list-item--disabled",Et[""+kt]="mdc-list-item--selected",Et[""+Lt]="mdc-list-item__primary-text",Et[""+Ft]="mdc-list";var Dt=((Tt={})[""+Ct]="mdc-deprecated-list-item--activated",Tt[""+St]="mdc-deprecated-list-item",Tt[""+Rt]="mdc-deprecated-list-item--disabled",Tt[""+kt]="mdc-deprecated-list-item--selected",Tt[""+Ot]="mdc-deprecated-list-item__text",Tt[""+Lt]="mdc-deprecated-list-item__primary-text",Tt[""+Ft]="mdc-deprecated-list",Tt),$t={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+St+" button:not(:disabled),\n ."+St+" a,\n ."+Dt[St]+" button:not(:disabled),\n ."+Dt[St]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+St+" button:not(:disabled),\n ."+St+" a,\n ."+St+' input[type="radio"]:not(:disabled),\n .'+St+' input[type="checkbox"]:not(:disabled),\n .'+Dt[St]+" button:not(:disabled),\n ."+Dt[St]+" a,\n ."+Dt[St]+' input[type="radio"]:not(:disabled),\n .'+Dt[St]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},Mt={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Nt=["input","button","textarea","select"],Bt=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===Nt.indexOf(i)&&e.preventDefault()}};function Ht(e,t){for(var i=new Map,n=0;nt&&!i(a[d].index)){l=d;break}if(-1!==l)return n.sortedIndexCursor=l,a[n.sortedIndexCursor].index;return-1}(a,o,l,t):function(e,t,i){var n=i.typeaheadBuffer[0],r=e.get(n);if(!r)return-1;var a=r[i.sortedIndexCursor];if(0===a.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(a.index))return a.index;var o=(i.sortedIndexCursor+1)%r.length,d=-1;for(;o!==i.sortedIndexCursor;){var l=r[o],s=0===l.text.lastIndexOf(i.typeaheadBuffer,0),c=!t(l.index);if(s&&c){d=o;break}o=(o+1)%r.length}if(-1!==d)return i.sortedIndexCursor=d,r[i.sortedIndexCursor].index;return-1}(a,l,t),-1===i||d||r(i),i}function zt(e){return e.typeaheadBuffer.length>0} + */ +var _a, _b; +var cssClasses$a = { + LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated', + LIST_ITEM_CLASS: 'mdc-list-item', + LIST_ITEM_DISABLED_CLASS: 'mdc-list-item--disabled', + LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected', + LIST_ITEM_TEXT_CLASS: 'mdc-list-item__text', + LIST_ITEM_PRIMARY_TEXT_CLASS: 'mdc-list-item__primary-text', + ROOT: 'mdc-list', +}; +(_a = {}, + _a["" + cssClasses$a.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-list-item--activated', + _a["" + cssClasses$a.LIST_ITEM_CLASS] = 'mdc-list-item', + _a["" + cssClasses$a.LIST_ITEM_DISABLED_CLASS] = 'mdc-list-item--disabled', + _a["" + cssClasses$a.LIST_ITEM_SELECTED_CLASS] = 'mdc-list-item--selected', + _a["" + cssClasses$a.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-list-item__primary-text', + _a["" + cssClasses$a.ROOT] = 'mdc-list', + _a); +var deprecatedClassNameMap = (_b = {}, + _b["" + cssClasses$a.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-deprecated-list-item--activated', + _b["" + cssClasses$a.LIST_ITEM_CLASS] = 'mdc-deprecated-list-item', + _b["" + cssClasses$a.LIST_ITEM_DISABLED_CLASS] = 'mdc-deprecated-list-item--disabled', + _b["" + cssClasses$a.LIST_ITEM_SELECTED_CLASS] = 'mdc-deprecated-list-item--selected', + _b["" + cssClasses$a.LIST_ITEM_TEXT_CLASS] = 'mdc-deprecated-list-item__text', + _b["" + cssClasses$a.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-deprecated-list-item__primary-text', + _b["" + cssClasses$a.ROOT] = 'mdc-deprecated-list', + _b); +var strings$7 = { + ACTION_EVENT: 'MDCList:action', + ARIA_CHECKED: 'aria-checked', + ARIA_CHECKED_CHECKBOX_SELECTOR: '[role="checkbox"][aria-checked="true"]', + ARIA_CHECKED_RADIO_SELECTOR: '[role="radio"][aria-checked="true"]', + ARIA_CURRENT: 'aria-current', + ARIA_DISABLED: 'aria-disabled', + ARIA_ORIENTATION: 'aria-orientation', + ARIA_ORIENTATION_HORIZONTAL: 'horizontal', + ARIA_ROLE_CHECKBOX_SELECTOR: '[role="checkbox"]', + ARIA_SELECTED: 'aria-selected', + ARIA_INTERACTIVE_ROLES_SELECTOR: '[role="listbox"], [role="menu"]', + ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable="true"]', + CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]', + CHECKBOX_SELECTOR: 'input[type="checkbox"]', + CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: "\n ." + cssClasses$a.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " a,\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " a\n ", + DEPRECATED_SELECTOR: '.mdc-deprecated-list', + FOCUSABLE_CHILD_ELEMENTS: "\n ." + cssClasses$a.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " a,\n ." + cssClasses$a.LIST_ITEM_CLASS + " input[type=\"radio\"]:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " input[type=\"checkbox\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " a,\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " input[type=\"radio\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " input[type=\"checkbox\"]:not(:disabled)\n ", + RADIO_SELECTOR: 'input[type="radio"]', + SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]', +}; +var numbers$7 = { + UNSET_INDEX: -1, + TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300 +}; + +/** + * @license + * Copyright 2020 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var ELEMENTS_KEY_ALLOWED_IN$1 = ['input', 'button', 'textarea', 'select']; +/** + * Ensures that preventDefault is only called if the containing element + * doesn't consume the event, and it will cause an unintended scroll. + * + * @param evt keyboard event to be prevented. + */ +var preventDefaultEvent = function (evt) { + var target = evt.target; + if (!target) { + return; + } + var tagName = ("" + target.tagName).toLowerCase(); + if (ELEMENTS_KEY_ALLOWED_IN$1.indexOf(tagName) === -1) { + evt.preventDefault(); + } +}; + +/** + * @license + * Copyright 2020 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +/** + * Initializes a state object for typeahead. Use the same reference for calls to + * typeahead functions. + * + * @return The current state of the typeahead process. Each state reference + * represents a typeahead instance as the reference is typically mutated + * in-place. + */ +function initState() { + var state = { + bufferClearTimeout: 0, + currentFirstChar: '', + sortedIndexCursor: 0, + typeaheadBuffer: '', + }; + return state; +} +/** + * Initializes typeahead state by indexing the current list items by primary + * text into the sortedIndexByFirstChar data structure. + * + * @param listItemCount numer of items in the list + * @param getPrimaryTextByItemIndex function that returns the primary text at a + * given index + * + * @return Map that maps the first character of the primary text to the full + * list text and it's index + */ +function initSortedIndex(listItemCount, getPrimaryTextByItemIndex) { + var sortedIndexByFirstChar = new Map(); + // Aggregate item text to index mapping + for (var i = 0; i < listItemCount; i++) { + var primaryText = getPrimaryTextByItemIndex(i).trim(); + if (!primaryText) { + continue; + } + var firstChar = primaryText[0].toLowerCase(); + if (!sortedIndexByFirstChar.has(firstChar)) { + sortedIndexByFirstChar.set(firstChar, []); + } + sortedIndexByFirstChar.get(firstChar).push({ text: primaryText.toLowerCase(), index: i }); + } + // Sort the mapping + // TODO(b/157162694): Investigate replacing forEach with Map.values() + sortedIndexByFirstChar.forEach(function (values) { + values.sort(function (first, second) { + return first.index - second.index; + }); + }); + return sortedIndexByFirstChar; +} +/** + * Given the next desired character from the user, it attempts to find the next + * list option matching the buffer. Wraps around if at the end of options. + * + * @param opts Options and accessors + * - nextChar - the next character to match against items + * - sortedIndexByFirstChar - output of `initSortedIndex(...)` + * - focusedItemIndex - the index of the currently focused item + * - focusItemAtIndex - function that focuses a list item at given index + * - skipFocus - whether or not to focus the matched item + * - isItemAtIndexDisabled - function that determines whether an item at a + * given index is disabled + * @param state The typeahead state instance. See `initState`. + * + * @return The index of the matched item, or -1 if no match. + */ +function matchItem(opts, state) { + var nextChar = opts.nextChar, focusItemAtIndex = opts.focusItemAtIndex, sortedIndexByFirstChar = opts.sortedIndexByFirstChar, focusedItemIndex = opts.focusedItemIndex, skipFocus = opts.skipFocus, isItemAtIndexDisabled = opts.isItemAtIndexDisabled; + clearTimeout(state.bufferClearTimeout); + state.bufferClearTimeout = setTimeout(function () { + clearBuffer(state); + }, numbers$7.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS); + state.typeaheadBuffer = state.typeaheadBuffer + nextChar; + var index; + if (state.typeaheadBuffer.length === 1) { + index = matchFirstChar(sortedIndexByFirstChar, focusedItemIndex, isItemAtIndexDisabled, state); + } + else { + index = matchAllChars(sortedIndexByFirstChar, isItemAtIndexDisabled, state); + } + if (index !== -1 && !skipFocus) { + focusItemAtIndex(index); + } + return index; +} +/** + * Matches the user's single input character in the buffer to the + * next option that begins with such character. Wraps around if at + * end of options. Returns -1 if no match is found. + */ +function matchFirstChar(sortedIndexByFirstChar, focusedItemIndex, isItemAtIndexDisabled, state) { + var firstChar = state.typeaheadBuffer[0]; + var itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar); + if (!itemsMatchingFirstChar) { + return -1; + } + // Has the same firstChar been recently matched? + // Also, did starting index remain the same between key presses? + // If both hold true, simply increment index. + if (firstChar === state.currentFirstChar && + itemsMatchingFirstChar[state.sortedIndexCursor].index === + focusedItemIndex) { + state.sortedIndexCursor = + (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length; + var newIndex = itemsMatchingFirstChar[state.sortedIndexCursor].index; + if (!isItemAtIndexDisabled(newIndex)) { + return newIndex; + } + } + // If we're here, it means one of the following happened: + // - either firstChar or startingIndex has changed, invalidating the + // cursor. + // - The next item of typeahead is disabled, so we have to look further. + state.currentFirstChar = firstChar; + var newCursorPosition = -1; + var cursorPosition; + // Find the first non-disabled item as a fallback. + for (cursorPosition = 0; cursorPosition < itemsMatchingFirstChar.length; cursorPosition++) { + if (!isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) { + newCursorPosition = cursorPosition; + break; + } + } + // Advance cursor to first item matching the firstChar that is positioned + // after starting item. Cursor is unchanged from fallback if there's no + // such item. + for (; cursorPosition < itemsMatchingFirstChar.length; cursorPosition++) { + if (itemsMatchingFirstChar[cursorPosition].index > focusedItemIndex && + !isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) { + newCursorPosition = cursorPosition; + break; + } + } + if (newCursorPosition !== -1) { + state.sortedIndexCursor = newCursorPosition; + return itemsMatchingFirstChar[state.sortedIndexCursor].index; + } + return -1; +} +/** + * Attempts to find the next item that matches all of the typeahead buffer. + * Wraps around if at end of options. Returns -1 if no match is found. + */ +function matchAllChars(sortedIndexByFirstChar, isItemAtIndexDisabled, state) { + var firstChar = state.typeaheadBuffer[0]; + var itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar); + if (!itemsMatchingFirstChar) { + return -1; + } + // Do nothing if text already matches + var startingItem = itemsMatchingFirstChar[state.sortedIndexCursor]; + if (startingItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0 && + !isItemAtIndexDisabled(startingItem.index)) { + return startingItem.index; + } + // Find next item that matches completely; if no match, we'll eventually + // loop around to same position + var cursorPosition = (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length; + var nextCursorPosition = -1; + while (cursorPosition !== state.sortedIndexCursor) { + var currentItem = itemsMatchingFirstChar[cursorPosition]; + var matches = currentItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0; + var isEnabled = !isItemAtIndexDisabled(currentItem.index); + if (matches && isEnabled) { + nextCursorPosition = cursorPosition; + break; + } + cursorPosition = (cursorPosition + 1) % itemsMatchingFirstChar.length; + } + if (nextCursorPosition !== -1) { + state.sortedIndexCursor = nextCursorPosition; + return itemsMatchingFirstChar[state.sortedIndexCursor].index; + } + return -1; +} +/** + * Whether or not the given typeahead instaance state is currently typing. + * + * @param state The typeahead state instance. See `initState`. + */ +function isTypingInProgress(state) { + return state.typeaheadBuffer.length > 0; +} +/** + * Clears the typeahaed buffer so that it resets item matching to the first + * character. + * + * @param state The typeahead state instance. See `initState`. + */ +function clearBuffer(state) { + state.typeaheadBuffer = ''; +} +/** + * Given a keydown event, it calculates whether or not to automatically focus a + * list item depending on what was typed mimicing the typeahead functionality of + * a standard null!=e?e:V aria-expanded=${this.menuOpen} aria-invalid=${!this.isUiValid} aria-haspopup="listbox" - aria-labelledby=${ni(i)} + aria-labelledby=${l$1(labelledby)} aria-required=${this.required} - aria-describedby=${ni(n)} + aria-describedby=${l$1(describedby)} @click=${this.onClick} @focus=${this.onFocus} @blur=${this.onBlur} @keydown=${this.onKeydown}> ${this.renderRipple()} - ${this.outlined?this.renderOutline():this.renderLabel()} + ${this.outlined ? this.renderOutline() : this.renderLabel()} ${this.renderLeadingIcon()} ${this.selectedText} @@ -410,9 +2332,9 @@ const ni=e=>null!=e?e:V null!=e?e:V - ${this.renderHelperText()}`}renderRipple(){return this.outlined?V:P` + ${this.renderHelperText()}`; + } + renderRipple() { + if (this.outlined) { + return A; + } + return x ` - `}renderOutline(){return this.outlined?P` + `; + } + renderOutline() { + if (!this.outlined) { + return A; + } + return x ` ${this.renderLabel()} - `:V}renderLabel(){return this.label?P` + `; + } + renderLabel() { + if (!this.label) { + return A; + } + return x ` ${this.label} - `:V}renderLeadingIcon(){return this.icon?P`
${this.icon}
`:V}renderLineRipple(){return this.outlined?V:P` - - `}renderHelperText(){if(!this.shouldRenderHelperText)return V;const e=this.validationMessage&&!this.isUiValid;return P` + `; + } + renderLeadingIcon() { + if (!this.icon) { + return A; + } + return x `
${this.icon}
`; + } + renderLineRipple() { + if (this.outlined) { + return A; + } + return x ` + + `; + } + renderHelperText() { + if (!this.shouldRenderHelperText) { + return A; + } + const showValidationMessage = this.validationMessage && !this.isUiValid; + const classes = { + 'mdc-select-helper-text--validation-msg': showValidationMessage, + }; + return x `

${e?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map((e=>e.value))},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>zt(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},n=Pt(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=ri(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((e=>requestAnimationFrame(e))),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Ht(this.items.length,(e=>this.items[e].text))}onItemsUpdated(){this.sortedIndexByFirstChar=Ht(this.items.length,(e=>this.items[e].text))}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i0,r=i&&this.index{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const r=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=r)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([he(".mdc-select")],ai.prototype,"mdcRoot",void 0),n([he(".formElement")],ai.prototype,"formElement",void 0),n([he("slot")],ai.prototype,"slotElement",void 0),n([he("select")],ai.prototype,"nativeSelectElement",void 0),n([he("input")],ai.prototype,"nativeInputElement",void 0),n([he(".mdc-line-ripple")],ai.prototype,"lineRippleElement",void 0),n([he(".mdc-floating-label")],ai.prototype,"labelElement",void 0),n([he("mwc-notched-outline")],ai.prototype,"outlineElement",void 0),n([he(".mdc-menu")],ai.prototype,"menuElement",void 0),n([he(".mdc-select__anchor")],ai.prototype,"anchorElement",void 0),n([se({type:Boolean,attribute:"disabled",reflect:!0}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)}))],ai.prototype,"disabled",void 0),n([se({type:Boolean}),Me((function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)}))],ai.prototype,"outlined",void 0),n([se({type:String}),Me((function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)}))],ai.prototype,"label",void 0),n([ce()],ai.prototype,"outlineOpen",void 0),n([ce()],ai.prototype,"outlineWidth",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}}))],ai.prototype,"value",void 0),n([se()],ai.prototype,"name",void 0),n([ce()],ai.prototype,"selectedText",void 0),n([se({type:String})],ai.prototype,"icon",void 0),n([ce()],ai.prototype,"menuOpen",void 0),n([se({type:String})],ai.prototype,"helper",void 0),n([se({type:Boolean})],ai.prototype,"validateOnInitialRender",void 0),n([se({type:String})],ai.prototype,"validationMessage",void 0),n([se({type:Boolean})],ai.prototype,"required",void 0),n([se({type:Boolean})],ai.prototype,"naturalMenuWidth",void 0),n([ce()],ai.prototype,"isUiValid",void 0),n([se({type:Boolean})],ai.prototype,"fixedMenuPosition",void 0),n([pe({capture:!0})],ai.prototype,"handleTypeahead",null); + class="mdc-select-helper-text ${o(classes)}" + id="helper-text">${showValidationMessage ? this.validationMessage : this.helper}

`; + } + createAdapter() { + return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { activateBottomLine: () => { + if (this.lineRippleElement) { + this.lineRippleElement.lineRippleFoundation.activate(); + } + }, deactivateBottomLine: () => { + if (this.lineRippleElement) { + this.lineRippleElement.lineRippleFoundation.deactivate(); + } + }, hasLabel: () => { + return !!this.label; + }, floatLabel: (shouldFloat) => { + if (this.labelElement) { + this.labelElement.floatingLabelFoundation.float(shouldFloat); + } + }, getLabelWidth: () => { + if (this.labelElement) { + return this.labelElement.floatingLabelFoundation.getWidth(); + } + return 0; + }, setLabelRequired: (isRequired) => { + if (this.labelElement) { + this.labelElement.floatingLabelFoundation.setRequired(isRequired); + } + }, hasOutline: () => this.outlined, notchOutline: (labelWidth) => { + const outlineElement = this.outlineElement; + if (outlineElement && !this.outlineOpen) { + this.outlineWidth = labelWidth; + this.outlineOpen = true; + } + }, closeOutline: () => { + if (this.outlineElement) { + this.outlineOpen = false; + } + }, setRippleCenter: (normalizedX) => { + if (this.lineRippleElement) { + const foundation = this.lineRippleElement.lineRippleFoundation; + foundation.setRippleCenter(normalizedX); + } + }, notifyChange: async (value) => { + if (!this.valueSetDirectly && value === this.value) { + return; + } + this.valueSetDirectly = false; + this.value = value; + await this.updateComplete; + const ev = new Event('change', { bubbles: true }); + this.dispatchEvent(ev); + }, setSelectedText: (value) => this.selectedText = value, isSelectAnchorFocused: () => { + const selectAnchorElement = this.anchorElement; + if (!selectAnchorElement) { + return false; + } + const rootNode = selectAnchorElement.getRootNode(); + return rootNode.activeElement === selectAnchorElement; + }, getSelectAnchorAttr: (attr) => { + const selectAnchorElement = this.anchorElement; + if (!selectAnchorElement) { + return null; + } + return selectAnchorElement.getAttribute(attr); + }, setSelectAnchorAttr: (attr, value) => { + const selectAnchorElement = this.anchorElement; + if (!selectAnchorElement) { + return; + } + selectAnchorElement.setAttribute(attr, value); + }, removeSelectAnchorAttr: (attr) => { + const selectAnchorElement = this.anchorElement; + if (!selectAnchorElement) { + return; + } + selectAnchorElement.removeAttribute(attr); + }, openMenu: () => { + this.menuOpen = true; + }, closeMenu: () => { + this.menuOpen = false; + }, addMenuClass: () => undefined, removeMenuClass: () => undefined, getAnchorElement: () => this.anchorElement, setMenuAnchorElement: () => { + /* Handled by anchor directive */ + }, setMenuAnchorCorner: () => { + const menuElement = this.menuElement; + if (menuElement) { + menuElement.corner = 'BOTTOM_START'; + } + }, setMenuWrapFocus: (wrapFocus) => { + const menuElement = this.menuElement; + if (menuElement) { + menuElement.wrapFocus = wrapFocus; + } + }, focusMenuItemAtIndex: (index) => { + const menuElement = this.menuElement; + if (!menuElement) { + return; + } + const element = menuElement.items[index]; + if (!element) { + return; + } + element.focus(); + }, getMenuItemCount: () => { + const menuElement = this.menuElement; + if (menuElement) { + return menuElement.items.length; + } + return 0; + }, getMenuItemValues: () => { + const menuElement = this.menuElement; + if (!menuElement) { + return []; + } + const items = menuElement.items; + return items.map((item) => item.value); + }, getMenuItemTextAtIndex: (index) => { + const menuElement = this.menuElement; + if (!menuElement) { + return ''; + } + const element = menuElement.items[index]; + if (!element) { + return ''; + } + return element.text; + }, getSelectedIndex: () => this.index, setSelectedIndex: () => undefined, isTypeaheadInProgress: () => isTypingInProgress(this.typeaheadState), typeaheadMatchItem: (nextChar, startingIndex) => { + if (!this.menuElement) { + return -1; + } + const opts = { + focusItemAtIndex: (index) => { + this.menuElement.focusItemAtIndex(index); + }, + focusedItemIndex: startingIndex ? + startingIndex : + this.menuElement.getFocusedItemIndex(), + nextChar, + sortedIndexByFirstChar: this.sortedIndexByFirstChar, + skipFocus: false, + isItemAtIndexDisabled: (index) => this.items[index].disabled, + }; + const index = matchItem(opts, this.typeaheadState); + if (index !== -1) { + this.select(index); + } + return index; + } }); + } + checkValidity() { + const isValid = this._checkValidity(this.value); + if (!isValid) { + const invalidEvent = new Event('invalid', { bubbles: false, cancelable: true }); + this.dispatchEvent(invalidEvent); + } + return isValid; + } + reportValidity() { + const isValid = this.checkValidity(); + this.isUiValid = isValid; + return isValid; + } + _checkValidity(value) { + const nativeValidity = this.formElement.validity; + let validity = createValidityObj$1(nativeValidity); + if (this.validityTransform) { + const customValidity = this.validityTransform(value, validity); + validity = Object.assign(Object.assign({}, validity), customValidity); + } + this._validity = validity; + return this._validity.valid; + } + setCustomValidity(message) { + this.validationMessage = message; + this.formElement.setCustomValidity(message); + } + // tslint:disable:ban-ts-ignore + async getUpdateComplete() { + await this._menuUpdateComplete; + // @ts-ignore + const result = await super.getUpdateComplete(); + return result; + } + // tslint:enable:ban-ts-ignore + async firstUpdated() { + const menuElement = this.menuElement; + if (menuElement) { + this._menuUpdateComplete = menuElement.updateComplete; + await this._menuUpdateComplete; + } + super.firstUpdated(); + this.mdcFoundation.isValid = () => true; + this.mdcFoundation.setValid = () => undefined; + this.mdcFoundation.setDisabled(this.disabled); + if (this.validateOnInitialRender) { + this.reportValidity(); + } + // Select an option based on init value + if (!this.selected) { + if (!this.items.length && this.slotElement && + this.slotElement.assignedNodes({ flatten: true }).length) { + // Shady DOM initial render fix + await new Promise((res) => requestAnimationFrame(res)); + await this.layout(); + } + const hasEmptyFirstOption = this.items.length && this.items[0].value === ''; + if (!this.value && hasEmptyFirstOption) { + this.select(0); + return; + } + this.selectByValue(this.value); + } + this.sortedIndexByFirstChar = initSortedIndex(this.items.length, (index) => this.items[index].text); + } + onItemsUpdated() { + this.sortedIndexByFirstChar = initSortedIndex(this.items.length, (index) => this.items[index].text); + } + select(index) { + const menuElement = this.menuElement; + if (menuElement) { + menuElement.select(index); + } + } + selectByValue(value) { + let indexToSelect = -1; + for (let i = 0; i < this.items.length; i++) { + const item = this.items[i]; + if (item.value === value) { + indexToSelect = i; + break; + } + } + this.valueSetDirectly = true; + this.select(indexToSelect); + this.mdcFoundation.handleChange(); + } + disconnectedCallback() { + super.disconnectedCallback(); + for (const listener of this.listeners) { + listener.target.removeEventListener(listener.name, listener.cb); + } + } + focus() { + const focusEvt = new CustomEvent('focus'); + const selectAnchorElement = this.anchorElement; + if (selectAnchorElement) { + selectAnchorElement.dispatchEvent(focusEvt); + selectAnchorElement.focus(); + } + } + blur() { + const focusEvt = new CustomEvent('blur'); + const selectAnchorElement = this.anchorElement; + if (selectAnchorElement) { + selectAnchorElement.dispatchEvent(focusEvt); + selectAnchorElement.blur(); + } + } + onFocus() { + if (this.mdcFoundation) { + this.mdcFoundation.handleFocus(); + } + } + onBlur() { + if (this.mdcFoundation) { + this.mdcFoundation.handleBlur(); + } + const menuElement = this.menuElement; + if (menuElement && !menuElement.open) { + this.reportValidity(); + } + } + onClick(evt) { + if (this.mdcFoundation) { + this.focus(); + const targetClientRect = evt.target.getBoundingClientRect(); + let xCoord = 0; + if ('touches' in evt) { + xCoord = evt.touches[0].clientX; + } + else { + xCoord = evt.clientX; + } + const normalizedX = xCoord - targetClientRect.left; + this.mdcFoundation.handleClick(normalizedX); + } + } + onKeydown(evt) { + const arrowUp = normalizeKey(evt) === KEY.ARROW_UP; + const arrowDown = normalizeKey(evt) === KEY.ARROW_DOWN; + if (arrowDown || arrowUp) { + const shouldSelectNextItem = arrowUp && this.index > 0; + const shouldSelectPrevItem = arrowDown && this.index < this.items.length - 1; + if (shouldSelectNextItem) { + this.select(this.index - 1); + } + else if (shouldSelectPrevItem) { + this.select(this.index + 1); + } + evt.preventDefault(); + this.mdcFoundation.openMenu(); + return; + } + this.mdcFoundation.handleKeydown(evt); + } + // must capture to run before list foundation captures event + handleTypeahead(event) { + if (!this.menuElement) { + return; + } + const focusedItemIndex = this.menuElement.getFocusedItemIndex(); + const target = isNodeElement(event.target) ? + event.target : + null; + const isTargetListItem = target ? target.hasAttribute('mwc-list-item') : false; + const opts = { + event, + focusItemAtIndex: (index) => { + this.menuElement.focusItemAtIndex(index); + }, + focusedItemIndex, + isTargetListItem, + sortedIndexByFirstChar: this.sortedIndexByFirstChar, + isItemAtIndexDisabled: (index) => this.items[index].disabled, + }; + handleKeydown(opts, this.typeaheadState); + } + async onSelected(event) { + if (!this.mdcFoundation) { + await this.updateComplete; + } + this.mdcFoundation.handleMenuItemAction(event.detail.index); + const item = this.items[event.detail.index]; + if (item) { + this.value = item.value; + } + } + onOpened() { + if (this.mdcFoundation) { + this.menuOpen = true; + this.mdcFoundation.handleMenuOpened(); + } + } + onClosed() { + if (this.mdcFoundation) { + this.menuOpen = false; + this.mdcFoundation.handleMenuClosed(); + } + } + setFormData(formData) { + if (this.name && this.selected !== null) { + formData.append(this.name, this.value); + } + } + async layout(updateItems = true) { + if (this.mdcFoundation) { + this.mdcFoundation.layout(); + } + await this.updateComplete; + const menuElement = this.menuElement; + if (menuElement) { + menuElement.layout(updateItems); + } + const labelElement = this.labelElement; + if (!labelElement) { + this.outlineOpen = false; + return; + } + const shouldFloat = !!this.label && !!this.value; + labelElement.floatingLabelFoundation.float(shouldFloat); + if (!this.outlined) { + return; + } + this.outlineOpen = shouldFloat; + await this.updateComplete; + /* When the textfield automatically notches due to a value and label + * being defined, the textfield may be set to `display: none` by the user. + * this means that the notch is of size 0px. We provide this function so + * that the user may manually resize the notch to the floated label's + * width. + */ + const labelWidth = labelElement.floatingLabelFoundation.getWidth(); + if (this.outlineOpen) { + this.outlineWidth = labelWidth; + } + } + async layoutOptions() { + if (!this.mdcFoundation) { + return; + } + this.mdcFoundation.layoutOptions(); + } +} +__decorate([ + i$2('.mdc-select') +], SelectBase.prototype, "mdcRoot", void 0); +__decorate([ + i$2('.formElement') +], SelectBase.prototype, "formElement", void 0); +__decorate([ + i$2('slot') +], SelectBase.prototype, "slotElement", void 0); +__decorate([ + i$2('select') +], SelectBase.prototype, "nativeSelectElement", void 0); +__decorate([ + i$2('input') +], SelectBase.prototype, "nativeInputElement", void 0); +__decorate([ + i$2('.mdc-line-ripple') +], SelectBase.prototype, "lineRippleElement", void 0); +__decorate([ + i$2('.mdc-floating-label') +], SelectBase.prototype, "labelElement", void 0); +__decorate([ + i$2('mwc-notched-outline') +], SelectBase.prototype, "outlineElement", void 0); +__decorate([ + i$2('.mdc-menu') +], SelectBase.prototype, "menuElement", void 0); +__decorate([ + i$2('.mdc-select__anchor') +], SelectBase.prototype, "anchorElement", void 0); +__decorate([ + e$6({ type: Boolean, attribute: 'disabled', reflect: true }), + observer(function (value) { + if (this.mdcFoundation) { + this.mdcFoundation.setDisabled(value); + } + }) +], SelectBase.prototype, "disabled", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (_newVal, oldVal) { + if (oldVal !== undefined && this.outlined !== oldVal) { + this.layout(false); + } + }) +], SelectBase.prototype, "outlined", void 0); +__decorate([ + e$6({ type: String }), + observer(function (_newVal, oldVal) { + if (oldVal !== undefined && this.label !== oldVal) { + this.layout(false); + } + }) +], SelectBase.prototype, "label", void 0); +__decorate([ + t$2() +], SelectBase.prototype, "outlineOpen", void 0); +__decorate([ + t$2() +], SelectBase.prototype, "outlineWidth", void 0); +__decorate([ + e$6({ type: String }), + observer(function (value) { + if (this.mdcFoundation) { + const initialization = this.selected === null && !!value; + const valueSetByUser = this.selected && this.selected.value !== value; + if (initialization || valueSetByUser) { + this.selectByValue(value); + } + this.reportValidity(); + } + }) +], SelectBase.prototype, "value", void 0); +__decorate([ + e$6() +], SelectBase.prototype, "name", void 0); +__decorate([ + t$2() +], SelectBase.prototype, "selectedText", void 0); +__decorate([ + e$6({ type: String }) +], SelectBase.prototype, "icon", void 0); +__decorate([ + t$2() +], SelectBase.prototype, "menuOpen", void 0); +__decorate([ + e$6({ type: String }) +], SelectBase.prototype, "helper", void 0); +__decorate([ + e$6({ type: Boolean }) +], SelectBase.prototype, "validateOnInitialRender", void 0); +__decorate([ + e$6({ type: String }) +], SelectBase.prototype, "validationMessage", void 0); +__decorate([ + e$6({ type: Boolean }) +], SelectBase.prototype, "required", void 0); +__decorate([ + e$6({ type: Boolean }) +], SelectBase.prototype, "naturalMenuWidth", void 0); +__decorate([ + t$2() +], SelectBase.prototype, "isUiValid", void 0); +__decorate([ + e$6({ type: Boolean }) +], SelectBase.prototype, "fixedMenuPosition", void 0); +__decorate([ + e$5({ capture: true }) +], SelectBase.prototype, "handleTypeahead", null); + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const oi=(e,t)=>e-t,di=["input","button","textarea","select"];function li(e){return e instanceof Set}const si=e=>{const t=e===Mt.UNSET_INDEX?new Set:e;return li(t)?new Set(t):new Set([t])};class ci extends ye{constructor(e){super(Object.assign(Object.assign({},ci.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=Mt.UNSET_INDEX,this.focusedItemIndex_=Mt.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return $t}static get numbers(){return Mt}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!li(t)){const e=t===Mt.UNSET_INDEX;this.selectedIndex_=e?new Set:new Set([t])}}else if(li(t))if(t.size){const e=Array.from(t).sort(oi);this.selectedIndex_=e[0]}else this.selectedIndex_=Mt.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(si(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(e,t,i){const n="ArrowLeft"===At(e),r="ArrowUp"===At(e),a="ArrowRight"===At(e),o="ArrowDown"===At(e),d="Home"===At(e),l="End"===At(e),s="Enter"===At(e),c="Spacebar"===At(e);if(this.adapter.isRootFocused())return void(r||l?(e.preventDefault(),this.focusLastElement()):(o||d)&&(e.preventDefault(),this.focusFirstElement()));let m,p=this.adapter.getFocusedElementIndex();if(!(-1===p&&(p=i,p<0))){if(this.isVertical_&&o||!this.isVertical_&&a)this.preventDefaultEvent(e),m=this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&n)this.preventDefaultEvent(e),m=this.focusPrevElement(p);else if(d)this.preventDefaultEvent(e),m=this.focusFirstElement();else if(l)this.preventDefaultEvent(e),m=this.focusLastElement();else if((s||c)&&t){const t=e.target;if(t&&"A"===t.tagName&&s)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(p,!0)}this.focusedItemIndex_=p,void 0!==m&&(this.setTabindexAtIndex_(m),this.focusedItemIndex_=m)}}handleSingleSelection(e,t,i){e!==Mt.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){let t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.adapter.focusItemAtIndex(t),t}focusPrevElement(e){let t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const t=`${e.target.tagName}`.toLowerCase();-1===di.indexOf(t)&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==Mt.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=((e,t)=>{const i=Array.from(e),n=Array.from(t),r={added:[],removed:[]},a=i.sort(oi),o=n.sort(oi);let d=0,l=0;for(;d=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==Mt.UNSET_INDEX?e=this.selectedIndex_:li(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===e.size)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}if("number"==typeof e){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===Mt.UNSET_INDEX||this.isIndexInRange_(e)}return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&e { + return a - b; +}; +const findIndexDiff = (oldSet, newSet) => { + const oldArr = Array.from(oldSet); + const newArr = Array.from(newSet); + const diff = { added: [], removed: [] }; + const oldSorted = oldArr.sort(integerSort); + const newSorted = newArr.sort(integerSort); + let i = 0; + let j = 0; + while (i < oldSorted.length || j < newSorted.length) { + const oldVal = oldSorted[i]; + const newVal = newSorted[j]; + if (oldVal === newVal) { + i++; + j++; + continue; + } + if (oldVal !== undefined && (newVal === undefined || oldVal < newVal)) { + diff.removed.push(oldVal); + i++; + continue; + } + if (newVal !== undefined && (oldVal === undefined || newVal < oldVal)) { + diff.added.push(newVal); + j++; + continue; + } + } + return diff; +}; +const ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select']; +function isIndexSet(selectedIndex) { + return selectedIndex instanceof Set; +} +const createSetFromIndex = (index) => { + const entry = index === numbers$7.UNSET_INDEX ? new Set() : index; + return isIndexSet(entry) ? new Set(entry) : new Set([entry]); +}; +class MDCListFoundation extends MDCFoundation { + constructor(adapter) { + super(Object.assign(Object.assign({}, MDCListFoundation.defaultAdapter), adapter)); + this.isMulti_ = false; + this.wrapFocus_ = false; + this.isVertical_ = true; + this.selectedIndex_ = numbers$7.UNSET_INDEX; + this.focusedItemIndex_ = numbers$7.UNSET_INDEX; + this.useActivatedClass_ = false; + this.ariaCurrentAttrValue_ = null; + } + static get strings() { + return strings$7; + } + static get numbers() { + return numbers$7; + } + static get defaultAdapter() { + return { + focusItemAtIndex: () => undefined, + getFocusedElementIndex: () => 0, + getListItemCount: () => 0, + isFocusInsideList: () => false, + isRootFocused: () => false, + notifyAction: () => undefined, + notifySelected: () => undefined, + getSelectedStateForElementIndex: () => false, + setDisabledStateForElementIndex: () => undefined, + getDisabledStateForElementIndex: () => false, + setSelectedStateForElementIndex: () => undefined, + setActivatedStateForElementIndex: () => undefined, + setTabIndexForElementIndex: () => undefined, + setAttributeForElementIndex: () => undefined, + getAttributeForElementIndex: () => null, + }; + } + /** + * Sets the private wrapFocus_ variable. + */ + setWrapFocus(value) { + this.wrapFocus_ = value; + } + /** + * Sets the private wrapFocus_ variable. + */ + setMulti(value) { + this.isMulti_ = value; + const currentIndex = this.selectedIndex_; + if (value) { + // number to set + if (!isIndexSet(currentIndex)) { + const isUnset = currentIndex === numbers$7.UNSET_INDEX; + this.selectedIndex_ = isUnset ? new Set() : new Set([currentIndex]); + } + } + else { + // set to first sorted number in set + if (isIndexSet(currentIndex)) { + if (currentIndex.size) { + const vals = Array.from(currentIndex).sort(integerSort); + this.selectedIndex_ = vals[0]; + } + else { + this.selectedIndex_ = numbers$7.UNSET_INDEX; + } + } + } + } + /** + * Sets the isVertical_ private variable. + */ + setVerticalOrientation(value) { + this.isVertical_ = value; + } + /** + * Sets the useActivatedClass_ private variable. + */ + setUseActivatedClass(useActivated) { + this.useActivatedClass_ = useActivated; + } + getSelectedIndex() { + return this.selectedIndex_; + } + setSelectedIndex(index) { + if (!this.isIndexValid_(index)) { + return; + } + if (this.isMulti_) { + this.setMultiSelectionAtIndex_(createSetFromIndex(index)); + } + else { + this.setSingleSelectionAtIndex_(index); + } + } + /** + * Focus in handler for the list items. + */ + handleFocusIn(_, listItemIndex) { + if (listItemIndex >= 0) { + this.adapter.setTabIndexForElementIndex(listItemIndex, 0); + } + } + /** + * Focus out handler for the list items. + */ + handleFocusOut(_, listItemIndex) { + if (listItemIndex >= 0) { + this.adapter.setTabIndexForElementIndex(listItemIndex, -1); + } + /** + * Between Focusout & Focusin some browsers do not have focus on any + * element. Setting a delay to wait till the focus is moved to next element. + */ + setTimeout(() => { + if (!this.adapter.isFocusInsideList()) { + this.setTabindexToFirstSelectedItem_(); + } + }, 0); + } + /** + * Key handler for the list. + */ + handleKeydown(event, isRootListItem, listItemIndex) { + const isArrowLeft = normalizeKey(event) === 'ArrowLeft'; + const isArrowUp = normalizeKey(event) === 'ArrowUp'; + const isArrowRight = normalizeKey(event) === 'ArrowRight'; + const isArrowDown = normalizeKey(event) === 'ArrowDown'; + const isHome = normalizeKey(event) === 'Home'; + const isEnd = normalizeKey(event) === 'End'; + const isEnter = normalizeKey(event) === 'Enter'; + const isSpace = normalizeKey(event) === 'Spacebar'; + if (this.adapter.isRootFocused()) { + if (isArrowUp || isEnd) { + event.preventDefault(); + this.focusLastElement(); + } + else if (isArrowDown || isHome) { + event.preventDefault(); + this.focusFirstElement(); + } + return; + } + let currentIndex = this.adapter.getFocusedElementIndex(); + if (currentIndex === -1) { + currentIndex = listItemIndex; + if (currentIndex < 0) { + // If this event doesn't have a mdc-deprecated-list-item ancestor from + // the current list (not from a sublist), return early. + return; + } + } + let nextIndex; + if ((this.isVertical_ && isArrowDown) || + (!this.isVertical_ && isArrowRight)) { + this.preventDefaultEvent(event); + nextIndex = this.focusNextElement(currentIndex); + } + else if ((this.isVertical_ && isArrowUp) || (!this.isVertical_ && isArrowLeft)) { + this.preventDefaultEvent(event); + nextIndex = this.focusPrevElement(currentIndex); + } + else if (isHome) { + this.preventDefaultEvent(event); + nextIndex = this.focusFirstElement(); + } + else if (isEnd) { + this.preventDefaultEvent(event); + nextIndex = this.focusLastElement(); + } + else if (isEnter || isSpace) { + if (isRootListItem) { + // Return early if enter key is pressed on anchor element which triggers + // synthetic MouseEvent event. + const target = event.target; + if (target && target.tagName === 'A' && isEnter) { + return; + } + this.preventDefaultEvent(event); + this.setSelectedIndexOnAction_(currentIndex, true); + } + } + this.focusedItemIndex_ = currentIndex; + if (nextIndex !== undefined) { + this.setTabindexAtIndex_(nextIndex); + this.focusedItemIndex_ = nextIndex; + } + } + /** + * Click handler for the list. + */ + handleSingleSelection(index, isInteraction, force) { + if (index === numbers$7.UNSET_INDEX) { + return; + } + this.setSelectedIndexOnAction_(index, isInteraction, force); + this.setTabindexAtIndex_(index); + this.focusedItemIndex_ = index; + } + /** + * Focuses the next element on the list. + */ + focusNextElement(index) { + const count = this.adapter.getListItemCount(); + let nextIndex = index + 1; + if (nextIndex >= count) { + if (this.wrapFocus_) { + nextIndex = 0; + } + else { + // Return early because last item is already focused. + return index; + } + } + this.adapter.focusItemAtIndex(nextIndex); + return nextIndex; + } + /** + * Focuses the previous element on the list. + */ + focusPrevElement(index) { + let prevIndex = index - 1; + if (prevIndex < 0) { + if (this.wrapFocus_) { + prevIndex = this.adapter.getListItemCount() - 1; + } + else { + // Return early because first item is already focused. + return index; + } + } + this.adapter.focusItemAtIndex(prevIndex); + return prevIndex; + } + focusFirstElement() { + this.adapter.focusItemAtIndex(0); + return 0; + } + focusLastElement() { + const lastIndex = this.adapter.getListItemCount() - 1; + this.adapter.focusItemAtIndex(lastIndex); + return lastIndex; + } + /** + * @param itemIndex Index of the list item + * @param isEnabled Sets the list item to enabled or disabled. + */ + setEnabled(itemIndex, isEnabled) { + if (!this.isIndexValid_(itemIndex)) { + return; + } + this.adapter.setDisabledStateForElementIndex(itemIndex, !isEnabled); + } + /** + * Ensures that preventDefault is only called if the containing element + * doesn't consume the event, and it will cause an unintended scroll. + */ + preventDefaultEvent(evt) { + const target = evt.target; + const tagName = `${target.tagName}`.toLowerCase(); + if (ELEMENTS_KEY_ALLOWED_IN.indexOf(tagName) === -1) { + evt.preventDefault(); + } + } + setSingleSelectionAtIndex_(index, isInteraction = true) { + if (this.selectedIndex_ === index) { + return; + } + // unset previous + if (this.selectedIndex_ !== numbers$7.UNSET_INDEX) { + this.adapter.setSelectedStateForElementIndex(this.selectedIndex_, false); + if (this.useActivatedClass_) { + this.adapter.setActivatedStateForElementIndex(this.selectedIndex_, false); + } + } + // set new + if (isInteraction) { + this.adapter.setSelectedStateForElementIndex(index, true); + } + if (this.useActivatedClass_) { + this.adapter.setActivatedStateForElementIndex(index, true); + } + this.setAriaForSingleSelectionAtIndex_(index); + this.selectedIndex_ = index; + this.adapter.notifySelected(index); + } + setMultiSelectionAtIndex_(newIndex, isInteraction = true) { + const oldIndex = createSetFromIndex(this.selectedIndex_); + const diff = findIndexDiff(oldIndex, newIndex); + if (!diff.removed.length && !diff.added.length) { + return; + } + for (const removed of diff.removed) { + if (isInteraction) { + this.adapter.setSelectedStateForElementIndex(removed, false); + } + if (this.useActivatedClass_) { + this.adapter.setActivatedStateForElementIndex(removed, false); + } + } + for (const added of diff.added) { + if (isInteraction) { + this.adapter.setSelectedStateForElementIndex(added, true); + } + if (this.useActivatedClass_) { + this.adapter.setActivatedStateForElementIndex(added, true); + } + } + this.selectedIndex_ = newIndex; + this.adapter.notifySelected(newIndex, diff); + } + /** + * Sets aria attribute for single selection at given index. + */ + setAriaForSingleSelectionAtIndex_(index) { + // Detect the presence of aria-current and get the value only during list + // initialization when it is in unset state. + if (this.selectedIndex_ === numbers$7.UNSET_INDEX) { + this.ariaCurrentAttrValue_ = + this.adapter.getAttributeForElementIndex(index, strings$7.ARIA_CURRENT); + } + const isAriaCurrent = this.ariaCurrentAttrValue_ !== null; + const ariaAttribute = isAriaCurrent ? strings$7.ARIA_CURRENT : strings$7.ARIA_SELECTED; + if (this.selectedIndex_ !== numbers$7.UNSET_INDEX) { + this.adapter.setAttributeForElementIndex(this.selectedIndex_, ariaAttribute, 'false'); + } + const ariaAttributeValue = isAriaCurrent ? this.ariaCurrentAttrValue_ : 'true'; + this.adapter.setAttributeForElementIndex(index, ariaAttribute, ariaAttributeValue); + } + setTabindexAtIndex_(index) { + if (this.focusedItemIndex_ === numbers$7.UNSET_INDEX && index !== 0) { + // If no list item was selected set first list item's tabindex to -1. + // Generally, tabindex is set to 0 on first list item of list that has no + // preselected items. + this.adapter.setTabIndexForElementIndex(0, -1); + } + else if (this.focusedItemIndex_ >= 0 && this.focusedItemIndex_ !== index) { + this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_, -1); + } + this.adapter.setTabIndexForElementIndex(index, 0); + } + setTabindexToFirstSelectedItem_() { + let targetIndex = 0; + if (typeof this.selectedIndex_ === 'number' && + this.selectedIndex_ !== numbers$7.UNSET_INDEX) { + targetIndex = this.selectedIndex_; + } + else if (isIndexSet(this.selectedIndex_) && this.selectedIndex_.size > 0) { + targetIndex = Math.min(...this.selectedIndex_); + } + this.setTabindexAtIndex_(targetIndex); + } + isIndexValid_(index) { + if (index instanceof Set) { + if (!this.isMulti_) { + throw new Error('MDCListFoundation: Array of index is only supported for checkbox based list'); + } + if (index.size === 0) { + return true; + } + else { + let isOneInRange = false; + for (const entry of index) { + isOneInRange = this.isIndexInRange_(entry); + if (isOneInRange) { + break; + } + } + return isOneInRange; + } + } + else if (typeof index === 'number') { + if (this.isMulti_) { + throw new Error('MDCListFoundation: Expected array of index for checkbox based list but got number: ' + + index); + } + return index === numbers$7.UNSET_INDEX || this.isIndexInRange_(index); + } + else { + return false; + } + } + isIndexInRange_(index) { + const listSize = this.adapter.getListItemCount(); + return index >= 0 && index < listSize; + } + /** + * Sets selected index on user action, toggles checkbox / radio based on + * toggleCheckbox value. User interaction should not toggle list item(s) when + * disabled. + */ + setSelectedIndexOnAction_(index, isInteraction, force) { + if (this.adapter.getDisabledStateForElementIndex(index)) { + return; + } + let checkedIndex = index; + if (this.isMulti_) { + checkedIndex = new Set([index]); + } + if (!this.isIndexValid_(checkedIndex)) { + return; + } + if (this.isMulti_) { + this.toggleMultiAtIndex(index, force, isInteraction); + } + else { + if (isInteraction || force) { + this.setSingleSelectionAtIndex_(index, isInteraction); + } + else { + const isDeselection = this.selectedIndex_ === index; + if (isDeselection) { + this.setSingleSelectionAtIndex_(numbers$7.UNSET_INDEX); + } + } + } + if (isInteraction) { + this.adapter.notifyAction(index); + } + } + toggleMultiAtIndex(index, force, isInteraction = true) { + let newSelectionValue = false; + if (force === undefined) { + newSelectionValue = !this.adapter.getSelectedStateForElementIndex(index); + } + else { + newSelectionValue = force; + } + const newSet = createSetFromIndex(this.selectedIndex_); + if (newSelectionValue) { + newSet.add(index); + } + else { + newSet.delete(index); + } + this.setMultiSelectionAtIndex_(newSet, isInteraction); + } +} + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const mi=e=>e.hasAttribute("mwc-list-item");function pi(){const e=this.itemsReadyResolver;this.itemsReady=new Promise((e=>this.itemsReadyResolver=e)),e()}class hi extends Oe{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=ci,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=function(e,t=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout((()=>{e(n)}),t)}}(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{pi.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[],i=[];for(const e of t)mi(e)&&(i.push(e),e._managingList=this),e.hasAttribute("divider")&&!e.hasAttribute("role")&&e.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach(((e,t)=>{this.itemRoles?e.setAttribute("role",this.itemRoles):e.removeAttribute("role"),e.selected&&n.add(t)})),this.multi)this.select(n);else{const e=n.size?n.entries().next().value[1]:-1;this.select(e)}const r=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(r)}get selected(){const e=this.index;if(!li(e))return-1===e?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=null===this.innerRole?void 0:this.innerRole,t=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return P` + */ +function debounceLayout(callback, waitInMS = 50) { + let timeoutId; + // tslint:disable-next-line + return function (updateItems = true) { + clearTimeout(timeoutId); + timeoutId = setTimeout(() => { + callback(updateItems); + }, waitInMS); + }; +} +const isListItem = (element) => { + return element.hasAttribute('mwc-list-item'); +}; +function clearAndCreateItemsReadyPromise() { + const oldResolver = this.itemsReadyResolver; + this.itemsReady = new Promise((res) => { + // TODO(b/175626389): Type '(value: never[] | PromiseLike) => void' + // is not assignable to type '(value?: never[] | PromiseLike | + // undefined) => void'. + return this.itemsReadyResolver = res; + }); + oldResolver(); +} +/** + * @fires selected {SelectedDetail} + * @fires action {ActionDetail} + * @fires items-updated + */ +class ListBase extends BaseElement { + constructor() { + super(); + this.mdcAdapter = null; + this.mdcFoundationClass = MDCListFoundation; + this.activatable = false; + this.multi = false; + this.wrapFocus = false; + this.itemRoles = null; + this.innerRole = null; + this.innerAriaLabel = null; + this.rootTabbable = false; + this.previousTabindex = null; + this.noninteractive = false; + this.itemsReadyResolver = (() => { + // + }); + this.itemsReady = Promise.resolve([]); + // tslint:enable:ban-ts-ignore + this.items_ = []; + const debouncedFunction = debounceLayout(this.layout.bind(this)); + this.debouncedLayout = (updateItems = true) => { + clearAndCreateItemsReadyPromise.call(this); + debouncedFunction(updateItems); + }; + } + // tslint:disable:ban-ts-ignore + async getUpdateComplete() { + // @ts-ignore + const result = await super.getUpdateComplete(); + await this.itemsReady; + return result; + } + get items() { + return this.items_; + } + updateItems() { + var _a; + const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : []; + const listItems = []; + for (const node of nodes) { + if (isListItem(node)) { + listItems.push(node); + node._managingList = this; + } + if (node.hasAttribute('divider') && !node.hasAttribute('role')) { + node.setAttribute('role', 'separator'); + } + } + this.items_ = listItems; + const selectedIndices = new Set(); + this.items_.forEach((item, index) => { + if (this.itemRoles) { + item.setAttribute('role', this.itemRoles); + } + else { + item.removeAttribute('role'); + } + if (item.selected) { + selectedIndices.add(index); + } + }); + if (this.multi) { + this.select(selectedIndices); + } + else { + const index = selectedIndices.size ? selectedIndices.entries().next().value[1] : -1; + this.select(index); + } + const itemsUpdatedEv = new Event('items-updated', { bubbles: true, composed: true }); + this.dispatchEvent(itemsUpdatedEv); + } + get selected() { + const index = this.index; + if (!isIndexSet(index)) { + if (index === -1) { + return null; + } + return this.items[index]; + } + const selected = []; + for (const entry of index) { + selected.push(this.items[entry]); + } + return selected; + } + get index() { + if (this.mdcFoundation) { + return this.mdcFoundation.getSelectedIndex(); + } + return -1; + } + render() { + const role = this.innerRole === null ? undefined : this.innerRole; + const ariaLabel = this.innerAriaLabel === null ? undefined : this.innerAriaLabel; + const tabindex = this.rootTabbable ? '0' : '-1'; + return x `
    e-t,di=["input","button","textarea","select"];function li(e){ret ${this.renderPlaceholder()}
- `}renderPlaceholder(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[];return void 0!==this.emptyMessage&&0===t.length?P` + `; + } + renderPlaceholder() { + var _a; + const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : []; + if (this.emptyMessage !== undefined && nodes.length === 0) { + return x ` ${this.emptyMessage} - `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,n=mi(i);this.mdcFoundation.handleKeydown(e,n,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(-1===t&&(this.layout(),t=this.getIndexOfTarget(e),-1===t))return;if(this.items[t].disabled)return;const i=e.detail.selected,n=e.detail.source;this.mdcFoundation.handleSingleSelection(t,"interaction"===n,i),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const e of i){let i=-1;if(Ie(e)&&mi(e)&&(i=t.indexOf(e)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const i=this.items[e];return i?i.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const n=this.items[e];n&&n.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>ke(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.disabled},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.selected},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(-1===this.items.indexOf(t))}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const e of this.items)e.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const e=Re();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(mi(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const e of this.items)if(0===e.tabindex){e.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}n([se({type:String})],hi.prototype,"emptyMessage",void 0),n([he(".mdc-deprecated-list")],hi.prototype,"mdcRoot",void 0),n([be("",!0,"*")],hi.prototype,"assignedElements",void 0),n([be("",!0,'[tabindex="0"]')],hi.prototype,"tabbableElements",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(e)}))],hi.prototype,"activatable",void 0),n([se({type:Boolean}),Me((function(e,t){this.mdcFoundation&&this.mdcFoundation.setMulti(e),void 0!==t&&this.layout()}))],hi.prototype,"multi",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(e)}))],hi.prototype,"wrapFocus",void 0),n([se({type:String}),Me((function(e,t){void 0!==t&&this.updateItems()}))],hi.prototype,"itemRoles",void 0),n([se({type:String})],hi.prototype,"innerRole",void 0),n([se({type:String})],hi.prototype,"innerAriaLabel",void 0),n([se({type:Boolean})],hi.prototype,"rootTabbable",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){var t,i;if(e){const e=null!==(i=null===(t=this.tabbableElements)||void 0===t?void 0:t[0])&&void 0!==i?i:null;this.previousTabindex=e,e&&e.setAttribute("tabindex","-1")}else!e&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],hi.prototype,"noninteractive",void 0); + `; + } + return null; + } + firstUpdated() { + super.firstUpdated(); + if (!this.items.length) { + // required because this is called before observers + this.mdcFoundation.setMulti(this.multi); + // for when children upgrade before list + this.layout(); + } + } + onFocusIn(evt) { + if (this.mdcFoundation && this.mdcRoot) { + const index = this.getIndexOfTarget(evt); + this.mdcFoundation.handleFocusIn(evt, index); + } + } + onFocusOut(evt) { + if (this.mdcFoundation && this.mdcRoot) { + const index = this.getIndexOfTarget(evt); + this.mdcFoundation.handleFocusOut(evt, index); + } + } + onKeydown(evt) { + if (this.mdcFoundation && this.mdcRoot) { + const index = this.getIndexOfTarget(evt); + const target = evt.target; + const isRootListItem = isListItem(target); + this.mdcFoundation.handleKeydown(evt, isRootListItem, index); + } + } + onRequestSelected(evt) { + if (this.mdcFoundation) { + let index = this.getIndexOfTarget(evt); + // might happen in shady dom slowness. Recalc children + if (index === -1) { + this.layout(); + index = this.getIndexOfTarget(evt); + // still not found; may not be mwc-list-item. Unsupported case. + if (index === -1) { + return; + } + } + const element = this.items[index]; + if (element.disabled) { + return; + } + const selected = evt.detail.selected; + const source = evt.detail.source; + this.mdcFoundation.handleSingleSelection(index, source === 'interaction', selected); + evt.stopPropagation(); + } + } + getIndexOfTarget(evt) { + const elements = this.items; + const path = evt.composedPath(); + for (const pathItem of path) { + let index = -1; + if (isNodeElement(pathItem) && isListItem(pathItem)) { + index = elements.indexOf(pathItem); + } + if (index !== -1) { + return index; + } + } + return -1; + } + createAdapter() { + this.mdcAdapter = { + getListItemCount: () => { + if (this.mdcRoot) { + return this.items.length; + } + return 0; + }, + getFocusedElementIndex: this.getFocusedItemIndex, + getAttributeForElementIndex: (index, attr) => { + const listElement = this.mdcRoot; + if (!listElement) { + return ''; + } + const element = this.items[index]; + return element ? element.getAttribute(attr) : ''; + }, + setAttributeForElementIndex: (index, attr, val) => { + if (!this.mdcRoot) { + return; + } + const element = this.items[index]; + if (element) { + element.setAttribute(attr, val); + } + }, + focusItemAtIndex: (index) => { + const element = this.items[index]; + if (element) { + element.focus(); + } + }, + setTabIndexForElementIndex: (index, value) => { + const item = this.items[index]; + if (item) { + item.tabindex = value; + } + }, + notifyAction: (index) => { + const init = { bubbles: true, composed: true }; + init.detail = { index }; + const ev = new CustomEvent('action', init); + this.dispatchEvent(ev); + }, + notifySelected: (index, diff) => { + const init = { bubbles: true, composed: true }; + init.detail = { index, diff }; + const ev = new CustomEvent('selected', init); + this.dispatchEvent(ev); + }, + isFocusInsideList: () => { + return doesElementContainFocus(this); + }, + isRootFocused: () => { + const mdcRoot = this.mdcRoot; + const root = mdcRoot.getRootNode(); + return root.activeElement === mdcRoot; + }, + setDisabledStateForElementIndex: (index, value) => { + const item = this.items[index]; + if (!item) { + return; + } + item.disabled = value; + }, + getDisabledStateForElementIndex: (index) => { + const item = this.items[index]; + if (!item) { + return false; + } + return item.disabled; + }, + setSelectedStateForElementIndex: (index, value) => { + const item = this.items[index]; + if (!item) { + return; + } + item.selected = value; + }, + getSelectedStateForElementIndex: (index) => { + const item = this.items[index]; + if (!item) { + return false; + } + return item.selected; + }, + setActivatedStateForElementIndex: (index, value) => { + const item = this.items[index]; + if (!item) { + return; + } + item.activated = value; + }, + }; + return this.mdcAdapter; + } + selectUi(index, activate = false) { + const item = this.items[index]; + if (item) { + item.selected = true; + item.activated = activate; + } + } + deselectUi(index) { + const item = this.items[index]; + if (item) { + item.selected = false; + item.activated = false; + } + } + select(index) { + if (!this.mdcFoundation) { + return; + } + this.mdcFoundation.setSelectedIndex(index); + } + toggle(index, force) { + if (this.multi) { + this.mdcFoundation.toggleMultiAtIndex(index, force); + } + } + onListItemConnected(e) { + const target = e.target; + this.layout(this.items.indexOf(target) === -1); + } + layout(updateItems = true) { + if (updateItems) { + this.updateItems(); + } + const first = this.items[0]; + for (const item of this.items) { + item.tabindex = -1; + } + if (first) { + if (this.noninteractive) { + if (!this.previousTabindex) { + this.previousTabindex = first; + } + } + else { + first.tabindex = 0; + } + } + this.itemsReadyResolver(); + } + getFocusedItemIndex() { + if (!this.mdcRoot) { + return -1; + } + if (!this.items.length) { + return -1; + } + const activeElementPath = deepActiveElementPath(); + if (!activeElementPath.length) { + return -1; + } + for (let i = activeElementPath.length - 1; i >= 0; i--) { + const activeItem = activeElementPath[i]; + if (isListItem(activeItem)) { + return this.items.indexOf(activeItem); + } + } + return -1; + } + focusItemAtIndex(index) { + for (const item of this.items) { + if (item.tabindex === 0) { + item.tabindex = -1; + break; + } + } + this.items[index].tabindex = 0; + this.items[index].focus(); + } + focus() { + const root = this.mdcRoot; + if (root) { + root.focus(); + } + } + blur() { + const root = this.mdcRoot; + if (root) { + root.blur(); + } + } +} +__decorate([ + e$6({ type: String }) +], ListBase.prototype, "emptyMessage", void 0); +__decorate([ + i$2('.mdc-deprecated-list') +], ListBase.prototype, "mdcRoot", void 0); +__decorate([ + o$1('', true, '*') +], ListBase.prototype, "assignedElements", void 0); +__decorate([ + o$1('', true, '[tabindex="0"]') +], ListBase.prototype, "tabbableElements", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (value) { + if (this.mdcFoundation) { + this.mdcFoundation.setUseActivatedClass(value); + } + }) +], ListBase.prototype, "activatable", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (newValue, oldValue) { + if (this.mdcFoundation) { + this.mdcFoundation.setMulti(newValue); + } + if (oldValue !== undefined) { + this.layout(); + } + }) +], ListBase.prototype, "multi", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (value) { + if (this.mdcFoundation) { + this.mdcFoundation.setWrapFocus(value); + } + }) +], ListBase.prototype, "wrapFocus", void 0); +__decorate([ + e$6({ type: String }), + observer(function (_newValue, oldValue) { + if (oldValue !== undefined) { + this.updateItems(); + } + }) +], ListBase.prototype, "itemRoles", void 0); +__decorate([ + e$6({ type: String }) +], ListBase.prototype, "innerRole", void 0); +__decorate([ + e$6({ type: String }) +], ListBase.prototype, "innerAriaLabel", void 0); +__decorate([ + e$6({ type: Boolean }) +], ListBase.prototype, "rootTabbable", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }), + observer(function (value) { + var _a, _b; + if (value) { + const tabbable = (_b = (_a = this.tabbableElements) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null; + this.previousTabindex = tabbable; + if (tabbable) { + tabbable.setAttribute('tabindex', '-1'); + } + } + else if (!value && this.previousTabindex) { + this.previousTabindex.setAttribute('tabindex', '0'); + this.previousTabindex = null; + } + }) +], ListBase.prototype, "noninteractive", void 0); + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class ui{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))},this.endPress=()=>{e().then((e=>{e&&e.endPress()}))},this.startFocus=()=>{e().then((e=>{e&&e.startFocus()}))},this.endFocus=()=>{e().then((e=>{e&&e.endFocus()}))},this.startHover=()=>{e().then((e=>{e&&e.startHover()}))},this.endHover=()=>{e().then((e=>{e&&e.endHover()}))}}} +/** + * Class that encapsulates the events handlers for `mwc-ripple` + * + * + * Example: + * ``` + * class XFoo extends LitElement { + * async getRipple() { + * this.renderRipple = true; + * await this.updateComplete; + * return this.renderRoot.querySelector('mwc-ripple'); + * } + * rippleHandlers = new RippleHandlers(() => this.getRipple()); + * + * render() { + * return html` + *
+ * ${this.renderRipple ? html`` : ''} + * `; + * } + * } + * ``` + */ +class RippleHandlers { + constructor( + /** Function that returns a `mwc-ripple` */ + rippleFn) { + this.startPress = (ev) => { + rippleFn().then((r) => { + r && r.startPress(ev); + }); + }; + this.endPress = () => { + rippleFn().then((r) => { + r && r.endPress(); + }); + }; + this.startFocus = () => { + rippleFn().then((r) => { + r && r.startFocus(); + }); + }; + this.endFocus = () => { + rippleFn().then((r) => { + r && r.endFocus(); + }); + }; + this.startHover = () => { + rippleFn().then((r) => { + r && r.startHover(); + }); + }; + this.endHover = () => { + rippleFn().then((r) => { + r && r.endHover(); + }); + }; + } +} + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class fi extends ae{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new ui((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:e=>{const t=e.type;this.onDown("mousedown"===t?"mouseup":"touchend",e)}}]}get text(){const e=this.textContent;return e?e.trim():""}render(){const e=this.renderText(),t=this.graphic?this.renderGraphic():P``,i=this.hasMeta?this.renderMeta():P``;return P` + */ +/** + * @fires request-selected {RequestSelectedDetail} + * @fires list-item-rendered + */ +class ListItemBase extends s$1 { + constructor() { + super(...arguments); + this.value = ''; + this.group = null; + this.tabindex = -1; + this.disabled = false; + this.twoline = false; + this.activated = false; + this.graphic = null; + this.multipleGraphics = false; + this.hasMeta = false; + this.noninteractive = false; + this.selected = false; + this.shouldRenderRipple = false; + this._managingList = null; + this.boundOnClick = this.onClick.bind(this); + this._firstChanged = true; + this._skipPropRequest = false; + this.rippleHandlers = new RippleHandlers(() => { + this.shouldRenderRipple = true; + return this.ripple; + }); + this.listeners = [ + { + target: this, + eventNames: ['click'], + cb: () => { + this.onClick(); + }, + }, + { + target: this, + eventNames: ['mouseenter'], + cb: this.rippleHandlers.startHover, + }, + { + target: this, + eventNames: ['mouseleave'], + cb: this.rippleHandlers.endHover, + }, + { + target: this, + eventNames: ['focus'], + cb: this.rippleHandlers.startFocus, + }, + { + target: this, + eventNames: ['blur'], + cb: this.rippleHandlers.endFocus, + }, + { + target: this, + eventNames: ['mousedown', 'touchstart'], + cb: (e) => { + const name = e.type; + this.onDown(name === 'mousedown' ? 'mouseup' : 'touchend', e); + }, + }, + ]; + } + get text() { + const textContent = this.textContent; + return textContent ? textContent.trim() : ''; + } + render() { + const text = this.renderText(); + const graphic = this.graphic ? this.renderGraphic() : x ``; + const meta = this.hasMeta ? this.renderMeta() : x ``; + return x ` ${this.renderRipple()} - ${t} - ${e} - ${i}`}renderRipple(){return this.shouldRenderRipple?P` + ${graphic} + ${text} + ${meta}`; + } + renderRipple() { + if (this.shouldRenderRipple) { + return x ` - `:this.activated?P`
`:""}renderGraphic(){const e={multi:this.multipleGraphics};return P` - + `; + } + else if (this.activated) { + return x `
`; + } + else { + return ''; + } + } + renderGraphic() { + const graphicClasses = { + multi: this.multipleGraphics, + }; + return x ` + - `}renderMeta(){return P` +
`; + } + renderMeta() { + return x ` - `}renderText(){const e=this.twoline?this.renderTwoline():this.renderSingleLine();return P` +
`; + } + renderText() { + const inner = this.twoline ? this.renderTwoline() : this.renderSingleLine(); + return x ` - ${e} - `}renderSingleLine(){return P``}renderTwoline(){return P` + ${inner} + `; + } + renderSingleLine() { + return x ``; + } + renderTwoline() { + return x ` - `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,t){const i=()=>{window.removeEventListener(e,i),this.rippleHandlers.endPress()};window.addEventListener(e,i),this.rippleHandlers.startPress(t)}fireRequestSelected(e,t){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:t,selected:e}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const t of e.eventNames)e.target.addEventListener(t,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const t of e.eventNames)e.target.removeEventListener(t,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}n([he("slot")],fi.prototype,"slotElement",void 0),n([ue("mwc-ripple")],fi.prototype,"ripple",void 0),n([se({type:String})],fi.prototype,"value",void 0),n([se({type:String,reflect:!0})],fi.prototype,"group",void 0),n([se({type:Number,reflect:!0})],fi.prototype,"tabindex",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){e?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],fi.prototype,"disabled",void 0),n([se({type:Boolean,reflect:!0})],fi.prototype,"twoline",void 0),n([se({type:Boolean,reflect:!0})],fi.prototype,"activated",void 0),n([se({type:String,reflect:!0})],fi.prototype,"graphic",void 0),n([se({type:Boolean})],fi.prototype,"multipleGraphics",void 0),n([se({type:Boolean})],fi.prototype,"hasMeta",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){e?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],fi.prototype,"noninteractive",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){const t=this.getAttribute("role"),i="gridcell"===t||"option"===t||"row"===t||"tab"===t;i&&e?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(e,"property")}))],fi.prototype,"selected",void 0),n([ce()],fi.prototype,"shouldRenderRipple",void 0),n([ce()],fi.prototype,"_managingList",void 0); + `; + } + onClick() { + this.fireRequestSelected(!this.selected, 'interaction'); + } + onDown(upName, evt) { + const onUp = () => { + window.removeEventListener(upName, onUp); + this.rippleHandlers.endPress(); + }; + window.addEventListener(upName, onUp); + this.rippleHandlers.startPress(evt); + } + fireRequestSelected(selected, source) { + if (this.noninteractive) { + return; + } + const customEv = new CustomEvent('request-selected', { bubbles: true, composed: true, detail: { source, selected } }); + this.dispatchEvent(customEv); + } + connectedCallback() { + super.connectedCallback(); + if (!this.noninteractive) { + this.setAttribute('mwc-list-item', ''); + } + for (const listener of this.listeners) { + for (const eventName of listener.eventNames) { + listener.target.addEventListener(eventName, listener.cb, { passive: true }); + } + } + } + disconnectedCallback() { + super.disconnectedCallback(); + for (const listener of this.listeners) { + for (const eventName of listener.eventNames) { + listener.target.removeEventListener(eventName, listener.cb); + } + } + if (this._managingList) { + this._managingList.debouncedLayout ? + this._managingList.debouncedLayout(true) : + this._managingList.layout(true); + } + } + // composed flag, event fire through shadow root and up through composed tree + firstUpdated() { + const ev = new Event('list-item-rendered', { bubbles: true, composed: true }); + this.dispatchEvent(ev); + } +} +__decorate([ + i$2('slot') +], ListItemBase.prototype, "slotElement", void 0); +__decorate([ + e$4('mwc-ripple') +], ListItemBase.prototype, "ripple", void 0); +__decorate([ + e$6({ type: String }) +], ListItemBase.prototype, "value", void 0); +__decorate([ + e$6({ type: String, reflect: true }) +], ListItemBase.prototype, "group", void 0); +__decorate([ + e$6({ type: Number, reflect: true }) +], ListItemBase.prototype, "tabindex", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }), + observer(function (value) { + if (value) { + this.setAttribute('aria-disabled', 'true'); + } + else { + this.setAttribute('aria-disabled', 'false'); + } + }) +], ListItemBase.prototype, "disabled", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }) +], ListItemBase.prototype, "twoline", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }) +], ListItemBase.prototype, "activated", void 0); +__decorate([ + e$6({ type: String, reflect: true }) +], ListItemBase.prototype, "graphic", void 0); +__decorate([ + e$6({ type: Boolean }) +], ListItemBase.prototype, "multipleGraphics", void 0); +__decorate([ + e$6({ type: Boolean }) +], ListItemBase.prototype, "hasMeta", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }), + observer(function (value) { + if (value) { + this.removeAttribute('aria-checked'); + this.removeAttribute('mwc-list-item'); + this.selected = false; + this.activated = false; + this.tabIndex = -1; + } + else { + this.setAttribute('mwc-list-item', ''); + } + }) +], ListItemBase.prototype, "noninteractive", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }), + observer(function (value) { + const role = this.getAttribute('role'); + const isAriaSelectable = role === 'gridcell' || role === 'option' || + role === 'row' || role === 'tab'; + if (isAriaSelectable && value) { + this.setAttribute('aria-selected', 'true'); + } + else if (isAriaSelectable) { + this.setAttribute('aria-selected', 'false'); + } + if (this._firstChanged) { + this._firstChanged = false; + return; + } + if (this._skipPropRequest) { + return; + } + this.fireRequestSelected(value, 'property'); + }) +], ListItemBase.prototype, "selected", void 0); +__decorate([ + t$2() +], ListItemBase.prototype, "shouldRenderRipple", void 0); +__decorate([ + t$2() +], ListItemBase.prototype, "_managingList", void 0); + /** * @license * Copyright 2018 Google Inc. @@ -526,7 +4222,30 @@ class ui{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))} * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var gi,bi={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},vi={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},xi={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(gi||(gi={})); +var cssClasses$5 = { + MENU_SELECTED_LIST_ITEM: 'mdc-menu-item--selected', + MENU_SELECTION_GROUP: 'mdc-menu__selection-group', + ROOT: 'mdc-menu', +}; +var strings$4 = { + ARIA_CHECKED_ATTR: 'aria-checked', + ARIA_DISABLED_ATTR: 'aria-disabled', + CHECKBOX_SELECTOR: 'input[type="checkbox"]', + LIST_SELECTOR: '.mdc-list,.mdc-deprecated-list', + SELECTED_EVENT: 'MDCMenu:selected', + SKIP_RESTORE_FOCUS: 'data-menu-item-skip-restore-focus', +}; +var numbers$4 = { + FOCUS_ROOT_INDEX: -1, +}; +var DefaultFocusState; +(function (DefaultFocusState) { + DefaultFocusState[DefaultFocusState["NONE"] = 0] = "NONE"; + DefaultFocusState[DefaultFocusState["LIST_ROOT"] = 1] = "LIST_ROOT"; + DefaultFocusState[DefaultFocusState["FIRST_ITEM"] = 2] = "FIRST_ITEM"; + DefaultFocusState[DefaultFocusState["LAST_ITEM"] = 3] = "LAST_ITEM"; +})(DefaultFocusState || (DefaultFocusState = {})); + /** * @license * Copyright 2018 Google Inc. @@ -549,13 +4268,833 @@ var gi,bi={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROU * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var _i=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.isSurfaceOpen=!1,r.isQuickOpen=!1,r.isHoistedElement=!1,r.isFixedPosition=!1,r.isHorizontallyCenteredOnViewport=!1,r.maxHeight=0,r.openBottomBias=0,r.openAnimationEndTimerId=0,r.closeAnimationEndTimerId=0,r.animationRequestId=0,r.anchorCorner=Yt.TOP_START,r.originCorner=Yt.TOP_START,r.anchorMargin={top:0,right:0,bottom:0,left:0},r.position={x:0,y:0},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Kt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Zt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Qt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"Corner",{get:function(){return Yt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e=n.cssClasses,t=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(t))throw new Error(t+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},n.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},n.prototype.setAnchorCorner=function(e){this.anchorCorner=e},n.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^qt.RIGHT},n.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},n.prototype.setIsHoisted=function(e){this.isHoistedElement=e},n.prototype.setFixedPosition=function(e){this.isFixedPosition=e},n.prototype.isFixed=function(){return this.isFixedPosition},n.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},n.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},n.prototype.setQuickOpen=function(e){this.isQuickOpen=e},n.prototype.setMaxHeight=function(e){this.maxHeight=e},n.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},n.prototype.isOpen=function(){return this.isSurfaceOpen},n.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(n.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(n.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(n.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout((function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(n.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()}),Qt.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},n.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(n.cssClasses.OPEN),this.adapter.removeClass(n.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(n.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){t.adapter.removeClass(n.cssClasses.OPEN),t.adapter.removeClass(n.cssClasses.IS_OPEN_BELOW),t.closeAnimationEndTimerId=setTimeout((function(){t.closeAnimationEndTimerId=0,t.adapter.removeClass(n.cssClasses.ANIMATING_CLOSED),t.adapter.notifyClose()}),Qt.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},n.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},n.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},n.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var t=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(t),r=this.hasBit(t,qt.BOTTOM)?"bottom":"top",a=this.hasBit(t,qt.RIGHT)?"right":"left",o=this.getHorizontalOriginOffset(t),d=this.getVerticalOriginOffset(t),l=this.measurements,s=l.anchorSize,c=l.surfaceSize,m=((e={})[a]=o,e[r]=d,e);s.width/c.width>Qt.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(a="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(a+" "+r),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(t,qt.BOTTOM)||this.adapter.addClass(n.cssClasses.IS_OPEN_BELOW)},n.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),n=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:i.width-e.right,bottom:i.height-e.bottom,left:e.left},viewportSize:i,windowScroll:n}},n.prototype.getoriginCorner=function(){var e,t,i=this.originCorner,r=this.measurements,a=r.viewportDistance,o=r.anchorSize,d=r.surfaceSize,l=n.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,qt.BOTTOM)?(e=a.top-l+this.anchorMargin.bottom,t=a.bottom-l-this.anchorMargin.bottom):(e=a.top-l+this.anchorMargin.top,t=a.bottom-l+o.height-this.anchorMargin.top),!(t-d.height>0)&&e>t+this.openBottomBias&&(i=this.setBit(i,qt.BOTTOM));var s,c,m=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,qt.FLIP_RTL),h=this.hasBit(this.anchorCorner,qt.RIGHT)||this.hasBit(i,qt.RIGHT),u=!1;(u=m&&p?!h:h)?(s=a.left+o.width+this.anchorMargin.right,c=a.right-this.anchorMargin.right):(s=a.left+this.anchorMargin.left,c=a.right+o.width-this.anchorMargin.left);var f=s-d.width>0,g=c-d.width>0,b=this.hasBit(i,qt.FLIP_RTL)&&this.hasBit(i,qt.RIGHT);return g&&b&&m||!f&&b?i=this.unsetBit(i,qt.RIGHT):(f&&u&&m||f&&!u&&h||!g&&s>=c)&&(i=this.setBit(i,qt.RIGHT)),i},n.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var t=this.measurements.viewportDistance,i=0,r=this.hasBit(e,qt.BOTTOM),a=this.hasBit(this.anchorCorner,qt.BOTTOM),o=n.numbers.MARGIN_TO_EDGE;return r?(i=t.top+this.anchorMargin.top-o,a||(i+=this.measurements.anchorSize.height)):(i=t.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-o,a&&(i-=this.measurements.anchorSize.height)),i},n.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,qt.RIGHT),n=this.hasBit(this.anchorCorner,qt.RIGHT);if(i){var r=n?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return n?t.width-this.anchorMargin.right:this.anchorMargin.left},n.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,qt.BOTTOM),n=this.hasBit(this.anchorCorner,qt.BOTTOM);return i?n?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:n?t.height+this.anchorMargin.bottom:this.anchorMargin.top},n.prototype.adjustPositionForHoistedElement=function(e){var t,i,n=this.measurements,a=n.windowScroll,o=n.viewportDistance,d=n.surfaceSize,l=n.viewportSize,s=Object.keys(e);try{for(var c=r(s),m=c.next();!m.done;m=c.next()){var p=m.value,h=e[p]||0;!this.isHorizontallyCenteredOnViewport||"left"!==p&&"right"!==p?(h+=o[p],this.isFixedPosition||("top"===p?h+=a.y:"bottom"===p?h-=a.y:"left"===p?h+=a.x:h-=a.x),e[p]=h):e[p]=(l.width-d.width)/2}}catch(e){t={error:e}}finally{try{m&&!m.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}},n.prototype.maybeRestoreFocus=function(){var e=this,t=this.adapter.isFocused(),i=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||i)&&setTimeout((function(){e.adapter.restoreFocus()}),Qt.TOUCH_EVENT_WAIT_MS)},n.prototype.hasBit=function(e,t){return Boolean(e&t)},n.prototype.setBit=function(e,t){return e|t},n.prototype.unsetBit=function(e,t){return e^t},n.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},n}(ye),yi=_i,wi=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.closeAnimationEndTimerId=0,r.defaultFocusState=gi.LIST_ROOT,r.selectedIndex=-1,r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return bi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return vi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return xi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),n.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},n.prototype.handleKeydown=function(e){var t=e.key,i=e.keyCode;("Tab"===t||9===i)&&this.adapter.closeSurface(!0)},n.prototype.handleItemAction=function(e){var t=this,i=this.adapter.getElementIndex(e);if(!(i<0)){this.adapter.notifySelected({index:i});var n="true"===this.adapter.getAttributeFromElementAtIndex(i,vi.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(n),this.closeAnimationEndTimerId=setTimeout((function(){var i=t.adapter.getElementIndex(e);i>=0&&t.adapter.isSelectableItemAtIndex(i)&&t.setSelectedIndex(i)}),_i.numbers.TRANSITION_CLOSE_DURATION)}},n.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case gi.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case gi.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case gi.NONE:break;default:this.adapter.focusListRoot()}},n.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},n.prototype.getSelectedIndex=function(){return this.selectedIndex},n.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,vi.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,bi.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,bi.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},n.prototype.setEnabled=function(e,t){this.validatedIndex(e),t?(this.adapter.removeClassFromElementAtIndex(e,Rt),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,Rt),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_DISABLED_ATTR,"true"))},n.prototype.validatedIndex=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e+----------+ + * | ANCHOR | + * +----------+ + * Origin corner --->+--------------+ + * | | + * | | + * | MENU SURFACE | + * | | + * | | + * +--------------+ + */ + _this.originCorner = Corner.TOP_START; + _this.anchorMargin = { top: 0, right: 0, bottom: 0, left: 0 }; + _this.position = { x: 0, y: 0 }; + return _this; + } + Object.defineProperty(MDCMenuSurfaceFoundation, "cssClasses", { + get: function () { + return cssClasses$7; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuSurfaceFoundation, "strings", { + get: function () { + return strings$6; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuSurfaceFoundation, "numbers", { + get: function () { + return numbers$6; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuSurfaceFoundation, "Corner", { + get: function () { + return Corner; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuSurfaceFoundation, "defaultAdapter", { + /** + * @see {@link MDCMenuSurfaceAdapter} for typing information on parameters and return types. + */ + get: function () { + // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. + return { + addClass: function () { return undefined; }, + removeClass: function () { return undefined; }, + hasClass: function () { return false; }, + hasAnchor: function () { return false; }, + isElementInContainer: function () { return false; }, + isFocused: function () { return false; }, + isRtl: function () { return false; }, + getInnerDimensions: function () { return ({ height: 0, width: 0 }); }, + getAnchorDimensions: function () { return null; }, + getWindowDimensions: function () { return ({ height: 0, width: 0 }); }, + getBodyDimensions: function () { return ({ height: 0, width: 0 }); }, + getWindowScroll: function () { return ({ x: 0, y: 0 }); }, + setPosition: function () { return undefined; }, + setMaxHeight: function () { return undefined; }, + setTransformOrigin: function () { return undefined; }, + saveFocus: function () { return undefined; }, + restoreFocus: function () { return undefined; }, + notifyClose: function () { return undefined; }, + notifyOpen: function () { return undefined; }, + notifyClosing: function () { return undefined; }, + }; + // tslint:enable:object-literal-sort-keys + }, + enumerable: false, + configurable: true + }); + MDCMenuSurfaceFoundation.prototype.init = function () { + var _a = MDCMenuSurfaceFoundation.cssClasses, ROOT = _a.ROOT, OPEN = _a.OPEN; + if (!this.adapter.hasClass(ROOT)) { + throw new Error(ROOT + " class required in root element."); + } + if (this.adapter.hasClass(OPEN)) { + this.isSurfaceOpen = true; + } + }; + MDCMenuSurfaceFoundation.prototype.destroy = function () { + clearTimeout(this.openAnimationEndTimerId); + clearTimeout(this.closeAnimationEndTimerId); + // Cancel any currently running animations. + cancelAnimationFrame(this.animationRequestId); + }; + /** + * @param corner Default anchor corner alignment of top-left menu surface + * corner. + */ + MDCMenuSurfaceFoundation.prototype.setAnchorCorner = function (corner) { + this.anchorCorner = corner; + }; + /** + * Flip menu corner horizontally. + */ + MDCMenuSurfaceFoundation.prototype.flipCornerHorizontally = function () { + this.originCorner = this.originCorner ^ CornerBit.RIGHT; + }; + /** + * @param margin Set of margin values from anchor. + */ + MDCMenuSurfaceFoundation.prototype.setAnchorMargin = function (margin) { + this.anchorMargin.top = margin.top || 0; + this.anchorMargin.right = margin.right || 0; + this.anchorMargin.bottom = margin.bottom || 0; + this.anchorMargin.left = margin.left || 0; + }; + /** Used to indicate if the menu-surface is hoisted to the body. */ + MDCMenuSurfaceFoundation.prototype.setIsHoisted = function (isHoisted) { + this.isHoistedElement = isHoisted; + }; + /** + * Used to set the menu-surface calculations based on a fixed position menu. + */ + MDCMenuSurfaceFoundation.prototype.setFixedPosition = function (isFixedPosition) { + this.isFixedPosition = isFixedPosition; + }; + /** + * @return Returns true if menu is in fixed (`position: fixed`) position. + */ + MDCMenuSurfaceFoundation.prototype.isFixed = function () { + return this.isFixedPosition; + }; + /** Sets the menu-surface position on the page. */ + MDCMenuSurfaceFoundation.prototype.setAbsolutePosition = function (x, y) { + this.position.x = this.isFinite(x) ? x : 0; + this.position.y = this.isFinite(y) ? y : 0; + }; + /** Sets whether menu-surface should be horizontally centered to viewport. */ + MDCMenuSurfaceFoundation.prototype.setIsHorizontallyCenteredOnViewport = function (isCentered) { + this.isHorizontallyCenteredOnViewport = isCentered; + }; + MDCMenuSurfaceFoundation.prototype.setQuickOpen = function (quickOpen) { + this.isQuickOpen = quickOpen; + }; + /** + * Sets maximum menu-surface height on open. + * @param maxHeight The desired max-height. Set to 0 (default) to + * automatically calculate max height based on available viewport space. + */ + MDCMenuSurfaceFoundation.prototype.setMaxHeight = function (maxHeight) { + this.maxHeight = maxHeight; + }; + /** + * Set to a positive integer to influence the menu to preferentially open + * below the anchor instead of above. + * @param bias A value of `x` simulates an extra `x` pixels of available space + * below the menu during positioning calculations. + */ + MDCMenuSurfaceFoundation.prototype.setOpenBottomBias = function (bias) { + this.openBottomBias = bias; + }; + MDCMenuSurfaceFoundation.prototype.isOpen = function () { + return this.isSurfaceOpen; + }; + /** + * Open the menu surface. + */ + MDCMenuSurfaceFoundation.prototype.open = function () { + var _this = this; + if (this.isSurfaceOpen) { + return; + } + this.adapter.saveFocus(); + if (this.isQuickOpen) { + this.isSurfaceOpen = true; + this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.OPEN); + this.dimensions = this.adapter.getInnerDimensions(); + this.autoposition(); + this.adapter.notifyOpen(); + } + else { + this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_OPEN); + this.animationRequestId = requestAnimationFrame(function () { + _this.dimensions = _this.adapter.getInnerDimensions(); + _this.autoposition(); + _this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.OPEN); + _this.openAnimationEndTimerId = setTimeout(function () { + _this.openAnimationEndTimerId = 0; + _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_OPEN); + _this.adapter.notifyOpen(); + }, numbers$6.TRANSITION_OPEN_DURATION); + }); + this.isSurfaceOpen = true; + } + }; + /** + * Closes the menu surface. + */ + MDCMenuSurfaceFoundation.prototype.close = function (skipRestoreFocus) { + var _this = this; + if (skipRestoreFocus === void 0) { skipRestoreFocus = false; } + if (!this.isSurfaceOpen) { + return; + } + this.adapter.notifyClosing(); + if (this.isQuickOpen) { + this.isSurfaceOpen = false; + if (!skipRestoreFocus) { + this.maybeRestoreFocus(); + } + this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.OPEN); + this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW); + this.adapter.notifyClose(); + return; + } + this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_CLOSED); + requestAnimationFrame(function () { + _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.OPEN); + _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW); + _this.closeAnimationEndTimerId = setTimeout(function () { + _this.closeAnimationEndTimerId = 0; + _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_CLOSED); + _this.adapter.notifyClose(); + }, numbers$6.TRANSITION_CLOSE_DURATION); + }); + this.isSurfaceOpen = false; + if (!skipRestoreFocus) { + this.maybeRestoreFocus(); + } + }; + /** Handle clicks and close if not within menu-surface element. */ + MDCMenuSurfaceFoundation.prototype.handleBodyClick = function (evt) { + var el = evt.target; + if (this.adapter.isElementInContainer(el)) { + return; + } + this.close(); + }; + /** Handle keys that close the surface. */ + MDCMenuSurfaceFoundation.prototype.handleKeydown = function (evt) { + var keyCode = evt.keyCode, key = evt.key; + var isEscape = key === 'Escape' || keyCode === 27; + if (isEscape) { + this.close(); + } + }; + MDCMenuSurfaceFoundation.prototype.autoposition = function () { + var _a; + // Compute measurements for autoposition methods reuse. + this.measurements = this.getAutoLayoutmeasurements(); + var corner = this.getoriginCorner(); + var maxMenuSurfaceHeight = this.getMenuSurfaceMaxHeight(corner); + var verticalAlignment = this.hasBit(corner, CornerBit.BOTTOM) ? 'bottom' : 'top'; + var horizontalAlignment = this.hasBit(corner, CornerBit.RIGHT) ? 'right' : 'left'; + var horizontalOffset = this.getHorizontalOriginOffset(corner); + var verticalOffset = this.getVerticalOriginOffset(corner); + var _b = this.measurements, anchorSize = _b.anchorSize, surfaceSize = _b.surfaceSize; + var position = (_a = {}, + _a[horizontalAlignment] = horizontalOffset, + _a[verticalAlignment] = verticalOffset, + _a); + // Center align when anchor width is comparable or greater than menu + // surface, otherwise keep corner. + if (anchorSize.width / surfaceSize.width > + numbers$6.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO) { + horizontalAlignment = 'center'; + } + // If the menu-surface has been hoisted to the body, it's no longer relative + // to the anchor element + if (this.isHoistedElement || this.isFixedPosition) { + this.adjustPositionForHoistedElement(position); + } + this.adapter.setTransformOrigin(horizontalAlignment + " " + verticalAlignment); + this.adapter.setPosition(position); + this.adapter.setMaxHeight(maxMenuSurfaceHeight ? maxMenuSurfaceHeight + 'px' : ''); + // If it is opened from the top then add is-open-below class + if (!this.hasBit(corner, CornerBit.BOTTOM)) { + this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW); + } + }; + /** + * @return Measurements used to position menu surface popup. + */ + MDCMenuSurfaceFoundation.prototype.getAutoLayoutmeasurements = function () { + var anchorRect = this.adapter.getAnchorDimensions(); + var bodySize = this.adapter.getBodyDimensions(); + var viewportSize = this.adapter.getWindowDimensions(); + var windowScroll = this.adapter.getWindowScroll(); + if (!anchorRect) { + // tslint:disable:object-literal-sort-keys Positional properties are more readable when they're grouped together + anchorRect = { + top: this.position.y, + right: this.position.x, + bottom: this.position.y, + left: this.position.x, + width: 0, + height: 0, + }; + // tslint:enable:object-literal-sort-keys + } + return { + anchorSize: anchorRect, + bodySize: bodySize, + surfaceSize: this.dimensions, + viewportDistance: { + // tslint:disable:object-literal-sort-keys Positional properties are more readable when they're grouped together + top: anchorRect.top, + right: viewportSize.width - anchorRect.right, + bottom: viewportSize.height - anchorRect.bottom, + left: anchorRect.left, + // tslint:enable:object-literal-sort-keys + }, + viewportSize: viewportSize, + windowScroll: windowScroll, + }; + }; + /** + * Computes the corner of the anchor from which to animate and position the + * menu surface. + * + * Only LEFT or RIGHT bit is used to position the menu surface ignoring RTL + * context. E.g., menu surface will be positioned from right side on TOP_END. + */ + MDCMenuSurfaceFoundation.prototype.getoriginCorner = function () { + var corner = this.originCorner; + var _a = this.measurements, viewportDistance = _a.viewportDistance, anchorSize = _a.anchorSize, surfaceSize = _a.surfaceSize; + var MARGIN_TO_EDGE = MDCMenuSurfaceFoundation.numbers.MARGIN_TO_EDGE; + var isAnchoredToBottom = this.hasBit(this.anchorCorner, CornerBit.BOTTOM); + var availableTop; + var availableBottom; + if (isAnchoredToBottom) { + availableTop = + viewportDistance.top - MARGIN_TO_EDGE + this.anchorMargin.bottom; + availableBottom = + viewportDistance.bottom - MARGIN_TO_EDGE - this.anchorMargin.bottom; + } + else { + availableTop = + viewportDistance.top - MARGIN_TO_EDGE + this.anchorMargin.top; + availableBottom = viewportDistance.bottom - MARGIN_TO_EDGE + + anchorSize.height - this.anchorMargin.top; + } + var isAvailableBottom = availableBottom - surfaceSize.height > 0; + if (!isAvailableBottom && + availableTop > availableBottom + this.openBottomBias) { + // Attach bottom side of surface to the anchor. + corner = this.setBit(corner, CornerBit.BOTTOM); + } + var isRtl = this.adapter.isRtl(); + var isFlipRtl = this.hasBit(this.anchorCorner, CornerBit.FLIP_RTL); + var hasRightBit = this.hasBit(this.anchorCorner, CornerBit.RIGHT) || + this.hasBit(corner, CornerBit.RIGHT); + // Whether surface attached to right side of anchor element. + var isAnchoredToRight = false; + // Anchored to start + if (isRtl && isFlipRtl) { + isAnchoredToRight = !hasRightBit; + } + else { + // Anchored to right + isAnchoredToRight = hasRightBit; + } + var availableLeft; + var availableRight; + if (isAnchoredToRight) { + availableLeft = + viewportDistance.left + anchorSize.width + this.anchorMargin.right; + availableRight = viewportDistance.right - this.anchorMargin.right; + } + else { + availableLeft = viewportDistance.left + this.anchorMargin.left; + availableRight = + viewportDistance.right + anchorSize.width - this.anchorMargin.left; + } + var isAvailableLeft = availableLeft - surfaceSize.width > 0; + var isAvailableRight = availableRight - surfaceSize.width > 0; + var isOriginCornerAlignedToEnd = this.hasBit(corner, CornerBit.FLIP_RTL) && + this.hasBit(corner, CornerBit.RIGHT); + if (isAvailableRight && isOriginCornerAlignedToEnd && isRtl || + !isAvailableLeft && isOriginCornerAlignedToEnd) { + // Attach left side of surface to the anchor. + corner = this.unsetBit(corner, CornerBit.RIGHT); + } + else if (isAvailableLeft && isAnchoredToRight && isRtl || + (isAvailableLeft && !isAnchoredToRight && hasRightBit) || + (!isAvailableRight && availableLeft >= availableRight)) { + // Attach right side of surface to the anchor. + corner = this.setBit(corner, CornerBit.RIGHT); + } + return corner; + }; + /** + * @param corner Origin corner of the menu surface. + * @return Maximum height of the menu surface, based on available space. 0 + * indicates should not be set. + */ + MDCMenuSurfaceFoundation.prototype.getMenuSurfaceMaxHeight = function (corner) { + if (this.maxHeight > 0) { + return this.maxHeight; + } + var viewportDistance = this.measurements.viewportDistance; + var maxHeight = 0; + var isBottomAligned = this.hasBit(corner, CornerBit.BOTTOM); + var isBottomAnchored = this.hasBit(this.anchorCorner, CornerBit.BOTTOM); + var MARGIN_TO_EDGE = MDCMenuSurfaceFoundation.numbers.MARGIN_TO_EDGE; + // When maximum height is not specified, it is handled from CSS. + if (isBottomAligned) { + maxHeight = viewportDistance.top + this.anchorMargin.top - MARGIN_TO_EDGE; + if (!isBottomAnchored) { + maxHeight += this.measurements.anchorSize.height; + } + } + else { + maxHeight = viewportDistance.bottom - this.anchorMargin.bottom + + this.measurements.anchorSize.height - MARGIN_TO_EDGE; + if (isBottomAnchored) { + maxHeight -= this.measurements.anchorSize.height; + } + } + return maxHeight; + }; + /** + * @param corner Origin corner of the menu surface. + * @return Horizontal offset of menu surface origin corner from corresponding + * anchor corner. + */ + MDCMenuSurfaceFoundation.prototype.getHorizontalOriginOffset = function (corner) { + var anchorSize = this.measurements.anchorSize; + // isRightAligned corresponds to using the 'right' property on the surface. + var isRightAligned = this.hasBit(corner, CornerBit.RIGHT); + var avoidHorizontalOverlap = this.hasBit(this.anchorCorner, CornerBit.RIGHT); + if (isRightAligned) { + var rightOffset = avoidHorizontalOverlap ? + anchorSize.width - this.anchorMargin.left : + this.anchorMargin.right; + // For hoisted or fixed elements, adjust the offset by the difference + // between viewport width and body width so when we calculate the right + // value (`adjustPositionForHoistedElement`) based on the element + // position, the right property is correct. + if (this.isHoistedElement || this.isFixedPosition) { + return rightOffset - + (this.measurements.viewportSize.width - + this.measurements.bodySize.width); + } + return rightOffset; + } + return avoidHorizontalOverlap ? anchorSize.width - this.anchorMargin.right : + this.anchorMargin.left; + }; + /** + * @param corner Origin corner of the menu surface. + * @return Vertical offset of menu surface origin corner from corresponding + * anchor corner. + */ + MDCMenuSurfaceFoundation.prototype.getVerticalOriginOffset = function (corner) { + var anchorSize = this.measurements.anchorSize; + var isBottomAligned = this.hasBit(corner, CornerBit.BOTTOM); + var avoidVerticalOverlap = this.hasBit(this.anchorCorner, CornerBit.BOTTOM); + var y = 0; + if (isBottomAligned) { + y = avoidVerticalOverlap ? anchorSize.height - this.anchorMargin.top : + -this.anchorMargin.bottom; + } + else { + y = avoidVerticalOverlap ? + (anchorSize.height + this.anchorMargin.bottom) : + this.anchorMargin.top; + } + return y; + }; + /** + * Calculates the offsets for positioning the menu-surface when the + * menu-surface has been hoisted to the body. + */ + MDCMenuSurfaceFoundation.prototype.adjustPositionForHoistedElement = function (position) { + var e_1, _a; + var _b = this.measurements, windowScroll = _b.windowScroll, viewportDistance = _b.viewportDistance, surfaceSize = _b.surfaceSize, viewportSize = _b.viewportSize; + var props = Object.keys(position); + try { + for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) { + var prop = props_1_1.value; + var value = position[prop] || 0; + if (this.isHorizontallyCenteredOnViewport && + (prop === 'left' || prop === 'right')) { + position[prop] = (viewportSize.width - surfaceSize.width) / 2; + continue; + } + // Hoisted surfaces need to have the anchor elements location on the page + // added to the position properties for proper alignment on the body. + value += viewportDistance[prop]; + // Surfaces that are absolutely positioned need to have additional + // calculations for scroll and bottom positioning. + if (!this.isFixedPosition) { + if (prop === 'top') { + value += windowScroll.y; + } + else if (prop === 'bottom') { + value -= windowScroll.y; + } + else if (prop === 'left') { + value += windowScroll.x; + } + else { // prop === 'right' + value -= windowScroll.x; + } + } + position[prop] = value; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (props_1_1 && !props_1_1.done && (_a = props_1.return)) _a.call(props_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + /** + * The last focused element when the menu surface was opened should regain + * focus, if the user is focused on or within the menu surface when it is + * closed. + */ + MDCMenuSurfaceFoundation.prototype.maybeRestoreFocus = function () { + var _this = this; + var isRootFocused = this.adapter.isFocused(); + var childHasFocus = document.activeElement && + this.adapter.isElementInContainer(document.activeElement); + if (isRootFocused || childHasFocus) { + // Wait before restoring focus when closing the menu surface. This is + // important because if a touch event triggered the menu close, and the + // subsequent mouse event occurs after focus is restored, then the + // restored focus would be lost. + setTimeout(function () { + _this.adapter.restoreFocus(); + }, numbers$6.TOUCH_EVENT_WAIT_MS); + } + }; + MDCMenuSurfaceFoundation.prototype.hasBit = function (corner, bit) { + return Boolean(corner & bit); // tslint:disable-line:no-bitwise + }; + MDCMenuSurfaceFoundation.prototype.setBit = function (corner, bit) { + return corner | bit; // tslint:disable-line:no-bitwise + }; + MDCMenuSurfaceFoundation.prototype.unsetBit = function (corner, bit) { + return corner ^ bit; + }; + /** + * isFinite that doesn't force conversion to number type. + * Equivalent to Number.isFinite in ES2015, which is not supported in IE. + */ + MDCMenuSurfaceFoundation.prototype.isFinite = function (num) { + return typeof num === 'number' && isFinite(num); + }; + return MDCMenuSurfaceFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCMenuSurfaceFoundation$1 = MDCMenuSurfaceFoundation; + +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var MDCMenuFoundation = /** @class */ (function (_super) { + __extends(MDCMenuFoundation, _super); + function MDCMenuFoundation(adapter) { + var _this = _super.call(this, __assign(__assign({}, MDCMenuFoundation.defaultAdapter), adapter)) || this; + _this.closeAnimationEndTimerId = 0; + _this.defaultFocusState = DefaultFocusState.LIST_ROOT; + _this.selectedIndex = -1; + return _this; + } + Object.defineProperty(MDCMenuFoundation, "cssClasses", { + get: function () { + return cssClasses$5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuFoundation, "strings", { + get: function () { + return strings$4; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuFoundation, "numbers", { + get: function () { + return numbers$4; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCMenuFoundation, "defaultAdapter", { + /** + * @see {@link MDCMenuAdapter} for typing information on parameters and return types. + */ + get: function () { + // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. + return { + addClassToElementAtIndex: function () { return undefined; }, + removeClassFromElementAtIndex: function () { return undefined; }, + addAttributeToElementAtIndex: function () { return undefined; }, + removeAttributeFromElementAtIndex: function () { return undefined; }, + getAttributeFromElementAtIndex: function () { return null; }, + elementContainsClass: function () { return false; }, + closeSurface: function () { return undefined; }, + getElementIndex: function () { return -1; }, + notifySelected: function () { return undefined; }, + getMenuItemCount: function () { return 0; }, + focusItemAtIndex: function () { return undefined; }, + focusListRoot: function () { return undefined; }, + getSelectedSiblingOfItemAtIndex: function () { return -1; }, + isSelectableItemAtIndex: function () { return false; }, + }; + // tslint:enable:object-literal-sort-keys + }, + enumerable: false, + configurable: true + }); + MDCMenuFoundation.prototype.destroy = function () { + if (this.closeAnimationEndTimerId) { + clearTimeout(this.closeAnimationEndTimerId); + } + this.adapter.closeSurface(); + }; + MDCMenuFoundation.prototype.handleKeydown = function (evt) { + var key = evt.key, keyCode = evt.keyCode; + var isTab = key === 'Tab' || keyCode === 9; + if (isTab) { + this.adapter.closeSurface(/** skipRestoreFocus */ true); + } + }; + MDCMenuFoundation.prototype.handleItemAction = function (listItem) { + var _this = this; + var index = this.adapter.getElementIndex(listItem); + if (index < 0) { + return; + } + this.adapter.notifySelected({ index: index }); + var skipRestoreFocus = this.adapter.getAttributeFromElementAtIndex(index, strings$4.SKIP_RESTORE_FOCUS) === 'true'; + this.adapter.closeSurface(skipRestoreFocus); + // Wait for the menu to close before adding/removing classes that affect styles. + this.closeAnimationEndTimerId = setTimeout(function () { + // Recompute the index in case the menu contents have changed. + var recomputedIndex = _this.adapter.getElementIndex(listItem); + if (recomputedIndex >= 0 && + _this.adapter.isSelectableItemAtIndex(recomputedIndex)) { + _this.setSelectedIndex(recomputedIndex); + } + }, MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION); + }; + MDCMenuFoundation.prototype.handleMenuSurfaceOpened = function () { + switch (this.defaultFocusState) { + case DefaultFocusState.FIRST_ITEM: + this.adapter.focusItemAtIndex(0); + break; + case DefaultFocusState.LAST_ITEM: + this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount() - 1); + break; + case DefaultFocusState.NONE: + // Do nothing. + break; + default: + this.adapter.focusListRoot(); + break; + } + }; + /** + * Sets default focus state where the menu should focus every time when menu + * is opened. Focuses the list root (`DefaultFocusState.LIST_ROOT`) element by + * default. + */ + MDCMenuFoundation.prototype.setDefaultFocusState = function (focusState) { + this.defaultFocusState = focusState; + }; + /** @return Index of the currently selected list item within the menu. */ + MDCMenuFoundation.prototype.getSelectedIndex = function () { + return this.selectedIndex; + }; + /** + * Selects the list item at `index` within the menu. + * @param index Index of list item within the menu. + */ + MDCMenuFoundation.prototype.setSelectedIndex = function (index) { + this.validatedIndex(index); + if (!this.adapter.isSelectableItemAtIndex(index)) { + throw new Error('MDCMenuFoundation: No selection group at specified index.'); + } + var prevSelectedIndex = this.adapter.getSelectedSiblingOfItemAtIndex(index); + if (prevSelectedIndex >= 0) { + this.adapter.removeAttributeFromElementAtIndex(prevSelectedIndex, strings$4.ARIA_CHECKED_ATTR); + this.adapter.removeClassFromElementAtIndex(prevSelectedIndex, cssClasses$5.MENU_SELECTED_LIST_ITEM); + } + this.adapter.addClassToElementAtIndex(index, cssClasses$5.MENU_SELECTED_LIST_ITEM); + this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_CHECKED_ATTR, 'true'); + this.selectedIndex = index; + }; + /** + * Sets the enabled state to isEnabled for the menu item at the given index. + * @param index Index of the menu item + * @param isEnabled The desired enabled state of the menu item. + */ + MDCMenuFoundation.prototype.setEnabled = function (index, isEnabled) { + this.validatedIndex(index); + if (isEnabled) { + this.adapter.removeClassFromElementAtIndex(index, cssClasses$a.LIST_ITEM_DISABLED_CLASS); + this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_DISABLED_ATTR, 'false'); + } + else { + this.adapter.addClassToElementAtIndex(index, cssClasses$a.LIST_ITEM_DISABLED_CLASS); + this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_DISABLED_ATTR, 'true'); + } + }; + MDCMenuFoundation.prototype.validatedIndex = function (index) { + var menuSize = this.adapter.getMenuItemCount(); + var isIndexInRange = index >= 0 && index < menuSize; + if (!isIndexInRange) { + throw new Error('MDCMenuFoundation: No list item at specified index.'); + } + }; + return MDCMenuFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCMenuFoundation$1 = MDCMenuFoundation; + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class Ei extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=wi,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_||(this.listElement_=this.renderRoot.querySelector("mwc-list")),this.listElement_}get items(){const e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){const e="menu"===this.innerRole?"menuitem":"option";return P` +/** + * @fires selected {SelectedDetail} + * @fires action {ActionDetail} + * @fires items-updated + * @fires opened + * @fires closed + */ +class MenuBase extends BaseElement { + constructor() { + super(...arguments); + this.mdcFoundationClass = MDCMenuFoundation$1; + this.listElement_ = null; + this.anchor = null; + this.open = false; + this.quick = false; + this.wrapFocus = false; + this.innerRole = 'menu'; + this.innerAriaLabel = null; + this.corner = 'TOP_START'; + this.x = null; + this.y = null; + this.absolute = false; + this.multi = false; + this.activatable = false; + this.fixed = false; + this.forceGroupSelection = false; + this.fullwidth = false; + this.menuCorner = 'START'; + this.stayOpenOnBodyClick = false; + this.defaultFocus = 'LIST_ROOT'; + this._listUpdateComplete = null; + } + get listElement() { + if (!this.listElement_) { + this.listElement_ = this.renderRoot.querySelector('mwc-list'); + return this.listElement_; + } + return this.listElement_; + } + get items() { + const listElement = this.listElement; + if (listElement) { + return listElement.items; + } + return []; + } + get index() { + const listElement = this.listElement; + if (listElement) { + return listElement.index; + } + return -1; + } + get selected() { + const listElement = this.listElement; + if (listElement) { + return listElement.selected; + } + return null; + } + render() { + const itemRoles = this.innerRole === 'menu' ? 'menuitem' : 'option'; + return x ` - `}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?this.forceGroupSelection&&!n.selected&&i.toggle(e,!0):n.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?n.selected&&i.toggle(e,!1):n.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const n=this.listElement;if(!n)return;const r=n.items[e];r&&r.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&n.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const n=i.items[e];return n?n.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let n=0;n{const t=this.listElement;if(!t)return!1;const i=t.items[e];return!!i&&i.hasAttribute("group")}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,n=t.items[i];n&&this.mdcFoundation.handleItemAction(n)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}n([he(".mdc-menu")],Ei.prototype,"mdcRoot",void 0),n([he("slot")],Ei.prototype,"slotElement",void 0),n([se({type:Object})],Ei.prototype,"anchor",void 0),n([se({type:Boolean,reflect:!0})],Ei.prototype,"open",void 0),n([se({type:Boolean})],Ei.prototype,"quick",void 0),n([se({type:Boolean})],Ei.prototype,"wrapFocus",void 0),n([se({type:String})],Ei.prototype,"innerRole",void 0),n([se({type:String})],Ei.prototype,"innerAriaLabel",void 0),n([se({type:String})],Ei.prototype,"corner",void 0),n([se({type:Number})],Ei.prototype,"x",void 0),n([se({type:Number})],Ei.prototype,"y",void 0),n([se({type:Boolean})],Ei.prototype,"absolute",void 0),n([se({type:Boolean})],Ei.prototype,"multi",void 0),n([se({type:Boolean})],Ei.prototype,"activatable",void 0),n([se({type:Boolean})],Ei.prototype,"fixed",void 0),n([se({type:Boolean})],Ei.prototype,"forceGroupSelection",void 0),n([se({type:Boolean})],Ei.prototype,"fullwidth",void 0),n([se({type:String})],Ei.prototype,"menuCorner",void 0),n([se({type:Boolean})],Ei.prototype,"stayOpenOnBodyClick",void 0),n([se({type:String}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(gi[e])}))],Ei.prototype,"defaultFocus",void 0); + `; + } + createAdapter() { + return { + addClassToElementAtIndex: (index, className) => { + const listElement = this.listElement; + if (!listElement) { + return; + } + const element = listElement.items[index]; + if (!element) { + return; + } + if (className === 'mdc-menu-item--selected') { + if (this.forceGroupSelection && !element.selected) { + listElement.toggle(index, true); + } + } + else { + element.classList.add(className); + } + }, + removeClassFromElementAtIndex: (index, className) => { + const listElement = this.listElement; + if (!listElement) { + return; + } + const element = listElement.items[index]; + if (!element) { + return; + } + if (className === 'mdc-menu-item--selected') { + if (element.selected) { + listElement.toggle(index, false); + } + } + else { + element.classList.remove(className); + } + }, + addAttributeToElementAtIndex: (index, attr, value) => { + const listElement = this.listElement; + if (!listElement) { + return; + } + const element = listElement.items[index]; + if (!element) { + return; + } + element.setAttribute(attr, value); + }, + removeAttributeFromElementAtIndex: (index, attr) => { + const listElement = this.listElement; + if (!listElement) { + return; + } + const element = listElement.items[index]; + if (!element) { + return; + } + element.removeAttribute(attr); + }, + getAttributeFromElementAtIndex: (index, attr) => { + const listElement = this.listElement; + if (!listElement) { + return null; + } + const element = listElement.items[index]; + if (!element) { + return null; + } + return element.getAttribute(attr); + }, + elementContainsClass: (element, className) => element.classList.contains(className), + closeSurface: () => { + this.open = false; + }, + getElementIndex: (element) => { + const listElement = this.listElement; + if (listElement) { + return listElement.items.indexOf(element); + } + return -1; + }, + notifySelected: () => { }, + getMenuItemCount: () => { + const listElement = this.listElement; + if (!listElement) { + return 0; + } + return listElement.items.length; + }, + focusItemAtIndex: (index) => { + const listElement = this.listElement; + if (!listElement) { + return; + } + const element = listElement.items[index]; + if (element) { + element.focus(); + } + }, + focusListRoot: () => { + if (this.listElement) { + this.listElement.focus(); + } + }, + getSelectedSiblingOfItemAtIndex: (index) => { + const listElement = this.listElement; + if (!listElement) { + return -1; + } + const elementAtIndex = listElement.items[index]; + if (!elementAtIndex || !elementAtIndex.group) { + return -1; + } + for (let i = 0; i < listElement.items.length; i++) { + if (i === index) { + continue; + } + const current = listElement.items[i]; + if (current.selected && current.group === elementAtIndex.group) { + return i; + } + } + return -1; + }, + isSelectableItemAtIndex: (index) => { + const listElement = this.listElement; + if (!listElement) { + return false; + } + const elementAtIndex = listElement.items[index]; + if (!elementAtIndex) { + return false; + } + return elementAtIndex.hasAttribute('group'); + }, + }; + } + onKeydown(evt) { + if (this.mdcFoundation) { + this.mdcFoundation.handleKeydown(evt); + } + } + onAction(evt) { + const listElement = this.listElement; + if (this.mdcFoundation && listElement) { + const index = evt.detail.index; + const el = listElement.items[index]; + if (el) { + this.mdcFoundation.handleItemAction(el); + } + } + } + onOpened() { + this.open = true; + if (this.mdcFoundation) { + this.mdcFoundation.handleMenuSurfaceOpened(); + } + } + onClosed() { + this.open = false; + } + // tslint:disable:ban-ts-ignore + async getUpdateComplete() { + await this._listUpdateComplete; + // @ts-ignore + const result = await super.getUpdateComplete(); + return result; + } + // tslint:enable:ban-ts-ignore + async firstUpdated() { + super.firstUpdated(); + const listElement = this.listElement; + if (listElement) { + this._listUpdateComplete = listElement.updateComplete; + await this._listUpdateComplete; + } + } + select(index) { + const listElement = this.listElement; + if (listElement) { + listElement.select(index); + } + } + close() { + this.open = false; + } + show() { + this.open = true; + } + getFocusedItemIndex() { + const listElement = this.listElement; + if (listElement) { + return listElement.getFocusedItemIndex(); + } + return -1; + } + focusItemAtIndex(index) { + const listElement = this.listElement; + if (listElement) { + listElement.focusItemAtIndex(index); + } + } + layout(updateItems = true) { + const listElement = this.listElement; + if (listElement) { + listElement.layout(updateItems); + } + } +} +__decorate([ + i$2('.mdc-menu') +], MenuBase.prototype, "mdcRoot", void 0); +__decorate([ + i$2('slot') +], MenuBase.prototype, "slotElement", void 0); +__decorate([ + e$6({ type: Object }) +], MenuBase.prototype, "anchor", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }) +], MenuBase.prototype, "open", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "quick", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "wrapFocus", void 0); +__decorate([ + e$6({ type: String }) +], MenuBase.prototype, "innerRole", void 0); +__decorate([ + e$6({ type: String }) +], MenuBase.prototype, "innerAriaLabel", void 0); +__decorate([ + e$6({ type: String }) +], MenuBase.prototype, "corner", void 0); +__decorate([ + e$6({ type: Number }) +], MenuBase.prototype, "x", void 0); +__decorate([ + e$6({ type: Number }) +], MenuBase.prototype, "y", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "absolute", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "multi", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "activatable", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "fixed", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "forceGroupSelection", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "fullwidth", void 0); +__decorate([ + e$6({ type: String }) +], MenuBase.prototype, "menuCorner", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuBase.prototype, "stayOpenOnBodyClick", void 0); +__decorate([ + e$6({ type: String }), + observer(function (value) { + if (this.mdcFoundation) { + this.mdcFoundation.setDefaultFocusState(DefaultFocusState[value]); + } + }) +], MenuBase.prototype, "defaultFocus", void 0); + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -const Ti=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const n=e[i];return null==n?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.vt){this.vt=new Set;for(const e in t)this.vt.add(e);return this.render(t)}this.vt.forEach((e=>{null==t[e]&&(this.vt.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const n=t[e];null!=n&&(this.vt.add(e),e.includes("-")?i.setProperty(e,n):i[e]=n)}return z}}),Ii={TOP_LEFT:Yt.TOP_LEFT,TOP_RIGHT:Yt.TOP_RIGHT,BOTTOM_LEFT:Yt.BOTTOM_LEFT,BOTTOM_RIGHT:Yt.BOTTOM_RIGHT,TOP_START:Yt.TOP_START,TOP_END:Yt.TOP_END,BOTTOM_START:Yt.BOTTOM_START,BOTTOM_END:Yt.BOTTOM_END}; + */const i=e$1(class extends i$1{constructor(t$1){var e;if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||(null===(e=t$1.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="");}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e);}return T}}); + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class Ai extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=yi,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=Yt.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){const e={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},t={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return P` + */ +// tslint:disable:no-bitwise +// required for closure compiler +const stringToCorner = { + 'TOP_LEFT': Corner.TOP_LEFT, + 'TOP_RIGHT': Corner.TOP_RIGHT, + 'BOTTOM_LEFT': Corner.BOTTOM_LEFT, + 'BOTTOM_RIGHT': Corner.BOTTOM_RIGHT, + 'TOP_START': Corner.TOP_START, + 'TOP_END': Corner.TOP_END, + 'BOTTOM_START': Corner.BOTTOM_START, + 'BOTTOM_END': Corner.BOTTOM_END, +}; +/** + * @fires opened + * @fires closed + */ +class MenuSurfaceBase extends BaseElement { + constructor() { + super(...arguments); + this.mdcFoundationClass = MDCMenuSurfaceFoundation$1; + this.absolute = false; + this.fullwidth = false; + this.fixed = false; + this.x = null; + this.y = null; + // must be defined before open or else race condition in foundation occurs. + this.quick = false; + this.open = false; + this.stayOpenOnBodyClick = false; + this.bitwiseCorner = Corner.TOP_START; + this.previousMenuCorner = null; + // must be defined before observer of anchor corner for initialization + this.menuCorner = 'START'; + this.corner = 'TOP_START'; + this.styleTop = ''; + this.styleLeft = ''; + this.styleRight = ''; + this.styleBottom = ''; + this.styleMaxHeight = ''; + this.styleTransformOrigin = ''; + this.anchor = null; + this.previouslyFocused = null; + this.previousAnchor = null; + this.onBodyClickBound = () => undefined; + } + render() { + const classes = { + 'mdc-menu-surface--fixed': this.fixed, + 'mdc-menu-surface--fullwidth': this.fullwidth, + }; + const styles = { + 'top': this.styleTop, + 'left': this.styleLeft, + 'right': this.styleRight, + 'bottom': this.styleBottom, + 'max-height': this.styleMaxHeight, + 'transform-origin': this.styleTransformOrigin, + }; + return x `
-
`}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const e=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const e=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>ke(this),saveFocus:()=>{const e=Re(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;-1===e.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}close(){this.open=!1}show(){this.open=!0}}n([he(".mdc-menu-surface")],Ai.prototype,"mdcRoot",void 0),n([he("slot")],Ai.prototype,"slotElement",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(e)}))],Ai.prototype,"absolute",void 0),n([se({type:Boolean})],Ai.prototype,"fullwidth",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(e)}))],Ai.prototype,"fixed",void 0),n([se({type:Number}),Me((function(e){this.mdcFoundation&&null!==this.y&&null!==e&&(this.mdcFoundation.setAbsolutePosition(e,this.y),this.mdcFoundation.setAnchorMargin({left:e,top:this.y,right:-e,bottom:this.y}))}))],Ai.prototype,"x",void 0),n([se({type:Number}),Me((function(e){this.mdcFoundation&&null!==this.x&&null!==e&&(this.mdcFoundation.setAbsolutePosition(this.x,e),this.mdcFoundation.setAnchorMargin({left:this.x,top:e,right:-this.x,bottom:e}))}))],Ai.prototype,"y",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(e)}))],Ai.prototype,"quick",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():void 0!==t&&this.mdcFoundation.close())}))],Ai.prototype,"open",void 0),n([se({type:Boolean})],Ai.prototype,"stayOpenOnBodyClick",void 0),n([ce(),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(e)}))],Ai.prototype,"bitwiseCorner",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation){const t="START"===e||"END"===e,i=null===this.previousMenuCorner,n=!i&&e!==this.previousMenuCorner,r=i&&"END"===e;t&&(n||r)&&(this.bitwiseCorner=this.bitwiseCorner^qt.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=e)}}))],Ai.prototype,"menuCorner",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation&&e){let t=Ii[e];"END"===this.menuCorner&&(t^=qt.RIGHT),this.bitwiseCorner=t}}))],Ai.prototype,"corner",void 0),n([ce()],Ai.prototype,"styleTop",void 0),n([ce()],Ai.prototype,"styleLeft",void 0),n([ce()],Ai.prototype,"styleRight",void 0),n([ce()],Ai.prototype,"styleBottom",void 0),n([ce()],Ai.prototype,"styleMaxHeight",void 0),n([ce()],Ai.prototype,"styleTransformOrigin",void 0); + `; + } + createAdapter() { + return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { hasAnchor: () => { + return !!this.anchor; + }, notifyClose: () => { + const init = { bubbles: true, composed: true }; + const ev = new CustomEvent('closed', init); + this.open = false; + this.mdcRoot.dispatchEvent(ev); + }, notifyClosing: () => { + const init = { bubbles: true, composed: true }; + const ev = new CustomEvent('closing', init); + this.mdcRoot.dispatchEvent(ev); + }, notifyOpen: () => { + const init = { bubbles: true, composed: true }; + const ev = new CustomEvent('opened', init); + this.open = true; + this.mdcRoot.dispatchEvent(ev); + }, isElementInContainer: () => false, isRtl: () => { + if (this.mdcRoot) { + return getComputedStyle(this.mdcRoot).direction === 'rtl'; + } + return false; + }, setTransformOrigin: (origin) => { + const root = this.mdcRoot; + if (!root) { + return; + } + this.styleTransformOrigin = origin; + }, isFocused: () => { + return doesElementContainFocus(this); + }, saveFocus: () => { + const activeElementPath = deepActiveElementPath(); + const pathLength = activeElementPath.length; + if (!pathLength) { + this.previouslyFocused = null; + } + this.previouslyFocused = activeElementPath[pathLength - 1]; + }, restoreFocus: () => { + if (!this.previouslyFocused) { + return; + } + if ('focus' in this.previouslyFocused) { + this.previouslyFocused.focus(); + } + }, getInnerDimensions: () => { + const mdcRoot = this.mdcRoot; + if (!mdcRoot) { + return { width: 0, height: 0 }; + } + return { width: mdcRoot.offsetWidth, height: mdcRoot.offsetHeight }; + }, getAnchorDimensions: () => { + const anchorElement = this.anchor; + return anchorElement ? anchorElement.getBoundingClientRect() : null; + }, getBodyDimensions: () => { + return { + width: document.body.clientWidth, + height: document.body.clientHeight, + }; + }, getWindowDimensions: () => { + return { + width: window.innerWidth, + height: window.innerHeight, + }; + }, getWindowScroll: () => { + return { + x: window.pageXOffset, + y: window.pageYOffset, + }; + }, setPosition: (position) => { + const mdcRoot = this.mdcRoot; + if (!mdcRoot) { + return; + } + this.styleLeft = 'left' in position ? `${position.left}px` : ''; + this.styleRight = 'right' in position ? `${position.right}px` : ''; + this.styleTop = 'top' in position ? `${position.top}px` : ''; + this.styleBottom = 'bottom' in position ? `${position.bottom}px` : ''; + }, setMaxHeight: async (height) => { + const mdcRoot = this.mdcRoot; + if (!mdcRoot) { + return; + } + // must set both for IE support as IE will not set a var + this.styleMaxHeight = height; + await this.updateComplete; + this.styleMaxHeight = `var(--mdc-menu-max-height, ${height})`; + } }); + } + onKeydown(evt) { + if (this.mdcFoundation) { + this.mdcFoundation.handleKeydown(evt); + } + } + onBodyClick(evt) { + if (this.stayOpenOnBodyClick) { + return; + } + const path = evt.composedPath(); + if (path.indexOf(this) === -1) { + this.close(); + } + } + registerBodyClick() { + this.onBodyClickBound = this.onBodyClick.bind(this); + // capture otherwise listener closes menu after quick menu opens + document.body.addEventListener('click', this.onBodyClickBound, { passive: true, capture: true }); + } + deregisterBodyClick() { + document.body.removeEventListener('click', this.onBodyClickBound, { capture: true }); + } + close() { + this.open = false; + } + show() { + this.open = true; + } +} +__decorate([ + i$2('.mdc-menu-surface') +], MenuSurfaceBase.prototype, "mdcRoot", void 0); +__decorate([ + i$2('slot') +], MenuSurfaceBase.prototype, "slotElement", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (isAbsolute) { + if (this.mdcFoundation && !this.fixed) { + this.mdcFoundation.setIsHoisted(isAbsolute); + } + }) +], MenuSurfaceBase.prototype, "absolute", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuSurfaceBase.prototype, "fullwidth", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (isFixed) { + if (this.mdcFoundation && !this.absolute) { + this.mdcFoundation.setFixedPosition(isFixed); + } + }) +], MenuSurfaceBase.prototype, "fixed", void 0); +__decorate([ + e$6({ type: Number }), + observer(function (value) { + if (this.mdcFoundation && this.y !== null && value !== null) { + this.mdcFoundation.setAbsolutePosition(value, this.y); + this.mdcFoundation.setAnchorMargin({ left: value, top: this.y, right: -value, bottom: this.y }); + } + }) +], MenuSurfaceBase.prototype, "x", void 0); +__decorate([ + e$6({ type: Number }), + observer(function (value) { + if (this.mdcFoundation && this.x !== null && value !== null) { + this.mdcFoundation.setAbsolutePosition(this.x, value); + this.mdcFoundation.setAnchorMargin({ left: this.x, top: value, right: -this.x, bottom: value }); + } + }) +], MenuSurfaceBase.prototype, "y", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (value) { + if (this.mdcFoundation) { + this.mdcFoundation.setQuickOpen(value); + } + }) +], MenuSurfaceBase.prototype, "quick", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }), + observer(function (isOpen, wasOpen) { + if (this.mdcFoundation) { + if (isOpen) { + this.mdcFoundation.open(); + // wasOpen helps with first render (when it is `undefined`) perf + } + else if (wasOpen !== undefined) { + this.mdcFoundation.close(); + } + } + }) +], MenuSurfaceBase.prototype, "open", void 0); +__decorate([ + e$6({ type: Boolean }) +], MenuSurfaceBase.prototype, "stayOpenOnBodyClick", void 0); +__decorate([ + t$2(), + observer(function (value) { + if (this.mdcFoundation) { + if (value) { + this.mdcFoundation.setAnchorCorner(value); + } + else { + this.mdcFoundation.setAnchorCorner(value); + } + } + }) +], MenuSurfaceBase.prototype, "bitwiseCorner", void 0); +__decorate([ + e$6({ type: String }), + observer(function (value) { + if (this.mdcFoundation) { + const isValidValue = value === 'START' || value === 'END'; + const isFirstTimeSet = this.previousMenuCorner === null; + const cornerChanged = !isFirstTimeSet && value !== this.previousMenuCorner; + const initiallySetToEnd = isFirstTimeSet && value === 'END'; + if (isValidValue && (cornerChanged || initiallySetToEnd)) { + this.bitwiseCorner = this.bitwiseCorner ^ CornerBit.RIGHT; + this.mdcFoundation.flipCornerHorizontally(); + this.previousMenuCorner = value; + } + } + }) +], MenuSurfaceBase.prototype, "menuCorner", void 0); +__decorate([ + e$6({ type: String }), + observer(function (value) { + if (this.mdcFoundation) { + if (value) { + let newCorner = stringToCorner[value]; + if (this.menuCorner === 'END') { + newCorner = newCorner ^ CornerBit.RIGHT; + } + this.bitwiseCorner = newCorner; + } + } + }) +], MenuSurfaceBase.prototype, "corner", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleTop", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleLeft", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleRight", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleBottom", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleMaxHeight", void 0); +__decorate([ + t$2() +], MenuSurfaceBase.prototype, "styleTransformOrigin", void 0); + +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +function matches(element, selector) { + var nativeMatches = element.matches + || element.webkitMatchesSelector + || element.msMatchesSelector; + return nativeMatches.call(element, selector); +} + /** * @license * Copyright 2016 Google Inc. @@ -627,7 +5779,59 @@ const Ti=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"styl * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var Ci={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Si={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ri={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}; +var cssClasses$4 = { + // Ripple is a special case where the "root" component is really a "mixin" of sorts, + // given that it's an 'upgrade' to an existing component. That being said it is the root + // CSS class that all other CSS classes derive from. + BG_FOCUSED: 'mdc-ripple-upgraded--background-focused', + FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation', + FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation', + ROOT: 'mdc-ripple-upgraded', + UNBOUNDED: 'mdc-ripple-upgraded--unbounded', +}; +var strings$3 = { + VAR_FG_SCALE: '--mdc-ripple-fg-scale', + VAR_FG_SIZE: '--mdc-ripple-fg-size', + VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end', + VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start', + VAR_LEFT: '--mdc-ripple-left', + VAR_TOP: '--mdc-ripple-top', +}; +var numbers$3 = { + DEACTIVATION_TIMEOUT_MS: 225, + FG_DEACTIVATION_MS: 150, + INITIAL_ORIGIN_SCALE: 0.6, + PADDING: 10, + TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices +}; + +/** + * Stores result from supportsCssVariables to avoid redundant processing to + * detect CSS custom variable support. + */ +function getNormalizedEventCoords(evt, pageOffset, clientRect) { + if (!evt) { + return { x: 0, y: 0 }; + } + var x = pageOffset.x, y = pageOffset.y; + var documentX = x + clientRect.left; + var documentY = y + clientRect.top; + var normalizedX; + var normalizedY; + // Determine touch point relative to the ripple container. + if (evt.type === 'touchstart') { + var touchEvent = evt; + normalizedX = touchEvent.changedTouches[0].pageX - documentX; + normalizedY = touchEvent.changedTouches[0].pageY - documentY; + } + else { + var mouseEvent = evt; + normalizedX = mouseEvent.pageX - documentX; + normalizedY = mouseEvent.pageY - documentY; + } + return { x: normalizedX, y: normalizedY }; +} + /** * @license * Copyright 2016 Google Inc. @@ -650,13 +5854,735 @@ var Ci={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var ki=["touchstart","pointerdown","mousedown","keydown"],Oi=["touchend","pointerup","mouseup","contextmenu"],Li=[],Fi=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(e){r.activateImpl(e)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Ci},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Si},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Ri},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e=this,t=this.supportsPressRipple();if(this.registerRootHandlers(t),t){var i=n.cssClasses,r=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(a),e.layoutInternal())}))}},n.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(n.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(n.cssClasses.FG_DEACTIVATION));var t=n.cssClasses,i=t.ROOT,r=t.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(r),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},n.prototype.activate=function(e){this.activateImpl(e)},n.prototype.deactivate=function(){this.deactivateImpl()},n.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},n.prototype.setUnbounded=function(e){var t=n.cssClasses.UNBOUNDED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},n.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},n.prototype.registerRootHandlers=function(e){var t,i;if(e){try{for(var n=r(ki),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},n.prototype.registerDeactivationHandlers=function(e){var t,i;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var n=r(Oi),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},n.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=r(ki),n=i.next();!n.done;n=i.next()){var a=n.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},n.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=r(Oi),n=i.next();!n.done;n=i.next()){var a=n.value;this.adapter.deregisterDocumentInteractionHandler(a,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},n.prototype.removeCssVars=function(){var e=this,t=n.strings;Object.keys(t).forEach((function(i){0===i.indexOf("VAR_")&&e.adapter.updateCssVariable(t[i],null)}))},n.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var n=this.previousActivationEvent;if(!(n&&void 0!==e&&n.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&Li.length>0&&Li.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(Li.push(e.target),this.registerDeactivationHandlers(e)),i.wasElementMadeActive=this.checkElementMadeActive(e),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Li=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive(e),i.wasElementMadeActive&&t.animateActivation()),i.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},n.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},n.prototype.animateActivation=function(){var e=this,t=n.strings,i=t.VAR_FG_TRANSLATE_START,r=t.VAR_FG_TRANSLATE_END,a=n.cssClasses,o=a.FG_DEACTIVATION,d=a.FG_ACTIVATION,l=n.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var s="",c="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates(),p=m.startPoint,h=m.endPoint;s=p.x+"px, "+p.y+"px",c=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(i,s),this.adapter.updateCssVariable(r,c),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(d),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),l)},n.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,i=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var n,r,a=t.x,o=t.y,d=a+i.left,l=o+i.top;if("touchstart"===e.type){var s=e;n=s.changedTouches[0].pageX-d,r=s.changedTouches[0].pageY-l}else{var c=e;n=c.pageX-d,r=c.pageY-l}return{x:n,y:r}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:e={x:e.x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},n.prototype.runDeactivationUXLogicIfReady=function(){var e=this,t=n.cssClasses.FG_DEACTIVATION,i=this.activationState,r=i.hasDeactivationUXRun,a=i.isActivated;(r||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(t),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(t)}),Ri.FG_DEACTIVATION_MS))},n.prototype.rmBoundedActivationClasses=function(){var e=n.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},n.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),n.numbers.TAP_DELAY_MS)},n.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var n=i({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(n),e.resetActivationState()})))}},n.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady()},n.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+n.numbers.PADDING;var i=Math.floor(t*n.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},n.prototype.updateLayoutCssVars=function(){var e=n.strings,t=e.VAR_FG_SIZE,i=e.VAR_LEFT,r=e.VAR_TOP,a=e.VAR_FG_SCALE;this.adapter.updateCssVariable(t,this.initialSize+"px"),this.adapter.updateCssVariable(a,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(r,this.unboundedCoords.top+"px"))},n}(ye),Di=Fi; +// Activation events registered on the root element of each instance for activation +var ACTIVATION_EVENT_TYPES = [ + 'touchstart', 'pointerdown', 'mousedown', 'keydown', +]; +// Deactivation events registered on documentElement when a pointer-related down event occurs +var POINTER_DEACTIVATION_EVENT_TYPES = [ + 'touchend', 'pointerup', 'mouseup', 'contextmenu', +]; +// simultaneous nested activations +var activatedTargets = []; +var MDCRippleFoundation = /** @class */ (function (_super) { + __extends(MDCRippleFoundation, _super); + function MDCRippleFoundation(adapter) { + var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this; + _this.activationAnimationHasEnded = false; + _this.activationTimer = 0; + _this.fgDeactivationRemovalTimer = 0; + _this.fgScale = '0'; + _this.frame = { width: 0, height: 0 }; + _this.initialSize = 0; + _this.layoutFrame = 0; + _this.maxRadius = 0; + _this.unboundedCoords = { left: 0, top: 0 }; + _this.activationState = _this.defaultActivationState(); + _this.activationTimerCallback = function () { + _this.activationAnimationHasEnded = true; + _this.runDeactivationUXLogicIfReady(); + }; + _this.activateHandler = function (e) { + _this.activateImpl(e); + }; + _this.deactivateHandler = function () { + _this.deactivateImpl(); + }; + _this.focusHandler = function () { + _this.handleFocus(); + }; + _this.blurHandler = function () { + _this.handleBlur(); + }; + _this.resizeHandler = function () { + _this.layout(); + }; + return _this; + } + Object.defineProperty(MDCRippleFoundation, "cssClasses", { + get: function () { + return cssClasses$4; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCRippleFoundation, "strings", { + get: function () { + return strings$3; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCRippleFoundation, "numbers", { + get: function () { + return numbers$3; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCRippleFoundation, "defaultAdapter", { + get: function () { + return { + addClass: function () { return undefined; }, + browserSupportsCssVars: function () { return true; }, + computeBoundingRect: function () { + return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 }); + }, + containsEventTarget: function () { return true; }, + deregisterDocumentInteractionHandler: function () { return undefined; }, + deregisterInteractionHandler: function () { return undefined; }, + deregisterResizeHandler: function () { return undefined; }, + getWindowPageOffset: function () { return ({ x: 0, y: 0 }); }, + isSurfaceActive: function () { return true; }, + isSurfaceDisabled: function () { return true; }, + isUnbounded: function () { return true; }, + registerDocumentInteractionHandler: function () { return undefined; }, + registerInteractionHandler: function () { return undefined; }, + registerResizeHandler: function () { return undefined; }, + removeClass: function () { return undefined; }, + updateCssVariable: function () { return undefined; }, + }; + }, + enumerable: false, + configurable: true + }); + MDCRippleFoundation.prototype.init = function () { + var _this = this; + var supportsPressRipple = this.supportsPressRipple(); + this.registerRootHandlers(supportsPressRipple); + if (supportsPressRipple) { + var _a = MDCRippleFoundation.cssClasses, ROOT_1 = _a.ROOT, UNBOUNDED_1 = _a.UNBOUNDED; + requestAnimationFrame(function () { + _this.adapter.addClass(ROOT_1); + if (_this.adapter.isUnbounded()) { + _this.adapter.addClass(UNBOUNDED_1); + // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple + _this.layoutInternal(); + } + }); + } + }; + MDCRippleFoundation.prototype.destroy = function () { + var _this = this; + if (this.supportsPressRipple()) { + if (this.activationTimer) { + clearTimeout(this.activationTimer); + this.activationTimer = 0; + this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION); + } + if (this.fgDeactivationRemovalTimer) { + clearTimeout(this.fgDeactivationRemovalTimer); + this.fgDeactivationRemovalTimer = 0; + this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION); + } + var _a = MDCRippleFoundation.cssClasses, ROOT_2 = _a.ROOT, UNBOUNDED_2 = _a.UNBOUNDED; + requestAnimationFrame(function () { + _this.adapter.removeClass(ROOT_2); + _this.adapter.removeClass(UNBOUNDED_2); + _this.removeCssVars(); + }); + } + this.deregisterRootHandlers(); + this.deregisterDeactivationHandlers(); + }; + /** + * @param evt Optional event containing position information. + */ + MDCRippleFoundation.prototype.activate = function (evt) { + this.activateImpl(evt); + }; + MDCRippleFoundation.prototype.deactivate = function () { + this.deactivateImpl(); + }; + MDCRippleFoundation.prototype.layout = function () { + var _this = this; + if (this.layoutFrame) { + cancelAnimationFrame(this.layoutFrame); + } + this.layoutFrame = requestAnimationFrame(function () { + _this.layoutInternal(); + _this.layoutFrame = 0; + }); + }; + MDCRippleFoundation.prototype.setUnbounded = function (unbounded) { + var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED; + if (unbounded) { + this.adapter.addClass(UNBOUNDED); + } + else { + this.adapter.removeClass(UNBOUNDED); + } + }; + MDCRippleFoundation.prototype.handleFocus = function () { + var _this = this; + requestAnimationFrame(function () { return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); }); + }; + MDCRippleFoundation.prototype.handleBlur = function () { + var _this = this; + requestAnimationFrame(function () { return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); }); + }; + /** + * We compute this property so that we are not querying information about the client + * until the point in time where the foundation requests it. This prevents scenarios where + * client-side feature-detection may happen too early, such as when components are rendered on the server + * and then initialized at mount time on the client. + */ + MDCRippleFoundation.prototype.supportsPressRipple = function () { + return this.adapter.browserSupportsCssVars(); + }; + MDCRippleFoundation.prototype.defaultActivationState = function () { + return { + activationEvent: undefined, + hasDeactivationUXRun: false, + isActivated: false, + isProgrammatic: false, + wasActivatedByPointer: false, + wasElementMadeActive: false, + }; + }; + /** + * supportsPressRipple Passed from init to save a redundant function call + */ + MDCRippleFoundation.prototype.registerRootHandlers = function (supportsPressRipple) { + var e_1, _a; + if (supportsPressRipple) { + try { + for (var ACTIVATION_EVENT_TYPES_1 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next(); !ACTIVATION_EVENT_TYPES_1_1.done; ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next()) { + var evtType = ACTIVATION_EVENT_TYPES_1_1.value; + this.adapter.registerInteractionHandler(evtType, this.activateHandler); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (ACTIVATION_EVENT_TYPES_1_1 && !ACTIVATION_EVENT_TYPES_1_1.done && (_a = ACTIVATION_EVENT_TYPES_1.return)) _a.call(ACTIVATION_EVENT_TYPES_1); + } + finally { if (e_1) throw e_1.error; } + } + if (this.adapter.isUnbounded()) { + this.adapter.registerResizeHandler(this.resizeHandler); + } + } + this.adapter.registerInteractionHandler('focus', this.focusHandler); + this.adapter.registerInteractionHandler('blur', this.blurHandler); + }; + MDCRippleFoundation.prototype.registerDeactivationHandlers = function (evt) { + var e_2, _a; + if (evt.type === 'keydown') { + this.adapter.registerInteractionHandler('keyup', this.deactivateHandler); + } + else { + try { + for (var POINTER_DEACTIVATION_EVENT_TYPES_1 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next(); !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done; POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next()) { + var evtType = POINTER_DEACTIVATION_EVENT_TYPES_1_1.value; + this.adapter.registerDocumentInteractionHandler(evtType, this.deactivateHandler); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (POINTER_DEACTIVATION_EVENT_TYPES_1_1 && !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_1.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_1); + } + finally { if (e_2) throw e_2.error; } + } + } + }; + MDCRippleFoundation.prototype.deregisterRootHandlers = function () { + var e_3, _a; + try { + for (var ACTIVATION_EVENT_TYPES_2 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next(); !ACTIVATION_EVENT_TYPES_2_1.done; ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next()) { + var evtType = ACTIVATION_EVENT_TYPES_2_1.value; + this.adapter.deregisterInteractionHandler(evtType, this.activateHandler); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (ACTIVATION_EVENT_TYPES_2_1 && !ACTIVATION_EVENT_TYPES_2_1.done && (_a = ACTIVATION_EVENT_TYPES_2.return)) _a.call(ACTIVATION_EVENT_TYPES_2); + } + finally { if (e_3) throw e_3.error; } + } + this.adapter.deregisterInteractionHandler('focus', this.focusHandler); + this.adapter.deregisterInteractionHandler('blur', this.blurHandler); + if (this.adapter.isUnbounded()) { + this.adapter.deregisterResizeHandler(this.resizeHandler); + } + }; + MDCRippleFoundation.prototype.deregisterDeactivationHandlers = function () { + var e_4, _a; + this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler); + try { + for (var POINTER_DEACTIVATION_EVENT_TYPES_2 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next(); !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done; POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next()) { + var evtType = POINTER_DEACTIVATION_EVENT_TYPES_2_1.value; + this.adapter.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (POINTER_DEACTIVATION_EVENT_TYPES_2_1 && !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_2.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_2); + } + finally { if (e_4) throw e_4.error; } + } + }; + MDCRippleFoundation.prototype.removeCssVars = function () { + var _this = this; + var rippleStrings = MDCRippleFoundation.strings; + var keys = Object.keys(rippleStrings); + keys.forEach(function (key) { + if (key.indexOf('VAR_') === 0) { + _this.adapter.updateCssVariable(rippleStrings[key], null); + } + }); + }; + MDCRippleFoundation.prototype.activateImpl = function (evt) { + var _this = this; + if (this.adapter.isSurfaceDisabled()) { + return; + } + var activationState = this.activationState; + if (activationState.isActivated) { + return; + } + // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction + var previousActivationEvent = this.previousActivationEvent; + var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type; + if (isSameInteraction) { + return; + } + activationState.isActivated = true; + activationState.isProgrammatic = evt === undefined; + activationState.activationEvent = evt; + activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown'); + var hasActivatedChild = evt !== undefined && + activatedTargets.length > 0 && + activatedTargets.some(function (target) { return _this.adapter.containsEventTarget(target); }); + if (hasActivatedChild) { + // Immediately reset activation state, while preserving logic that prevents touch follow-on events + this.resetActivationState(); + return; + } + if (evt !== undefined) { + activatedTargets.push(evt.target); + this.registerDeactivationHandlers(evt); + } + activationState.wasElementMadeActive = this.checkElementMadeActive(evt); + if (activationState.wasElementMadeActive) { + this.animateActivation(); + } + requestAnimationFrame(function () { + // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples + activatedTargets = []; + if (!activationState.wasElementMadeActive + && evt !== undefined + && (evt.key === ' ' || evt.keyCode === 32)) { + // If space was pressed, try again within an rAF call to detect :active, because different UAs report + // active states inconsistently when they're called within event handling code: + // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971 + // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741 + // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS + // variable is set within a rAF callback for a submit button interaction (#2241). + activationState.wasElementMadeActive = _this.checkElementMadeActive(evt); + if (activationState.wasElementMadeActive) { + _this.animateActivation(); + } + } + if (!activationState.wasElementMadeActive) { + // Reset activation state immediately if element was not made active. + _this.activationState = _this.defaultActivationState(); + } + }); + }; + MDCRippleFoundation.prototype.checkElementMadeActive = function (evt) { + return (evt !== undefined && evt.type === 'keydown') ? + this.adapter.isSurfaceActive() : + true; + }; + MDCRippleFoundation.prototype.animateActivation = function () { + var _this = this; + var _a = MDCRippleFoundation.strings, VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END; + var _b = MDCRippleFoundation.cssClasses, FG_DEACTIVATION = _b.FG_DEACTIVATION, FG_ACTIVATION = _b.FG_ACTIVATION; + var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS; + this.layoutInternal(); + var translateStart = ''; + var translateEnd = ''; + if (!this.adapter.isUnbounded()) { + var _c = this.getFgTranslationCoordinates(), startPoint = _c.startPoint, endPoint = _c.endPoint; + translateStart = startPoint.x + "px, " + startPoint.y + "px"; + translateEnd = endPoint.x + "px, " + endPoint.y + "px"; + } + this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart); + this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd); + // Cancel any ongoing activation/deactivation animations + clearTimeout(this.activationTimer); + clearTimeout(this.fgDeactivationRemovalTimer); + this.rmBoundedActivationClasses(); + this.adapter.removeClass(FG_DEACTIVATION); + // Force layout in order to re-trigger the animation. + this.adapter.computeBoundingRect(); + this.adapter.addClass(FG_ACTIVATION); + this.activationTimer = setTimeout(function () { + _this.activationTimerCallback(); + }, DEACTIVATION_TIMEOUT_MS); + }; + MDCRippleFoundation.prototype.getFgTranslationCoordinates = function () { + var _a = this.activationState, activationEvent = _a.activationEvent, wasActivatedByPointer = _a.wasActivatedByPointer; + var startPoint; + if (wasActivatedByPointer) { + startPoint = getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect()); + } + else { + startPoint = { + x: this.frame.width / 2, + y: this.frame.height / 2, + }; + } + // Center the element around the start point. + startPoint = { + x: startPoint.x - (this.initialSize / 2), + y: startPoint.y - (this.initialSize / 2), + }; + var endPoint = { + x: (this.frame.width / 2) - (this.initialSize / 2), + y: (this.frame.height / 2) - (this.initialSize / 2), + }; + return { startPoint: startPoint, endPoint: endPoint }; + }; + MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady = function () { + var _this = this; + // This method is called both when a pointing device is released, and when the activation animation ends. + // The deactivation animation should only run after both of those occur. + var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION; + var _a = this.activationState, hasDeactivationUXRun = _a.hasDeactivationUXRun, isActivated = _a.isActivated; + var activationHasEnded = hasDeactivationUXRun || !isActivated; + if (activationHasEnded && this.activationAnimationHasEnded) { + this.rmBoundedActivationClasses(); + this.adapter.addClass(FG_DEACTIVATION); + this.fgDeactivationRemovalTimer = setTimeout(function () { + _this.adapter.removeClass(FG_DEACTIVATION); + }, numbers$3.FG_DEACTIVATION_MS); + } + }; + MDCRippleFoundation.prototype.rmBoundedActivationClasses = function () { + var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION; + this.adapter.removeClass(FG_ACTIVATION); + this.activationAnimationHasEnded = false; + this.adapter.computeBoundingRect(); + }; + MDCRippleFoundation.prototype.resetActivationState = function () { + var _this = this; + this.previousActivationEvent = this.activationState.activationEvent; + this.activationState = this.defaultActivationState(); + // Touch devices may fire additional events for the same interaction within a short time. + // Store the previous event until it's safe to assume that subsequent events are for new interactions. + setTimeout(function () { return _this.previousActivationEvent = undefined; }, MDCRippleFoundation.numbers.TAP_DELAY_MS); + }; + MDCRippleFoundation.prototype.deactivateImpl = function () { + var _this = this; + var activationState = this.activationState; + // This can happen in scenarios such as when you have a keyup event that blurs the element. + if (!activationState.isActivated) { + return; + } + var state = __assign({}, activationState); + if (activationState.isProgrammatic) { + requestAnimationFrame(function () { + _this.animateDeactivation(state); + }); + this.resetActivationState(); + } + else { + this.deregisterDeactivationHandlers(); + requestAnimationFrame(function () { + _this.activationState.hasDeactivationUXRun = true; + _this.animateDeactivation(state); + _this.resetActivationState(); + }); + } + }; + MDCRippleFoundation.prototype.animateDeactivation = function (_a) { + var wasActivatedByPointer = _a.wasActivatedByPointer, wasElementMadeActive = _a.wasElementMadeActive; + if (wasActivatedByPointer || wasElementMadeActive) { + this.runDeactivationUXLogicIfReady(); + } + }; + MDCRippleFoundation.prototype.layoutInternal = function () { + var _this = this; + this.frame = this.adapter.computeBoundingRect(); + var maxDim = Math.max(this.frame.height, this.frame.width); + // Surface diameter is treated differently for unbounded vs. bounded ripples. + // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately + // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically + // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter + // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via + // `overflow: hidden`. + var getBoundedRadius = function () { + var hypotenuse = Math.sqrt(Math.pow(_this.frame.width, 2) + Math.pow(_this.frame.height, 2)); + return hypotenuse + MDCRippleFoundation.numbers.PADDING; + }; + this.maxRadius = this.adapter.isUnbounded() ? maxDim : getBoundedRadius(); + // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform + var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE); + // Unbounded ripple size should always be even number to equally center align. + if (this.adapter.isUnbounded() && initialSize % 2 !== 0) { + this.initialSize = initialSize - 1; + } + else { + this.initialSize = initialSize; + } + this.fgScale = "" + this.maxRadius / this.initialSize; + this.updateLayoutCssVars(); + }; + MDCRippleFoundation.prototype.updateLayoutCssVars = function () { + var _a = MDCRippleFoundation.strings, VAR_FG_SIZE = _a.VAR_FG_SIZE, VAR_LEFT = _a.VAR_LEFT, VAR_TOP = _a.VAR_TOP, VAR_FG_SCALE = _a.VAR_FG_SCALE; + this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize + "px"); + this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale); + if (this.adapter.isUnbounded()) { + this.unboundedCoords = { + left: Math.round((this.frame.width / 2) - (this.initialSize / 2)), + top: Math.round((this.frame.height / 2) - (this.initialSize / 2)), + }; + this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords.left + "px"); + this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords.top + "px"); + } + }; + return MDCRippleFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCRippleFoundation$1 = MDCRippleFoundation; + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class $i extends Oe{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=Di}get isActive(){return e=this.parentElement||this,t=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t); +/** @soyCompatible */ +class RippleBase extends BaseElement { + constructor() { + super(...arguments); + this.primary = false; + this.accent = false; + this.unbounded = false; + this.disabled = false; + this.activated = false; + this.selected = false; + this.internalUseStateLayerCustomProperties = false; + this.hovering = false; + this.bgFocused = false; + this.fgActivation = false; + this.fgDeactivation = false; + this.fgScale = ''; + this.fgSize = ''; + this.translateStart = ''; + this.translateEnd = ''; + this.leftPos = ''; + this.topPos = ''; + this.mdcFoundationClass = MDCRippleFoundation$1; + } + get isActive() { + return matches(this.parentElement || this, ':active'); + } + createAdapter() { + return { + browserSupportsCssVars: () => true, + isUnbounded: () => this.unbounded, + isSurfaceActive: () => this.isActive, + isSurfaceDisabled: () => this.disabled, + addClass: (className) => { + switch (className) { + case 'mdc-ripple-upgraded--background-focused': + this.bgFocused = true; + break; + case 'mdc-ripple-upgraded--foreground-activation': + this.fgActivation = true; + break; + case 'mdc-ripple-upgraded--foreground-deactivation': + this.fgDeactivation = true; + break; + } + }, + removeClass: (className) => { + switch (className) { + case 'mdc-ripple-upgraded--background-focused': + this.bgFocused = false; + break; + case 'mdc-ripple-upgraded--foreground-activation': + this.fgActivation = false; + break; + case 'mdc-ripple-upgraded--foreground-deactivation': + this.fgDeactivation = false; + break; + } + }, + containsEventTarget: () => true, + registerInteractionHandler: () => undefined, + deregisterInteractionHandler: () => undefined, + registerDocumentInteractionHandler: () => undefined, + deregisterDocumentInteractionHandler: () => undefined, + registerResizeHandler: () => undefined, + deregisterResizeHandler: () => undefined, + updateCssVariable: (varName, value) => { + switch (varName) { + case '--mdc-ripple-fg-scale': + this.fgScale = value; + break; + case '--mdc-ripple-fg-size': + this.fgSize = value; + break; + case '--mdc-ripple-fg-translate-end': + this.translateEnd = value; + break; + case '--mdc-ripple-fg-translate-start': + this.translateStart = value; + break; + case '--mdc-ripple-left': + this.leftPos = value; + break; + case '--mdc-ripple-top': + this.topPos = value; + break; + } + }, + computeBoundingRect: () => (this.parentElement || this).getBoundingClientRect(), + getWindowPageOffset: () => ({ x: window.pageXOffset, y: window.pageYOffset }), + }; + } + startPress(ev) { + this.waitForFoundation(() => { + this.mdcFoundation.activate(ev); + }); + } + endPress() { + this.waitForFoundation(() => { + this.mdcFoundation.deactivate(); + }); + } + startFocus() { + this.waitForFoundation(() => { + this.mdcFoundation.handleFocus(); + }); + } + endFocus() { + this.waitForFoundation(() => { + this.mdcFoundation.handleBlur(); + }); + } + startHover() { + this.hovering = true; + } + endHover() { + this.hovering = false; + } + /** + * Wait for the MDCFoundation to be created by `firstUpdated` + */ + waitForFoundation(fn) { + if (this.mdcFoundation) { + fn(); + } + else { + this.updateComplete.then(fn); + } + } + update(changedProperties) { + if (changedProperties.has('disabled')) { + // stop hovering when ripple is disabled to prevent a stuck "hover" state + // When re-enabled, the outer component will get a `mouseenter` event on + // the first movement, which will call `startHover()` + if (this.disabled) { + this.endHover(); + } + } + super.update(changedProperties); + } + /** @soyTemplate */ + render() { + const shouldActivateInPrimary = this.activated && (this.primary || !this.accent); + const shouldSelectInPrimary = this.selected && (this.primary || !this.accent); + /** @classMap */ + const classes = { + 'mdc-ripple-surface--accent': this.accent, + 'mdc-ripple-surface--primary--activated': shouldActivateInPrimary, + 'mdc-ripple-surface--accent--activated': this.accent && this.activated, + 'mdc-ripple-surface--primary--selected': shouldSelectInPrimary, + 'mdc-ripple-surface--accent--selected': this.accent && this.selected, + 'mdc-ripple-surface--disabled': this.disabled, + 'mdc-ripple-surface--hover': this.hovering, + 'mdc-ripple-surface--primary': this.primary, + 'mdc-ripple-surface--selected': this.selected, + 'mdc-ripple-upgraded--background-focused': this.bgFocused, + 'mdc-ripple-upgraded--foreground-activation': this.fgActivation, + 'mdc-ripple-upgraded--foreground-deactivation': this.fgDeactivation, + 'mdc-ripple-upgraded--unbounded': this.unbounded, + 'mdc-ripple-surface--internal-use-state-layer-custom-properties': this.internalUseStateLayerCustomProperties, + }; + return x ` +
`; + } +} +__decorate([ + i$2('.mdc-ripple-surface') +], RippleBase.prototype, "mdcRoot", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "primary", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "accent", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "unbounded", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "disabled", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "activated", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "selected", void 0); +__decorate([ + e$6({ type: Boolean }) +], RippleBase.prototype, "internalUseStateLayerCustomProperties", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "hovering", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "bgFocused", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "fgActivation", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "fgDeactivation", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "fgScale", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "fgSize", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "translateStart", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "translateEnd", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "leftPos", void 0); +__decorate([ + t$2() +], RippleBase.prototype, "topPos", void 0); + /** * @license * Copyright 2018 Google Inc. @@ -679,12 +6605,22 @@ class $i extends Oe{constructor(){super(...arguments),this.primary=!1,this.accen * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var e,t}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(e,t)=>{switch(e){case"--mdc-ripple-fg-scale":this.fgScale=t;break;case"--mdc-ripple-fg-size":this.fgSize=t;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=t;break;case"--mdc-ripple-fg-translate-start":this.translateStart=t;break;case"--mdc-ripple-left":this.leftPos=t;break;case"--mdc-ripple-top":this.topPos=t}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(e){this.waitForFoundation((()=>{this.mdcFoundation.activate(e)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(e){this.mdcFoundation?e():this.updateComplete.then(e)}update(e){e.has("disabled")&&this.disabled&&this.endHover(),super.update(e)}render(){const e=this.activated&&(this.primary||!this.accent),t=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":e,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":t,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return P` -
`}}n([he(".mdc-ripple-surface")],$i.prototype,"mdcRoot",void 0),n([se({type:Boolean})],$i.prototype,"primary",void 0),n([se({type:Boolean})],$i.prototype,"accent",void 0),n([se({type:Boolean})],$i.prototype,"unbounded",void 0),n([se({type:Boolean})],$i.prototype,"disabled",void 0),n([se({type:Boolean})],$i.prototype,"activated",void 0),n([se({type:Boolean})],$i.prototype,"selected",void 0),n([se({type:Boolean})],$i.prototype,"internalUseStateLayerCustomProperties",void 0),n([ce()],$i.prototype,"hovering",void 0),n([ce()],$i.prototype,"bgFocused",void 0),n([ce()],$i.prototype,"fgActivation",void 0),n([ce()],$i.prototype,"fgDeactivation",void 0),n([ce()],$i.prototype,"fgScale",void 0),n([ce()],$i.prototype,"fgSize",void 0),n([ce()],$i.prototype,"translateStart",void 0),n([ce()],$i.prototype,"translateEnd",void 0),n([ce()],$i.prototype,"leftPos",void 0),n([ce()],$i.prototype,"topPos",void 0); +var strings$2 = { + NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch', +}; +var numbers$2 = { + // This should stay in sync with $mdc-notched-outline-padding * 2. + NOTCH_ELEMENT_PADDING: 8, +}; +var cssClasses$3 = { + NO_LABEL: 'mdc-notched-outline--no-label', + OUTLINE_NOTCHED: 'mdc-notched-outline--notched', + OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded', +}; + /** * @license - * Copyright 2018 Google Inc. + * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -704,62 +6640,350 @@ var e,t}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>thi * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var Mi={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},Ni={NOTCH_ELEMENT_PADDING:8},Bi={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},Hi=function(e){function n(t){return e.call(this,i(i({},n.defaultAdapter),t))||this}return t(n,e),Object.defineProperty(n,"strings",{get:function(){return Mi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return Bi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Ni},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(e){var t=n.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=Ni.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(t)},n.prototype.closeNotch=function(){var e=n.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},n}(ye); +var MDCNotchedOutlineFoundation = /** @class */ (function (_super) { + __extends(MDCNotchedOutlineFoundation, _super); + function MDCNotchedOutlineFoundation(adapter) { + return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this; + } + Object.defineProperty(MDCNotchedOutlineFoundation, "strings", { + get: function () { + return strings$2; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", { + get: function () { + return cssClasses$3; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", { + get: function () { + return numbers$2; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", { + /** + * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types. + */ + get: function () { + // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. + return { + addClass: function () { return undefined; }, + removeClass: function () { return undefined; }, + setNotchWidthProperty: function () { return undefined; }, + removeNotchWidthProperty: function () { return undefined; }, + }; + // tslint:enable:object-literal-sort-keys + }, + enumerable: false, + configurable: true + }); + /** + * Adds the outline notched selector and updates the notch width calculated based off of notchWidth. + */ + MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) { + var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; + if (notchWidth > 0) { + notchWidth += numbers$2.NOTCH_ELEMENT_PADDING; // Add padding from left/right. + } + this.adapter.setNotchWidthProperty(notchWidth); + this.adapter.addClass(OUTLINE_NOTCHED); + }; + /** + * Removes notched outline selector to close the notch in the outline. + */ + MDCNotchedOutlineFoundation.prototype.closeNotch = function () { + var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; + this.adapter.removeClass(OUTLINE_NOTCHED); + this.adapter.removeNotchWidthProperty(); + }; + return MDCNotchedOutlineFoundation; +}(MDCFoundation)); + /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class Pi extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=Hi,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:e=>this.mdcRoot.classList.add(e),removeClass:e=>this.mdcRoot.classList.remove(e),setNotchWidthProperty:e=>this.notchElement.style.setProperty("width",`${e}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(e,t){this.mdcFoundation&&(e&&void 0!==t?this.mdcFoundation.notch(t):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const e=Ve({"mdc-notched-outline--notched":this.open});return P` - +class NotchedOutlineBase extends BaseElement { + constructor() { + super(...arguments); + this.mdcFoundationClass = MDCNotchedOutlineFoundation; + this.width = 0; + this.open = false; + this.lastOpen = this.open; + } + createAdapter() { + return { + addClass: (className) => this.mdcRoot.classList.add(className), + removeClass: (className) => this.mdcRoot.classList.remove(className), + setNotchWidthProperty: (width) => this.notchElement.style.setProperty('width', `${width}px`), + removeNotchWidthProperty: () => this.notchElement.style.removeProperty('width'), + }; + } + openOrClose(shouldOpen, width) { + if (!this.mdcFoundation) { + return; + } + if (shouldOpen && width !== undefined) { + this.mdcFoundation.notch(width); + } + else { + this.mdcFoundation.closeNotch(); + } + } + render() { + this.openOrClose(this.open, this.width); + const classes = o({ + 'mdc-notched-outline--notched': this.open, + }); + return x ` + - `}}n([he(".mdc-notched-outline")],Pi.prototype,"mdcRoot",void 0),n([se({type:Number})],Pi.prototype,"width",void 0),n([se({type:Boolean,reflect:!0})],Pi.prototype,"open",void 0),n([he(".mdc-notched-outline__notch")],Pi.prototype,"notchElement",void 0); + `; + } +} +__decorate([ + i$2('.mdc-notched-outline') +], NotchedOutlineBase.prototype, "mdcRoot", void 0); +__decorate([ + e$6({ type: Number }) +], NotchedOutlineBase.prototype, "width", void 0); +__decorate([ + e$6({ type: Boolean, reflect: true }) +], NotchedOutlineBase.prototype, "open", void 0); +__decorate([ + i$2('.mdc-notched-outline__notch') +], NotchedOutlineBase.prototype, "notchElement", void 0); + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const zi=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}` +const styles$9 = i$5 `.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,Vi=c`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}` + */ +const styles$8 = i$5 `@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,Ui=c`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}` + */ +const styles$7 = i$5 `:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,Xi=c`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}` + */ +const styles$6 = i$5 `.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,Wi=c`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}` + */ +const styles$5 = i$5 `mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,ji=c`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}` + */ +const styles$4 = i$5 `.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`; + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 - */,Gi=c`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`,qi={"mwc-select":class extends ai{static get styles(){return zi}},"mwc-list":class extends hi{static get styles(){return Vi}},"mwc-list-item":class extends fi{static get styles(){return Ui}},"mwc-ripple":class extends $i{static get styles(){return Xi}},"mwc-menu":class extends Ei{static get styles(){return Wi}},"mwc-menu-surface":class extends Ai{static get styles(){return ji}},"mwc-notched-outline":class extends Pi{static get styles(){return Gi}}};function Yi(e,t,i){if(void 0!==t) + */ +const styles$3 = i$5 `.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`; + +const selectDefinition = { + 'mwc-select': class extends SelectBase { + static get styles() { + return styles$9; + } + }, + 'mwc-list': class extends ListBase { + static get styles() { + return styles$8; + } + }, + 'mwc-list-item': class extends ListItemBase { + static get styles() { + return styles$7; + } + }, + 'mwc-ripple': class extends RippleBase { + static get styles() { + return styles$6; + } + }, + 'mwc-menu': class extends MenuBase { + static get styles() { + return styles$5; + } + }, + 'mwc-menu-surface': class extends MenuSurfaceBase { + static get styles() { + return styles$4; + } + }, + 'mwc-notched-outline': class extends NotchedOutlineBase { + static get styles() { + return styles$3; + } + } +}; + /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -return function(e,t,i){const n=e.constructor;if(!i){const e=`__${t}`;if(!(i=n.getPropertyDescriptor(t,e)))throw new Error("@ariaProperty must be used after a @property decorator")}const r=i;let a="";if(!r.set)throw new Error(`@ariaProperty requires a setter for ${t}`);if(e.dispatchWizEvent)return i;const o={configurable:!0,enumerable:!0,set(e){if(""===a){const e=n.getPropertyOptions(t);a="string"==typeof e.attribute?e.attribute:t}this.hasAttribute(a)&&this.removeAttribute(a),r.set.call(this,e)}};return r.get&&(o.get=function(){return r.get.call(this)}),o}(e,t,i);throw new Error("@ariaProperty only supports TypeScript Decorators")} +/** + * TypeScript version of the decorator + * @see https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators + */ +function tsDecorator(prototype, name, descriptor) { + const constructor = prototype.constructor; + if (!descriptor) { + /** + * lit uses internal properties with two leading underscores to + * provide storage for accessors + */ + const litInternalPropertyKey = `__${name}`; + descriptor = + constructor.getPropertyDescriptor(name, litInternalPropertyKey); + if (!descriptor) { + throw new Error('@ariaProperty must be used after a @property decorator'); + } + } + // descriptor must exist at this point, reassign so typescript understands + const propDescriptor = descriptor; + let attribute = ''; + if (!propDescriptor.set) { + throw new Error(`@ariaProperty requires a setter for ${name}`); + } + // TODO(b/202853219): Remove this check when internal tooling is + // compatible + // tslint:disable-next-line:no-any bail if applied to internal generated class + if (prototype.dispatchWizEvent) { + return descriptor; + } + const wrappedDescriptor = { + configurable: true, + enumerable: true, + set(value) { + if (attribute === '') { + const options = constructor.getPropertyOptions(name); + // if attribute is not a string, use `name` instead + attribute = + typeof options.attribute === 'string' ? options.attribute : name; + } + if (this.hasAttribute(attribute)) { + this.removeAttribute(attribute); + } + propDescriptor.set.call(this, value); + } + }; + if (propDescriptor.get) { + wrappedDescriptor.get = function () { + return propDescriptor.get.call(this); + }; + } + return wrappedDescriptor; +} +/** + * A property decorator proxies an aria attribute to an internal node + * + * This decorator is only intended for use with ARIA attributes, such as `role` + * and `aria-label` due to screenreader needs. + * + * Upon first render, `@ariaProperty` will remove the attribute from the host + * element to prevent screenreaders from reading the host instead of the + * internal node. + * + * This decorator should only be used for non-Symbol public fields decorated + * with `@property`, or on a setter with an optional getter. + * + * @example + * ```ts + * class MyElement { + * @ariaProperty + * @property({ type: String, attribute: 'aria-label' }) + * ariaLabel!: string; + * } + * ``` + * @category Decorator + * @ExportDecoratedItems + */ +function ariaProperty(protoOrDescriptor, name, +// tslint:disable-next-line:no-any any is required as a return type from decorators +descriptor) { + if (name !== undefined) { + return tsDecorator(protoOrDescriptor, name, descriptor); + } + else { + throw new Error('@ariaProperty only supports TypeScript Decorators'); + } +} + +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +/** CSS classes used by the switch. */ +var cssClasses$2 = { + /** Class used for a switch that is in the "checked" (on) position. */ + CHECKED: 'mdc-switch--checked', + /** Class used for a switch that is disabled. */ + DISABLED: 'mdc-switch--disabled', +}; +/** String constants used by the switch. */ +var strings$1 = { + /** Aria attribute for checked or unchecked state of switch */ + ARIA_CHECKED_ATTR: 'aria-checked', + /** A CSS selector used to locate the native HTML control for the switch. */ + NATIVE_CONTROL_SELECTOR: '.mdc-switch__native-control', + /** A CSS selector used to locate the ripple surface element for the switch. */ + RIPPLE_SURFACE_SELECTOR: '.mdc-switch__thumb-underlay', +}; + /** * @license * Copyright 2018 Google Inc. @@ -781,18 +7005,151 @@ return function(e,t,i){const n=e.constructor;if(!i){const e=`__${t}`;if(!(i=n.ge * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */var Ki={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},Zi={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},Qi=function(e){function n(t){return e.call(this,i(i({},n.defaultAdapter),t))||this}return t(n,e),Object.defineProperty(n,"strings",{get:function(){return Zi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return Ki},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!1,configurable:!0}),n.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked(e),this.updateCheckedStyling(e)},n.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ki.DISABLED):this.adapter.removeClass(Ki.DISABLED)},n.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked(t.checked),this.updateCheckedStyling(t.checked)},n.prototype.updateCheckedStyling=function(e){e?this.adapter.addClass(Ki.CHECKED):this.adapter.removeClass(Ki.CHECKED)},n.prototype.updateAriaChecked=function(e){this.adapter.setNativeControlAttr(Zi.ARIA_CHECKED_ATTR,""+!!e)},n}(ye); + */ +var MDCSwitchFoundation = /** @class */ (function (_super) { + __extends(MDCSwitchFoundation, _super); + function MDCSwitchFoundation(adapter) { + return _super.call(this, __assign(__assign({}, MDCSwitchFoundation.defaultAdapter), adapter)) || this; + } + Object.defineProperty(MDCSwitchFoundation, "strings", { + /** The string constants used by the switch. */ + get: function () { + return strings$1; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCSwitchFoundation, "cssClasses", { + /** The CSS classes used by the switch. */ + get: function () { + return cssClasses$2; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCSwitchFoundation, "defaultAdapter", { + /** The default Adapter for the switch. */ + get: function () { + return { + addClass: function () { return undefined; }, + removeClass: function () { return undefined; }, + setNativeControlChecked: function () { return undefined; }, + setNativeControlDisabled: function () { return undefined; }, + setNativeControlAttr: function () { return undefined; }, + }; + }, + enumerable: false, + configurable: true + }); + /** Sets the checked state of the switch. */ + MDCSwitchFoundation.prototype.setChecked = function (checked) { + this.adapter.setNativeControlChecked(checked); + this.updateAriaChecked(checked); + this.updateCheckedStyling(checked); + }; + /** Sets the disabled state of the switch. */ + MDCSwitchFoundation.prototype.setDisabled = function (disabled) { + this.adapter.setNativeControlDisabled(disabled); + if (disabled) { + this.adapter.addClass(cssClasses$2.DISABLED); + } + else { + this.adapter.removeClass(cssClasses$2.DISABLED); + } + }; + /** Handles the change event for the switch native control. */ + MDCSwitchFoundation.prototype.handleChange = function (evt) { + var nativeControl = evt.target; + this.updateAriaChecked(nativeControl.checked); + this.updateCheckedStyling(nativeControl.checked); + }; + /** Updates the styling of the switch based on its checked state. */ + MDCSwitchFoundation.prototype.updateCheckedStyling = function (checked) { + if (checked) { + this.adapter.addClass(cssClasses$2.CHECKED); + } + else { + this.adapter.removeClass(cssClasses$2.CHECKED); + } + }; + MDCSwitchFoundation.prototype.updateAriaChecked = function (checked) { + this.adapter.setNativeControlAttr(strings$1.ARIA_CHECKED_ATTR, "" + !!checked); + }; + return MDCSwitchFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCSwitchFoundation$1 = MDCSwitchFoundation; + /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.shouldRenderRipple=!1,this.mdcFoundationClass=Qi,this.rippleHandlers=new ui((()=>(this.shouldRenderRipple=!0,this.ripple)))}changeHandler(e){this.mdcFoundation.handleChange(e),this.checked=this.formElement.checked}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{setNativeControlChecked:e=>{this.formElement.checked=e},setNativeControlDisabled:e=>{this.formElement.disabled=e},setNativeControlAttr:(e,t)=>{this.formElement.setAttribute(e,t)}})}renderRipple(){return this.shouldRenderRipple?P` +class SwitchBase extends BaseElement { + constructor() { + super(...arguments); + this.checked = false; + this.disabled = false; + this.shouldRenderRipple = false; + this.mdcFoundationClass = MDCSwitchFoundation$1; + this.rippleHandlers = new RippleHandlers(() => { + this.shouldRenderRipple = true; + return this.ripple; + }); + } + changeHandler(e) { + this.mdcFoundation.handleChange(e); + // catch "click" event and sync properties + this.checked = this.formElement.checked; + } + createAdapter() { + return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { setNativeControlChecked: (checked) => { + this.formElement.checked = checked; + }, setNativeControlDisabled: (disabled) => { + this.formElement.disabled = disabled; + }, setNativeControlAttr: (attr, value) => { + this.formElement.setAttribute(attr, value); + } }); + } + renderRipple() { + return this.shouldRenderRipple ? x ` - `:""}focus(){const e=this.formElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.formElement;e&&(this.rippleHandlers.endFocus(),e.blur())}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}render(){return P` + ` : + ''; + } + focus() { + const formElement = this.formElement; + if (formElement) { + this.rippleHandlers.startFocus(); + formElement.focus(); + } + } + blur() { + const formElement = this.formElement; + if (formElement) { + this.rippleHandlers.endFocus(); + formElement.blur(); + } + } + click() { + if (this.formElement && !this.disabled) { + this.formElement.focus(); + this.formElement.click(); + } + } + firstUpdated() { + super.firstUpdated(); + if (this.shadowRoot) { + this.mdcRoot.addEventListener('change', (e) => { + this.dispatchEvent(new Event('change', e)); + }); + } + } + render() { + return x `
@@ -803,8 +7160,8 @@ class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disab id="basic-switch" class="mdc-switch__native-control" role="switch" - aria-label="${ni(this.ariaLabel)}" - aria-labelledby="${ni(this.ariaLabelledBy)}" + aria-label="${l$1(this.ariaLabel)}" + aria-labelledby="${l$1(this.ariaLabelledBy)}" @change="${this.changeHandler}" @focus="${this.handleRippleFocus}" @blur="${this.handleRippleBlur}" @@ -816,13 +7173,173 @@ class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disab @touchcancel="${this.handleRippleDeactivate}">
- `}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}n([se({type:Boolean}),Me((function(e){this.mdcFoundation.setChecked(e)}))],Ji.prototype,"checked",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation.setDisabled(e)}))],Ji.prototype,"disabled",void 0),n([Yi,se({attribute:"aria-label"})],Ji.prototype,"ariaLabel",void 0),n([Yi,se({attribute:"aria-labelledby"})],Ji.prototype,"ariaLabelledBy",void 0),n([he(".mdc-switch")],Ji.prototype,"mdcRoot",void 0),n([he("input")],Ji.prototype,"formElement",void 0),n([ue("mwc-ripple")],Ji.prototype,"ripple",void 0),n([ce()],Ji.prototype,"shouldRenderRipple",void 0),n([pe({passive:!0})],Ji.prototype,"handleRippleMouseDown",null),n([pe({passive:!0})],Ji.prototype,"handleRippleTouchStart",null); + `; + } + handleRippleMouseDown(event) { + const onUp = () => { + window.removeEventListener('mouseup', onUp); + this.handleRippleDeactivate(); + }; + window.addEventListener('mouseup', onUp); + this.rippleHandlers.startPress(event); + } + handleRippleTouchStart(event) { + this.rippleHandlers.startPress(event); + } + handleRippleDeactivate() { + this.rippleHandlers.endPress(); + } + handleRippleMouseEnter() { + this.rippleHandlers.startHover(); + } + handleRippleMouseLeave() { + this.rippleHandlers.endHover(); + } + handleRippleFocus() { + this.rippleHandlers.startFocus(); + } + handleRippleBlur() { + this.rippleHandlers.endFocus(); + } +} +__decorate([ + e$6({ type: Boolean }), + observer(function (value) { + this.mdcFoundation.setChecked(value); + }) +], SwitchBase.prototype, "checked", void 0); +__decorate([ + e$6({ type: Boolean }), + observer(function (value) { + this.mdcFoundation.setDisabled(value); + }) +], SwitchBase.prototype, "disabled", void 0); +__decorate([ + ariaProperty, + e$6({ attribute: 'aria-label' }) +], SwitchBase.prototype, "ariaLabel", void 0); +__decorate([ + ariaProperty, + e$6({ attribute: 'aria-labelledby' }) +], SwitchBase.prototype, "ariaLabelledBy", void 0); +__decorate([ + i$2('.mdc-switch') +], SwitchBase.prototype, "mdcRoot", void 0); +__decorate([ + i$2('input') +], SwitchBase.prototype, "formElement", void 0); +__decorate([ + e$4('mwc-ripple') +], SwitchBase.prototype, "ripple", void 0); +__decorate([ + t$2() +], SwitchBase.prototype, "shouldRenderRipple", void 0); +__decorate([ + e$5({ passive: true }) +], SwitchBase.prototype, "handleRippleMouseDown", null); +__decorate([ + e$5({ passive: true }) +], SwitchBase.prototype, "handleRippleTouchStart", null); + /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const en=c`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`,tn={"mwc-switch":class extends Ji{static get styles(){return en}},"mwc-ripple":class extends $i{static get styles(){return Xi}}}; +const styles$2 = i$5 `.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`; + +const switchDefinition = { + 'mwc-switch': class extends SwitchBase { + static get styles() { + return styles$2; + } + }, + 'mwc-ripple': class extends RippleBase { + static get styles() { + return styles$6; + } + } +}; + +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var strings = { + ARIA_CONTROLS: 'aria-controls', + ARIA_DESCRIBEDBY: 'aria-describedby', + INPUT_SELECTOR: '.mdc-text-field__input', + LABEL_SELECTOR: '.mdc-floating-label', + LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading', + LINE_RIPPLE_SELECTOR: '.mdc-line-ripple', + OUTLINE_SELECTOR: '.mdc-notched-outline', + PREFIX_SELECTOR: '.mdc-text-field__affix--prefix', + SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix', + TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing' +}; +var cssClasses$1 = { + DISABLED: 'mdc-text-field--disabled', + FOCUSED: 'mdc-text-field--focused', + HELPER_LINE: 'mdc-text-field-helper-line', + INVALID: 'mdc-text-field--invalid', + LABEL_FLOATING: 'mdc-text-field--label-floating', + NO_LABEL: 'mdc-text-field--no-label', + OUTLINED: 'mdc-text-field--outlined', + ROOT: 'mdc-text-field', + TEXTAREA: 'mdc-text-field--textarea', + WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon', + WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon', + WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter', +}; +var numbers$1 = { + LABEL_SCALE: 0.75, +}; +/** + * Whitelist based off of + * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation + * under the "Validation-related attributes" section. + */ +var VALIDATION_ATTR_WHITELIST = [ + 'pattern', + 'min', + 'max', + 'required', + 'step', + 'minlength', + 'maxlength', +]; +/** + * Label should always float for these types as they show some UI even if value + * is empty. + */ +var ALWAYS_FLOAT_TYPES = [ + 'color', + 'date', + 'datetime-local', + 'month', + 'range', + 'time', + 'week', +]; + /** * @license * Copyright 2016 Google Inc. @@ -845,84 +7362,1198 @@ const en=c`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var nn={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},rn={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},an={LABEL_SCALE:.75},on=["pattern","min","max","required","step","minlength","maxlength"],dn=["color","date","datetime-local","month","range","time","week"],ln=["mousedown","touchstart"],sn=["click","keydown"],cn=function(e){function n(t,r){void 0===r&&(r={});var a=e.call(this,i(i({},n.defaultAdapter),t))||this;return a.isFocused=!1,a.receivedUserInput=!1,a.valid=!0,a.useNativeValidation=!0,a.validateOnValueChange=!0,a.helperText=r.helperText,a.characterCounter=r.characterCounter,a.leadingIcon=r.leadingIcon,a.trailingIcon=r.trailingIcon,a.inputFocusHandler=function(){a.activateFocus()},a.inputBlurHandler=function(){a.deactivateFocus()},a.inputInputHandler=function(){a.handleInput()},a.setPointerXOffset=function(e){a.setTransformOrigin(e)},a.textFieldInteractionHandler=function(){a.handleTextFieldInteraction()},a.validationAttributeChangeHandler=function(e){a.handleValidationAttributeChange(e)},a}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return rn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return nn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return an},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return dn.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e,t,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var a=r(ln),o=a.next();!o.done;o=a.next()){var d=o.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var l=r(sn),s=l.next();!s.done;s=l.next()){d=s.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var e,t,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var a=r(ln),o=a.next();!o.done;o=a.next()){var d=o.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var l=r(sn),s=l.next();!s.done;s=l.next()){d=s.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return on.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)})),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*an.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,n=i.target.getBoundingClientRect(),r=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(r)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},n.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},n.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},n.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},n.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},n.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},n.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},n.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(e){var t=n.cssClasses.INVALID;if(e?this.adapter.removeClass(t):this.adapter.addClass(t),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),r=this.helperText.getId();i&&r?this.adapter.setInputAttr(nn.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(nn.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(e){var t=n.cssClasses.FOCUSED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.styleDisabled=function(e){var t=n.cssClasses,i=t.DISABLED,r=t.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},n.prototype.styleFloating=function(e){var t=n.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(ye),mn=cn; +var POINTERDOWN_EVENTS = ['mousedown', 'touchstart']; +var INTERACTION_EVENTS = ['click', 'keydown']; +var MDCTextFieldFoundation = /** @class */ (function (_super) { + __extends(MDCTextFieldFoundation, _super); + /** + * @param adapter + * @param foundationMap Map from subcomponent names to their subfoundations. + */ + function MDCTextFieldFoundation(adapter, foundationMap) { + if (foundationMap === void 0) { foundationMap = {}; } + var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this; + _this.isFocused = false; + _this.receivedUserInput = false; + _this.valid = true; + _this.useNativeValidation = true; + _this.validateOnValueChange = true; + _this.helperText = foundationMap.helperText; + _this.characterCounter = foundationMap.characterCounter; + _this.leadingIcon = foundationMap.leadingIcon; + _this.trailingIcon = foundationMap.trailingIcon; + _this.inputFocusHandler = function () { + _this.activateFocus(); + }; + _this.inputBlurHandler = function () { + _this.deactivateFocus(); + }; + _this.inputInputHandler = function () { + _this.handleInput(); + }; + _this.setPointerXOffset = function (evt) { + _this.setTransformOrigin(evt); + }; + _this.textFieldInteractionHandler = function () { + _this.handleTextFieldInteraction(); + }; + _this.validationAttributeChangeHandler = function (attributesList) { + _this.handleValidationAttributeChange(attributesList); + }; + return _this; + } + Object.defineProperty(MDCTextFieldFoundation, "cssClasses", { + get: function () { + return cssClasses$1; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation, "strings", { + get: function () { + return strings; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation, "numbers", { + get: function () { + return numbers$1; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldAlwaysFloat", { + get: function () { + var type = this.getNativeInput().type; + return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldFloat", { + get: function () { + return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() || + this.isBadInput(); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldShake", { + get: function () { + return !this.isFocused && !this.isValid() && !!this.getValue(); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MDCTextFieldFoundation, "defaultAdapter", { + /** + * See {@link MDCTextFieldAdapter} for typing information on parameters and + * return types. + */ + get: function () { + // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. + return { + addClass: function () { return undefined; }, + removeClass: function () { return undefined; }, + hasClass: function () { return true; }, + setInputAttr: function () { return undefined; }, + removeInputAttr: function () { return undefined; }, + registerTextFieldInteractionHandler: function () { return undefined; }, + deregisterTextFieldInteractionHandler: function () { return undefined; }, + registerInputInteractionHandler: function () { return undefined; }, + deregisterInputInteractionHandler: function () { return undefined; }, + registerValidationAttributeChangeHandler: function () { + return new MutationObserver(function () { return undefined; }); + }, + deregisterValidationAttributeChangeHandler: function () { return undefined; }, + getNativeInput: function () { return null; }, + isFocused: function () { return false; }, + activateLineRipple: function () { return undefined; }, + deactivateLineRipple: function () { return undefined; }, + setLineRippleTransformOrigin: function () { return undefined; }, + shakeLabel: function () { return undefined; }, + floatLabel: function () { return undefined; }, + setLabelRequired: function () { return undefined; }, + hasLabel: function () { return false; }, + getLabelWidth: function () { return 0; }, + hasOutline: function () { return false; }, + notchOutline: function () { return undefined; }, + closeOutline: function () { return undefined; }, + }; + // tslint:enable:object-literal-sort-keys + }, + enumerable: false, + configurable: true + }); + MDCTextFieldFoundation.prototype.init = function () { + var e_1, _a, e_2, _b; + if (this.adapter.hasLabel() && this.getNativeInput().required) { + this.adapter.setLabelRequired(true); + } + if (this.adapter.isFocused()) { + this.inputFocusHandler(); + } + else if (this.adapter.hasLabel() && this.shouldFloat) { + this.notchOutline(true); + this.adapter.floatLabel(true); + this.styleFloating(true); + } + this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler); + this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler); + this.adapter.registerInputInteractionHandler('input', this.inputInputHandler); + try { + for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) { + var evtType = POINTERDOWN_EVENTS_1_1.value; + this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1); + } + finally { if (e_1) throw e_1.error; } + } + try { + for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) { + var evtType = INTERACTION_EVENTS_1_1.value; + this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1); + } + finally { if (e_2) throw e_2.error; } + } + this.validationObserver = + this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler); + this.setcharacterCounter(this.getValue().length); + }; + MDCTextFieldFoundation.prototype.destroy = function () { + var e_3, _a, e_4, _b; + this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler); + this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler); + this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler); + try { + for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) { + var evtType = POINTERDOWN_EVENTS_2_1.value; + this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2); + } + finally { if (e_3) throw e_3.error; } + } + try { + for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) { + var evtType = INTERACTION_EVENTS_2_1.value; + this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2); + } + finally { if (e_4) throw e_4.error; } + } + this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver); + }; + /** + * Handles user interactions with the Text Field. + */ + MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () { + var nativeInput = this.adapter.getNativeInput(); + if (nativeInput && nativeInput.disabled) { + return; + } + this.receivedUserInput = true; + }; + /** + * Handles validation attribute changes + */ + MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) { + var _this = this; + attributesList.some(function (attributeName) { + if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) { + _this.styleValidity(true); + _this.adapter.setLabelRequired(_this.getNativeInput().required); + return true; + } + return false; + }); + if (attributesList.indexOf('maxlength') > -1) { + this.setcharacterCounter(this.getValue().length); + } + }; + /** + * Opens/closes the notched outline. + */ + MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) { + if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) { + return; + } + if (openNotch) { + var labelWidth = this.adapter.getLabelWidth() * numbers$1.LABEL_SCALE; + this.adapter.notchOutline(labelWidth); + } + else { + this.adapter.closeOutline(); + } + }; + /** + * Activates the text field focus state. + */ + MDCTextFieldFoundation.prototype.activateFocus = function () { + this.isFocused = true; + this.styleFocused(this.isFocused); + this.adapter.activateLineRipple(); + if (this.adapter.hasLabel()) { + this.notchOutline(this.shouldFloat); + this.adapter.floatLabel(this.shouldFloat); + this.styleFloating(this.shouldFloat); + this.adapter.shakeLabel(this.shouldShake); + } + if (this.helperText && + (this.helperText.isPersistent() || !this.helperText.isValidation() || + !this.valid)) { + this.helperText.showToScreenReader(); + } + }; + /** + * Sets the line ripple's transform origin, so that the line ripple activate + * animation will animate out from the user's click location. + */ + MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) { + if (this.isDisabled() || this.adapter.hasOutline()) { + return; + } + var touches = evt.touches; + var targetEvent = touches ? touches[0] : evt; + var targetClientRect = targetEvent.target.getBoundingClientRect(); + var normalizedX = targetEvent.clientX - targetClientRect.left; + this.adapter.setLineRippleTransformOrigin(normalizedX); + }; + /** + * Handles input change of text input and text area. + */ + MDCTextFieldFoundation.prototype.handleInput = function () { + this.autoCompleteFocus(); + this.setcharacterCounter(this.getValue().length); + }; + /** + * Activates the Text Field's focus state in cases when the input value + * changes without user input (e.g. programmatically). + */ + MDCTextFieldFoundation.prototype.autoCompleteFocus = function () { + if (!this.receivedUserInput) { + this.activateFocus(); + } + }; + /** + * Deactivates the Text Field's focus state. + */ + MDCTextFieldFoundation.prototype.deactivateFocus = function () { + this.isFocused = false; + this.adapter.deactivateLineRipple(); + var isValid = this.isValid(); + this.styleValidity(isValid); + this.styleFocused(this.isFocused); + if (this.adapter.hasLabel()) { + this.notchOutline(this.shouldFloat); + this.adapter.floatLabel(this.shouldFloat); + this.styleFloating(this.shouldFloat); + this.adapter.shakeLabel(this.shouldShake); + } + if (!this.shouldFloat) { + this.receivedUserInput = false; + } + }; + MDCTextFieldFoundation.prototype.getValue = function () { + return this.getNativeInput().value; + }; + /** + * @param value The value to set on the input Element. + */ + MDCTextFieldFoundation.prototype.setValue = function (value) { + // Prevent Safari from moving the caret to the end of the input when the + // value has not changed. + if (this.getValue() !== value) { + this.getNativeInput().value = value; + } + this.setcharacterCounter(value.length); + if (this.validateOnValueChange) { + var isValid = this.isValid(); + this.styleValidity(isValid); + } + if (this.adapter.hasLabel()) { + this.notchOutline(this.shouldFloat); + this.adapter.floatLabel(this.shouldFloat); + this.styleFloating(this.shouldFloat); + if (this.validateOnValueChange) { + this.adapter.shakeLabel(this.shouldShake); + } + } + }; + /** + * @return The custom validity state, if set; otherwise, the result of a + * native validity check. + */ + MDCTextFieldFoundation.prototype.isValid = function () { + return this.useNativeValidation ? this.isNativeInputValid() : this.valid; + }; + /** + * @param isValid Sets the custom validity state of the Text Field. + */ + MDCTextFieldFoundation.prototype.setValid = function (isValid) { + this.valid = isValid; + this.styleValidity(isValid); + var shouldShake = !isValid && !this.isFocused && !!this.getValue(); + if (this.adapter.hasLabel()) { + this.adapter.shakeLabel(shouldShake); + } + }; + /** + * @param shouldValidate Whether or not validity should be updated on + * value change. + */ + MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) { + this.validateOnValueChange = shouldValidate; + }; + /** + * @return Whether or not validity should be updated on value change. `true` + * by default. + */ + MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () { + return this.validateOnValueChange; + }; + /** + * Enables or disables the use of native validation. Use this for custom + * validation. + * @param useNativeValidation Set this to false to ignore native input + * validation. + */ + MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) { + this.useNativeValidation = useNativeValidation; + }; + MDCTextFieldFoundation.prototype.isDisabled = function () { + return this.getNativeInput().disabled; + }; + /** + * @param disabled Sets the text-field disabled or enabled. + */ + MDCTextFieldFoundation.prototype.setDisabled = function (disabled) { + this.getNativeInput().disabled = disabled; + this.styleDisabled(disabled); + }; + /** + * @param content Sets the content of the helper text. + */ + MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) { + if (this.helperText) { + this.helperText.setContent(content); + } + }; + /** + * Sets the aria label of the leading icon. + */ + MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) { + if (this.leadingIcon) { + this.leadingIcon.setAriaLabel(label); + } + }; + /** + * Sets the text content of the leading icon. + */ + MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) { + if (this.leadingIcon) { + this.leadingIcon.setContent(content); + } + }; + /** + * Sets the aria label of the trailing icon. + */ + MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) { + if (this.trailingIcon) { + this.trailingIcon.setAriaLabel(label); + } + }; + /** + * Sets the text content of the trailing icon. + */ + MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) { + if (this.trailingIcon) { + this.trailingIcon.setContent(content); + } + }; + /** + * Sets character counter values that shows characters used and the total + * character limit. + */ + MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) { + if (!this.characterCounter) { + return; + } + var maxLength = this.getNativeInput().maxLength; + if (maxLength === -1) { + throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.'); + } + this.characterCounter.setCounterValue(currentLength, maxLength); + }; + /** + * @return True if the Text Field input fails in converting the user-supplied + * value. + */ + MDCTextFieldFoundation.prototype.isBadInput = function () { + // The badInput property is not supported in IE 11 💩. + return this.getNativeInput().validity.badInput || false; + }; + /** + * @return The result of native validity checking (ValidityState.valid). + */ + MDCTextFieldFoundation.prototype.isNativeInputValid = function () { + return this.getNativeInput().validity.valid; + }; + /** + * Styles the component based on the validity state. + */ + MDCTextFieldFoundation.prototype.styleValidity = function (isValid) { + var INVALID = MDCTextFieldFoundation.cssClasses.INVALID; + if (isValid) { + this.adapter.removeClass(INVALID); + } + else { + this.adapter.addClass(INVALID); + } + if (this.helperText) { + this.helperText.setValidity(isValid); + // We dynamically set or unset aria-describedby for validation helper text + // only, based on whether the field is valid + var helperTextValidation = this.helperText.isValidation(); + if (!helperTextValidation) { + return; + } + var helperTextVisible = this.helperText.isVisible(); + var helperTextId = this.helperText.getId(); + if (helperTextVisible && helperTextId) { + this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId); + } + else { + this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY); + } + } + }; + /** + * Styles the component based on the focused state. + */ + MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) { + var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED; + if (isFocused) { + this.adapter.addClass(FOCUSED); + } + else { + this.adapter.removeClass(FOCUSED); + } + }; + /** + * Styles the component based on the disabled state. + */ + MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) { + var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID; + if (isDisabled) { + this.adapter.addClass(DISABLED); + this.adapter.removeClass(INVALID); + } + else { + this.adapter.removeClass(DISABLED); + } + if (this.leadingIcon) { + this.leadingIcon.setDisabled(isDisabled); + } + if (this.trailingIcon) { + this.trailingIcon.setDisabled(isDisabled); + } + }; + /** + * Styles the component based on the label floating state. + */ + MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) { + var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING; + if (isFloating) { + this.adapter.addClass(LABEL_FLOATING); + } + else { + this.adapter.removeClass(LABEL_FLOATING); + } + }; + /** + * @return The native text input element from the host environment, or an + * object with the same shape for unit tests. + */ + MDCTextFieldFoundation.prototype.getNativeInput = function () { + // this.adapter may be undefined in foundation unit tests. This happens when + // testdouble is creating a mock object and invokes the + // shouldShake/shouldFloat getters (which in turn call getValue(), which + // calls this method) before init() has been called from the MDCTextField + // constructor. To work around that issue, we return a dummy object. + var nativeInput = this.adapter ? this.adapter.getNativeInput() : null; + return nativeInput || { + disabled: false, + maxLength: -1, + required: false, + type: 'input', + validity: { + badInput: false, + valid: true, + }, + value: '', + }; + }; + return MDCTextFieldFoundation; +}(MDCFoundation)); +// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. +var MDCTextFieldFoundation$1 = MDCTextFieldFoundation; + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -const pn={},hn=Pe(class extends ze{constructor(e){if(super(e),e.type!==Be&&e.type!==Ne&&e.type!==He)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===z||t===V)return t;const i=e.element,n=e.name;if(e.type===Be){if(t===i[n])return z}else if(e.type===He){if(!!t===i.hasAttribute(n))return z}else if(e.type===Ne&&i.getAttribute(n)===t+"")return z;return((e,t=pn)=>{e._$AH=t; + */const e=o=>void 0===o.strings,f={},s=(o,l=f)=>o._$AH=l; + /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */})(e),t}}),un=["touchstart","touchmove","scroll","mousewheel"],fn=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class gn extends $e{constructor(){super(...arguments),this.mdcFoundationClass=mn,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=fn(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return P` -