@fluid-topics/ft-select 0.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ Value selector for a predefined list of choices
2
+
3
+ ## Install
4
+
5
+ ```shell
6
+ npm install @fluid-topics/ft-select
7
+ yarn add @fluid-topics/ft-select
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ ```typescript
13
+ import { html } from "lit"
14
+ import "@fluid-topics/ft-select"
15
+
16
+ function render() {
17
+ return html`
18
+ <ft-select label="label"
19
+ @change=${ (e: CustomEvent) => console.log("Value changed:", e.detail) }>
20
+ <ft-select-option></ft-select-option>
21
+ <ft-select-option label="Option 1" value="Value 1"></ft-select-option>
22
+ <ft-select-option label="Option 2" value="Value 2"></ft-select-option>
23
+ <ft-select-option label="Option 3" value="Value 3" selected></ft-select-option>
24
+ <ft-select-option label="Option 4" value="Value 4"></ft-select-option>
25
+ </ft-select>
26
+ `
27
+ }
28
+ ```
@@ -0,0 +1,61 @@
1
+ import { PropertyValues } from "lit";
2
+ import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
+ export interface FtSelectOptionProperties {
4
+ label?: string;
5
+ value?: any;
6
+ selected?: boolean;
7
+ }
8
+ export declare class FtSelectOption extends FtLitElement implements FtSelectOptionProperties {
9
+ static elementDefinitions: ElementDefinitionsMap;
10
+ label: string;
11
+ value: any;
12
+ selected: boolean;
13
+ protected getTemplate(): import("lit-html").TemplateResult<1>;
14
+ protected updated(changedProperties: PropertyValues): void;
15
+ }
16
+ export interface FtSelectProperties {
17
+ label?: string;
18
+ helper?: string;
19
+ outlined?: boolean;
20
+ disabled?: boolean;
21
+ options?: Array<FtSelectOptionProperties>;
22
+ selectedOption?: FtSelectOptionProperties;
23
+ }
24
+ export interface FtSelectCssVariables {
25
+ "--ft-select-label-size"?: string;
26
+ "--ft-select-selected-option-size"?: string;
27
+ "--ft-select-vertical-spacing"?: string;
28
+ "--ft-select-helper-color"?: string;
29
+ }
30
+ export declare class FtSelect extends FtLitElement implements FtSelectProperties {
31
+ static elementDefinitions: ElementDefinitionsMap;
32
+ protected getStyles(): import("lit").CSSResult[];
33
+ label: string;
34
+ helper: string;
35
+ outlined: boolean;
36
+ disabled: boolean;
37
+ options: Array<FtSelectOptionProperties>;
38
+ selectedOption?: FtSelectOptionProperties;
39
+ private optionsDisplayed;
40
+ private focusOptions;
41
+ private mainPanel?;
42
+ private firstOption?;
43
+ private focusedOption?;
44
+ private selectedOptionElement?;
45
+ private lastOption?;
46
+ private optionsSlot?;
47
+ protected getTemplate(): import("lit-html").TemplateResult<1>;
48
+ private renderOption;
49
+ protected updated(props: PropertyValues): void;
50
+ protected contentAvailableCallback(props: PropertyValues): void;
51
+ private get hasOptions();
52
+ private updateOptionsFromSlot;
53
+ private onMainPanelKeyDown;
54
+ private onOptionsKeyDown;
55
+ private onOptionKeyDown;
56
+ private selectOption;
57
+ private hideOptions;
58
+ connectedCallback(): void;
59
+ disconnectedCallback(): void;
60
+ }
61
+ //# sourceMappingURL=ft-select.d.ts.map
@@ -0,0 +1,401 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html } from "lit";
8
+ import { property, query, state } from "lit/decorators.js";
9
+ import { classMap } from "lit/directives/class-map.js";
10
+ import { repeat } from "lit/directives/repeat.js";
11
+ import { customElement, FtLitElement } from "@fluid-topics/ft-wc-utils";
12
+ import { FtTypography, FtTypographyBody2, FtTypographyCaption } from "@fluid-topics/ft-typography";
13
+ import { FtInputLabel } from "@fluid-topics/ft-input-label";
14
+ import { FtRipple } from "@fluid-topics/ft-ripple";
15
+ import { Icon } from "@material/mwc-icon";
16
+ let FtSelectOption = class FtSelectOption extends FtLitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.label = "";
20
+ this.value = null;
21
+ this.selected = false;
22
+ }
23
+ getTemplate() {
24
+ return html ``;
25
+ }
26
+ updated(changedProperties) {
27
+ super.updated(changedProperties);
28
+ this.dispatchEvent(new CustomEvent("option-change", { detail: this, bubbles: true }));
29
+ }
30
+ };
31
+ FtSelectOption.elementDefinitions = {};
32
+ __decorate([
33
+ property({ type: String })
34
+ ], FtSelectOption.prototype, "label", void 0);
35
+ __decorate([
36
+ property({ type: Object, converter: value => value })
37
+ ], FtSelectOption.prototype, "value", void 0);
38
+ __decorate([
39
+ property({ type: Boolean, reflect: true })
40
+ ], FtSelectOption.prototype, "selected", void 0);
41
+ FtSelectOption = __decorate([
42
+ customElement("ft-select-option")
43
+ ], FtSelectOption);
44
+ export { FtSelectOption };
45
+ let FtSelect = class FtSelect extends FtLitElement {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.label = "";
49
+ this.helper = "";
50
+ this.outlined = false;
51
+ this.disabled = false;
52
+ this.options = [];
53
+ this.optionsDisplayed = false;
54
+ this.focusOptions = false;
55
+ this.hideOptions = () => this.optionsDisplayed = false;
56
+ }
57
+ // language=CSS
58
+ getStyles() {
59
+ return [
60
+ FtTypographyBody2,
61
+ FtTypographyCaption,
62
+ css `
63
+ *:focus {
64
+ outline: none;
65
+ }
66
+
67
+ .ft-select {
68
+ display: flex;
69
+ flex-direction: column;
70
+ align-items: stretch;
71
+ }
72
+
73
+ .ft-select--main-panel {
74
+ position: relative;
75
+ display: flex;
76
+ height: calc(4 * var(--ft-select-vertical-spacing, 4px) + var(--ft-select-label-size, 11px) + var(--ft-select-selected-option-size, 14px));
77
+ }
78
+
79
+ .ft-select--input-panel {
80
+ flex-grow: 1;
81
+ position: relative;
82
+ display: flex;
83
+ align-items: center;
84
+ overflow: hidden;
85
+ padding-left: 16px;
86
+ padding-right: 8px;
87
+ gap: 8px;
88
+ }
89
+
90
+ .ft-select--input-panel,
91
+ .ft-select--option {
92
+ color: var(--ft-color-on-surface, rgba(0, 0, 0, 0.87));
93
+ --ft-opacity-color-content-on-surface-hover: 0.08;
94
+ --ft-opacity-color-content-on-surface-dragged: 0.04;
95
+ }
96
+
97
+ .ft-select--disabled .ft-select--input-panel,
98
+ .ft-select--disabled .ft-select--option {
99
+ color: var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38));
100
+ }
101
+
102
+ .ft-select:not(.ft-select--disabled) .ft-select--input-panel {
103
+ cursor: pointer;
104
+ }
105
+
106
+ ft-input-label {
107
+ --ft-input-label-font-size: var(--ft-select-selected-option-size, 14px);
108
+ --ft-input-label-raised-font-size: var(--ft-select-label-size, 11px);
109
+ --ft-input-label-vertical-spacing: var(--ft-select-vertical-spacing, 4px);
110
+ }
111
+
112
+ .ft-select:not(.ft-select--disabled):focus-within ft-input-label {
113
+ --ft-input-label-border-color: var(--ft-color-primary, #2196F3);
114
+ --ft-input-label-text-color: var(--ft-color-primary, #2196F3);
115
+ }
116
+
117
+ .ft-select--selected-option {
118
+ display: block;
119
+ flex-grow: 1;
120
+ flex-shrink: 1;
121
+ overflow: hidden;
122
+ white-space: nowrap;
123
+ text-overflow: ellipsis;
124
+ --ft-typography-font-size: var(--ft-select-selected-option-size, 14px);
125
+ --ft-typography-line-height: var(--ft-select-selected-option-size, 14px);
126
+ }
127
+
128
+ mwc-icon {
129
+ flex-shrink: 0;
130
+ }
131
+
132
+ slot {
133
+ display: none;
134
+ }
135
+
136
+ .ft-select--filled .ft-select--input-panel {
137
+ border-radius: var(--ft-border-radius-S, 4px) var(--ft-border-radius-S, 4px) 0 0;
138
+ }
139
+
140
+ .ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
141
+ align-self: stretch;
142
+ padding-top: calc(var(--ft-select-label-size, 11px) + 2 * var(--ft-select-vertical-spacing, 4px));
143
+ }
144
+
145
+ .ft-select--outlined .ft-select--input-panel {
146
+ border-radius: var(--ft-border-radius-S, 4px);
147
+ }
148
+
149
+ .ft-select--options {
150
+ display: none;
151
+ position: absolute;
152
+ top: 100%;
153
+ left: 0;
154
+ right: 0;
155
+ background: var(--ft-color-surface, #FFFFFF);
156
+ z-index: var(--ft-select-options-z-index, 1);
157
+ box-shadow: var(--ft-elevation-02, 0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06));
158
+ }
159
+
160
+ .ft-select--options-displayed .ft-select--options {
161
+ display: block;
162
+ }
163
+
164
+ .ft-select--option {
165
+ position: relative;
166
+ padding: 4px 16px;
167
+ min-height: 32px;
168
+ display: flex;
169
+ align-items: center;
170
+ }
171
+
172
+ .ft-select--helper-text {
173
+ padding: 0 12px 0 16px;
174
+ color: var(--ft-select-helper-color, var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60)));
175
+ }
176
+ `
177
+ ];
178
+ }
179
+ getTemplate() {
180
+ var _a, _b, _c, _d, _e;
181
+ let optionsDisplayed = !this.disabled && this.optionsDisplayed && this.hasOptions;
182
+ let disabled = this.disabled || !this.hasOptions;
183
+ const classes = {
184
+ "ft-select": true,
185
+ "ft-select--filled": !this.outlined,
186
+ "ft-select--outlined": this.outlined,
187
+ "ft-select--disabled": disabled,
188
+ "ft-select--options-displayed": optionsDisplayed,
189
+ "ft-select--has-value": ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value) != null,
190
+ "ft-select--no-label": !this.label
191
+ };
192
+ return html `
193
+ <div class="${classMap(classes)}" @click=${(e) => e.stopPropagation()} part="container">
194
+ <div class="ft-select--main-panel" part="main-panel">
195
+ <ft-input-label text="${this.label}"
196
+ part="label"
197
+ ?disabled=${disabled}
198
+ ?outlined=${this.outlined}
199
+ ?raised=${((_b = this.selectedOption) === null || _b === void 0 ? void 0 : _b.value) != null || optionsDisplayed}
200
+ ></ft-input-label>
201
+ <div class="ft-select--input-panel"
202
+ part="selected-value"
203
+ tabindex="${disabled ? "-1" : "0"}"
204
+ @click=${() => this.optionsDisplayed = !this.optionsDisplayed}
205
+ @keydown=${this.onMainPanelKeyDown}
206
+ aria-label="${this.label}"
207
+ aria-haspopup="listbox"
208
+ aria-expanded="${optionsDisplayed}">
209
+ ${this.outlined ? null : html `
210
+ <ft-ripple ?disabled=${disabled} activated></ft-ripple>
211
+ `}
212
+ <ft-typography variant="body1" class="ft-select--selected-option">
213
+ ${((_c = this.selectedOption) === null || _c === void 0 ? void 0 : _c.value) != null ? (_e = (_d = this.selectedOption) === null || _d === void 0 ? void 0 : _d.label) !== null && _e !== void 0 ? _e : "" : ""}
214
+ </ft-typography>
215
+ <mwc-icon>${optionsDisplayed ? "expand_less" : "expand_more"}</mwc-icon>
216
+ </div>
217
+ <div class="ft-select--options"
218
+ part="options"
219
+ @keydown=${this.onOptionsKeyDown}
220
+ innerrole="listbox">
221
+ ${repeat(this.options, option => option.value, option => this.renderOption(option))}
222
+ </div>
223
+ </div>
224
+ ${this.helper ? html `
225
+ <ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
226
+ </ft-typography>` : undefined}
227
+ </div>
228
+ <slot @slotchange=${this.updateOptionsFromSlot}
229
+ @option-change=${this.updateOptionsFromSlot}
230
+ ></slot>
231
+ `;
232
+ }
233
+ renderOption(option) {
234
+ let selected = this.selectedOption === option;
235
+ const classes = {
236
+ "ft-select--option": true,
237
+ "ft-select--option-selected": selected,
238
+ "ft-typography--body2": true
239
+ };
240
+ return html `
241
+ <div class="${classMap(classes)}"
242
+ part="option"
243
+ tabindex="0"
244
+ @keydown=${(e) => this.onOptionKeyDown(e, option)}
245
+ @click=${() => this.selectOption(option)}>
246
+ <ft-ripple ?primary=${selected} ?activated=${selected}></ft-ripple>
247
+ ${option.label}
248
+ </div>
249
+ `;
250
+ }
251
+ updated(props) {
252
+ var _a;
253
+ super.updated(props);
254
+ if (props.has("options")) {
255
+ this.selectedOption = this.options.filter(o => o.selected)[0];
256
+ }
257
+ if (props.has("selectedOption")) {
258
+ this.optionsDisplayed = false;
259
+ this.dispatchEvent(new CustomEvent("change", { detail: (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value }));
260
+ }
261
+ }
262
+ contentAvailableCallback(props) {
263
+ var _a, _b;
264
+ if (props.has("focusOptions") && this.focusOptions) {
265
+ (_b = ((_a = this.selectedOptionElement) !== null && _a !== void 0 ? _a : this.firstOption)) === null || _b === void 0 ? void 0 : _b.focus();
266
+ this.focusOptions = false;
267
+ }
268
+ }
269
+ get hasOptions() {
270
+ return this.options.length > 0;
271
+ }
272
+ updateOptionsFromSlot(e) {
273
+ var _a;
274
+ e.stopPropagation();
275
+ let optionsFromSlot = (_a = this.optionsSlot) === null || _a === void 0 ? void 0 : _a.assignedElements().map(n => n);
276
+ if (optionsFromSlot && optionsFromSlot.length > 0) {
277
+ this.options = optionsFromSlot;
278
+ }
279
+ }
280
+ onMainPanelKeyDown(e) {
281
+ switch (e.key) {
282
+ // @ts-ignore
283
+ case " ":
284
+ e.preventDefault();
285
+ e.stopPropagation();
286
+ // No break
287
+ case "Enter":
288
+ this.optionsDisplayed = !this.optionsDisplayed;
289
+ this.focusOptions = true;
290
+ break;
291
+ case "ArrowUp":
292
+ case "ArrowDown":
293
+ e.preventDefault();
294
+ e.stopPropagation();
295
+ this.optionsDisplayed = true;
296
+ this.focusOptions = true;
297
+ break;
298
+ }
299
+ }
300
+ onOptionsKeyDown(e) {
301
+ var _a, _b, _c, _d, _e;
302
+ let optionToFocus;
303
+ switch (e.key) {
304
+ case "Escape":
305
+ this.optionsDisplayed = false;
306
+ (_a = this.mainPanel) === null || _a === void 0 ? void 0 : _a.focus();
307
+ break;
308
+ case "Tab":
309
+ this.optionsDisplayed = false;
310
+ break;
311
+ case "ArrowUp":
312
+ e.preventDefault();
313
+ e.stopPropagation();
314
+ optionToFocus = (_c = (_b = this.focusedOption) === null || _b === void 0 ? void 0 : _b.previousElementSibling) !== null && _c !== void 0 ? _c : this.lastOption;
315
+ break;
316
+ case "ArrowDown":
317
+ e.preventDefault();
318
+ e.stopPropagation();
319
+ optionToFocus = (_e = (_d = this.focusedOption) === null || _d === void 0 ? void 0 : _d.nextElementSibling) !== null && _e !== void 0 ? _e : this.firstOption;
320
+ break;
321
+ }
322
+ optionToFocus === null || optionToFocus === void 0 ? void 0 : optionToFocus.focus();
323
+ }
324
+ onOptionKeyDown(e, option) {
325
+ var _a;
326
+ if (e.key === "Enter" || e.key === " ") {
327
+ e.preventDefault();
328
+ e.stopPropagation();
329
+ this.selectOption(option);
330
+ this.optionsDisplayed = false;
331
+ (_a = this.mainPanel) === null || _a === void 0 ? void 0 : _a.focus();
332
+ }
333
+ }
334
+ selectOption(option) {
335
+ this.selectedOption = option;
336
+ for (let otherOption of this.options) {
337
+ otherOption.selected = otherOption === option;
338
+ }
339
+ }
340
+ connectedCallback() {
341
+ super.connectedCallback();
342
+ document.addEventListener("click", this.hideOptions);
343
+ }
344
+ disconnectedCallback() {
345
+ super.disconnectedCallback();
346
+ document.removeEventListener("click", this.hideOptions);
347
+ }
348
+ };
349
+ FtSelect.elementDefinitions = {
350
+ "ft-input-label": FtInputLabel,
351
+ "ft-typography": FtTypography,
352
+ "ft-ripple": FtRipple,
353
+ "mwc-icon": Icon,
354
+ };
355
+ __decorate([
356
+ property({ type: String })
357
+ ], FtSelect.prototype, "label", void 0);
358
+ __decorate([
359
+ property({ type: String })
360
+ ], FtSelect.prototype, "helper", void 0);
361
+ __decorate([
362
+ property({ type: Boolean })
363
+ ], FtSelect.prototype, "outlined", void 0);
364
+ __decorate([
365
+ property({ type: Boolean })
366
+ ], FtSelect.prototype, "disabled", void 0);
367
+ __decorate([
368
+ property({ type: Array })
369
+ ], FtSelect.prototype, "options", void 0);
370
+ __decorate([
371
+ state()
372
+ ], FtSelect.prototype, "selectedOption", void 0);
373
+ __decorate([
374
+ state()
375
+ ], FtSelect.prototype, "optionsDisplayed", void 0);
376
+ __decorate([
377
+ state()
378
+ ], FtSelect.prototype, "focusOptions", void 0);
379
+ __decorate([
380
+ query(".ft-select--input-panel")
381
+ ], FtSelect.prototype, "mainPanel", void 0);
382
+ __decorate([
383
+ query(".ft-select--option:first-child")
384
+ ], FtSelect.prototype, "firstOption", void 0);
385
+ __decorate([
386
+ query(".ft-select--option:focus")
387
+ ], FtSelect.prototype, "focusedOption", void 0);
388
+ __decorate([
389
+ query(".ft-select--option.ft-select--option-selected")
390
+ ], FtSelect.prototype, "selectedOptionElement", void 0);
391
+ __decorate([
392
+ query(".ft-select--option:last-child")
393
+ ], FtSelect.prototype, "lastOption", void 0);
394
+ __decorate([
395
+ query("slot")
396
+ ], FtSelect.prototype, "optionsSlot", void 0);
397
+ FtSelect = __decorate([
398
+ customElement("ft-select")
399
+ ], FtSelect);
400
+ export { FtSelect };
401
+ //# sourceMappingURL=ft-select.js.map
@@ -0,0 +1,341 @@
1
+ !function(t){
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new Map;class o{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return e&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const a=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,i,r)=>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.")})(i)+t[r+1]),t[0]);return new o(r,i)},n=(t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),r=window.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))},s=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",i))(e)})(t):t
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */;var l;const c=window.trustedTypes,p=c?c.emptyScript:"",d=window.reactiveElementPolyfillSupport,f={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},u=(t,e)=>e!==t&&(e==e||t==t),h={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:u};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Eh(i,e);void 0!==r&&(this._$Eu.set(r,i),t.push(r))})),t}static createProperty(t,e=h){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||h}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return n(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=h){var r,o;const a=this.constructor._$Eh(t,i);if(void 0!==a&&!0===i.reflect){const n=(null!==(o=null===(r=i.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==o?o:f.toAttribute)(e,i.type);this._$Ei=t,null==n?this.removeAttribute(a):this.setAttribute(a,n),this._$Ei=null}}_$AK(t,e){var i,r,o;const a=this.constructor,n=a._$Eu.get(t);if(void 0!==n&&this._$Ei!==n){const t=a.getPropertyOptions(n),s=t.converter,l=null!==(o=null!==(r=null===(i=s)||void 0===i?void 0:i.fromAttribute)&&void 0!==r?r:"function"==typeof s?s:null)&&void 0!==o?o:f.fromAttribute;this._$Ei=n,this[n]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ var y;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const m=globalThis.trustedTypes,g=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,w="?"+b,x=`<${w}>`,k=document,S=(t="")=>k.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,A=t=>{var e;return $(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,T=/>/g,j=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,C=/'/g,_=/"/g,M=/^(?:script|style|textarea|title)$/i,R=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),F=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),I=new WeakMap,U=k.createTreeWalker(k,129,null,!1),B=(t,e)=>{const i=t.length-1,r=[];let o,a=2===e?"<svg>":"",n=z;for(let e=0;e<i;e++){const i=t[e];let s,l,c=-1,p=0;for(;p<i.length&&(n.lastIndex=p,l=n.exec(i),null!==l);)p=n.lastIndex,n===z?"!--"===l[1]?n=E:void 0!==l[1]?n=T:void 0!==l[2]?(M.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=j):void 0!==l[3]&&(n=j):n===j?">"===l[0]?(n=null!=o?o:z,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?j:'"'===l[3]?_:C):n===_||n===C?n=j:n===E||n===T?n=z:(n=j,o=void 0);const d=n===j&&t[e+1].startsWith("/>")?" ":"";a+=n===z?i+x:c>=0?(r.push(s),i.slice(0,c)+"$lit$"+i.slice(c)+b+d):i+b+(-2===c?(r.push(void 0),e):d)}const s=a+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(s):s,r]};class H{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,a=0;const n=t.length-1,s=this.parts,[l,c]=B(t,e);if(this.el=H.createElement(l,i),U.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=U.nextNode())&&s.length<n;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(b)){const i=c[a++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(b),e=/([.?@])?(.*)/.exec(i);s.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?G:"?"===e[1]?W:"@"===e[1]?K:V})}else s.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(M.test(r.tagName)){const t=r.textContent.split(b),e=t.length-1;if(e>0){r.textContent=m?m.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],S()),U.nextNode(),s.push({type:2,index:++o});r.append(t[e],S())}}}else if(8===r.nodeType)if(r.data===w)s.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(b,t+1));)s.push({type:7,index:o}),t+=b.length-1}o++}}static createElement(t,e){const i=k.createElement("template");return i.innerHTML=t,i}}function P(t,e,i=t,r){var o,a,n,s;if(e===F)return e;let l=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const c=O(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(a=null==l?void 0:l._$AO)||void 0===a||a.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,i,r)),void 0!==r?(null!==(n=(s=i)._$Cl)&&void 0!==n?n:s._$Cl=[])[r]=l:i._$Cu=l),void 0!==l&&(e=P(t,l._$AS(t,e.values),l,r)),e}class L{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:k).importNode(i,!0);U.currentNode=o;let a=U.nextNode(),n=0,s=0,l=r[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new N(a,a.nextSibling,this,t):1===l.type?e=new l.ctor(a,l.name,l.strings,this,t):6===l.type&&(e=new Z(a,this,t)),this.v.push(e),l=r[++s]}n!==(null==l?void 0:l.index)&&(a=U.nextNode(),n++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class N{constructor(t,e,i,r){var o;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),O(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==F&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):A(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==D&&O(this._$AH)?this._$AA.nextSibling.data=t:this.S(k.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=H.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new L(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new H(t)),e}A(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new N(this.M(S()),this.M(S()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class V{constructor(t,e,i,r,o){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let a=!1;if(void 0===o)t=P(this,t,e,0),a=!O(t)||t!==this._$AH&&t!==F,a&&(this._$AH=t);else{const r=t;let n,s;for(t=o[0],n=0;n<o.length-1;n++)s=P(this,r[i+n],e,n),s===F&&(s=this._$AH[n]),a||(a=!O(s)||s!==this._$AH[n]),s===D?t=D:t!==D&&(t+=(null!=s?s:"")+o[n+1]),this._$AH[n]=s}a&&!r&&this.k(t)}k(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends V{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===D?void 0:t}}const q=m?m.emptyScript:"";class W extends V{constructor(){super(...arguments),this.type=4}k(t){t&&t!==D?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class K extends V{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=P(this,t,e,0))&&void 0!==i?i:D)===F)return;const r=this._$AH,o=t===D&&r!==D||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==D&&(r===D||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const J={P:"$lit$",V:b,L:w,I:1,N:B,R:L,D:A,j:P,H:N,O:V,F:W,B:K,W:G,Z},X=window.litHtmlPolyfillSupport;
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+ var Y,Q;null==X||X(H,N),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.1.3");class tt extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=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 e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var r,o;const a=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let n=a._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;a._$litPart$=n=new N(e.insertBefore(S(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return F}}tt.finalized=!0,tt._$litElement$=!0,null===(Y=globalThis.litElementHydrateSupport)||void 0===Y||Y.call(globalThis,{LitElement:tt});const et=globalThis.litElementPolyfillSupport;null==et||et({LitElement:tt}),(null!==(Q=globalThis.litElementVersions)&&void 0!==Q?Q:globalThis.litElementVersions=[]).push("3.1.2");
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+ const it=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:r}=e;return{kind:i,elements:r,finisher(e){window.customElements.define(t,e)}}})(t,e)
31
+ /**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */,rt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function ot(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):rt(t,e)
36
+ /**
37
+ * @license
38
+ * Copyright 2017 Google LLC
39
+ * SPDX-License-Identifier: BSD-3-Clause
40
+ */}function at(t){return ot({...t,state:!0})}
41
+ /**
42
+ * @license
43
+ * Copyright 2017 Google LLC
44
+ * SPDX-License-Identifier: BSD-3-Clause
45
+ */
46
+ /**
47
+ * @license
48
+ * Copyright 2017 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ */
51
+ function nt(t,e){return(({finisher:t,descriptor:e})=>(i,r)=>{var o;if(void 0===r){const r=null!==(o=i.originalKey)&&void 0!==o?o:i.key,a=null!=e?{kind:"method",placement:"prototype",key:r,descriptor:e(i.key)}:{...i,key:r};return null!=t&&(a.finisher=function(e){t(e,r)}),a}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,r,e(r)),null==t||t(o,r)}})({descriptor:i=>{const r={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;r.get=function(){var i,r;return void 0===this[e]&&(this[e]=null!==(r=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==r?r:null),this[e]}}return r}})}
52
+ /**
53
+ * @license
54
+ * Copyright 2021 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */var st;null===(st=window.HTMLSlotElement)||void 0===st||st.prototype.assignedElements;
57
+ /**
58
+ * @license
59
+ * Copyright 2017 Google LLC
60
+ * SPDX-License-Identifier: BSD-3-Clause
61
+ */
62
+ const lt=1,ct=2,pt=t=>(...e)=>({_$litDirective$:t,values:e});class dt{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)}}
63
+ /**
64
+ * @license
65
+ * Copyright 2018 Google LLC
66
+ * SPDX-License-Identifier: BSD-3-Clause
67
+ */const ft=pt(class extends dt{constructor(t){var e;if(super(t),t.type!==lt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.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((e=>t[e])).join(" ")+" "}update(t,[e]){var i,r;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const o=t.element.classList;this.st.forEach((t=>{t in e||(o.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(r=this.et)||void 0===r?void 0:r.has(t))||(i?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return F}}),{H:ut}=J,ht=()=>document.createComment(""),vt=(t,e,i)=>{var r;const o=t._$AA.parentNode,a=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(ht(),a),r=o.insertBefore(ht(),a);i=new ut(e,r,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,s=n!==t;if(s){let e;null===(r=i._$AQ)||void 0===r||r.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==a||s){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,a),t=e}}}return i},yt=(t,e,i=t)=>(t._$AI(e,i),t),mt={},gt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const r=t._$AB.nextSibling;for(;i!==r;){const t=i.nextSibling;i.remove(),i=t}},bt=(t,e,i)=>{const r=new Map;for(let o=e;o<=i;o++)r.set(t[o],o);return r},wt=pt(class extends dt{constructor(t){if(super(t),t.type!==ct)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let r;void 0===i?i=e:void 0!==e&&(r=e);const o=[],a=[];let n=0;for(const e of t)o[n]=r?r(e,n):n,a[n]=i(e,n),n++;return{values:a,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,r]){var o;const a=(t=>t._$AH)(t),{values:n,keys:s}=this.dt(e,i,r);if(!Array.isArray(a))return this.at=s,n;const l=null!==(o=this.at)&&void 0!==o?o:this.at=[],c=[];let p,d,f=0,u=a.length-1,h=0,v=n.length-1;for(;f<=u&&h<=v;)if(null===a[f])f++;else if(null===a[u])u--;else if(l[f]===s[h])c[h]=yt(a[f],n[h]),f++,h++;else if(l[u]===s[v])c[v]=yt(a[u],n[v]),u--,v--;else if(l[f]===s[v])c[v]=yt(a[f],n[v]),vt(t,c[v+1],a[f]),f++,v--;else if(l[u]===s[h])c[h]=yt(a[u],n[h]),vt(t,a[f],a[u]),u--,h++;else if(void 0===p&&(p=bt(s,h,v),d=bt(l,f,u)),p.has(l[f]))if(p.has(l[u])){const e=d.get(s[h]),i=void 0!==e?a[e]:null;if(null===i){const e=vt(t,a[f]);yt(e,n[h]),c[h]=e}else c[h]=yt(i,n[h]),vt(t,a[f],i),a[e]=null;h++}else gt(a[u]),u--;else gt(a[f]),f++;for(;h<=v;){const e=vt(t,c[v+1]);yt(e,n[h]),c[h++]=e}for(;f<=u;){const t=a[f++];null!==t&&gt(t)}return this.at=s,((t,e=mt)=>{t._$AH=e})(t,c),F}});
68
+ /**
69
+ * @license
70
+ * Copyright 2020 Google LLC
71
+ * SPDX-License-Identifier: BSD-3-Clause
72
+ */(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,r=[];!(i=t.next()).done;)r.push(i.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var o,a=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),n=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,i,r){return e=t(e,i),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=r(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var s;t:{var l={};try{l.__proto__={a:!0},s=l.a;break t}catch(t){}s=!1}o=s?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var c=o;if(!ShadowRoot.prototype.createElement){var p,d=window.HTMLElement,f=window.customElements.define,u=window.customElements.get,h=window.customElements,v=new WeakMap,y=new WeakMap,m=new WeakMap,g=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,i){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=i.prototype.attributeChangedCallback,o=new Set(i.observedAttributes||[]);if(w(i,o,r),r={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,r),this.o.set(i,r),(o=u.call(h,t))||(o=b(t),f.call(h,t,o)),this===window.customElements&&(m.set(i,r),r.s=o),o=this.h.get(t)){this.h.delete(t);for(var a=(o=e(o)).next();!a.done;a=o.next())a=a.value,y.delete(a),k(a,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){O.push(this),h.upgrade.apply(h,arguments),O.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var r=this.h.get(e);r||this.h.set(e,r=new Set),i?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=p;if(t)return p=void 0,t;var e=m.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(d,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,e),t},window.HTMLElement.prototype=d.prototype;var b=function(t){function e(){var e=Reflect.construct(d,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=O[O.length-1])instanceof CustomElementRegistry){var r=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(r=g.get(i))?void 0:r.getRootNode())||document)}r=i.customElements}return(i=(r=r||window.customElements).j(t))?k(e,i):y.set(e,r),e}return a.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=v.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):y.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=v.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):y.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=v.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=v.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},w=function(t,e,i){if(0!==e.size&&void 0!==i){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),e.has(t)){var a=this.getAttribute(t);r.call(this,t,o),i.call(this,t,a,o)}else r.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);o.call(this,t),i.call(this,t,r,null)}else o.call(this,t)})}},x=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===d?Object.setPrototypeOf(t,window.HTMLElement):x(e)},k=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),v.set(t,e),p=t;try{new e.g}catch(t){x(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},S=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=S.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var O=[document],$=function(t,e,i){var r=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){O.push(this);var t=r.apply(i||this,arguments);return void 0!==t&&g.set(t,this),O.pop(),t}};$(ShadowRoot,"createElement",document),$(ShadowRoot,"importNode",document),$(Element,"insertAdjacentHTML");var A=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){O.push(this),e.set.call(this,t),O.pop()}}))};if(A(Element),A(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var z=new WeakMap,E=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=E.call.apply(E,[this].concat(i(e))),z.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],o=0;o<arguments.length;++o)e[o]=arguments[o];if(o=z.get(this),!0!==v.get(o).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(i(e)))}}));var T=function(t){var e=n(Array,[].concat(i(t)),this.constructor);return e.h=t,e},j=T,C=Array;if(j.prototype=r(C.prototype),j.prototype.constructor=j,c)c(j,C);else for(var _ in C)if("prototype"!=_)if(Object.defineProperties){var M=Object.getOwnPropertyDescriptor(C,_);M&&Object.defineProperty(j,_,M)}else j[_]=C[_];j.u=C.prototype,a.Object.defineProperty(T.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var R=function(t){var e=this,i=new Map;t.forEach((function(t,r){var o=t.getAttribute("name"),a=i.get(o)||[];e[+r]=t,a.push(t),i.set(o,a)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new T(t))}))};R.prototype.namedItem=function(t){return this[t]};var F=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=F.get.call(this,[]),i=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var o=v.get(r);o&&!0!==o.formAssociated||i.push(r)}return new R(i)}})}}}).call(self);try{window.customElements.define("custom-element",null)}catch(St){const t=window.customElements.define;window.customElements.define=(e,i,r)=>{try{t.bind(window.customElements)(e,i,r)}catch(t){console.warn(e,i,r,t)}}}const xt=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)}
73
+ /**
74
+ * @license
75
+ * Copyright 2021 Google LLC
76
+ * SPDX-License-Identifier: BSD-3-Clause
77
+ */;class kt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return n(o,this.constructor.elementStyles),o}}}(tt)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),R`${t.map((t=>R`<style>${t}</style>`))} ${this.getTemplate()}`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}
78
+ /**
79
+ * @license
80
+ * Copyright 2017 Google LLC
81
+ * SPDX-License-Identifier: BSD-3-Clause
82
+ */class St extends dt{constructor(t){if(super(t),this.it=D,t.type!==ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||null==t)return this.vt=void 0,this.it=t;if(t===F)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}var Ot,$t;St.directiveName="unsafeHTML",St.resultType=1,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($t=null===(Ot=window.safari)||void 0===Ot?void 0:Ot.pushNotification)||void 0===$t||$t.toString());
83
+ /**
84
+ * @license
85
+ * Copyright 2020 Google LLC
86
+ * SPDX-License-Identifier: BSD-3-Clause
87
+ */
88
+ const At=t=>({_$litStatic$:t}),zt=new Map,Et=(t=>(e,...i)=>{var r;const o=i.length;let a,n;const s=[],l=[];let c,p=0,d=!1;for(;p<o;){for(c=e[p];p<o&&void 0!==(n=i[p],a=null===(r=n)||void 0===r?void 0:r._$litStatic$);)c+=a+e[++p],d=!0;l.push(n),s.push(c),p++}if(p===o&&s.push(e[o]),d){const t=s.join("$$lit$$");void 0===(e=zt.get(t))&&(s.raw=s,zt.set(t,e=s)),i=l}return t(e,...i)})(R);var Tt,jt=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Tt||(Tt={}));const Ct=a`
89
+ .ft-typography--title {
90
+ font-family: var(--ft-typography-title-font-family, var(--ft-typography-font-family, var(--ft-title-font, Ubuntu))), system-ui, sans-serif;
91
+ font-size: var(--ft-typography-title-font-size, var(--ft-typography-font-size, 20px));
92
+ font-weight: var(--ft-typography-title-font-weight, var(--ft-typography-font-weight, normal));
93
+ letter-spacing: var(--ft-typography-title-letter-spacing, var(--ft-typography-letter-spacing, 0.15px));
94
+ line-height: var(--ft-typography-title-line-height, var(--ft-typography-line-height, 24px));
95
+ text-transform: var(--ft-typography-title-text-transform, var(--ft-typography-text-transform, inherit));
96
+ }
97
+ `,_t=a`
98
+ .ft-typography--title-dense {
99
+ font-family: var(--ft-typography-title-dense-font-family, var(--ft-typography-font-family, var(--ft-title-font, Ubuntu))), system-ui, sans-serif;
100
+ font-size: var(--ft-typography-title-dense-font-size, var(--ft-typography-font-size, 14px));
101
+ font-weight: var(--ft-typography-title-dense-font-weight, var(--ft-typography-font-weight, normal));
102
+ letter-spacing: var(--ft-typography-title-dense-letter-spacing, var(--ft-typography-letter-spacing, 0.105px));
103
+ line-height: var(--ft-typography-title-dense-line-height, var(--ft-typography-line-height, 24px));
104
+ text-transform: var(--ft-typography-title-dense-text-transform, var(--ft-typography-text-transform, inherit));
105
+ }
106
+ `,Mt=a`
107
+ .ft-typography--subtitle1 {
108
+ font-family: var(--ft-typography-subtitle1-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
109
+ font-size: var(--ft-typography-subtitle1-font-size, var(--ft-typography-font-size, 16px));
110
+ font-weight: var(--ft-typography-subtitle1-font-weight, var(--ft-typography-font-weight, 600));
111
+ letter-spacing: var(--ft-typography-subtitle1-letter-spacing, var(--ft-typography-letter-spacing, 0.144px));
112
+ line-height: var(--ft-typography-subtitle1-line-height, var(--ft-typography-line-height, 24px));
113
+ text-transform: var(--ft-typography-subtitle1-text-transform, var(--ft-typography-text-transform, inherit));
114
+ }
115
+ `,Rt=a`
116
+ .ft-typography--subtitle2 {
117
+ font-family: var(--ft-typography-subtitle2-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
118
+ font-size: var(--ft-typography-subtitle2-font-size, var(--ft-typography-font-size, 14px));
119
+ font-weight: var(--ft-typography-subtitle2-font-weight, var(--ft-typography-font-weight, normal));
120
+ letter-spacing: var(--ft-typography-subtitle2-letter-spacing, var(--ft-typography-letter-spacing, 0.098px));
121
+ line-height: var(--ft-typography-subtitle2-line-height, var(--ft-typography-line-height, 24px));
122
+ text-transform: var(--ft-typography-subtitle2-text-transform, var(--ft-typography-text-transform, inherit));
123
+ }
124
+
125
+ `,Ft=a`
126
+ .ft-typography--body1 {
127
+ font-family: var(--ft-typography-body1-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
128
+ font-size: var(--ft-typography-body1-font-size, var(--ft-typography-font-size, 16px));
129
+ font-weight: var(--ft-typography-body1-font-weight, var(--ft-typography-font-weight, normal));
130
+ letter-spacing: var(--ft-typography-body1-letter-spacing, var(--ft-typography-letter-spacing, 0.496px));
131
+ line-height: var(--ft-typography-body1-line-height, var(--ft-typography-line-height, 24px));
132
+ text-transform: var(--ft-typography-body1-text-transform, var(--ft-typography-text-transform, inherit));
133
+ }
134
+ `,Dt=a`
135
+ .ft-typography--body2 {
136
+ font-family: var(--ft-typography-body2-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
137
+ font-size: var(--ft-typography-body2-font-size, var(--ft-typography-font-size, 14px));
138
+ font-weight: var(--ft-typography-body2-font-weight, var(--ft-typography-font-weight, normal));
139
+ letter-spacing: var(--ft-typography-body2-letter-spacing, var(--ft-typography-letter-spacing, 0.252px));
140
+ line-height: var(--ft-typography-body2-line-height, var(--ft-typography-line-height, 20px));
141
+ text-transform: var(--ft-typography-body2-text-transform, var(--ft-typography-text-transform, inherit));
142
+ }
143
+ `,It=a`
144
+ .ft-typography--caption {
145
+ font-family: var(--ft-typography-caption-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
146
+ font-size: var(--ft-typography-caption-font-size, var(--ft-typography-font-size, 12px));
147
+ font-weight: var(--ft-typography-caption-font-weight, var(--ft-typography-font-weight, normal));
148
+ letter-spacing: var(--ft-typography-caption-letter-spacing, var(--ft-typography-letter-spacing, 0.396px));
149
+ line-height: var(--ft-typography-caption-line-height, var(--ft-typography-line-height, 16px));
150
+ text-transform: var(--ft-typography-caption-text-transform, var(--ft-typography-text-transform, inherit));
151
+ }
152
+ `,Ut=a`
153
+ .ft-typography--breadcrumb {
154
+ font-family: var(--ft-typography-breadcrumb-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
155
+ font-size: var(--ft-typography-breadcrumb-font-size, var(--ft-typography-font-size, 10px));
156
+ font-weight: var(--ft-typography-breadcrumb-font-weight, var(--ft-typography-font-weight, normal));
157
+ letter-spacing: var(--ft-typography-breadcrumb-letter-spacing, var(--ft-typography-letter-spacing, 0.33px));
158
+ line-height: var(--ft-typography-breadcrumb-line-height, var(--ft-typography-line-height, 16px));
159
+ text-transform: var(--ft-typography-breadcrumb-text-transform, var(--ft-typography-text-transform, inherit));
160
+ }
161
+ `,Bt=a`
162
+ .ft-typography--overline {
163
+ font-family: var(--ft-typography-overline-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
164
+ font-size: var(--ft-typography-overline-font-size, var(--ft-typography-font-size, 10px));
165
+ font-weight: var(--ft-typography-overline-font-weight, var(--ft-typography-font-weight, normal));
166
+ letter-spacing: var(--ft-typography-overline-letter-spacing, var(--ft-typography-letter-spacing, 1.5px));
167
+ line-height: var(--ft-typography-overline-line-height, var(--ft-typography-line-height, 16px));
168
+ text-transform: var(--ft-typography-overline-text-transform, var(--ft-typography-text-transform, uppercase));
169
+ }
170
+ `,Ht=a`
171
+ .ft-typography--button {
172
+ font-family: var(--ft-typography-button-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
173
+ font-size: var(--ft-typography-button-font-size, var(--ft-typography-font-size, 14px));
174
+ font-weight: var(--ft-typography-button-font-weight, var(--ft-typography-font-weight, 600));
175
+ letter-spacing: var(--ft-typography-button-letter-spacing, var(--ft-typography-letter-spacing, 1.246px));
176
+ line-height: var(--ft-typography-button-line-height, var(--ft-typography-line-height, 16px));
177
+ text-transform: var(--ft-typography-button-text-transform, var(--ft-typography-text-transform, uppercase));
178
+ }
179
+ `;let Pt=class extends kt{constructor(){super(...arguments),this.variant=Tt.body1}getStyles(){return[Ct,_t,Mt,Rt,Ft,Dt,It,Ut,Bt,Ht]}getTemplate(){return this.element?Et`
180
+ <${At(this.element)}
181
+ class="ft-typography ft-typography--${this.variant}">
182
+ <slot></slot>
183
+ </${At(this.element)}>
184
+ `:Et`
185
+ <slot class="ft-typography ft-typography--${this.variant}"></slot>
186
+ `}};jt([ot()],Pt.prototype,"element",void 0),jt([ot()],Pt.prototype,"variant",void 0),Pt=jt([xt("ft-typography")],Pt);var Lt=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Nt=class extends kt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[It,a`.ft-input-label{position:absolute;inset:0;display:flex}.ft-input-label{border-color:var(--ft-input-label-border-color,var(--ft-color-outline,rgba(0,0,0,.14)))}.ft-input-label:after,.ft-input-label:before{content:"";display:flex;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit}.ft-input-label:before{width:var(--ft-input-label-horizontal-spacing,12px);flex-shrink:0}.ft-input-label:after{flex-grow:1;flex-shrink:1}.ft-input-label--text{display:flex;flex-shrink:1;position:relative;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit;padding:0 4px;color:var(--ft-input-label-text-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)));transition:font-size 250ms,line-height 250ms,color 250ms;--ft-typography-font-size:var(--ft-input-label-font-size, 14px);--ft-typography-line-height:var(--ft-input-label-font-size, 14px)}.ft-input-label--disabled .ft-input-label--text{color:var(--ft-input-label-text-color,var(--ft-color-on-surface-disabled,rgba(0,0,0,.38)))}.ft-input-label--hidden-text{opacity:0}.ft-input-label--floating-text{position:absolute;top:calc(50% - var(--ft-typography-line-height)/ 2);transition:top 250ms;width:calc(100% - 8px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--ft-input-label-vertical-spacing,4px) 0;margin:calc(var(--ft-input-label-vertical-spacing,4px) * -1) 0}.ft-input-label--raised .ft-input-label--text{--ft-typography-font-size:var(--ft-input-label-raised-font-size, 11px);--ft-typography-line-height:var(--ft-input-label-raised-font-size, 11px)}.ft-input-label--raised .ft-input-label--floating-text{top:var(--ft-input-label-vertical-spacing,4px)}.ft-input-label--outlined .ft-input-label--text,.ft-input-label--outlined:after,.ft-input-label--outlined:before{border-top-width:1px;border-top-style:solid}.ft-input-label--outlined:before{border-left-width:1px;border-left-style:solid;border-radius:var(--ft-border-radius-S,4px) 0 0 var(--ft-border-radius-S,4px)}.ft-input-label--outlined:after{border-right-width:1px;border-right-style:solid;border-radius:0 var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text{top:calc(var(--ft-typography-line-height)/ -2)}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text{border-top:none}`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return R`<div class="${ft(t)}">${this.text?R`<div class="ft-input-label--text ft-typography--caption"><span class="ft-input-label--floating-text">${this.text}</span> <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span></div>`:null}</div>`}};Nt.elementDefinitions={},Lt([ot({type:String})],Nt.prototype,"text",void 0),Lt([ot({type:Boolean})],Nt.prototype,"raised",void 0),Lt([ot({type:Boolean})],Nt.prototype,"outlined",void 0),Lt([ot({type:Boolean})],Nt.prototype,"disabled",void 0),Nt=Lt([xt("ft-input-label")],Nt);
187
+ /*! *****************************************************************************
188
+ Copyright (c) Microsoft Corporation.
189
+
190
+ Permission to use, copy, modify, and/or distribute this software for any
191
+ purpose with or without fee is hereby granted.
192
+
193
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
194
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
195
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
196
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
197
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
198
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
199
+ PERFORMANCE OF THIS SOFTWARE.
200
+ ***************************************************************************** */
201
+ var Vt=function(t,e){return Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Vt(t,e)};var Gt=function(){return Gt=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Gt.apply(this,arguments)};function qt(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n}function Wt(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
202
+ /**
203
+ * @license
204
+ * Copyright 2018 Google Inc.
205
+ *
206
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
207
+ * of this software and associated documentation files (the "Software"), to deal
208
+ * in the Software without restriction, including without limitation the rights
209
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
210
+ * copies of the Software, and to permit persons to whom the Software is
211
+ * furnished to do so, subject to the following conditions:
212
+ *
213
+ * The above copyright notice and this permission notice shall be included in
214
+ * all copies or substantial portions of the Software.
215
+ *
216
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
217
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
218
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
219
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
220
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
221
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
222
+ * THE SOFTWARE.
223
+ */
224
+ /**
225
+ * @license
226
+ * Copyright 2018 Google LLC
227
+ * SPDX-License-Identifier: Apache-2.0
228
+ */
229
+ const Kt=()=>{},Zt={get passive(){return!1}};document.addEventListener("x",Kt,Zt),document.removeEventListener("x",Kt);
230
+ /**
231
+ * @license
232
+ * Copyright 2018 Google LLC
233
+ * SPDX-License-Identifier: Apache-2.0
234
+ */
235
+ class Jt extends tt{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()}}
236
+ /**
237
+ * @license
238
+ * Copyright 2016 Google Inc.
239
+ *
240
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
241
+ * of this software and associated documentation files (the "Software"), to deal
242
+ * in the Software without restriction, including without limitation the rights
243
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
244
+ * copies of the Software, and to permit persons to whom the Software is
245
+ * furnished to do so, subject to the following conditions:
246
+ *
247
+ * The above copyright notice and this permission notice shall be included in
248
+ * all copies or substantial portions of the Software.
249
+ *
250
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
251
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
252
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
253
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
254
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
255
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
256
+ * THE SOFTWARE.
257
+ */var Xt=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Yt={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"},Qt={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"},te={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
258
+ /**
259
+ * @license
260
+ * Copyright 2016 Google Inc.
261
+ *
262
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
263
+ * of this software and associated documentation files (the "Software"), to deal
264
+ * in the Software without restriction, including without limitation the rights
265
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
266
+ * copies of the Software, and to permit persons to whom the Software is
267
+ * furnished to do so, subject to the following conditions:
268
+ *
269
+ * The above copyright notice and this permission notice shall be included in
270
+ * all copies or substantial portions of the Software.
271
+ *
272
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
274
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
278
+ * THE SOFTWARE.
279
+ */
280
+ /**
281
+ * @license
282
+ * Copyright 2016 Google Inc.
283
+ *
284
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
285
+ * of this software and associated documentation files (the "Software"), to deal
286
+ * in the Software without restriction, including without limitation the rights
287
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
288
+ * copies of the Software, and to permit persons to whom the Software is
289
+ * furnished to do so, subject to the following conditions:
290
+ *
291
+ * The above copyright notice and this permission notice shall be included in
292
+ * all copies or substantial portions of the Software.
293
+ *
294
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
295
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
296
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
297
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
298
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
299
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
300
+ * THE SOFTWARE.
301
+ */
302
+ var ee=["touchstart","pointerdown","mousedown","keydown"],ie=["touchend","pointerup","mouseup","contextmenu"],re=[],oe=function(t){function e(i){var r=t.call(this,Gt(Gt({},e.defaultAdapter),i))||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(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Vt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Yt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Qt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return te},enumerable:!1,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,o=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(a),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=Wt(ee),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=Wt(ie),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=Wt(ee),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=Wt(ie),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&re.length>0&&re.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(re.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){re=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,o=i.VAR_FG_TRANSLATE_END,a=e.cssClasses,n=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,l=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",p="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),f=d.startPoint,u=d.endPoint;c=f.x+"px, "+f.y+"px",p=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(r,c),this.adapter.updateCssVariable(o,p),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(n),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),l)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,o,a=e.x,n=e.y,s=a+i.left,l=n+i.top;if("touchstart"===t.type){var c=t;r=c.changedTouches[0].pageX-s,o=c.changedTouches[0].pageY-l}else{var p=t;r=p.pageX-s,o=p.pageY-l}return{x:r,y:o}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:t={x:t.x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,o=r.hasDeactivationUXRun,a=r.isActivated;(o||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),te.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=Gt({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,o=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,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(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(Xt),ae=oe;
303
+ /**
304
+ * @license
305
+ * Copyright 2018 Google LLC
306
+ * SPDX-License-Identifier: BSD-3-Clause
307
+ */
308
+ const ne=pt(class extends dt{constructor(t){var e;if(super(t),t.type!==lt||"style"!==t.name||(null===(e=t.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,i)=>{const r=t[i];return null==r?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?i.setProperty(t,r):i[t]=r)}return F}});
309
+ /**
310
+ * @license
311
+ * Copyright 2018 Google LLC
312
+ * SPDX-License-Identifier: Apache-2.0
313
+ */class se extends Jt{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=ae}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){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:t=>{switch(t){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:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}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(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"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 R`<div class="mdc-ripple-surface mdc-ripple-upgraded ${ft(i)}" style="${ne({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}qt([nt(".mdc-ripple-surface")],se.prototype,"mdcRoot",void 0),qt([ot({type:Boolean})],se.prototype,"primary",void 0),qt([ot({type:Boolean})],se.prototype,"accent",void 0),qt([ot({type:Boolean})],se.prototype,"unbounded",void 0),qt([ot({type:Boolean})],se.prototype,"disabled",void 0),qt([ot({type:Boolean})],se.prototype,"activated",void 0),qt([ot({type:Boolean})],se.prototype,"selected",void 0),qt([ot({type:Boolean})],se.prototype,"internalUseStateLayerCustomProperties",void 0),qt([at()],se.prototype,"hovering",void 0),qt([at()],se.prototype,"bgFocused",void 0),qt([at()],se.prototype,"fgActivation",void 0),qt([at()],se.prototype,"fgDeactivation",void 0),qt([at()],se.prototype,"fgScale",void 0),qt([at()],se.prototype,"fgSize",void 0),qt([at()],se.prototype,"translateStart",void 0),qt([at()],se.prototype,"translateEnd",void 0),qt([at()],se.prototype,"leftPos",void 0),qt([at()],se.prototype,"topPos",void 0);
314
+ /**
315
+ * @license
316
+ * Copyright 2021 Google LLC
317
+ * SPDX-LIcense-Identifier: Apache-2.0
318
+ */
319
+ const le=a`.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:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{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::after,.mdc-ripple-surface::before{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]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{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::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.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:.12;opacity:var(--mdc-ripple-press-opacity,.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(.4,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::after,.mdc-ripple-surface--primary::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.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:.12;opacity:var(--mdc-ripple-focus-opacity,.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:.12;opacity:var(--mdc-ripple-press-opacity,.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:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--primary--activated::after,.mdc-ripple-surface--primary--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.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:.24;opacity:var(--mdc-ripple-focus-opacity,.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:.24;opacity:var(--mdc-ripple-press-opacity,.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:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--primary--selected::after,.mdc-ripple-surface--primary--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.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:.2;opacity:var(--mdc-ripple-focus-opacity,.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:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::after,.mdc-ripple-surface--accent::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.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:.12;opacity:var(--mdc-ripple-focus-opacity,.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:.12;opacity:var(--mdc-ripple-press-opacity,.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:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--accent--activated::after,.mdc-ripple-surface--accent--activated::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.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:.24;opacity:var(--mdc-ripple-focus-opacity,.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:.24;opacity:var(--mdc-ripple-press-opacity,.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:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--accent--selected::after,.mdc-ripple-surface--accent--selected::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.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:.2;opacity:var(--mdc-ripple-focus-opacity,.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:.2;opacity:var(--mdc-ripple-press-opacity,.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::after,.mdc-ripple-surface--internal-use-state-layer-custom-properties::before{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color,#000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-state-layer-opacity,.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:.12;opacity:var(--mdc-ripple-focus-state-layer-opacity,.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:.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity,.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)}`
320
+ /**
321
+ * @license
322
+ * Copyright 2018 Google LLC
323
+ * SPDX-License-Identifier: Apache-2.0
324
+ */;let ce=class extends se{};ce.styles=[le],ce=qt([it("mwc-ripple")],ce);
325
+ /**
326
+ * @license
327
+ * Copyright 2020 Google LLC
328
+ * SPDX-License-Identifier: Apache-2.0
329
+ */
330
+ class pe{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}var de=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let fe=class extends kt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a`:host{display:contents;--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-content, #000));--mdc-ripple-press-opacity:var(--ft-opacity-color-content-on-surface-pressed, 0.1);--mdc-ripple-hover-opacity:var(--ft-opacity-color-content-on-surface-hover, 0.04);--mdc-ripple-focus-opacity:var(--ft-opacity-color-content-on-surface-focused, 0.12);--mdc-ripple-selected-opacity:var(--ft-opacity-color-content-on-surface-selected, 0.08);--mdc-ripple-activated-opacity:var(--ft-opacity-color-content-on-surface-dragged, 0.08)}mwc-ripple.ft-ripple--secondary{--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-secondary, #FFCC80))}mwc-ripple.ft-ripple--primary{--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-primary, #2196F3))}`}getTemplate(){return R`<mwc-ripple class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}" ?unbounded="${this.unbounded}" ?activated="${this.activated}" ?selected="${this.selected}" ?disabled="${this.disabled}"></mwc-ripple>`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new pe((async()=>this.mwcRipple)),i=e=>i=>{window.addEventListener(e,t.endPress,{once:!0}),t.startPress(i)},r=i("mouseup"),o=i("touchend"),a=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",a),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",a),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};fe.elementDefinitions={"mwc-ripple":ce},de([ot({type:Boolean})],fe.prototype,"primary",void 0),de([ot({type:Boolean})],fe.prototype,"secondary",void 0),de([ot({type:Boolean})],fe.prototype,"unbounded",void 0),de([ot({type:Boolean})],fe.prototype,"activated",void 0),de([ot({type:Boolean})],fe.prototype,"selected",void 0),de([ot({type:Boolean})],fe.prototype,"disabled",void 0),de([nt("mwc-ripple")],fe.prototype,"mwcRipple",void 0),fe=de([xt("ft-ripple")],fe);
331
+ /**
332
+ * @license
333
+ * Copyright 2021 Google LLC
334
+ * SPDX-LIcense-Identifier: Apache-2.0
335
+ */
336
+ const ue=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;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"}`
337
+ /**
338
+ * @license
339
+ * Copyright 2018 Google LLC
340
+ * SPDX-License-Identifier: Apache-2.0
341
+ */;let he=class extends tt{render(){return R`<span><slot></slot></span>`}};he.styles=[ue],he=qt([it("mwc-icon")],he);var ve=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};t.FtSelectOption=class extends kt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return R``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}},t.FtSelectOption.elementDefinitions={},ve([ot({type:String})],t.FtSelectOption.prototype,"label",void 0),ve([ot({type:Object,converter:t=>t})],t.FtSelectOption.prototype,"value",void 0),ve([ot({type:Boolean,reflect:!0})],t.FtSelectOption.prototype,"selected",void 0),t.FtSelectOption=ve([xt("ft-select-option")],t.FtSelectOption),t.FtSelect=class extends kt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=()=>this.optionsDisplayed=!1}getStyles(){return[Dt,It,a`:focus{outline:0}.ft-select{display:flex;flex-direction:column;align-items:stretch}.ft-select--main-panel{position:relative;display:flex;height:calc(4 * var(--ft-select-vertical-spacing,4px) + var(--ft-select-label-size,11px) + var(--ft-select-selected-option-size,14px))}.ft-select--input-panel{flex-grow:1;position:relative;display:flex;align-items:center;overflow:hidden;padding-left:16px;padding-right:8px;gap:8px}.ft-select--input-panel,.ft-select--option{color:var(--ft-color-on-surface,rgba(0,0,0,.87));--ft-opacity-color-content-on-surface-hover:0.08;--ft-opacity-color-content-on-surface-dragged:0.04}.ft-select--disabled .ft-select--input-panel,.ft-select--disabled .ft-select--option{color:var(--ft-color-on-surface-disabled,rgba(0,0,0,.38))}.ft-select:not(.ft-select--disabled) .ft-select--input-panel{cursor:pointer}ft-input-label{--ft-input-label-font-size:var(--ft-select-selected-option-size, 14px);--ft-input-label-raised-font-size:var(--ft-select-label-size, 11px);--ft-input-label-vertical-spacing:var(--ft-select-vertical-spacing, 4px)}.ft-select:not(.ft-select--disabled):focus-within ft-input-label{--ft-input-label-border-color:var(--ft-color-primary, #2196F3);--ft-input-label-text-color:var(--ft-color-primary, #2196F3)}.ft-select--selected-option{display:block;flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--ft-typography-font-size:var(--ft-select-selected-option-size, 14px);--ft-typography-line-height:var(--ft-select-selected-option-size, 14px)}mwc-icon{flex-shrink:0}slot{display:none}.ft-select--filled .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0 0}.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option{align-self:stretch;padding-top:calc(var(--ft-select-label-size,11px) + 2 * var(--ft-select-vertical-spacing,4px))}.ft-select--outlined .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px)}.ft-select--options{display:none;position:absolute;top:100%;left:0;right:0;background:var(--ft-color-surface,#fff);z-index:var(--ft-select-options-z-index,1);box-shadow:var(--ft-elevation-02,0 4px 10px 0 rgba(0,0,0,.06),0 2px 5px 0 rgba(0,0,0,.14),0 0 1px 0 rgba(0,0,0,.06))}.ft-select--options-displayed .ft-select--options{display:block}.ft-select--option{position:relative;padding:4px 16px;min-height:32px;display:flex;align-items:center}.ft-select--helper-text{padding:0 12px 0 16px;color:var(--ft-select-helper-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)))}`]}getTemplate(){var t,e,i,r,o;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,n=this.disabled||!this.hasOptions;const s={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":n,"ft-select--options-displayed":a,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return R`<div class="${ft(s)}" @click="${t=>t.stopPropagation()}" part="container"><div class="ft-select--main-panel" part="main-panel"><ft-input-label text="${this.label}" part="label" ?disabled="${n}" ?outlined="${this.outlined}" ?raised="${null!=(null===(e=this.selectedOption)||void 0===e?void 0:e.value)||a}"></ft-input-label><div class="ft-select--input-panel" part="selected-value" tabindex="${n?"-1":"0"}" @click="${()=>this.optionsDisplayed=!this.optionsDisplayed}" @keydown="${this.onMainPanelKeyDown}" aria-label="${this.label}" aria-haspopup="listbox" aria-expanded="${a}">${this.outlined?null:R`<ft-ripple ?disabled="${n}" activated></ft-ripple>`}<ft-typography variant="body1" class="ft-select--selected-option">${null!=(null===(i=this.selectedOption)||void 0===i?void 0:i.value)&&null!==(o=null===(r=this.selectedOption)||void 0===r?void 0:r.label)&&void 0!==o?o:""}</ft-typography><mwc-icon>${a?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-select--options" part="options" @keydown="${this.onOptionsKeyDown}" innerrole="listbox">${wt(this.options,(t=>t.value),(t=>this.renderOption(t)))}</div></div>${this.helper?R`<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}</ft-typography>`:void 0}</div><slot @slotchange="${this.updateOptionsFromSlot}" @option-change="${this.updateOptionsFromSlot}"></slot>`}renderOption(t){let e=this.selectedOption===t;return R`<div class="${ft({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}" part="option" tabindex="0" @keydown="${e=>this.onOptionKeyDown(e,t)}" @click="${()=>this.selectOption(t)}"><ft-ripple ?primary="${e}" ?activated="${e}"></ft-ripple>${t.label}</div>`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,a;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(a=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}},t.FtSelect.elementDefinitions={"ft-input-label":Nt,"ft-typography":Pt,"ft-ripple":fe,"mwc-icon":he},ve([ot({type:String})],t.FtSelect.prototype,"label",void 0),ve([ot({type:String})],t.FtSelect.prototype,"helper",void 0),ve([ot({type:Boolean})],t.FtSelect.prototype,"outlined",void 0),ve([ot({type:Boolean})],t.FtSelect.prototype,"disabled",void 0),ve([ot({type:Array})],t.FtSelect.prototype,"options",void 0),ve([at()],t.FtSelect.prototype,"selectedOption",void 0),ve([at()],t.FtSelect.prototype,"optionsDisplayed",void 0),ve([at()],t.FtSelect.prototype,"focusOptions",void 0),ve([nt(".ft-select--input-panel")],t.FtSelect.prototype,"mainPanel",void 0),ve([nt(".ft-select--option:first-child")],t.FtSelect.prototype,"firstOption",void 0),ve([nt(".ft-select--option:focus")],t.FtSelect.prototype,"focusedOption",void 0),ve([nt(".ft-select--option.ft-select--option-selected")],t.FtSelect.prototype,"selectedOptionElement",void 0),ve([nt(".ft-select--option:last-child")],t.FtSelect.prototype,"lastOption",void 0),ve([nt("slot")],t.FtSelect.prototype,"optionsSlot",void 0),t.FtSelect=ve([xt("ft-select")],t.FtSelect),Object.defineProperty(t,"t",{value:!0})}({});
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@fluid-topics/ft-select",
3
+ "version": "0.0.88",
4
+ "description": "Value selector for a predefined list of choices",
5
+ "keywords": [
6
+ "Lit"
7
+ ],
8
+ "author": "Fluid Topics <devtopics@antidot.net>",
9
+ "license": "ISC",
10
+ "main": "build/ft-select.js",
11
+ "web": "build/ft-select.min.js",
12
+ "typings": "build/ft-select",
13
+ "files": [
14
+ "build/*.ts",
15
+ "build/*.js"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
+ },
21
+ "dependencies": {
22
+ "@fluid-topics/ft-input-label": "^0.0.88",
23
+ "@fluid-topics/ft-ripple": "^0.0.88",
24
+ "@fluid-topics/ft-typography": "^0.0.88",
25
+ "@fluid-topics/ft-wc-utils": "^0.0.88",
26
+ "@material/mwc-icon": "^0.25.3",
27
+ "lit": "^2.0.2"
28
+ },
29
+ "gitHead": "220e53dba55dfa1de1560abbc30067555f72198c"
30
+ }