import * as i6 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Self, Optional, HostBinding, ViewChild, Input, Output, ContentChild, ContentChildren, NgModule } from '@angular/core';
import * as i3 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i10 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i11 from '@angular/material/input';
import { MatInput, MatInputModule } from '@angular/material/input';
import * as i7 from '@deja-js/component/chips';
import { DejaChipsModule } from '@deja-js/component/chips';
import * as i4 from '@deja-js/component/core';
import { DejaConnectionPositionPair, KeyCodes, DejaChildValidatorDirective, DejaChildValidatorModule, MediaModule } from '@deja-js/component/core';
import * as i1 from '@deja-js/component/core/item-list';
import { ItemListBase, ViewPortService, DejaItemComponent, DejaItemModule } from '@deja-js/component/core/item-list';
import * as i8 from '@deja-js/component/loaders';
import { DejaListLoaderModule } from '@deja-js/component/loaders';
import * as i9 from '@deja-js/component/overlay';
import { DejaOverlayComponent, DejaOverlayModule } from '@deja-js/component/overlay';
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
import { MatFormFieldControl } from '@angular/material/form-field';
import { Subject, BehaviorSubject, takeUntil, debounceTime, combineLatestWith, debounce, timer, filter, delayWhen, tap, delay, switchMap, map, take, of, fromEvent, mergeWith } from 'rxjs';
import * as i2 from '@angular/cdk/a11y';
import * as i5 from '@angular/material/core';

