this.primereact = this.primereact || {};
this.primereact.autocomplete = (function (exports, React, PrimeReact, button, hooks, inputtext, overlayservice, tooltip, utils, csstransition, portal, ripple, virtualscroller) {
  'use strict';

  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

  function _interopNamespace(e) {
    if (e && e.__esModule) return e;
    var n = Object.create(null);
    if (e) {
      Object.keys(e).forEach(function (k) {
        if (k !== 'default') {
          var d = Object.getOwnPropertyDescriptor(e, k);
          Object.defineProperty(n, k, d.get ? d : {
            enumerable: true,
            get: function () { return e[k]; }
          });
        }
      });
    }
    n["default"] = e;
    return Object.freeze(n);
  }

  var React__namespace = /*#__PURE__*/_interopNamespace(React);
  var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);

  function _extends() {
    _extends = Object.assign || function (target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];

        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }

      return target;
    };

    return _extends.apply(this, arguments);
  }

  function _arrayLikeToArray(arr, len) {
    if (len == null || len > arr.length) len = arr.length;

    for (var i = 0, arr2 = new Array(len); i < len; i++) {
      arr2[i] = arr[i];
    }

    return arr2;
  }

  function _arrayWithoutHoles(arr) {
    if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  }

  function _iterableToArray(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  }

  function _unsupportedIterableToArray(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(o);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  }

  function _nonIterableSpread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  function _toConsumableArray(arr) {
    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  }

  function _arrayWithHoles(arr) {
    if (Array.isArray(arr)) return arr;
  }

  function _iterableToArrayLimit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];

    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;

    var _s, _e;

    try {
      for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
        _arr.push(_s.value);

        if (i && _arr.length === i) break;
      }
    } catch (err) {
      _d = true;
      _e = err;
    } finally {
      try {
        if (!_n && _i["return"] != null) _i["return"]();
      } finally {
        if (_d) throw _e;
      }
    }

    return _arr;
  }

  function _nonIterableRest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  function _slicedToArray(arr, i) {
    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  }

  function _defineProperty(obj, key, value) {
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
    }

    return obj;
  }

  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
    var getOptionGroupRenderKey = function getOptionGroupRenderKey(optionGroup) {
      return utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
    };

    var createGroupChildren = function createGroupChildren(optionGroup, i) {
      var groupChildren = props.getOptionGroupChildren(optionGroup);
      return groupChildren.map(function (item, j) {
        var key = i + '_' + j;
        var selected = props.selectedItem === item;
        var content = props.itemTemplate ? utils.ObjectUtils.getJSXElement(props.itemTemplate, item, j) : props.field ? utils.ObjectUtils.resolveFieldData(item, props.field) : item;
        return /*#__PURE__*/React__namespace.createElement("li", {
          key: key,
          role: "option",
          "aria-selected": selected,
          className: "p-autocomplete-item",
          onClick: function onClick(e) {
            return props.onItemClick(e, item);
          },
          "data-group": i,
          "data-index": j
        }, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
      });
    };

    var createItem = function createItem(suggestion, index) {
      if (props.optionGroupLabel) {
        var content = props.optionGroupTemplate ? utils.ObjectUtils.getJSXElement(props.optionGroupTemplate, suggestion, index) : props.getOptionGroupLabel(suggestion);
        var childrenContent = createGroupChildren(suggestion, index);
        var key = index + '_' + getOptionGroupRenderKey(suggestion);
        return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
          key: key
        }, /*#__PURE__*/React__namespace.createElement("li", {
          className: "p-autocomplete-item-group"
        }, content), childrenContent);
      } else {
        var _content = props.itemTemplate ? utils.ObjectUtils.getJSXElement(props.itemTemplate, suggestion, index) : props.field ? utils.ObjectUtils.resolveFieldData(suggestion, props.field) : suggestion;

        return /*#__PURE__*/React__namespace.createElement("li", {
          key: index,
          role: "option",
          "aria-selected": props.selectedItem === suggestion,
          className: "p-autocomplete-item",
          onClick: function onClick(e) {
            return props.onItemClick(e, suggestion);
          }
        }, _content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
      }
    };

    var createItems = function createItems() {
      return props.suggestions ? props.suggestions.map(createItem) : null;
    };

    var createContent = function createContent() {
      if (props.virtualScrollerOptions) {
        var virtualScrollerProps = _objectSpread(_objectSpread({}, props.virtualScrollerOptions), {
          style: _objectSpread(_objectSpread({}, props.virtualScrollerOptions.style), {
            height: props.scrollHeight
          }),
          items: props.suggestions,
          itemTemplate: function itemTemplate(item, options) {
            return item && createItem(item, options.index);
          },
          contentTemplate: function contentTemplate(options) {
            var className = utils.classNames('p-autocomplete-items', options.className);
            return /*#__PURE__*/React__namespace.createElement("ul", {
              ref: options.contentRef,
              className: className,
              role: "listbox",
              id: props.listId
            }, options.children);
          }
        });

        return /*#__PURE__*/React__namespace.createElement(virtualscroller.VirtualScroller, _extends({
          ref: props.virtualScrollerRef
        }, virtualScrollerProps));
      } else {
        var items = createItems();
        return /*#__PURE__*/React__namespace.createElement("ul", {
          className: "p-autocomplete-items",
          role: "listbox",
          id: props.listId
        }, items);
      }
    };

    var createElement = function createElement() {
      var className = utils.classNames('p-autocomplete-panel p-component', props.panelClassName);

      var style = _objectSpread({
        maxHeight: props.scrollHeight
      }, props.panelStyle || {});

      var content = createContent();
      return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
        nodeRef: ref,
        classNames: "p-connected-overlay",
        "in": props["in"],
        timeout: {
          enter: 120,
          exit: 100
        },
        options: props.transitionOptions,
        unmountOnExit: true,
        onEnter: props.onEnter,
        onEntering: props.onEntering,
        onEntered: props.onEntered,
        onExit: props.onExit,
        onExited: props.onExited
      }, /*#__PURE__*/React__namespace.createElement("div", {
        ref: ref,
        className: className,
        style: style,
        onClick: props.onClick
      }, content));
    };

    var element = createElement();
    return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
      element: element,
      appendTo: props.appendTo
    });
  }));
  AutoCompletePanel.displayName = 'AutoCompletePanel';

  var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
    var _React$useState = React__namespace.useState(props.id),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        idState = _React$useState2[0],
        setIdState = _React$useState2[1];

    var _React$useState3 = React__namespace.useState(false),
        _React$useState4 = _slicedToArray(_React$useState3, 2),
        searchingState = _React$useState4[0],
        setSearchingState = _React$useState4[1];

    var _React$useState5 = React__namespace.useState(false),
        _React$useState6 = _slicedToArray(_React$useState5, 2),
        focusedState = _React$useState6[0],
        setFocusedState = _React$useState6[1];

    var _React$useState7 = React__namespace.useState(false),
        _React$useState8 = _slicedToArray(_React$useState7, 2),
        overlayVisibleState = _React$useState8[0],
        setOverlayVisibleState = _React$useState8[1];

    var elementRef = React__namespace.useRef(null);
    var overlayRef = React__namespace.useRef(null);
    var inputRef = React__namespace.useRef(props.inputRef);
    var multiContainerRef = React__namespace.useRef(null);
    var virtualScrollerRef = React__namespace.useRef(null);
    var timeout = React__namespace.useRef(null);
    var selectedItem = React__namespace.useRef(null);

    var _useOverlayListener = hooks.useOverlayListener({
      target: elementRef,
      overlay: overlayRef,
      listener: function listener(event, _ref) {
        var type = _ref.type,
            valid = _ref.valid;

        if (valid) {
          type === 'outside' ? !isInputClicked(event) && hide() : hide();
        }
      },
      when: overlayVisibleState
    }),
        _useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
        bindOverlayListener = _useOverlayListener2[0],
        unbindOverlayListener = _useOverlayListener2[1];

    var isInputClicked = function isInputClicked(event) {
      return props.multiple ? event.target === multiContainerRef.current || multiContainerRef.current.contains(event.target) : event.target === inputRef.current;
    };

    var onInputChange = function onInputChange(event) {
      //Cancel the search request if user types within the timeout
      if (timeout.current) {
        clearTimeout(timeout.current);
      }

      var query = event.target.value;

      if (!props.multiple) {
        updateModel(event, query);
      }

      if (utils.ObjectUtils.isEmpty(query)) {
        hide();
        props.onClear && props.onClear(event);
      } else {
        if (query.length >= props.minLength) {
          timeout.current = setTimeout(function () {
            search(event, query, 'input');
          }, props.delay);
        } else {
          hide();
        }
      }
    };

    var search = function search(event, query, source) {
      //allow empty string but not undefined or null
      if (query === undefined || query === null) {
        return;
      } //do not search blank values on input change


      if (source === 'input' && query.trim().length === 0) {
        return;
      }

      if (props.completeMethod) {
        setSearchingState(true);
        props.completeMethod({
          originalEvent: event,
          query: query
        });
      }
    };

    var selectItem = function selectItem(event, option, preventInputFocus) {
      if (props.multiple) {
        inputRef.current.value = '';

        if (!isSelected(option)) {
          var newValue = props.value ? [].concat(_toConsumableArray(props.value), [option]) : [option];
          updateModel(event, newValue);
        }
      } else {
        updateInputField(option);
        updateModel(event, option);
      }

      if (props.onSelect) {
        props.onSelect({
          originalEvent: event,
          value: option
        });
      }

      if (!preventInputFocus) {
        inputRef.current.focus();
        hide();
      }
    };

    var updateModel = function updateModel(event, value) {
      // #2176 only call change if value actually changed
      if (selectedItem && selectedItem.current === value) {
        return;
      }

      if (props.onChange) {
        props.onChange({
          originalEvent: event,
          value: value,
          stopPropagation: function stopPropagation() {},
          preventDefault: function preventDefault() {},
          target: {
            name: props.name,
            id: idState,
            value: value
          }
        });
      }

      selectedItem.current = value;
    };

    var formatValue = function formatValue(value) {
      if (value) {
        if (props.selectedItemTemplate && (props.multiple ? isSelected(value) : findOptionIndex(value) > -1)) {
          var resolvedFieldData = utils.ObjectUtils.getJSXElement(props.selectedItemTemplate, value);
          return resolvedFieldData ? resolvedFieldData : value;
        } else if (props.field) {
          var _resolvedFieldData = utils.ObjectUtils.resolveFieldData(value, props.field);

          return _resolvedFieldData !== null && _resolvedFieldData !== undefined ? _resolvedFieldData : value;
        } else {
          return value;
        }
      }

      return '';
    };

    var updateInputField = function updateInputField(value) {
      inputRef.current.value = formatValue(value);
    };

    var show = function show() {
      setOverlayVisibleState(true);
    };

    var hide = function hide() {
      setOverlayVisibleState(false);
      setSearchingState(false);
    };

    var onOverlayEnter = function onOverlayEnter() {
      utils.ZIndexUtils.set('overlay', overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
      alignOverlay();
    };

    var onOverlayEntering = function onOverlayEntering() {
      if (props.autoHighlight && props.suggestions && props.suggestions.length) {
        utils.DomHandler.addClass(overlayRef.current.firstChild.firstChild, 'p-highlight');
      }
    };

    var onOverlayEntered = function onOverlayEntered() {
      bindOverlayListener();
      props.onShow && props.onShow();
    };

    var onOverlayExit = function onOverlayExit() {
      unbindOverlayListener();
    };

    var onOverlayExited = function onOverlayExited() {
      utils.ZIndexUtils.clear(overlayRef.current);
      props.onHide && props.onHide();
    };

    var alignOverlay = function alignOverlay() {
      var target = props.multiple ? multiContainerRef.current : inputRef.current;
      utils.DomHandler.alignOverlay(overlayRef.current, target, props.appendTo || PrimeReact__default["default"].appendTo);
    };

    var onPanelClick = function onPanelClick(event) {
      overlayservice.OverlayService.emit('overlay-click', {
        originalEvent: event,
        target: elementRef.current
      });
    };

    var onDropdownClick = function onDropdownClick(event) {
      if (props.dropdownAutoFocus) {
        inputRef.current.focus();
      }

      if (props.dropdownMode === 'blank') search(event, '', 'dropdown');else if (props.dropdownMode === 'current') search(event, inputRef.current.value, 'dropdown');

      if (props.onDropdownClick) {
        props.onDropdownClick({
          originalEvent: event,
          query: inputRef.current.value
        });
      }
    };

    var removeItem = function removeItem(event, index) {
      var removedValue = props.value[index];
      var newValue = props.value.filter(function (_, i) {
        return index !== i;
      });
      updateModel(event, newValue);

      if (props.onUnselect) {
        props.onUnselect({
          originalEvent: event,
          value: removedValue
        });
      }
    };

    var onInputKeyDown = function onInputKeyDown(event) {
      if (overlayVisibleState) {
        var highlightItem = utils.DomHandler.findSingle(overlayRef.current, 'li.p-highlight');

        switch (event.which) {
          //down
          case 40:
            if (highlightItem) {
              var nextElement = findNextItem(highlightItem);

              if (nextElement) {
                utils.DomHandler.addClass(nextElement, 'p-highlight');
                utils.DomHandler.removeClass(highlightItem, 'p-highlight');
                utils.DomHandler.scrollInView(overlayRef.current, nextElement);
              }
            } else {
              highlightItem = utils.DomHandler.findSingle(overlayRef.current, 'li');

              if (utils.DomHandler.hasClass(highlightItem, 'p-autocomplete-item-group')) {
                highlightItem = findNextItem(highlightItem);
              }

              if (highlightItem) {
                utils.DomHandler.addClass(highlightItem, 'p-highlight');
              }
            }

            event.preventDefault();
            break;
          //up

          case 38:
            if (highlightItem) {
              var previousElement = findPrevItem(highlightItem);

              if (previousElement) {
                utils.DomHandler.addClass(previousElement, 'p-highlight');
                utils.DomHandler.removeClass(highlightItem, 'p-highlight');
                utils.DomHandler.scrollInView(overlayRef.current, previousElement);
              }
            }

            event.preventDefault();
            break;
          //enter

          case 13:
            if (highlightItem) {
              selectHighlightItem(event, highlightItem);
              hide();
            }

            event.preventDefault();
            break;
          //escape

          case 27:
            hide();
            event.preventDefault();
            break;
          //tab

          case 9:
            if (highlightItem) {
              selectHighlightItem(event, highlightItem);
            }

            hide();
            break;
        }
      }

      if (props.multiple) {
        switch (event.which) {
          //backspace
          case 8:
            if (props.value && props.value.length && !inputRef.current.value) {
              var removedValue = props.value[props.value.length - 1];
              var newValue = props.value.slice(0, -1);
              updateModel(event, newValue);

              if (props.onUnselect) {
                props.onUnselect({
                  originalEvent: event,
                  value: removedValue
                });
              }
            }

            break;
        }
      }
    };

    var selectHighlightItem = function selectHighlightItem(event, item) {
      if (props.optionGroupLabel) {
        var optionGroup = props.suggestions[item.dataset.group];
        selectItem(event, getOptionGroupChildren(optionGroup)[item.dataset.index]);
      } else {
        selectItem(event, props.suggestions[utils.DomHandler.index(item)]);
      }
    };

    var findNextItem = function findNextItem(item) {
      var nextItem = item.nextElementSibling;
      return nextItem ? utils.DomHandler.hasClass(nextItem, 'p-autocomplete-item-group') ? findNextItem(nextItem) : nextItem : null;
    };

    var findPrevItem = function findPrevItem(item) {
      var prevItem = item.previousElementSibling;
      return prevItem ? utils.DomHandler.hasClass(prevItem, 'p-autocomplete-item-group') ? findPrevItem(prevItem) : prevItem : null;
    };

    var onInputFocus = function onInputFocus(event) {
      setFocusedState(true);
      props.onFocus && props.onFocus(event);
    };

    var forceItemSelection = function forceItemSelection(event) {
      var inputValue = event.target.value.trim();
      var item = (props.suggestions || []).find(function (it) {
        var value = props.field ? utils.ObjectUtils.resolveFieldData(it, props.field) : it;
        return value && inputValue === value.trim();
      });

      if (item) {
        selectItem(event, item, true);
      } else {
        inputRef.current.value = '';
        updateModel(event, null);
        props.onClear && props.onClear(event);
      }
    };

    var onInputBlur = function onInputBlur(event) {
      setFocusedState(false);

      if (props.forceSelection) {
        forceItemSelection(event);
      }

      props.onBlur && props.onBlur(event);
    };

    var onMultiContainerClick = function onMultiContainerClick(event) {
      inputRef.current.focus();
      props.onClick && props.onClick(event);
    };

    var onMultiInputFocus = function onMultiInputFocus(event) {
      onInputFocus(event);
      utils.DomHandler.addClass(multiContainerRef.current, 'p-focus');
    };

    var onMultiInputBlur = function onMultiInputBlur(event) {
      onInputBlur(event);
      utils.DomHandler.removeClass(multiContainerRef.current, 'p-focus');
    };

    var isSelected = function isSelected(val) {
      return props.value ? props.value.some(function (v) {
        return utils.ObjectUtils.equals(v, val);
      }) : false;
    };

    var findOptionIndex = function findOptionIndex(option) {
      return props.suggestions ? props.suggestions.findIndex(function (s) {
        return utils.ObjectUtils.equals(s, option);
      }) : -1;
    };

    var getOptionGroupLabel = function getOptionGroupLabel(optionGroup) {
      return props.optionGroupLabel ? utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel) : optionGroup;
    };

    var getOptionGroupChildren = function getOptionGroupChildren(optionGroup) {
      return utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupChildren);
    };

    React__namespace.useEffect(function () {
      utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
    }, [inputRef, props.inputRef]);
    hooks.useMountEffect(function () {
      if (!idState) {
        setIdState(utils.UniqueComponentId());
      }

      if (props.autoFocus && inputRef.current) {
        inputRef.current.focus();
      }
    });
    hooks.useUpdateEffect(function () {
      if (searchingState) {
        utils.ObjectUtils.isNotEmpty(props.suggestions) ? show() : hide();
        setSearchingState(false);
      }
    }, [props.suggestions]);
    hooks.useUpdateEffect(function () {
      if (inputRef.current && !props.multiple) {
        updateInputField(props.value);
      }
    });
    hooks.useUnmountEffect(function () {
      if (timeout.current) {
        clearTimeout(timeout.current);
      }

      utils.ZIndexUtils.clear(overlayRef.current);
    });
    React__namespace.useImperativeHandle(ref, function () {
      return {
        search: search
      };
    });

    var createSimpleAutoComplete = function createSimpleAutoComplete() {
      var value = formatValue(props.value);
      var ariaControls = idState + '_list';
      var className = utils.classNames('p-autocomplete-input', props.inputClassName, {
        'p-autocomplete-dd-input': props.dropdown
      });
      return /*#__PURE__*/React__namespace.createElement(inputtext.InputText, {
        ref: inputRef,
        id: props.inputId,
        type: props.type,
        name: props.name,
        defaultValue: value,
        role: "searchbox",
        "aria-autocomplete": "list",
        "aria-controls": ariaControls,
        "aria-labelledby": props.ariaLabelledBy,
        className: className,
        style: props.inputStyle,
        autoComplete: "off",
        readOnly: props.readOnly,
        disabled: props.disabled,
        placeholder: props.placeholder,
        size: props.size,
        maxLength: props.maxLength,
        tabIndex: props.tabIndex,
        onBlur: onInputBlur,
        onFocus: onInputFocus,
        onChange: onInputChange,
        onMouseDown: props.onMouseDown,
        onKeyUp: props.onKeyUp,
        onKeyDown: onInputKeyDown,
        onKeyPress: props.onKeyPress,
        onContextMenu: props.onContextMenu,
        onClick: props.onClick,
        onDoubleClick: props.onDblClick
      });
    };

    var createChips = function createChips() {
      if (utils.ObjectUtils.isNotEmpty(props.value)) {
        return props.value.map(function (val, index) {
          var key = index + 'multi-item';
          return /*#__PURE__*/React__namespace.createElement("li", {
            key: key,
            className: "p-autocomplete-token p-highlight"
          }, /*#__PURE__*/React__namespace.createElement("span", {
            className: "p-autocomplete-token-label"
          }, formatValue(val)), !props.disabled && utils.IconUtils.getJSXIcon(props.removeIcon, {
            className: 'p-autocomplete-token-icon',
            onClick: function onClick(e) {
              return removeItem(e, index);
            }
          }, {
            props: props
          }));
        });
      }

      return null;
    };

    var createMultiInput = function createMultiInput() {
      var ariaControls = idState + '_list';
      return /*#__PURE__*/React__namespace.createElement("li", {
        className: "p-autocomplete-input-token"
      }, /*#__PURE__*/React__namespace.createElement("input", {
        ref: inputRef,
        type: props.type,
        disabled: props.disabled,
        placeholder: props.placeholder,
        role: "searchbox",
        "aria-autocomplete": "list",
        "aria-controls": ariaControls,
        "aria-labelledby": props.ariaLabelledBy,
        autoComplete: "off",
        tabIndex: props.tabIndex,
        onChange: onInputChange,
        id: props.inputId,
        name: props.name,
        style: props.inputStyle,
        className: props.inputClassName,
        maxLength: props.maxLength,
        onKeyUp: props.onKeyUp,
        onKeyDown: onInputKeyDown,
        onKeyPress: props.onKeyPress,
        onFocus: onMultiInputFocus,
        onBlur: onMultiInputBlur
      }));
    };

    var createMultipleAutoComplete = function createMultipleAutoComplete() {
      var className = utils.classNames('p-autocomplete-multiple-container p-component p-inputtext', {
        'p-disabled': props.disabled
      });
      var tokens = createChips();
      var input = createMultiInput();
      return /*#__PURE__*/React__namespace.createElement("ul", {
        ref: multiContainerRef,
        className: className,
        onContextMenu: props.onContextMenu,
        onMouseDown: props.onMouseDown,
        onClick: onMultiContainerClick,
        onDoubleClick: props.onDblClick
      }, tokens, input);
    };

    var createDropdown = function createDropdown() {
      if (props.dropdown) {
        return /*#__PURE__*/React__namespace.createElement(button.Button, {
          type: "button",
          icon: props.dropdownIcon,
          className: "p-autocomplete-dropdown",
          disabled: props.disabled,
          onClick: onDropdownClick
        });
      }

      return null;
    };

    var createLoader = function createLoader() {
      if (searchingState) {
        return /*#__PURE__*/React__namespace.createElement("i", {
          className: "p-autocomplete-loader pi pi-spinner pi-spin"
        });
      }

      return null;
    };

    var createInput = function createInput() {
      return props.multiple ? createMultipleAutoComplete() : createSimpleAutoComplete();
    };

    var listId = idState + '_list';
    var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
    var otherProps = utils.ObjectUtils.findDiffKeys(props, AutoComplete.defaultProps);
    var className = utils.classNames('p-autocomplete p-component p-inputwrapper', {
      'p-autocomplete-dd': props.dropdown,
      'p-autocomplete-multiple': props.multiple,
      'p-inputwrapper-filled': props.value,
      'p-inputwrapper-focus': focusedState
    }, props.className);
    var loader = createLoader();
    var input = createInput();
    var dropdown = createDropdown();
    return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("span", _extends({
      ref: elementRef,
      id: idState,
      style: props.style,
      className: className,
      "aria-haspopup": "listbox",
      "aria-expanded": overlayVisibleState,
      "aria-owns": listId
    }, otherProps), input, loader, dropdown, /*#__PURE__*/React__namespace.createElement(AutoCompletePanel, _extends({
      ref: overlayRef,
      virtualScrollerRef: virtualScrollerRef
    }, props, {
      listId: listId,
      onItemClick: selectItem,
      selectedItem: selectedItem,
      onClick: onPanelClick,
      getOptionGroupLabel: getOptionGroupLabel,
      getOptionGroupChildren: getOptionGroupChildren,
      "in": overlayVisibleState,
      onEnter: onOverlayEnter,
      onEntering: onOverlayEntering,
      onEntered: onOverlayEntered,
      onExit: onOverlayExit,
      onExited: onOverlayExited
    }))), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
      target: elementRef,
      content: props.tooltip
    }, props.tooltipOptions)));
  }));
  AutoComplete.displayName = 'AutoComplete';
  AutoComplete.defaultProps = {
    __TYPE: 'AutoComplete',
    id: null,
    inputRef: null,
    value: null,
    name: null,
    type: 'text',
    suggestions: null,
    field: null,
    optionGroupLabel: null,
    optionGroupChildren: null,
    optionGroupTemplate: null,
    forceSelection: false,
    autoHighlight: false,
    virtualScrollerOptions: null,
    scrollHeight: '200px',
    dropdown: false,
    dropdownMode: 'blank',
    dropdownAutoFocus: true,
    multiple: false,
    minLength: 1,
    delay: 300,
    style: null,
    className: null,
    inputId: null,
    inputStyle: null,
    inputClassName: null,
    panelClassName: null,
    panelStyle: null,
    placeholder: null,
    readOnly: false,
    disabled: false,
    maxLength: null,
    size: null,
    appendTo: null,
    tabIndex: null,
    autoFocus: false,
    tooltip: null,
    tooltipOptions: null,
    ariaLabelledBy: null,
    completeMethod: null,
    itemTemplate: null,
    selectedItemTemplate: null,
    transitionOptions: null,
    dropdownIcon: 'pi pi-chevron-down',
    removeIcon: 'pi pi-times-circle',
    onChange: null,
    onFocus: null,
    onBlur: null,
    onSelect: null,
    onUnselect: null,
    onDropdownClick: null,
    onClick: null,
    onDblClick: null,
    onMouseDown: null,
    onKeyUp: null,
    onKeyPress: null,
    onContextMenu: null,
    onClear: null,
    onShow: null,
    onHide: null
  };

  exports.AutoComplete = AutoComplete;

  Object.defineProperty(exports, '__esModule', { value: true });

  return exports;

})({}, React, primereact.api, primereact.button, primereact.hooks, primereact.inputtext, primereact.overlayservice, primereact.tooltip, primereact.utils, primereact.csstransition, primereact.portal, primereact.ripple, primereact.virtualscroller);
