/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { FocusKeyManager } from '@angular/cdk/a11y';
import { Directionality } from '@angular/cdk/bidi';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { SelectionModel } from '@angular/cdk/collections';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, Input, Optional, Output, QueryList, Self, ViewEncapsulation, } from '@angular/core';
import { FormGroupDirective, NgControl, NgForm, Validators, } from '@angular/forms';
import { ErrorStateMatcher, mixinErrorState } from '@angular/material/core';
import { MatLegacyFormFieldControl } from '@angular/material/legacy-form-field';
import { merge, Subject } from 'rxjs';
import { startWith, takeUntil } from 'rxjs/operators';
import { MatLegacyChip } from './chip';
import * as i0 from "@angular/core";
import * as i1 from "@angular/cdk/bidi";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/core";
// Boilerplate for applying mixins to MatChipList.
/** @docs-private */
const _MatChipListBase = mixinErrorState(class {
constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup,
/**
* Form control bound to the component.
* Implemented as part of `MatFormFieldControl`.
* @docs-private
*/
ngControl) {
this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
this._parentForm = _parentForm;
this._parentFormGroup = _parentFormGroup;
this.ngControl = ngControl;
/**
* Emits whenever the component state changes and should cause the parent
* form-field to update. Implemented as part of `MatFormFieldControl`.
* @docs-private
*/
this.stateChanges = new Subject();
}
});
// Increasing integer for generating unique ids for chip-list components.
let nextUniqueId = 0;
/**
* Change event object that is emitted when the chip list value has changed.
* @deprecated Use `MatChipListChange` from `@angular/material/chips` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyChipListChange {
constructor(
/** Chip list that emitted the event. */
source,
/** Value of the chip list when the event was emitted. */
value) {
this.source = source;
this.value = value;
}
}
/**
* A material design chips component (named ChipList for its similarity to the List component).
* @deprecated Use `MatChipList` from `@angular/material/chips` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyChipList extends _MatChipListBase {
/** The array of selected chips inside chip list. */
get selected() {
return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0];
}
/** The ARIA role applied to the chip list. */
get role() {
if (this._explicitRole) {
return this._explicitRole;
}
return this.empty ? null : 'listbox';
}
set role(role) {
this._explicitRole = role;
}
/** Whether the user should be allowed to select multiple chips. */
get multiple() {
return this._multiple;
}
set multiple(value) {
this._multiple = coerceBooleanProperty(value);
this._syncChipsState();
}
/**
* A function to compare the option values with the selected values. The first argument
* is a value from an option. The second is a value from the selection. A boolean
* should be returned.
*/
get compareWith() {
return this._compareWith;
}
set compareWith(fn) {
this._compareWith = fn;
if (this._selectionModel) {
// A different comparator means the selection could change.
this._initializeSelection();
}
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get value() {
return this._value;
}
set value(value) {
this.writeValue(value);
this._value = value;
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get id() {
return this._chipInput ? this._chipInput.id : this._uid;
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get required() {
return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
}
set required(value) {
this._required = coerceBooleanProperty(value);
this.stateChanges.next();
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get placeholder() {
return this._chipInput ? this._chipInput.placeholder : this._placeholder;
}
set placeholder(value) {
this._placeholder = value;
this.stateChanges.next();
}
/** Whether any chips or the matChipInput inside of this chip-list has focus. */
get focused() {
return (this._chipInput && this._chipInput.focused) || this._hasFocusedChip();
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get empty() {
return (!this._chipInput || this._chipInput.empty) && (!this.chips || this.chips.length === 0);
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get shouldLabelFloat() {
return !this.empty || this.focused;
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
get disabled() {
return this.ngControl ? !!this.ngControl.disabled : this._disabled;
}
set disabled(value) {
this._disabled = coerceBooleanProperty(value);
this._syncChipsState();
}
/**
* Whether or not this chip list is selectable. When a chip list is not selectable,
* the selected states for all the chips inside the chip list are always ignored.
*/
get selectable() {
return this._selectable;
}
set selectable(value) {
this._selectable = coerceBooleanProperty(value);
this._syncChipsState();
}
set tabIndex(value) {
this._userTabIndex = value;
this._tabIndex = value;
}
/** Combined stream of all of the child chips' selection change events. */
get chipSelectionChanges() {
return merge(...this.chips.map(chip => chip.selectionChange));
}
/** Combined stream of all of the child chips' focus change events. */
get chipFocusChanges() {
return merge(...this.chips.map(chip => chip._onFocus));
}
/** Combined stream of all of the child chips' blur change events. */
get chipBlurChanges() {
return merge(...this.chips.map(chip => chip._onBlur));
}
/** Combined stream of all of the child chips' remove change events. */
get chipRemoveChanges() {
return merge(...this.chips.map(chip => chip.destroyed));
}
constructor(_elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, ngControl) {
super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);
this._elementRef = _elementRef;
this._changeDetectorRef = _changeDetectorRef;
this._dir = _dir;
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
this.controlType = 'mat-chip-list';
/**
* When a chip is destroyed, we store the index of the destroyed chip until the chips
* query list notifies about the update. This is necessary because we cannot determine an
* appropriate chip that should receive focus until the array of chips updated completely.
*/
this._lastDestroyedChipIndex = null;
/** Subject that emits when the component has been destroyed. */
this._destroyed = new Subject();
/** Uid of the chip list */
this._uid = `mat-chip-list-${nextUniqueId++}`;
/** Tab index for the chip list. */
this._tabIndex = 0;
/**
* User defined tab index.
* When it is not null, use user defined tab index. Otherwise use _tabIndex
*/
this._userTabIndex = null;
/** Function when touched */
this._onTouched = () => { };
/** Function when changed */
this._onChange = () => { };
this._multiple = false;
this._compareWith = (o1, o2) => o1 === o2;
this._disabled = false;
/** Orientation of the chip list. */
this.ariaOrientation = 'horizontal';
this._selectable = true;
/** Event emitted when the selected chip list value has been changed by the user. */
this.change = new EventEmitter();
/**
* Event that emits whenever the raw value of the chip-list changes. This is here primarily
* to facilitate the two-way binding for the `value` input.
* @docs-private
*/
this.valueChange = new EventEmitter();
if (this.ngControl) {
this.ngControl.valueAccessor = this;
}
}
ngAfterContentInit() {
this._keyManager = new FocusKeyManager(this.chips)
.withWrap()
.withVerticalOrientation()
.withHomeAndEnd()
.withHorizontalOrientation(this._dir ? this._dir.value : 'ltr');
if (this._dir) {
this._dir.change
.pipe(takeUntil(this._destroyed))
.subscribe(dir => this._keyManager.withHorizontalOrientation(dir));
}
this._keyManager.tabOut.subscribe(() => this._allowFocusEscape());
// When the list changes, re-subscribe
this.chips.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {
if (this.disabled || !this.selectable) {
// Since this happens after the content has been
// checked, we need to defer it to the next tick.
Promise.resolve().then(() => {
this._syncChipsState();
});
}
this._resetChips();
// Reset chips selected/deselected status
this._initializeSelection();
// Check to see if we need to update our tab index
this._updateTabIndex();
// Check to see if we have a destroyed chip and need to refocus
this._updateFocusForDestroyedChips();
this.stateChanges.next();
});
}
ngOnInit() {
this._selectionModel = new SelectionModel(this.multiple, undefined, false);
this.stateChanges.next();
}
ngDoCheck() {
if (this.ngControl) {
// We need to re-evaluate this on every change detection cycle, because there are some
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
// that whatever logic is in here has to be super lean or we risk destroying the performance.
this.updateErrorState();
if (this.ngControl.disabled !== this._disabled) {
this.disabled = !!this.ngControl.disabled;
}
}
}
ngOnDestroy() {
this._keyManager?.destroy();
this._destroyed.next();
this._destroyed.complete();
this.stateChanges.complete();
this._dropSubscriptions();
}
/** Associates an HTML input element with this chip list. */
registerInput(inputElement) {
this._chipInput = inputElement;
// We use this attribute to match the chip list to its input in test harnesses.
// Set the attribute directly here to avoid "changed after checked" errors.
this._elementRef.nativeElement.setAttribute('data-mat-chip-input', inputElement.id);
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
setDescribedByIds(ids) {
if (ids.length) {
this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));
}
else {
this._elementRef.nativeElement.removeAttribute('aria-describedby');
}
}
// Implemented as part of ControlValueAccessor.
writeValue(value) {
if (this.chips) {
this._setSelectionByValue(value, false);
}
}
// Implemented as part of ControlValueAccessor.
registerOnChange(fn) {
this._onChange = fn;
}
// Implemented as part of ControlValueAccessor.
registerOnTouched(fn) {
this._onTouched = fn;
}
// Implemented as part of ControlValueAccessor.
setDisabledState(isDisabled) {
this.disabled = isDisabled;
this.stateChanges.next();
}
/**
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
onContainerClick(event) {
if (!this._originatesFromChip(event)) {
this.focus();
}
}
/**
* Focuses the first non-disabled chip in this chip list, or the associated input when there
* are no eligible chips.
*/
focus(options) {
if (this.disabled) {
return;
}
// TODO: ARIA says this should focus the first `selected` chip if any are selected.
// Focus on first element if there's no chipInput inside chip-list
if (this._chipInput && this._chipInput.focused) {
// do nothing
}
else if (this.chips.length > 0) {
this._keyManager.setFirstItemActive();
this.stateChanges.next();
}
else {
this._focusInput(options);
this.stateChanges.next();
}
}
/** Attempt to focus an input if we have one. */
_focusInput(options) {
if (this._chipInput) {
this._chipInput.focus(options);
}
}
/**
* Pass events to the keyboard manager. Available here for tests.
*/
_keydown(event) {
const target = event.target;
if (target && target.classList.contains('mat-chip')) {
this._keyManager.onKeydown(event);
this.stateChanges.next();
}
}
/**
* Check the tab index as you should not be allowed to focus an empty list.
*/
_updateTabIndex() {
// If we have 0 chips, we should not allow keyboard focus
this._tabIndex = this._userTabIndex || (this.chips.length === 0 ? -1 : 0);
}
/**
* If the amount of chips changed, we need to update the
* key manager state and focus the next closest chip.
*/
_updateFocusForDestroyedChips() {
// Move focus to the closest chip. If no other chips remain, focus the chip-list itself.
if (this._lastDestroyedChipIndex != null) {
if (this.chips.length) {
const newChipIndex = Math.min(this._lastDestroyedChipIndex, this.chips.length - 1);
this._keyManager.setActiveItem(newChipIndex);
}
else {
this.focus();
}
}
this._lastDestroyedChipIndex = null;
}
/**
* Utility to ensure all indexes are valid.
*
* @param index The index to be checked.
* @returns True if the index is valid for our list of chips.
*/
_isValidIndex(index) {
return index >= 0 && index < this.chips.length;
}
_setSelectionByValue(value, isUserInput = true) {
this._clearSelection();
this.chips.forEach(chip => chip.deselect());
if (Array.isArray(value)) {
value.forEach(currentValue => this._selectValue(currentValue, isUserInput));
this._sortValues();
}
else {
const correspondingChip = this._selectValue(value, isUserInput);
// Shift focus to the active item. Note that we shouldn't do this in multiple
// mode, because we don't know what chip the user interacted with last.
if (correspondingChip) {
if (isUserInput) {
this._keyManager.setActiveItem(correspondingChip);
}
}
}
}
/**
* Finds and selects the chip based on its value.
* @returns Chip that has the corresponding value.
*/
_selectValue(value, isUserInput = true) {
const correspondingChip = this.chips.find(chip => {
return chip.value != null && this._compareWith(chip.value, value);
});
if (correspondingChip) {
isUserInput ? correspondingChip.selectViaInteraction() : correspondingChip.select();
this._selectionModel.select(correspondingChip);
}
return correspondingChip;
}
_initializeSelection() {
// Defer setting the value in order to avoid the "Expression
// has changed after it was checked" errors from Angular.
Promise.resolve().then(() => {
if (this.ngControl || this._value) {
this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);
this.stateChanges.next();
}
});
}
/**
* Deselects every chip in the list.
* @param skip Chip that should not be deselected.
*/
_clearSelection(skip) {
this._selectionModel.clear();
this.chips.forEach(chip => {
if (chip !== skip) {
chip.deselect();
}
});
this.stateChanges.next();
}
/**
* Sorts the model values, ensuring that they keep the same
* order that they have in the panel.
*/
_sortValues() {
if (this._multiple) {
this._selectionModel.clear();
this.chips.forEach(chip => {
if (chip.selected) {
this._selectionModel.select(chip);
}
});
this.stateChanges.next();
}
}
/** Emits change event to set the model value. */
_propagateChanges(fallbackValue) {
let valueToEmit = null;
if (Array.isArray(this.selected)) {
valueToEmit = this.selected.map(chip => chip.value);
}
else {
valueToEmit = this.selected ? this.selected.value : fallbackValue;
}
this._value = valueToEmit;
this.change.emit(new MatLegacyChipListChange(this, valueToEmit));
this.valueChange.emit(valueToEmit);
this._onChange(valueToEmit);
this._changeDetectorRef.markForCheck();
}
/** When blurred, mark the field as touched when focus moved outside the chip list. */
_blur() {
if (!this._hasFocusedChip()) {
this._keyManager.setActiveItem(-1);
}
if (!this.disabled) {
if (this._chipInput) {
// If there's a chip input, we should check whether the focus moved to chip input.
// If the focus is not moved to chip input, mark the field as touched. If the focus moved
// to chip input, do nothing.
// Timeout is needed to wait for the focus() event trigger on chip input.
setTimeout(() => {
if (!this.focused) {
this._markAsTouched();
}
});
}
else {
// If there's no chip input, then mark the field as touched.
this._markAsTouched();
}
}
}
/** Mark the field as touched */
_markAsTouched() {
this._onTouched();
this._changeDetectorRef.markForCheck();
this.stateChanges.next();
}
/**
* Removes the `tabindex` from the chip list and resets it back afterwards, allowing the
* user to tab out of it. This prevents the list from capturing focus and redirecting
* it back to the first chip, creating a focus trap, if it user tries to tab away.
*/
_allowFocusEscape() {
if (this._tabIndex !== -1) {
this._tabIndex = -1;
setTimeout(() => {
this._tabIndex = this._userTabIndex || 0;
this._changeDetectorRef.markForCheck();
});
}
}
_resetChips() {
this._dropSubscriptions();
this._listenToChipsFocus();
this._listenToChipsSelection();
this._listenToChipsRemoved();
}
_dropSubscriptions() {
if (this._chipFocusSubscription) {
this._chipFocusSubscription.unsubscribe();
this._chipFocusSubscription = null;
}
if (this._chipBlurSubscription) {
this._chipBlurSubscription.unsubscribe();
this._chipBlurSubscription = null;
}
if (this._chipSelectionSubscription) {
this._chipSelectionSubscription.unsubscribe();
this._chipSelectionSubscription = null;
}
if (this._chipRemoveSubscription) {
this._chipRemoveSubscription.unsubscribe();
this._chipRemoveSubscription = null;
}
}
/** Listens to user-generated selection events on each chip. */
_listenToChipsSelection() {
this._chipSelectionSubscription = this.chipSelectionChanges.subscribe(event => {
event.source.selected
? this._selectionModel.select(event.source)
: this._selectionModel.deselect(event.source);
// For single selection chip list, make sure the deselected value is unselected.
if (!this.multiple) {
this.chips.forEach(chip => {
if (!this._selectionModel.isSelected(chip) && chip.selected) {
chip.deselect();
}
});
}
if (event.isUserInput) {
this._propagateChanges();
}
});
}
/** Listens to user-generated selection events on each chip. */
_listenToChipsFocus() {
this._chipFocusSubscription = this.chipFocusChanges.subscribe(event => {
let chipIndex = this.chips.toArray().indexOf(event.chip);
if (this._isValidIndex(chipIndex)) {
this._keyManager.updateActiveItem(chipIndex);
}
this.stateChanges.next();
});
this._chipBlurSubscription = this.chipBlurChanges.subscribe(() => {
this._blur();
this.stateChanges.next();
});
}
_listenToChipsRemoved() {
this._chipRemoveSubscription = this.chipRemoveChanges.subscribe(event => {
const chip = event.chip;
const chipIndex = this.chips.toArray().indexOf(event.chip);
// In case the chip that will be removed is currently focused, we temporarily store
// the index in order to be able to determine an appropriate sibling chip that will
// receive focus.
if (this._isValidIndex(chipIndex) && chip._hasFocus) {
this._lastDestroyedChipIndex = chipIndex;
}
});
}
/** Checks whether an event comes from inside a chip element. */
_originatesFromChip(event) {
let currentElement = event.target;
while (currentElement && currentElement !== this._elementRef.nativeElement) {
if (currentElement.classList.contains('mat-chip')) {
return true;
}
currentElement = currentElement.parentElement;
}
return false;
}
/** Checks whether any of the chips is focused. */
_hasFocusedChip() {
return this.chips && this.chips.some(chip => chip._hasFocus);
}
/** Syncs the list's state with the individual chips. */
_syncChipsState() {
if (this.chips) {
this.chips.forEach(chip => {
chip._chipListDisabled = this._disabled;
chip._chipListMultiple = this.multiple;
chip.chipListSelectable = this._selectable;
});
}
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatLegacyChipList, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: MatLegacyChipList, selector: "mat-chip-list", inputs: { role: "role", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], errorStateMatcher: "errorStateMatcher", multiple: "multiple", compareWith: "compareWith", value: "value", required: "required", placeholder: "placeholder", disabled: "disabled", ariaOrientation: ["aria-orientation", "ariaOrientation"], selectable: "selectable", tabIndex: "tabIndex" }, outputs: { change: "change", valueChange: "valueChange" }, host: { attributes: { "ngSkipHydration": "" }, listeners: { "focus": "focus()", "blur": "_blur()", "keydown": "_keydown($event)" }, properties: { "attr.tabindex": "disabled ? null : _tabIndex", "attr.aria-required": "role ? required : null", "attr.aria-disabled": "disabled.toString()", "attr.aria-invalid": "errorState", "attr.aria-multiselectable": "multiple", "attr.role": "role", "class.mat-chip-list-disabled": "disabled", "class.mat-chip-list-invalid": "errorState", "class.mat-chip-list-required": "required", "attr.aria-orientation": "ariaOrientation", "id": "_uid" }, classAttribute: "mat-chip-list" }, providers: [{ provide: MatLegacyFormFieldControl, useExisting: MatLegacyChipList }], queries: [{ propertyName: "chips", predicate: MatLegacyChip, descendants: true }], exportAs: ["matChipList"], usesInheritance: true, ngImport: i0, template: `
`, isInline: true, styles: [".mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-chip::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:\"\";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatLegacyChipList, decorators: [{
type: Component,
args: [{ selector: 'mat-chip-list', template: `
`, exportAs: 'matChipList', host: {
'[attr.tabindex]': 'disabled ? null : _tabIndex',
'[attr.aria-required]': 'role ? required : null',
'[attr.aria-disabled]': 'disabled.toString()',
'[attr.aria-invalid]': 'errorState',
'[attr.aria-multiselectable]': 'multiple',
'[attr.role]': 'role',
'[class.mat-chip-list-disabled]': 'disabled',
'[class.mat-chip-list-invalid]': 'errorState',
'[class.mat-chip-list-required]': 'required',
'[attr.aria-orientation]': 'ariaOrientation',
'class': 'mat-chip-list',
'(focus)': 'focus()',
'(blur)': '_blur()',
'(keydown)': '_keydown($event)',
'[id]': '_uid',
'ngSkipHydration': '',
}, providers: [{ provide: MatLegacyFormFieldControl, useExisting: MatLegacyChipList }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-chip::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:\"\";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}"] }]
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Directionality, decorators: [{
type: Optional
}] }, { type: i2.NgForm, decorators: [{
type: Optional
}] }, { type: i2.FormGroupDirective, decorators: [{
type: Optional
}] }, { type: i3.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
type: Optional
}, {
type: Self
}] }]; }, propDecorators: { role: [{
type: Input
}], userAriaDescribedBy: [{
type: Input,
args: ['aria-describedby']
}], errorStateMatcher: [{
type: Input
}], multiple: [{
type: Input
}], compareWith: [{
type: Input
}], value: [{
type: Input
}], required: [{
type: Input
}], placeholder: [{
type: Input
}], disabled: [{
type: Input
}], ariaOrientation: [{
type: Input,
args: ['aria-orientation']
}], selectable: [{
type: Input
}], tabIndex: [{
type: Input
}], change: [{
type: Output
}], valueChange: [{
type: Output
}], chips: [{
type: ContentChildren,
args: [MatLegacyChip, {
// We need to use `descendants: true`, because Ivy will no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