/** Combo box avec une liste basée sur la treelist */
class DejaSelectComponent extends ItemListBase {
    constructor(changeDetectorRef, viewPort, fm, elementRef, ngControl, parentForm, parentFormGroup, mediaService, defaultErrorStateMatcher) {
        super(changeDetectorRef, viewPort);
        this.viewPort = viewPort;
        this.fm = fm;
        this.elementRef = elementRef;
        this.ngControl = ngControl;
        this.parentForm = parentForm;
        this.parentFormGroup = parentFormGroup;
        this.defaultErrorStateMatcher = defaultErrorStateMatcher;
        this.id = `deja-select-${DejaSelectComponent.nextId++}`;
        this.describedBy = '';
        this._waiter = false;
        this._disabled = null;
        this._readonly = null;
        /** Offset de position horizontal de la zone de dropdown */
        this.overlayOffsetX = 0;
        /** Offset de position vertical de la zone de dropdown */
        this.overlayOffsetY = 0;
        /** Exécuté lorsque le calcul du viewPort est terminé. */
        this.viewPortChanged = new EventEmitter();
        /** Exécuté lorsque l'utilisateur sélectionne ou désélectionne une ligne. */
        this.selectedChange = new EventEmitter();
        /** For test only. */
        this.dropDownVisibleChange = new EventEmitter();
        this.controlType = 'deja-select';
        this.errorState = false;
        // eslint-disable-next-line rxjs/finnish
        this.stateChanges = new Subject();
        this.dropDownMaxHeight = null;
        this._keyboardNavigation = false;
        this.isMobile = false;
        this._type = 'select';
        this.dropDownQuery = '';
        this.filterExpression = '';
        this._dropdownVisible = false;
        this.lastScrollPosition = 0;
        this._selectionClearable = false;
        this._query = '';
        this._required = false;
        this._focused = false;
        this.clearFilterExpression$ = new BehaviorSubject(null);
        this.filterListComplete$ = new Subject();
        this.storeScrollPosition$ = new Subject();
        this.hideDropDown$ = new Subject();
        this.showDropDown$ = new Subject();
        this.filter$ = new Subject();
        this.query$ = new BehaviorSubject('');
        this.writeValue$ = new Subject();
        this.contentInitialized$ = new Subject();
        this.keyboardNavigation$ = new Subject();
        this.delaySearchTrigger$ = new BehaviorSubject(250);
        this._positions = DejaConnectionPositionPair.default;
        // NgModel implementation
        this.onTouchedCallback = () => undefined;
        this.onChangeCallback = (_a) => undefined;
        this.onValidatorChangeCallback = (_a) => undefined;
        this.overlayOwnerElement = this.elementRef.nativeElement;
        if (this.ngControl) {
            this.ngControl.valueAccessor = this;
        }
        this.fm.monitor(elementRef.nativeElement, true).pipe(takeUntil(this.destroyed$)).subscribe(origin => {
            this._focused = !!origin;
            this.stateChanges.next();
        });
        const setDropDownVisible = (state) => {
            if (state !== this._dropdownVisible) {
                this._dropdownVisible = state;
                this.changeDetectorRef.markForCheck();
                this.dropDownVisibleChange.emit(state);
            }
        };
        mediaService.isMobile$.pipe(takeUntil(this.destroyed$)).subscribe(value => {
            this.isMobile = value;
            this.changeDetectorRef.markForCheck();
        });
        if (this.parentForm) {
            this.parentForm.ngSubmit.pipe(takeUntil(this.destroyed$)).subscribe(() => {
                this.changeDetectorRef.markForCheck();
            });
        }
        if (this.parentFormGroup) {
            this.parentFormGroup.ngSubmit.pipe(takeUntil(this.destroyed$)).subscribe(() => {
                this.changeDetectorRef.markForCheck();
            });
        }
        this.clearFilterExpression$.pipe(debounceTime(750), takeUntil(this.destroyed$)).subscribe(() => this.filterExpression = '');
        this.delaySearchTrigger$.pipe(combineLatestWith(this.filterListComplete$), debounce(([delaySearchTrigger]) => timer(delaySearchTrigger)), takeUntil(this.destroyed$)).subscribe(() => {
            this._itemList = [];
            this.reshowDropDown();
        });
        this.storeScrollPosition$.pipe(takeUntil(this.destroyed$)).subscribe(scrollPos => {
            this.viewPort.scrollPosition$.next(scrollPos);
            this.lastScrollPosition = scrollPos;
        });
        this.hideDropDown$.pipe(filter(() => this.dropdownVisible), delayWhen(time => timer(time || 0)), takeUntil(this.destroyed$)).subscribe(() => {
            delete this.selectingItemIndex;
            setDropDownVisible(false);
            this.viewPort.element$.next(null);
            this.changeDetectorRef.markForCheck();
        });
        this.showDropDown$.pipe(debounceTime(50), filter(() => (this.query || '').length >= this.minSearchlength && !this._readonly), tap(() => {
            // Set overlay origin element
            const originElement = (this.isMobile && document.body) || this.htmlInputElement || this.elementRef.nativeElement;
            // Calc max height
            if (this.isMobile) {
                this.dropDownMaxHeight = document.body.clientHeight;
            }
            else if (this.maxHeight) {
                this.dropDownMaxHeight = this.maxHeight;
            }
            else {
                const originRect = originElement.getBoundingClientRect();
                const maxHeight = document.body.clientHeight;
                this.dropDownMaxHeight = Math.max(originRect.top, maxHeight - originRect.bottom, 25) - 25;
            }
            // Ensure dropDowsQuery if autocomplete and minSearchLength
            if (!this.dropDownQuery && this.isModeAutocomplete && this.minSearchlength > 0 && this.query && this.query.length > this.minSearchlength) {
                this.dropDownQuery = this.query;
            }
            // Display overlay
            setDropDownVisible(true);
            this.changeDetectorRef.markForCheck();
        }), delay(1), filter(() => this.dropdownVisible), // Show canceled by the hide$ observable if !dropdownVisible
        switchMap(() => this.calcViewList$()), tap(() => {
            const selectedItems = this.getSelectedItems();
            const firstItem = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems[0];
            const index = firstItem ? this.getItemIndex(firstItem) : -1;
            if (index >= 0) {
                // Ensure selection
                this.setSelectedItems(selectedItems);
                this.currentItemIndex = index;
                this.ensureItemVisible(index);
            }
            else if (this.listElement) {
                // Restore scroll Position
                this.ensureItemVisible(null);
                this.listElement.scrollTop = this.lastScrollPosition;
            }
        }), delay(1), filter(() => this.dropdownVisible), // Show canceled by the hide$ observable if !dropdownVisible
        tap(() => {
            this.viewPort.element$.next(this.listElement);
        }), delay(1), takeUntil(this.destroyed$)).subscribe(() => {
            // View port calculated
            this.overlay.updatePosition();
        });
        this.keyboardNavigation$.pipe(tap(() => this._keyboardNavigation = true), debounceTime(1000), takeUntil(this.destroyed$)).subscribe(() => {
            this._keyboardNavigation = false;
            this.changeDetectorRef.markForCheck();
        });
        this.query$.pipe(tap(query => this._query = query), filter(() => !!this.input), delay(1), takeUntil(this.destroyed$)).subscribe(() => {
            // **** Force place holder to refresh to escape input angular material issue ****
            this.changeDetectorRef.markForCheck();
        });
        this.writeValue$.pipe(combineLatestWith(this.contentInitialized$), map(([value]) => value), tap(value => {
            if (this.modelIsValue === undefined) {
                if (value instanceof Array) {
                    const av = value || [];
                    const modelType = av.length && typeof av[0];
                    this.modelIsValue = modelType === 'string' || modelType === 'number';
                }
                else {
                    const modelType = typeof value;
                    this.modelIsValue = value === '' || modelType === 'string' || modelType === 'number';
                }
            }
            if (this.modelIsValue) {
                this.query = '';
            }
            return value;
        }), map(value => this.getVirtualSelectedEntities(value)), switchMap(value => {
            var _b;
            if (!value) {
                if ((_b = this.selectedItems) === null || _b === void 0 ? void 0 : _b.length) {
                    this.removeSelection();
                }
            }
            else if (this._multiSelect) {
                this.query = '';
                super.setSelectedModels(value);
                super.getItemListService().ensureSelection();
            }
            else {
                const v = value instanceof Array ? [value[0]] : [value];
                const item = super.mapToIItemBase(v)[0];
                return this.unselectAll$().pipe(switchMap(() => item ? this.toggleSelect$([item], true) : []), map(() => super.getItemListService().ensureSelection()), tap(() => this.ensureSelection()), take(1));
            }
            return of(null);
        }), takeUntil(this.destroyed$)).subscribe(() => this.changeDetectorRef.markForCheck());
        this._viewPortChanged = this.viewPortChanged;
        this.maxHeight = 0;
    }
    get shouldLabelFloat() {
        return this.focused || !this.empty;
    }
    /** Définit une valeur indiquant si en reactive form le model renvoyé doit être un object ou une valeur */
    set modelIsValue(value) {
        this._modelIsValue = coerceBooleanProperty(value);
    }
    get modelIsValue() {
        return this._modelIsValue;
    }
    set positions(value) {
        this._positions = typeof value === 'string' ? DejaConnectionPositionPair.parse(value) : value;
    }
    get positions() {
        return this._positions;
    }
    set dropDownWidth(value) {
        this._dropDownWidth = coerceNumberProperty(value);
    }
    get dropDownWidth() {
        var _b;
        return this._dropDownWidth || ((_b = this.elementRef) === null || _b === void 0 ? void 0 : _b.nativeElement.clientWidth);
    }
    get keyboardNavigation() {
        return this._keyboardNavigation;
    }
    get required() {
        return this._required;
    }
    set required(req) {
        this._required = coerceBooleanProperty(req);
        this.stateChanges.next();
    }
    /**
     * Placeholder of the input
     */
    get placeholder() {
        return this._placeholder;
    }
    set placeholder(plh) {
        this._placeholder = plh;
        this.stateChanges.next();
    }
    get empty() {
        return !this.value;
    }
    get focused() {
        return this._focused;
    }
    set options(options) {
        if (!this.items && (options === null || options === void 0 ? void 0 : options.length)) {
            const selectedModels = [];
            this.valueField = 'value';
            this.textField = 'text';
            const models = options.map(option => {
                const model = {
                    text: option.text,
                    value: option.value
                };
                if (option.selected) {
                    selectedModels.push(model);
                }
                return model;
            });
            this.models = models;
            if (selectedModels.length) {
                this.selectedModels = selectedModels;
            }
            if (models.length > 100) {
                // tslint:disable-next-line:no-debugger
                console.error('Select options with more than 100 items can have performance options. Please bind directly the items in code behind with items or models input.');
            }
        }
    }
    /** Correspond au model du champ de filtrage ou recherche */
    set query(value) {
        this.query$.next(value);
    }
    get query() {
        return this._query;
    }
    /** Temps d'attente en ms avant que la recherche dans la liste soit lancée lorsque l'utilisateur tape dans le select */
    // eslint-disable-next-line @angular-eslint/no-input-rename
    set delaySearchTrigger(value) {
        this.delaySearchTrigger$.next(value);
    }
    /** Définit la longueur minimale de caractères dans le champ de recherche avant que la recherche ou le filtrage soient effectués */
    // eslint-disable-next-line @angular-eslint/no-input-rename
    set minSearchlength(value) {
        this._minSearchLength = coerceNumberProperty(value);
    }
    get minSearchlength() {
        return this._minSearchLength;
    }
    /** Permet de désactiver le select */
    set disabled(value) {
        const disabled = coerceBooleanProperty(value);
        this._disabled = disabled || null;
        this.changeDetectorRef.markForCheck();
    }
    get disabled() {
        return this.ngControl ? this.ngControl.disabled : this._disabled;
    }
    /** Indique ou détermine si le bouton pour effacer la selection doit être affiché */
    set selectionClearable(value) {
        this._selectionClearable = coerceBooleanProperty(value);
    }
    get selectionClearable() {
        return this._selectionClearable;
    }
    set hideSelected(value) {
        this.setHideSelected(coerceBooleanProperty(value));
    }
    /** Renvoie une valeur indiquant si les éléments selectionés doivent être masqué de la liste déroulante. */
    get hideSelected() {
        return this._hideSelected;
    }
    /** Définit la ligne courant ou ligne active */
    set currentItem(item) {
        super.setCurrentItem(item);
        if (item) {
            this.ensureItemVisible(item);
        }
    }
    /** Définit le nombre de lignes à sauter en cas de pression sur les touches PageUp ou PageDown */
    set pageSize(value) {
        this._pageSize = coerceNumberProperty(value);
    }
    /** Retourne le nombre de lignes à sauter en cas de pression sur les touches PageUp ou PageDown */
    get pageSize() {
        if (this._pageSize === 0) {
            const vpRowHeight = this.getViewPortRowHeight();
            const containerElement = this.listElement;
            const containerHeight = (containerElement === null || containerElement === void 0 ? void 0 : containerElement.clientHeight) || this.dropDownMaxHeight;
            return Math.floor(containerHeight / vpRowHeight);
        }
        return this._pageSize;
    }
    /** Définit un texte de conseil en cas d'erreur de validation ou autre */
    set hintLabel(value) {
        this.setHintLabel(value);
    }
    /** Retourne un texte de conseil en cas d'erreur de validation ou autre */
    get hintLabel() {
        return this._hintLabel;
    }
    /** Définit la hauteur d'une ligne pour le calcul du viewport en pixels (la valeur par défaut sera utilisée si aucune valeur n'est définie). */
    set viewPortRowHeight(value) {
        this.setViewPortRowHeight(value);
    }
    /**
     * Les trois valeurs acceptés en paramètre se trouvent dans l'enum ViewportMode (disabled, fixed, variable, auto)
     * Attention, une désactivation du viewport dégrade considérablement les performances de la liste et ne doit pas être activée si la liste
     * est suceptible de contenir beaucoup d'éléments.
     */
    set viewportMode(mode) {
        this.setViewportMode(mode);
    }
    /** Retourne le champ utilisé pour la liste des enfants d'un parent */
    set childrenField(value) {
        super.setChildrenField(value);
    }
    /** Définit le champ utilisé pour la liste des enfants d'un parent */
    get childrenField() {
        return this._childrenField;
    }
    /** Définit le champ à utiliser comme valeur d'affichage. */
    set textField(value) {
        super.setTextField(value);
    }
    /** Retourne le champ à utiliser comme valeur d'affichage. */
    get textField() {
        return super.getTextField();
    }
    /** Définit le champ à utiliser comme valeur de comparaison. */
    set valueField(value) {
        super.setValueField(value);
    }
    /** Retourne le champ à utiliser comme valeur de comparaison. */
    get valueField() {
        return super.getValueField();
    }
    /** Définit le champ à utiliser comme champ de recherche.
     * Ce champ peut indiquer, un champ contenant une valeur, un texte indexé, ou une fonction.
     */
    set searchField(value) {
        super.setSearchField(value);
    }
    /** Retourne le champ à utiliser comme champ de recherche.
     * Ce champ peut indiquer, un champ contenant une valeur, un texte indexé, ou une fonction.
     */
    get searchField() {
        return this._searchField;
    }
    set type(type) {
        if (type !== 'autocomplete' && type !== 'multiselect' && type !== 'select') {
            throw new Error('Invalid type property for DejaSelectComponent. Type can be select, autocomplete or multiselect.');
        }
        this._type = type;
        this.setMultiSelect(this._type === 'multiselect');
        this.changeDetectorRef.markForCheck();
    }
    get type() {
        return this._type;
    }
    /**
     * Set an observable called before the list will be displayed
     */
    set loadingItems(fn) {
        super.setLoadingItems(fn);
    }
    /**
     * Set a promise or an observable called before an item selection
     */
    set selectingItem(fn) {
        super.setSelectingItem(fn);
    }
    /**
     * Set a promise or an observable called before an item deselection
     */
    set unselectingItem(fn) {
        super.setUnselectingItem(fn);
    }
    /**
     * Set a promise or an observable called before an item expand
     */
    set expandingItem(fn) {
        super.setExpandingItem(fn);
    }
    /**
     * Set a promise or an observable called before an item collapse
     */
    set collapsingItem(fn) {
        super.setCollapsingItem(fn);
    }
    /** Retourne si le select est en mode select, donc en lecture seule. */
    get isModeSelect() {
        return this._type === 'select';
    }
    /** Retourne si le select est en mode autocomplete */
    get isModeAutocomplete() {
        return this._type === 'autocomplete';
    }
    /** Définit la liste des éléments selectionés en mode multiselect */
    set selectedItems(value) {
        this.setSelectedItems(value);
    }
    /** Retourne la liste des éléments selectionés en mode multiselect */
    get selectedItems() {
        return super.getSelectedItems();
    }
    /** Définit l'éléments selectioné en mode single select */
    set selectedItem(value) {
        this.setSelectedItems(value !== undefined && value !== null ? [value] : []);
    }
    /** Retourne l'élément selectioné en mode single select */
    get selectedItem() {
        const selectedItem = super.getSelectedItems();
        return selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[0];
    }
    /** Définit le model selectioné en mode single select */
    set selectedModel(value) {
        this.writeValue(value);
    }
    /** Retourne le model selectioné en mode single select */
    get selectedModel() {
        const selectedModel = super.getSelectedModels();
        return selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel[0];
    }
    /** Définit la liste des models selectionés en mode multiselect */
    set selectedModels(value) {
        this.writeValue(value);
    }
    /** Retourne la liste des models selectionés en mode multiselect */
    get selectedModels() {
        return super.getSelectedModels();
    }
    /** Definit le service de liste utilisé par ce composant. Ce service permet de controller dynamiquement la liste, ou de faire du lazyloading. */
    set itemListService(itemListService) {
        this.setItemListService(itemListService);
        if (itemListService === null || itemListService === void 0 ? void 0 : itemListService.lastQuery) {
            this.query = itemListService.lastQuery.toString();
        }
    }
    /** Retourne le service de liste utilisé par ce composant. Ce service permet de controller dynamiquement la liste, ou de faire du lazyloading. */
    get itemListService() {
        return this.getItemListService();
    }
    /** Definit le service utilisé pour le tri de la liste */
    set sortingService(value) {
        this.setSortingService(value);
    }
    /** Definit le service utilisé pour le regroupement de la liste */
    set groupingService(value) {
        this.setGroupingService(value);
    }
    /** Definit si le waiter doit être affiché dans le select. */
    set waiter(value) {
        this._waiter = value;
    }
    /** Retourne si le waiter doit être affiché dans le select. */
    get waiter() {
        return this._waiter;
    }
    /** Définit la liste des éléments au format IItemBase */
    set items(items) {
        super.setItems$(items).pipe(take(1), tap(() => this.ensureSelection()), switchMap(() => this.calcViewList$()), takeUntil(this.destroyed$)).subscribe();
    }
    /** Définit la liste des éléments (tout type d'objet métier) */
    set models(items) {
        super.setModels$(items).pipe(take(1), tap(() => this.ensureSelection()), switchMap(() => this.calcViewList$()), takeUntil(this.destroyed$)).subscribe();
    }
    /** Retourne le nombre de niveau pour une liste hierarchique */
    get depthMax() {
        return this._depthMax;
    }
    /** Définit la hauteur maximum avant que le composant affiche une scrollbar
     * spécifier une grande valeur pour ne jamais afficher de scrollbar
     * Spécifier 0 pour que le composant determine sa hauteur à partir du container
     */
    set maxHeight(value) {
        super.setMaxHeight(value);
    }
    /** Retourne la hauteur maximum avant que le composant affiche une scrollbar
     * spécifier une grande valeur pour ne jamais afficher de scrollbar
     * Spécifier 0 pour que le composant determine sa hauteur à partir du container
     */
    get maxHeight() {
        return this.getMaxHeight();
    }
    set readonly(value) {
        const readonly = coerceBooleanProperty(value);
        this._readonly = readonly || null;
        this.changeDetectorRef.markForCheck();
    }
    /** Retourne une valeur indiquant si le composant est en lecture seule */
    get readonly() {
        return this._readonly;
    }
    set inputValidatorDirective(value) {
        if (value) {
            value.parentControl = this.ngControl;
        }
    }
    set currentItemIndex(value) {
        super.setCurrentItemIndex(value);
        this.changeDetectorRef.markForCheck();
    }
    get currentItemIndex() {
        return this.getCurrentItemIndex();
    }
    get itemTemplate() {
        return this.itemTemplateExternal || this.itemTemplateInternal;
    }
    get parentItemTemplate() {
        return this.parentItemTemplateExternal || this.parentItemTemplateInternal;
    }
    get htmlInputElement() {
        var _b;
        return (_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.nativeElement;
    }
    get loaderTemplate() {
        return this.loaderTemplateExternal || this.loaderTemplateInternal;
    }
    get dropdownVisible() {
        return this._dropdownVisible;
    }
    // ************* ControlValueAccessor Implementation **************
    get value() {
        return this._multiSelect ? this.selectedItems : this.selectedItem;
    }
    set value(val) {
        this.writeValue(val);
        this.onChangeCallback(val);
        this.onTouchedCallback();
        this.stateChanges.next();
    }
    writeValue(value) {
        this.writeValue$.next(value);
    }
    registerOnChange(fn) {
        this.onChangeCallback = fn;
    }
    registerOnTouched(fn) {
        this.onTouchedCallback = fn;
    }
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
    }
    // ************* End of ControlValueAccessor Implementation **************
    ngDoCheck() {
        if (this.ngControl) {
            this.updateErrorState();
        }
    }
    ngOnDestroy() {
        this.stateChanges.complete();
        this.fm.stopMonitoring(this.elementRef.nativeElement);
    }
    ngAfterContentInit() {
        this.contentInitialized$.next(true);
        if (this.ngControl) {
            this.ngControl.valueChanges.pipe(filter(() => !!this.input), takeUntil(this.destroyed$)).subscribe(() => {
                if (this.ngControl.touched) {
                    this.input.ngControl.control.markAsTouched();
                }
                this.input.ngControl.control.updateValueAndValidity();
            });
        }
        this.overlayOwnerElement = this.elementRef.nativeElement;
        if (this.overlayOwnerElement.parentElement.className.includes('mat-form-field-infix')) {
            this.overlayOwnerElement = this.overlayOwnerElement.parentElement;
        }
    }
    ngAfterViewInit() {
        fromEvent(this.htmlInputElement, 'click').pipe(filter(() => !this.dropdownVisible && !this.disabled), takeUntil(this.destroyed$)).subscribe(_event => {
            if (this.isModeSelect) {
                this.showDropDown();
            }
        });
        fromEvent(this.htmlInputElement, 'focus').pipe(filter(() => !this.dropdownVisible && !this.disabled), delay(10), filter(() => this.htmlInputElement === document.activeElement), takeUntil(this.destroyed$)).subscribe(event => {
            if (this.isModeSelect) {
                this.showDropDown();
            }
            else {
                this.filter$.next(event);
            }
        });
        fromEvent(this.htmlInputElement, 'blur').pipe(filter(() => this.selectingItemIndex === undefined), takeUntil(this.destroyed$)).subscribe(() => {
            this.onTouchedCallback();
            this.hideDropDown$.next(10);
        });
        fromEvent(this.htmlInputElement, 'keydown').pipe(mergeWith(fromEvent(this.elementRef.nativeElement, 'keydown')), filter(event => {
            if (event.defaultPrevented) {
                return false;
            }
            const keyCode = event.code;
            return keyCode === KeyCodes.Home ||
                keyCode === KeyCodes.End ||
                keyCode === KeyCodes.PageUp ||
                keyCode === KeyCodes.PageDown ||
                keyCode === KeyCodes.UpArrow ||
                keyCode === KeyCodes.DownArrow ||
                keyCode === KeyCodes.Space ||
                keyCode === KeyCodes.Enter;
        }), switchMap(event => this.ensureListCaches$().pipe(switchMap(() => {
            // Set and get current index for keyboard features only
            const setCurrentIndex = (index, item) => {
                this.currentItemIndex = index;
                if (this.dropdownVisible) {
                    this.ensureItemVisible(this.currentItemIndex);
                    this.viewPort.refresh();
                }
                if (!this._multiSelect) {
                    item = item || super.getCurrentItem();
                    this.select(item, false);
                }
            };
            switch (event.code) {
                case KeyCodes.Home:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        setCurrentIndex(0);
                    }
                    return of(false);
                case KeyCodes.End:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        setCurrentIndex(Math.max(0, this.rowsCount - 1));
                    }
                    return of(false);
                case KeyCodes.PageUp:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        const index = Math.max(0, this.currentItemIndex - this._pageSize);
                        setCurrentIndex(index);
                    }
                    return of(false);
                case KeyCodes.PageDown:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        const index = Math.min(this.rowsCount - 1, this.currentItemIndex + this._pageSize);
                        setCurrentIndex(index);
                    }
                    return of(false);
                case KeyCodes.UpArrow:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        const index = Math.max(0, this.currentItemIndex - 1);
                        setCurrentIndex(index);
                    }
                    return of(false);
                case KeyCodes.DownArrow:
                    if (event.altKey || this._multiSelect && !this.dropdownVisible) {
                        this.toggleDropDown();
                    }
                    else {
                        const index = Math.min(this.rowsCount - 1, this.currentItemIndex + 1);
                        setCurrentIndex(index);
                    }
                    return of(false);
                case KeyCodes.Space:
                    if (this.dropdownVisible) {
                        const item = this._itemList[this.currentItemIndex - this.vpStartRow];
                        if (this.isCollapsible(item)) {
                            this.keyboardNavigation$.next();
                            const treeItem = item;
                            return this.toggleCollapse$(this.currentItemIndex, !treeItem.collapsed).pipe(map(() => false));
                        }
                    }
                    return of(!this.isModeSelect);
                // Do not break or return here
                // tslint:disable-next-line:no-switch-case-fall-through
                case KeyCodes.Enter:
                    if (this.dropdownVisible) {
                        const item = this._itemList[this.currentItemIndex - this.vpStartRow];
                        this.select(item);
                    }
                    return of(false);
                default:
                    return of(true);
            }
        }), filter(continuePropagation => !continuePropagation), map(() => {
            this.keyboardNavigation$.next();
            this.changeDetectorRef.markForCheck();
            event.preventDefault();
            return false;
        }))), takeUntil(this.destroyed$)).subscribe();
        const keyUp$ = fromEvent(this.htmlInputElement, 'keyup').pipe(filter(event => {
            const keyCode = event.code;
            return keyCode >= KeyCodes.Key0 ||
                keyCode === KeyCodes.Backspace ||
                keyCode === KeyCodes.Space ||
                keyCode === KeyCodes.Delete;
        }));
        keyUp$.pipe(mergeWith(this.filter$), tap(() => {
            if ((this.query || '').length < this.minSearchlength) {
                this._itemList = [];
                this.hideDropDown();
                return;
            }
        }), switchMap(event => {
            // console.log('select.component, keycode:' + event.code);
            this.keyboardNavigation$.next();
            if (this.isModeSelect) {
                const keyboardEvent = event;
                // Select, search on the list
                if ((/[a-zA-Z0-9]/).test(keyboardEvent.key)) {
                    // Valid char
                    this.clearFilterExpression$.next(null);
                    // Search next
                    this.filterExpression += keyboardEvent.key;
                    const rg = new RegExp(`^${this.filterExpression}`, 'i');
                    return this.findNextMatch$(item => {
                        if (item && this.isSelectable(item)) {
                            const label = this.getTextValue(item);
                            if (rg.test(label)) {
                                return true;
                            }
                        }
                        return false;
                    }, this.currentItemIndex).pipe(take(1));
                }
            }
            else {
                // Autocomplete, filter the list
                this.filterListComplete$.next();
            }
            return of(null);
        }), filter(result => (result === null || result === void 0 ? void 0 : result.index) >= 0), takeUntil(this.destroyed$)).subscribe(result => {
            // Set and get current index for keyboard features only
            this.currentItemIndex = result.index;
            if (this.dropdownVisible) {
                this.ensureItemVisible(this.currentItemIndex);
            }
            if (!this._multiSelect) {
                const item = result.item || super.getCurrentItem();
                this.select(item, false);
            }
        });
    }
    setDescribedByIds(ids) {
        this.describedBy = ids.join(' ');
    }
    onContainerClick(event) {
        if (event.target.tagName.toLowerCase() !== 'input') {
            this.elementRef.nativeElement.querySelector('input').focus();
        }
    }
    /** Change l'état d'expansion de toute les lignes parentes */
    toggleAll$(collapsed) {
        return super.toggleAll$(collapsed).pipe(switchMap(items => this.calcViewList$().pipe(take(1), map(() => items))));
    }
    /** Change l'état d'expansion de toute les lignes parentes */
    toggleAll(collapsed) {
        this.toggleAll$(collapsed).pipe(take(1), takeUntil(this.destroyed$)).subscribe();
    }
    /** Change l'état d'expansion de la ligne spécifiée
     * @param index  Index sur la liste des éléments visibles de l'élément à changer.
     * @param collapsed  Etat de l'élément. True pour réduire l'élément.
     * @return Observable résolu par la fonction.
     */
    toggleCollapse$(index, collapsed) {
        return super.toggleCollapse$(index, collapsed).pipe(tap(() => {
            if (this.dropdownVisible) {
                this.reshowDropDown();
            }
        }));
    }
    /** Change l'état d'expansion de la ligne spécifiée
     * @param index  Index sur la liste des éléments visibles de l'élément à changer.
     * @param collapsed  Etat de l'élément. True pour réduire l'élément.
     */
    toggleCollapse(index, collapsed) {
        this.toggleCollapse$(index, collapsed).pipe(take(1), takeUntil(this.destroyed$)).subscribe();
    }
    queryChanged(value) {
        this.query = value;
        if (!this.isModeSelect) {
            // Autocomplete or multiselect only
            this.dropDownQuery = this.query;
            if (this.isModeAutocomplete) {
                this.unselectAll$().pipe(take(1), takeUntil(this.destroyed$)).subscribe(() => this.onModelChange());
            }
        }
    }
    hideDropDown() {
        this.hideDropDown$.next(null);
    }
    scroll(event) {
        const element = event.target;
        this.storeScrollPosition$.next(element.scrollTop);
    }
    mousedown(e) {
        if (this.mouseUp$sub) {
            this.mouseUp$sub.unsubscribe();
            this.mouseUp$sub = undefined;
        }
        this.selectingItemIndex = this.getItemIndexFromHTMLElement(e.target);
        this.mouseUp$sub = fromEvent(this.listElement, 'mouseup').pipe(switchMap(upEvent => {
            const itemIndex = this.getItemIndexFromHTMLElement(upEvent.target);
            if (itemIndex === undefined || this.selectingItemIndex === undefined || itemIndex !== this.selectingItemIndex) {
                return of(null);
            }
            const item = this._itemList[itemIndex - this.vpStartRow];
            if (!item || upEvent.button !== 0) {
                // Right click menu
                return of(null);
            }
            const isExpandButton = (target) => target.id === 'expandbtn' || target.parentElement.id === 'expandbtn';
            if (this.isCollapsible(item) && (isExpandButton(e.target) || !this.isSelectable(item))) {
                if (upEvent.button === 0) {
                    const treeItem = item;
                    return this.toggleCollapse$(itemIndex, !treeItem.collapsed);
                }
            }
            else if (!item.selected) {
                this.select(item);
            }
            return of(null);
        }), takeUntil(this.destroyed$)).subscribe();
    }
    getItemClass(item) {
        var _b;
        const classNames = ['listitem'];
        if (item.className) {
            classNames.push(item.className);
        }
        if (item.collapsing || item.expanding) {
            classNames.push('hide');
        }
        if (item.depth < this.depthMax) {
            classNames.push('parent');
        }
        if (item.collapsed) {
            classNames.push('collapsed');
        }
        if (item.selected) {
            classNames.push('selected');
        }
        if (!((_b = item.selectable) !== null && _b !== void 0 ? _b : true)) {
            classNames.push('unselectable');
        }
        if (item.depth === this._depthMax && item.odd) {
            classNames.push('odd');
        }
        return classNames.join(' ');
    }
    updateErrorState() {
        const oldState = this.errorState;
        const parent = this.parentFormGroup || this.parentForm;
        const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
        const control = this.ngControl ? this.ngControl.control : null;
        const newState = matcher.isErrorState(control, parent);
        if (newState !== oldState) {
            this.errorState = newState;
            this.stateChanges.next();
        }
    }
    clearSelection() {
        this.removeSelection();
    }
    onClearQuery(clickEvent) {
        this.onRemoveSelection();
        clickEvent.stopPropagation();
        return false;
    }
    onRemoveSelection(closeEvent) {
        if (this.ngControl) {
            this.ngControl.control.markAsTouched();
        }
        this.removeSelection(closeEvent === null || closeEvent === void 0 ? void 0 : closeEvent.item);
    }
    onOpenClicked(event) {
        if (this.dropdownVisible || this.disabled) {
            return;
        }
        if (this.isModeSelect) {
            this.showDropDown();
        }
        else {
            this.htmlInputElement.select();
            this.filter$.next(event);
        }
    }
    toggleDropDown() {
        if (this.dropdownVisible) {
            this.hideDropDown();
        }
        else {
            this.showDropDown();
        }
    }
    showDropDown() {
        this.showDropDown$.next();
    }
    removeSelection(item) {
        if (!this._multiSelect) {
            this.query = '';
            this.dropDownQuery = '';
            this.setSelectedItems(null);
            this.onModelChange();
            delete this.selectingItemIndex;
        }
        else if (item) {
            this.toggleSelect$([item], false).pipe(take(1), takeUntil(this.destroyed$)).subscribe(selectedItems => {
                const selected = [...selectedItems];
                this.setSelectedItems(selected);
                this.onModelChange(selected);
            });
        }
        else {
            this.unselectAll$().pipe(take(1), takeUntil(this.destroyed$)).subscribe(() => this.onModelChange());
        }
    }
    calcViewList$() {
        return super.calcViewList$(this.dropDownQuery).pipe(tap(() => this.changeDetectorRef.markForCheck()));
    }
    ensureItemVisible(item) {
        super.ensureItemVisible(item);
    }
    onModelChange(items) {
        let outputEmitter = null;
        let output = null;
        if (items) {
            if (Array.isArray(items)) {
                // eslint-disable-next-line @typescript-eslint/no-unsafe-return
                const models = items.map(itm => itm.model !== undefined ? itm.model : itm);
                outputEmitter = {
                    items: items,
                    models: models
                };
                if (this.modelIsValue) {
                    const valueField = this.getValueField();
                    if (models.find((m) => !!m[valueField])) {
                        // eslint-disable-next-line @typescript-eslint/no-unsafe-return
                        output = models.map((m) => m[valueField] !== undefined ? m[valueField] : m);
                    }
                }
                else {
                    output = models;
                }
            }
            else {
                const model = items.model;
                outputEmitter = {
                    item: items,
                    model: model
                };
                if (this.modelIsValue) {
                    const valueField = this.getValueField();
                    output = model[valueField] !== undefined ? model[valueField] : model;
                }
                else {
                    output = items.model !== undefined ? items.model : items;
                }
            }
        }
        this.onChangeCallback(output);
        if (outputEmitter) {
            this.selectedChange.emit(outputEmitter);
        }
    }
    select(item, hideDropDown) {
        if (!this.isSelectable(item)) {
            return;
        }
        if (!item) {
            // this.query = '';
            // this.dropDownQuery = '';
            // this.setSelectedItems(null);
            // this.onModelChange();
            return;
        }
        if (this._multiSelect) {
            this.toggleSelect$([item], true).pipe(take(1), takeUntil(this.destroyed$)).subscribe(selectedItems => {
                const selected = selectedItems ? [...selectedItems] : [];
                this.setSelectedItems(selected);
                this.onModelChange(selected);
                this.query = '';
                this.dropDownQuery = '';
            });
        }
        else {
            this.query = this.getTextValue(item);
            this.setSelectedItems([item]);
            this.onModelChange(item);
        }
        this.htmlInputElement.focus();
        if (hideDropDown !== null && hideDropDown !== void 0 ? hideDropDown : true) {
            this.hideDropDown();
        }
    }
    reshowDropDown() {
        if (!this.dropdownVisible) {
            return this.showDropDown();
        }
        delete this.selectingItemIndex;
        // Restore scroll Position
        const listElement = this.listElement;
        if (listElement) {
            listElement.scrollTop = this.lastScrollPosition;
        }
        this.calcViewList$().pipe(tap(() => this.refreshViewPort()), switchMap(() => this.viewPortChanged), // Wait for viewport calculation
        take(1), delay(1), takeUntil(this.destroyed$)).subscribe(() => {
            // View port calculated
            this.overlay.updatePosition();
            // Ensure selection
            const item = this.getSelectedItems()[0];
            const index = item && this.getItemIndex(item);
            if (index >= 0) {
                this.currentItemIndex = index;
                this.ensureItemVisible(index);
            }
        });
        return undefined;
    }
    ensureSelection() {
        if (this._multiSelect) {
            // Do nothing yet
        }
        else {
            this.query = this.selectedItems.length ? this.getTextValue(this.selectedItems[0]) : '';
        }
    }
}
// eslint-disable-next-line @typescript-eslint/naming-convention
DejaSelectComponent.nextId = 0;
DejaSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ViewPortService }, { token: i2.FocusMonitor }, { token: i0.ElementRef }, { token: i3.NgControl, optional: true, self: true }, { token: i3.NgForm, optional: true }, { token: i3.FormGroupDirective, optional: true }, { token: i4.MediaService }, { token: i5.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component });
DejaSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: DejaSelectComponent, selector: "deja-select", inputs: { nodataholder: "nodataholder", overlayOffsetX: "overlayOffsetX", overlayOffsetY: "overlayOffsetY", overlayBackdropClass: "overlayBackdropClass", overlayContainerClass: "overlayContainerClass", itemTemplateExternal: "itemTemplateExternal", parentItemTemplateExternal: "parentItemTemplateExternal", loaderTemplateExternal: "loaderTemplateExternal", modelIsValue: "modelIsValue", positions: "positions", dropDownWidth: "dropDownWidth", required: "required", placeholder: "placeholder", query: "query", delaySearchTrigger: ["delay-search-trigger", "delaySearchTrigger"], minSearchlength: ["min-search-length", "minSearchlength"], disabled: "disabled", selectionClearable: "selectionClearable", hideSelected: "hideSelected", currentItem: "currentItem", pageSize: "pageSize", hintLabel: "hintLabel", viewPortRowHeight: "viewPortRowHeight", viewportMode: "viewportMode", childrenField: "childrenField", textField: "textField", valueField: "valueField", searchField: "searchField", type: "type", loadingItems: "loadingItems", selectingItem: "selectingItem", unselectingItem: "unselectingItem", expandingItem: "expandingItem", collapsingItem: "collapsingItem", selectedItems: "selectedItems", selectedItem: "selectedItem", selectedModel: "selectedModel", selectedModels: "selectedModels", itemListService: "itemListService", sortingService: "sortingService", groupingService: "groupingService", waiter: "waiter", items: "items", models: "models", maxHeight: "maxHeight", readonly: "readonly" }, outputs: { viewPortChanged: "viewPortChanged", selectedChange: "selectedChange", dropDownVisibleChange: "dropDownVisibleChange" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "attr.wait": "this._waiter", "attr.disabled": "this._disabled", "attr.readonly": "this._readonly", "class.floating": "this.shouldLabelFloat" } }, providers: [
        ViewPortService,
        { provide: MatFormFieldControl, useExisting: DejaSelectComponent }
    ], queries: [{ propertyName: "itemTemplateInternal", first: true, predicate: ["itemTemplate"], descendants: true }, { propertyName: "parentItemTemplateInternal", first: true, predicate: ["parentItemTemplate"], descendants: true }, { propertyName: "selectedTemplate", first: true, predicate: ["selectedTemplate"], descendants: true }, { propertyName: "loaderTemplateInternal", first: true, predicate: ["loaderTemplate"], descendants: true }, { propertyName: "options", predicate: DejaItemComponent }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "input", first: true, predicate: MatInput, descendants: true }, { propertyName: "overlay", first: true, predicate: DejaOverlayComponent, descendants: true, static: true }, { propertyName: "inputValidatorDirective", first: true, predicate: DejaChildValidatorDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<input [placeholder]=\"placeholder\" *ngIf=\"!isMultiSelect\" matInput [disabled]=\"disabled\" [ngModel]=\"query\" #inputElement deja-child-validator type=\"text\" [readonly]=\"isModeSelect || readonly\" (ngModelChange)=\"queryChanged($event)\" autocomplete=\"off\">\n<div *ngIf=\"!disabled && !isMultiSelect\" class=\"actions-suffix\">\n    <mat-icon (click)=\"onClearQuery($event)\" id=\"clear-button\" *ngIf=\"selectionClearable && selectedItems?.length\">clear</mat-icon>\n    <mat-icon (click)=\"onOpenClicked($event)\" id=\"drop-down-button\">arrow_drop_down</mat-icon>\n</div>\n<deja-chips *ngIf=\"isMultiSelect\" [items]=\"selectedItems\" [readonly]=\"readonly\" [disabled]=\"disabled\" (close)=\"onRemoveSelection($event)\" [itemTemplateExternal]=\"selectedTemplate\" [textField]=\"textField\">\n    <ng-template #insertTemplate>\n        <input [placeholder]=\"placeholder\" matInput [disabled]=\"disabled\" [ngModel]=\"query\" #inputElement deja-child-validator type=\"text\" [readonly]=\"isModeSelect || readonly\" (ngModelChange)=\"queryChanged($event)\" autocomplete=\"off\">\n        <div *ngIf=\"!disabled\" class=\"actions-suffix\">\n            <mat-icon id=\"drop-down-button\" (click)=\"onOpenClicked($event)\">arrow_drop_down</mat-icon>\n        </div>\n    </ng-template>\n</deja-chips>\n<deja-overlay #dejaOverlay [overlayBackdropClass]=\"overlayBackdropClass || 'deja-select-backdrop'\" [overlayContainerClass]=\"overlayContainerClass\" [ownerElement]=\"overlayOwnerElement\" [isVisible]=\"dropdownVisible\" (closed)=\"hideDropDown()\" [positions]=\"positions\" [overlayOffsetY]=\"overlayOffsetY\" [overlayOffsetX]=\"overlayOffsetX\" [width]=\"dropDownWidth\" widthForMobile=\"100%\">\n    <div [id]=\"listElementId\" class=\"deja-listcontainer\" [attr.itemscount]=\"itemList?.length\" [attr.depth-max]=\"depthMax || null\" [attr.keynav]=\"keyboardNavigation\" [attr.vprowheight]=\"getViewPortRowHeight()\" (mousedown)=\"mousedown($event)\" (scroll)=\"scroll($event)\" [style.max-height.px]=\"dropDownMaxHeight\">\n        <div id=\"nodata-holder\" *ngIf=\"!treeItemList?.length && !waiter\">{{ nodataholder }}</div>\n        <div *ngIf=\"vpBeforeHeight\" [style.height.px]=\"vpBeforeHeight\"></div>\n        <div *ngFor=\"let item of treeItemList; let index = index\" #listitem [attr.class]=\"getItemClass(item)\" [attr.current]=\"(isMultiSelect && vpStartRow+index === getCurrentItemIndex()) || null\" [attr.depth]=\"depthMax ? item.depth : null\" [attr.id]=\"item.id || null\" [attr.flat]=\"vpStartRow + index\" [style.height.px]=\"getItemHeight(item)\">\n            <span id=\"expandbtn\">\n\t\t\t\t<mat-icon *ngIf=\"item.$items?.length\">arrow_drop_down</mat-icon>\n\t\t\t</span>\n            <ng-container *ngIf=\"(!item.$items || !parentItemTemplate) && (item.$items || !itemTemplate)\">{{ getTextValue(item) }}</ng-container>\n            <ng-container *ngIf=\"item.$items && parentItemTemplate\">\n                <ng-template [ngTemplateOutlet]=\"parentItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item, query: query, flatindex: vpStartRow+index }\"></ng-template>\n            </ng-container>\n            <ng-container *ngIf=\"!item.$items && itemTemplate\">\n                <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item, query: query, flatindex: vpStartRow+index }\"></ng-template>\n            </ng-container>\n        </div>\n        <div *ngIf=\"vpAfterHeight\" [style.height.px]=\"vpAfterHeight\"></div>\n        <deja-list-loader id=\"loader\" *ngIf=\"waiter && !loaderTemplate\"></deja-list-loader>\n        <ng-container *ngIf=\"waiter && loaderTemplate\">\n            <ng-template [ngTemplateOutlet]=\"loaderTemplate\"></ng-template>\n        </ng-container>\n    </div>\n</deja-overlay>\n<div *ngIf=\"hintLabel\" class=\"mat-hint\">{{hintLabel}}</div>\n", styles: ["deja-select{width:100%;white-space:initial;display:flex;align-items:center;min-height:1rem}deja-select>input{flex:1 1 100%}deja-select deja-chips{width:100%}deja-select deja-chips .insert-item{display:flex;align-items:center;height:1.2rem}deja-select .actions-suffix{flex:0 0 auto;text-align:right;overflow:visible;display:flex;align-items:center;height:0}deja-select .actions-suffix #clear-button,deja-select .actions-suffix #drop-down-button{font-size:1.2rem;opacity:.35}deja-select .actions-suffix #clear-button:hover,deja-select .actions-suffix #drop-down-button:hover{opacity:1;cursor:pointer}@keyframes load{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes load-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}.deja-overlay-container .deja-listcontainer{width:100%;text-align:left;overflow-y:auto}.deja-overlay-container .deja-listcontainer div.listitem{white-space:nowrap}.deja-overlay-container .deja-listcontainer div.listitem>deja-bold-query{flex:1 1 100%;overflow:hidden}.deja-overlay-container .deja-listcontainer div.listitem>deja-bold-query div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;width:100%}.deja-overlay-container .deja-listcontainer #expandbtn{min-width:24px}.deja-overlay-container .deja-listcontainer[valign=bottom]{border-top:none}.deja-overlay-container .deja-listcontainer [current=true]{box-shadow:none}.deja-overlay-container .deja-listcontainer[keynav=false] div.listitem:not(.unselectable):hover{cursor:pointer}.deja-overlay-container .deja-listcontainer #nodata-holder{margin:.5rem}.deja-overlay-container .deja-listcontainer #loader .spinner{margin:10px auto}.deja-overlay-container .deja-listcontainer{padding:0;margin:0;position:relative}.deja-overlay-container .deja-listcontainer[vprowheight=\"0\"]>div.listitem{padding:.35rem .1rem}.deja-overlay-container .deja-listcontainer>div.listitem{opacity:1;margin:0;transition-timing-function:linear;transition-duration:.3s;transition-property:max-height,opacity;display:flex;align-items:center}.deja-overlay-container .deja-listcontainer>div.listitem.hide{opacity:0!important;max-height:0!important;transition-timing-function:ease-out}.deja-overlay-container .deja-listcontainer>div.listitem #expandbtn{width:24px;cursor:pointer}.deja-overlay-container .deja-listcontainer>div.listitem.parent.collapsed #expandbtn>.mat-icon{transform:rotate(-90deg)}.deja-overlay-container .deja-listcontainer [depth=\"0\"]{padding-left:0rem}.deja-overlay-container .deja-listcontainer [depth=\"1\"]{padding-left:1rem}.deja-overlay-container .deja-listcontainer [depth=\"2\"]{padding-left:2rem}.deja-overlay-container .deja-listcontainer [depth=\"3\"]{padding-left:3rem}.deja-overlay-container .deja-listcontainer [depth=\"4\"]{padding-left:4rem}.deja-overlay-container .deja-listcontainer [depth=\"5\"]{padding-left:5rem}.deja-overlay-container .deja-listcontainer [depth=\"6\"]{padding-left:6rem}.deja-overlay-container .deja-listcontainer [depth=\"7\"]{padding-left:7rem}.deja-overlay-container .deja-listcontainer [depth=\"8\"]{padding-left:8rem}.deja-overlay-container .deja-listcontainer [depth=\"9\"]{padding-left:9rem}.deja-overlay-container .deja-listcontainer [depth=\"10\"]{padding-left:10rem}.deja-overlay-container .deja-listcontainer [depth=\"11\"]{padding-left:11rem}.deja-overlay-container .deja-listcontainer [depth=\"12\"]{padding-left:12rem}.deja-overlay-container .deja-listcontainer [depth=\"13\"]{padding-left:13rem}.deja-overlay-container .deja-listcontainer [depth=\"14\"]{padding-left:14rem}.deja-overlay-container .deja-listcontainer [depth=\"15\"]{padding-left:15rem}.deja-overlay-container .deja-listcontainer [depth=\"16\"]{padding-left:16rem}.deja-overlay-container .deja-listcontainer [depth=\"17\"]{padding-left:17rem}.deja-overlay-container .deja-listcontainer [depth=\"18\"]{padding-left:18rem}.deja-overlay-container .deja-listcontainer [depth=\"19\"]{padding-left:19rem}.deja-overlay-container .deja-listcontainer [depth=\"20\"]{padding-left:20rem}.deja-overlay-container .deja-listcontainer [depth=\"21\"]{padding-left:21rem}.deja-overlay-container .deja-listcontainer [depth=\"22\"]{padding-left:22rem}.deja-overlay-container .deja-listcontainer [depth=\"23\"]{padding-left:23rem}.deja-overlay-container .deja-listcontainer [depth=\"24\"]{padding-left:24rem}.deja-overlay-container .deja-listcontainer [depth=\"25\"]{padding-left:25rem}.deja-overlay-container .deja-listcontainer [depth=\"26\"]{padding-left:26rem}.deja-overlay-container .deja-listcontainer [depth=\"27\"]{padding-left:27rem}.deja-overlay-container .deja-listcontainer [depth=\"28\"]{padding-left:28rem}.deja-overlay-container .deja-listcontainer [depth=\"29\"]{padding-left:29rem}.deja-overlay-container .deja-listcontainer [depth=\"30\"]{padding-left:30rem}.deja-overlay-container .deja-listcontainer [depth=\"31\"]{padding-left:31rem}.deja-overlay-container .deja-listcontainer [depth=\"32\"]{padding-left:32rem}.deja-overlay-container .deja-listcontainer [depth=\"33\"]{padding-left:33rem}.deja-overlay-container .deja-listcontainer [depth=\"34\"]{padding-left:34rem}.deja-overlay-container .deja-listcontainer [depth=\"35\"]{padding-left:35rem}.deja-overlay-container .deja-listcontainer [depth=\"36\"]{padding-left:36rem}.deja-overlay-container .deja-listcontainer [depth=\"37\"]{padding-left:37rem}.deja-overlay-container .deja-listcontainer [depth=\"38\"]{padding-left:38rem}.deja-overlay-container .deja-listcontainer [depth=\"39\"]{padding-left:39rem}.deja-overlay-container .deja-listcontainer [depth=\"40\"]{padding-left:40rem}.deja-overlay-container .deja-listcontainer [depth=\"41\"]{padding-left:41rem}.deja-overlay-container .deja-listcontainer [depth=\"42\"]{padding-left:42rem}.deja-overlay-container .deja-listcontainer [depth=\"43\"]{padding-left:43rem}.deja-overlay-container .deja-listcontainer [depth=\"44\"]{padding-left:44rem}.deja-overlay-container .deja-listcontainer [depth=\"45\"]{padding-left:45rem}.deja-overlay-container .deja-listcontainer [depth=\"46\"]{padding-left:46rem}.deja-overlay-container .deja-listcontainer [depth=\"47\"]{padding-left:47rem}.deja-overlay-container .deja-listcontainer [depth=\"48\"]{padding-left:48rem}.deja-overlay-container .deja-listcontainer [depth=\"49\"]{padding-left:49rem}.deja-overlay-container .deja-listcontainer [depth=\"50\"]{padding-left:50rem}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.DejaChildValidatorDirective, selector: "[deja-child-validator]" }, { kind: "component", type: i7.DejaChipsComponent, selector: "deja-chips", inputs: ["_items", "textField", "itemTemplateExternal", "insertTemplateExternal", "readonly", "disabled", "items"], outputs: ["close"] }, { kind: "component", type: i8.DejaListLoaderComponent, selector: "deja-list-loader" }, { kind: "component", type: i9.DejaOverlayComponent, selector: "deja-overlay", inputs: ["overlayBackdropClass", "overlayContainerClass", "overlayOffsetX", "overlayOffsetY", "isVisible", "hasBackdrop", "ownerElement", "positions", "positionsForMobile", "isMobile", "width", "widthForMobile"], outputs: ["visibleChange", "closed"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectComponent, decorators: [{
            type: Component,
            args: [{ selector: 'deja-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
                        ViewPortService,
                        { provide: MatFormFieldControl, useExisting: DejaSelectComponent }
                    ], template: "<input [placeholder]=\"placeholder\" *ngIf=\"!isMultiSelect\" matInput [disabled]=\"disabled\" [ngModel]=\"query\" #inputElement deja-child-validator type=\"text\" [readonly]=\"isModeSelect || readonly\" (ngModelChange)=\"queryChanged($event)\" autocomplete=\"off\">\n<div *ngIf=\"!disabled && !isMultiSelect\" class=\"actions-suffix\">\n    <mat-icon (click)=\"onClearQuery($event)\" id=\"clear-button\" *ngIf=\"selectionClearable && selectedItems?.length\">clear</mat-icon>\n    <mat-icon (click)=\"onOpenClicked($event)\" id=\"drop-down-button\">arrow_drop_down</mat-icon>\n</div>\n<deja-chips *ngIf=\"isMultiSelect\" [items]=\"selectedItems\" [readonly]=\"readonly\" [disabled]=\"disabled\" (close)=\"onRemoveSelection($event)\" [itemTemplateExternal]=\"selectedTemplate\" [textField]=\"textField\">\n    <ng-template #insertTemplate>\n        <input [placeholder]=\"placeholder\" matInput [disabled]=\"disabled\" [ngModel]=\"query\" #inputElement deja-child-validator type=\"text\" [readonly]=\"isModeSelect || readonly\" (ngModelChange)=\"queryChanged($event)\" autocomplete=\"off\">\n        <div *ngIf=\"!disabled\" class=\"actions-suffix\">\n            <mat-icon id=\"drop-down-button\" (click)=\"onOpenClicked($event)\">arrow_drop_down</mat-icon>\n        </div>\n    </ng-template>\n</deja-chips>\n<deja-overlay #dejaOverlay [overlayBackdropClass]=\"overlayBackdropClass || 'deja-select-backdrop'\" [overlayContainerClass]=\"overlayContainerClass\" [ownerElement]=\"overlayOwnerElement\" [isVisible]=\"dropdownVisible\" (closed)=\"hideDropDown()\" [positions]=\"positions\" [overlayOffsetY]=\"overlayOffsetY\" [overlayOffsetX]=\"overlayOffsetX\" [width]=\"dropDownWidth\" widthForMobile=\"100%\">\n    <div [id]=\"listElementId\" class=\"deja-listcontainer\" [attr.itemscount]=\"itemList?.length\" [attr.depth-max]=\"depthMax || null\" [attr.keynav]=\"keyboardNavigation\" [attr.vprowheight]=\"getViewPortRowHeight()\" (mousedown)=\"mousedown($event)\" (scroll)=\"scroll($event)\" [style.max-height.px]=\"dropDownMaxHeight\">\n        <div id=\"nodata-holder\" *ngIf=\"!treeItemList?.length && !waiter\">{{ nodataholder }}</div>\n        <div *ngIf=\"vpBeforeHeight\" [style.height.px]=\"vpBeforeHeight\"></div>\n        <div *ngFor=\"let item of treeItemList; let index = index\" #listitem [attr.class]=\"getItemClass(item)\" [attr.current]=\"(isMultiSelect && vpStartRow+index === getCurrentItemIndex()) || null\" [attr.depth]=\"depthMax ? item.depth : null\" [attr.id]=\"item.id || null\" [attr.flat]=\"vpStartRow + index\" [style.height.px]=\"getItemHeight(item)\">\n            <span id=\"expandbtn\">\n\t\t\t\t<mat-icon *ngIf=\"item.$items?.length\">arrow_drop_down</mat-icon>\n\t\t\t</span>\n            <ng-container *ngIf=\"(!item.$items || !parentItemTemplate) && (item.$items || !itemTemplate)\">{{ getTextValue(item) }}</ng-container>\n            <ng-container *ngIf=\"item.$items && parentItemTemplate\">\n                <ng-template [ngTemplateOutlet]=\"parentItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item, query: query, flatindex: vpStartRow+index }\"></ng-template>\n            </ng-container>\n            <ng-container *ngIf=\"!item.$items && itemTemplate\">\n                <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item, query: query, flatindex: vpStartRow+index }\"></ng-template>\n            </ng-container>\n        </div>\n        <div *ngIf=\"vpAfterHeight\" [style.height.px]=\"vpAfterHeight\"></div>\n        <deja-list-loader id=\"loader\" *ngIf=\"waiter && !loaderTemplate\"></deja-list-loader>\n        <ng-container *ngIf=\"waiter && loaderTemplate\">\n            <ng-template [ngTemplateOutlet]=\"loaderTemplate\"></ng-template>\n        </ng-container>\n    </div>\n</deja-overlay>\n<div *ngIf=\"hintLabel\" class=\"mat-hint\">{{hintLabel}}</div>\n", styles: ["deja-select{width:100%;white-space:initial;display:flex;align-items:center;min-height:1rem}deja-select>input{flex:1 1 100%}deja-select deja-chips{width:100%}deja-select deja-chips .insert-item{display:flex;align-items:center;height:1.2rem}deja-select .actions-suffix{flex:0 0 auto;text-align:right;overflow:visible;display:flex;align-items:center;height:0}deja-select .actions-suffix #clear-button,deja-select .actions-suffix #drop-down-button{font-size:1.2rem;opacity:.35}deja-select .actions-suffix #clear-button:hover,deja-select .actions-suffix #drop-down-button:hover{opacity:1;cursor:pointer}@keyframes load{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes load-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}.deja-overlay-container .deja-listcontainer{width:100%;text-align:left;overflow-y:auto}.deja-overlay-container .deja-listcontainer div.listitem{white-space:nowrap}.deja-overlay-container .deja-listcontainer div.listitem>deja-bold-query{flex:1 1 100%;overflow:hidden}.deja-overlay-container .deja-listcontainer div.listitem>deja-bold-query div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;width:100%}.deja-overlay-container .deja-listcontainer #expandbtn{min-width:24px}.deja-overlay-container .deja-listcontainer[valign=bottom]{border-top:none}.deja-overlay-container .deja-listcontainer [current=true]{box-shadow:none}.deja-overlay-container .deja-listcontainer[keynav=false] div.listitem:not(.unselectable):hover{cursor:pointer}.deja-overlay-container .deja-listcontainer #nodata-holder{margin:.5rem}.deja-overlay-container .deja-listcontainer #loader .spinner{margin:10px auto}.deja-overlay-container .deja-listcontainer{padding:0;margin:0;position:relative}.deja-overlay-container .deja-listcontainer[vprowheight=\"0\"]>div.listitem{padding:.35rem .1rem}.deja-overlay-container .deja-listcontainer>div.listitem{opacity:1;margin:0;transition-timing-function:linear;transition-duration:.3s;transition-property:max-height,opacity;display:flex;align-items:center}.deja-overlay-container .deja-listcontainer>div.listitem.hide{opacity:0!important;max-height:0!important;transition-timing-function:ease-out}.deja-overlay-container .deja-listcontainer>div.listitem #expandbtn{width:24px;cursor:pointer}.deja-overlay-container .deja-listcontainer>div.listitem.parent.collapsed #expandbtn>.mat-icon{transform:rotate(-90deg)}.deja-overlay-container .deja-listcontainer [depth=\"0\"]{padding-left:0rem}.deja-overlay-container .deja-listcontainer [depth=\"1\"]{padding-left:1rem}.deja-overlay-container .deja-listcontainer [depth=\"2\"]{padding-left:2rem}.deja-overlay-container .deja-listcontainer [depth=\"3\"]{padding-left:3rem}.deja-overlay-container .deja-listcontainer [depth=\"4\"]{padding-left:4rem}.deja-overlay-container .deja-listcontainer [depth=\"5\"]{padding-left:5rem}.deja-overlay-container .deja-listcontainer [depth=\"6\"]{padding-left:6rem}.deja-overlay-container .deja-listcontainer [depth=\"7\"]{padding-left:7rem}.deja-overlay-container .deja-listcontainer [depth=\"8\"]{padding-left:8rem}.deja-overlay-container .deja-listcontainer [depth=\"9\"]{padding-left:9rem}.deja-overlay-container .deja-listcontainer [depth=\"10\"]{padding-left:10rem}.deja-overlay-container .deja-listcontainer [depth=\"11\"]{padding-left:11rem}.deja-overlay-container .deja-listcontainer [depth=\"12\"]{padding-left:12rem}.deja-overlay-container .deja-listcontainer [depth=\"13\"]{padding-left:13rem}.deja-overlay-container .deja-listcontainer [depth=\"14\"]{padding-left:14rem}.deja-overlay-container .deja-listcontainer [depth=\"15\"]{padding-left:15rem}.deja-overlay-container .deja-listcontainer [depth=\"16\"]{padding-left:16rem}.deja-overlay-container .deja-listcontainer [depth=\"17\"]{padding-left:17rem}.deja-overlay-container .deja-listcontainer [depth=\"18\"]{padding-left:18rem}.deja-overlay-container .deja-listcontainer [depth=\"19\"]{padding-left:19rem}.deja-overlay-container .deja-listcontainer [depth=\"20\"]{padding-left:20rem}.deja-overlay-container .deja-listcontainer [depth=\"21\"]{padding-left:21rem}.deja-overlay-container .deja-listcontainer [depth=\"22\"]{padding-left:22rem}.deja-overlay-container .deja-listcontainer [depth=\"23\"]{padding-left:23rem}.deja-overlay-container .deja-listcontainer [depth=\"24\"]{padding-left:24rem}.deja-overlay-container .deja-listcontainer [depth=\"25\"]{padding-left:25rem}.deja-overlay-container .deja-listcontainer [depth=\"26\"]{padding-left:26rem}.deja-overlay-container .deja-listcontainer [depth=\"27\"]{padding-left:27rem}.deja-overlay-container .deja-listcontainer [depth=\"28\"]{padding-left:28rem}.deja-overlay-container .deja-listcontainer [depth=\"29\"]{padding-left:29rem}.deja-overlay-container .deja-listcontainer [depth=\"30\"]{padding-left:30rem}.deja-overlay-container .deja-listcontainer [depth=\"31\"]{padding-left:31rem}.deja-overlay-container .deja-listcontainer [depth=\"32\"]{padding-left:32rem}.deja-overlay-container .deja-listcontainer [depth=\"33\"]{padding-left:33rem}.deja-overlay-container .deja-listcontainer [depth=\"34\"]{padding-left:34rem}.deja-overlay-container .deja-listcontainer [depth=\"35\"]{padding-left:35rem}.deja-overlay-container .deja-listcontainer [depth=\"36\"]{padding-left:36rem}.deja-overlay-container .deja-listcontainer [depth=\"37\"]{padding-left:37rem}.deja-overlay-container .deja-listcontainer [depth=\"38\"]{padding-left:38rem}.deja-overlay-container .deja-listcontainer [depth=\"39\"]{padding-left:39rem}.deja-overlay-container .deja-listcontainer [depth=\"40\"]{padding-left:40rem}.deja-overlay-container .deja-listcontainer [depth=\"41\"]{padding-left:41rem}.deja-overlay-container .deja-listcontainer [depth=\"42\"]{padding-left:42rem}.deja-overlay-container .deja-listcontainer [depth=\"43\"]{padding-left:43rem}.deja-overlay-container .deja-listcontainer [depth=\"44\"]{padding-left:44rem}.deja-overlay-container .deja-listcontainer [depth=\"45\"]{padding-left:45rem}.deja-overlay-container .deja-listcontainer [depth=\"46\"]{padding-left:46rem}.deja-overlay-container .deja-listcontainer [depth=\"47\"]{padding-left:47rem}.deja-overlay-container .deja-listcontainer [depth=\"48\"]{padding-left:48rem}.deja-overlay-container .deja-listcontainer [depth=\"49\"]{padding-left:49rem}.deja-overlay-container .deja-listcontainer [depth=\"50\"]{padding-left:50rem}\n"] }]
        }], ctorParameters: function () {
        return [{ type: i0.ChangeDetectorRef }, { type: i1.ViewPortService }, { type: i2.FocusMonitor }, { type: i0.ElementRef }, { type: i3.NgControl, decorators: [{
                        type: Self
                    }, {
                        type: Optional
                    }] }, { type: i3.NgForm, decorators: [{
                        type: Optional
                    }] }, { type: i3.FormGroupDirective, decorators: [{
                        type: Optional
                    }] }, { type: i4.MediaService }, { type: i5.ErrorStateMatcher }];
    }, propDecorators: { id: [{
                type: HostBinding
            }], describedBy: [{
                type: HostBinding,
                args: ['attr.aria-describedby']
            }], _waiter: [{
                type: HostBinding,
                args: ['attr.wait']
            }], inputElement: [{
                type: ViewChild,
                args: ['inputElement']
            }], _disabled: [{
                type: HostBinding,
                args: ['attr.disabled']
            }], _readonly: [{
                type: HostBinding,
                args: ['attr.readonly']
            }], nodataholder: [{
                type: Input
            }], overlayOffsetX: [{
                type: Input
            }], overlayOffsetY: [{
                type: Input
            }], overlayBackdropClass: [{
                type: Input
            }], overlayContainerClass: [{
                type: Input
            }], itemTemplateExternal: [{
                type: Input
            }], parentItemTemplateExternal: [{
                type: Input
            }], loaderTemplateExternal: [{
                type: Input
            }], viewPortChanged: [{
                type: Output
            }], selectedChange: [{
                type: Output
            }], dropDownVisibleChange: [{
                type: Output
            }], itemTemplateInternal: [{
                type: ContentChild,
                args: ['itemTemplate']
            }], parentItemTemplateInternal: [{
                type: ContentChild,
                args: ['parentItemTemplate']
            }], selectedTemplate: [{
                type: ContentChild,
                args: ['selectedTemplate']
            }], input: [{
                type: ViewChild,
                args: [MatInput]
            }], overlay: [{
                type: ViewChild,
                args: [DejaOverlayComponent, { static: true }]
            }], loaderTemplateInternal: [{
                type: ContentChild,
                args: ['loaderTemplate']
            }], shouldLabelFloat: [{
                type: HostBinding,
                args: ['class.floating']
            }], modelIsValue: [{
                type: Input
            }], positions: [{
                type: Input
            }], dropDownWidth: [{
                type: Input
            }], required: [{
                type: Input
            }], placeholder: [{
                type: Input
            }], options: [{
                type: ContentChildren,
                args: [DejaItemComponent]
            }], query: [{
                type: Input
            }], delaySearchTrigger: [{
                type: Input,
                args: ['delay-search-trigger']
            }], minSearchlength: [{
                type: Input,
                args: ['min-search-length']
            }], disabled: [{
                type: Input
            }], selectionClearable: [{
                type: Input
            }], hideSelected: [{
                type: Input
            }], currentItem: [{
                type: Input
            }], pageSize: [{
                type: Input
            }], hintLabel: [{
                type: Input
            }], viewPortRowHeight: [{
                type: Input
            }], viewportMode: [{
                type: Input
            }], childrenField: [{
                type: Input
            }], textField: [{
                type: Input
            }], valueField: [{
                type: Input
            }], searchField: [{
                type: Input
            }], type: [{
                type: Input
            }], loadingItems: [{
                type: Input
            }], selectingItem: [{
                type: Input
            }], unselectingItem: [{
                type: Input
            }], expandingItem: [{
                type: Input
            }], collapsingItem: [{
                type: Input
            }], selectedItems: [{
                type: Input
            }], selectedItem: [{
                type: Input
            }], selectedModel: [{
                type: Input
            }], selectedModels: [{
                type: Input
            }], itemListService: [{
                type: Input
            }], sortingService: [{
                type: Input
            }], groupingService: [{
                type: Input
            }], waiter: [{
                type: Input
            }], items: [{
                type: Input
            }], models: [{
                type: Input
            }], maxHeight: [{
                type: Input
            }], readonly: [{
                type: Input
            }], inputValidatorDirective: [{
                type: ViewChild,
                args: [DejaChildValidatorDirective]
            }] } });

/*
 *  @license
 *  Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
 *
 *  Use of this source code is governed by an Apache-2.0 license that can be
 *  found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
 */
class DejaSelectModule {
}
DejaSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
DejaSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectModule, declarations: [DejaSelectComponent], imports: [CommonModule,
        DejaChildValidatorModule,
        DejaChipsModule,
        DejaItemModule,
        DejaListLoaderModule,
        DejaOverlayModule,
        FormsModule,
        MatIconModule,
        MatInputModule,
        MediaModule], exports: [DejaSelectComponent] });
DejaSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectModule, imports: [CommonModule,
        DejaChildValidatorModule,
        DejaChipsModule,
        DejaItemModule,
        DejaListLoaderModule,
        DejaOverlayModule,
        FormsModule,
        MatIconModule,
        MatInputModule,
        MediaModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DejaSelectModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [
                        DejaSelectComponent
                    ],
                    exports: [
                        DejaSelectComponent
                    ],
                    imports: [
                        CommonModule,
                        DejaChildValidatorModule,
                        DejaChipsModule,
                        DejaItemModule,
                        DejaListLoaderModule,
                        DejaOverlayModule,
                        FormsModule,
                        MatIconModule,
                        MatInputModule,
                        MediaModule
                    ]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { DejaSelectComponent, DejaSelectModule };
//# sourceMappingURL=deja-js-component-select.mjs.map
