{"ast":null,"code":"import React, { createRef, Component } from 'react';\nimport { classNames, IconUtils, ObjectUtils, DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';\nimport { tip } from 'primereact/tooltip';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Portal } from 'primereact/portal';\nimport { InputText } from 'primereact/inputtext';\nimport { Ripple } from 'primereact/ripple';\nimport { VirtualScroller } from 'primereact/virtualscroller';\nimport PrimeReact, { localeOption, FilterService } from 'primereact/api';\nimport { OverlayService } from 'primereact/overlayservice';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _arrayLikeToArray$1(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$1(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys$2(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper$4(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$4();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$4() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar Checkbox = /*#__PURE__*/function (_Component) {\n _inherits(Checkbox, _Component);\n\n var _super = _createSuper$4(Checkbox);\n\n function Checkbox(props) {\n var _this;\n\n _classCallCheck(this, Checkbox);\n\n _this = _super.call(this, props);\n _this.state = {\n focused: false\n };\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(Checkbox, [{\n key: \"onClick\",\n value: function onClick(e) {\n if (!this.props.disabled && !this.props.readOnly && this.props.onChange) {\n var value = this.isChecked() ? this.props.falseValue : this.props.trueValue;\n this.props.onChange({\n originalEvent: e,\n value: this.props.value,\n checked: value,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n type: 'checkbox',\n name: this.props.name,\n id: this.props.id,\n value: this.props.value,\n checked: value\n }\n });\n this.inputRef.current.checked = !this.isChecked();\n this.inputRef.current.focus();\n e.preventDefault();\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n this.inputRef.current.checked = this.isChecked();\n\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread$2({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n }\n }, {\n key: \"onFocus\",\n value: function onFocus() {\n this.setState({\n focused: true\n });\n }\n }, {\n key: \"onBlur\",\n value: function onBlur() {\n this.setState({\n focused: false\n });\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n if (event.key === 'Enter') {\n this.onClick(event);\n event.preventDefault();\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.element,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"isChecked\",\n value: function isChecked() {\n return this.props.checked === this.props.trueValue;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var checked = this.isChecked();\n var containerClass = classNames('p-checkbox p-component', {\n 'p-checkbox-checked': checked,\n 'p-checkbox-disabled': this.props.disabled,\n 'p-checkbox-focused': this.state.focused\n }, this.props.className);\n var boxClass = classNames('p-checkbox-box', {\n 'p-highlight': checked,\n 'p-disabled': this.props.disabled,\n 'p-focus': this.state.focused\n });\n var icon = checked && this.props.icon;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this2.element = el;\n },\n id: this.props.id,\n className: containerClass,\n style: this.props.style,\n onClick: this.onClick,\n onContextMenu: this.props.onContextMenu,\n onMouseDown: this.props.onMouseDown\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hidden-accessible\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n ref: this.inputRef,\n type: \"checkbox\",\n \"aria-labelledby\": this.props.ariaLabelledBy,\n id: this.props.inputId,\n name: this.props.name,\n tabIndex: this.props.tabIndex,\n defaultChecked: checked,\n onKeyDown: this.onKeyDown,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n disabled: this.props.disabled,\n readOnly: this.props.readOnly,\n required: this.props.required\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: boxClass,\n ref: function ref(el) {\n return _this2.box = el;\n },\n role: \"checkbox\",\n \"aria-checked\": checked\n }, IconUtils.getJSXIcon(icon, {\n className: 'p-checkbox-icon p-c'\n }, {\n props: this.props,\n checked: checked\n })));\n }\n }]);\n\n return Checkbox;\n}(Component);\n\n_defineProperty(Checkbox, \"defaultProps\", {\n id: null,\n inputRef: null,\n inputId: null,\n value: null,\n name: null,\n checked: false,\n trueValue: true,\n falseValue: false,\n style: null,\n className: null,\n disabled: false,\n required: false,\n readOnly: false,\n tabIndex: null,\n icon: 'pi pi-check',\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n onChange: null,\n onMouseDown: null,\n onContextMenu: null\n});\n\nfunction _createSuper$3(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$3();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$3() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar MultiSelectHeader = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectHeader, _Component);\n\n var _super = _createSuper$3(MultiSelectHeader);\n\n function MultiSelectHeader(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectHeader);\n\n _this = _super.call(this, props);\n _this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this));\n _this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectHeader, [{\n key: \"onFilter\",\n value: function onFilter(event) {\n if (this.props.onFilter) {\n this.props.onFilter({\n originalEvent: event,\n query: event.target.value\n });\n }\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(event) {\n if (this.props.onSelectAll) {\n this.props.onSelectAll({\n originalEvent: event,\n checked: this.props.selectAll\n });\n }\n }\n }, {\n key: \"renderFilterElement\",\n value: function renderFilterElement() {\n if (this.props.filter) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-filter-container\"\n }, /*#__PURE__*/React.createElement(InputText, {\n type: \"text\",\n role: \"textbox\",\n value: this.props.filterValue,\n onChange: this.onFilter,\n className: \"p-multiselect-filter\",\n placeholder: this.props.filterPlaceholder\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-filter-icon pi pi-search\"\n }));\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var filterElement = this.renderFilterElement();\n var checkboxElement = this.props.showSelectAll && /*#__PURE__*/React.createElement(Checkbox, {\n checked: this.props.selectAll,\n onChange: this.onSelectAll,\n role: \"checkbox\",\n \"aria-checked\": this.props.selectAll\n });\n var closeElement = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-multiselect-close p-link\",\n onClick: this.props.onClose\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-close-icon pi pi-times\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n var element = /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-header\"\n }, checkboxElement, filterElement, closeElement);\n\n if (this.props.template) {\n var defaultOptions = {\n className: 'p-multiselect-header',\n checkboxElement: checkboxElement,\n checked: this.props.selectAll,\n onChange: this.onSelectAll,\n filterElement: filterElement,\n closeElement: closeElement,\n closeElementClassName: 'p-multiselect-close p-link',\n closeIconClassName: 'p-multiselect-close-icon pi pi-times',\n onCloseClick: this.props.onClose,\n element: element,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.template, defaultOptions);\n }\n\n return element;\n }\n }]);\n\n return MultiSelectHeader;\n}(Component);\n\nfunction _createSuper$2(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$2();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$2() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar MultiSelectItem = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectItem, _Component);\n\n var _super = _createSuper$2(MultiSelectItem);\n\n function MultiSelectItem(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectItem);\n\n _this = _super.call(this, props);\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectItem, [{\n key: \"onClick\",\n value: function onClick(event) {\n if (this.props.onClick) {\n this.props.onClick({\n originalEvent: event,\n option: this.props.option\n });\n }\n\n event.preventDefault();\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n if (this.props.onKeyDown) {\n this.props.onKeyDown({\n originalEvent: event,\n option: this.props.option\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-multiselect-item', {\n 'p-highlight': this.props.selected,\n 'p-disabled': this.props.disabled\n }, this.props.option.className);\n var checkboxClassName = classNames('p-checkbox-box', {\n 'p-highlight': this.props.selected\n });\n var checkboxIcon = classNames('p-checkbox-icon p-c', {\n 'pi pi-check': this.props.selected\n });\n var content = this.props.template ? ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label;\n var tabIndex = this.props.disabled ? null : this.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n onClick: this.onClick,\n tabIndex: tabIndex,\n onKeyDown: this.onKeyDown,\n role: \"option\",\n \"aria-selected\": this.props.selected\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-checkbox p-component\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: checkboxClassName\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: checkboxIcon\n }))), /*#__PURE__*/React.createElement(\"span\", null, content), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }]);\n\n return MultiSelectItem;\n}(Component);\n\n_defineProperty(MultiSelectItem, \"defaultProps\", {\n option: null,\n label: null,\n selected: false,\n disabled: false,\n tabIndex: null,\n template: null,\n onClick: null,\n onKeyDown: null\n});\n\nfunction ownKeys$1(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper$1(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$1();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$1() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar MultiSelectPanelComponent = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectPanelComponent, _Component);\n\n var _super = _createSuper$1(MultiSelectPanelComponent);\n\n function MultiSelectPanelComponent(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectPanelComponent);\n\n _this = _super.call(this, props);\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectPanelComponent, [{\n key: \"onEnter\",\n value: function onEnter() {\n var _this2 = this;\n\n this.props.onEnter(function () {\n if (_this2.virtualScrollerRef) {\n var selectedIndex = _this2.props.getSelectedOptionIndex();\n\n if (selectedIndex !== -1) {\n _this2.virtualScrollerRef.scrollToIndex(selectedIndex);\n }\n }\n });\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n if (this.virtualScrollerRef) {\n this.virtualScrollerRef.scrollToIndex(0);\n }\n\n this.props.onFilterInputChange && this.props.onFilterInputChange(event);\n }\n }, {\n key: \"isEmptyFilter\",\n value: function isEmptyFilter() {\n return !(this.props.visibleOptions && this.props.visibleOptions.length) && this.props.hasFilter();\n }\n }, {\n key: \"renderHeader\",\n value: function renderHeader() {\n return /*#__PURE__*/React.createElement(MultiSelectHeader, {\n filter: this.props.filter,\n filterValue: this.props.filterValue,\n onFilter: this.onFilterInputChange,\n filterPlaceholder: this.props.filterPlaceholder,\n onClose: this.props.onCloseClick,\n showSelectAll: this.props.showSelectAll,\n selectAll: this.props.isAllSelected(),\n onSelectAll: this.props.onSelectAll,\n template: this.props.panelHeaderTemplate\n });\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n if (this.props.panelFooterTemplate) {\n var content = ObjectUtils.getJSXElement(this.props.panelFooterTemplate, this.props, this.props.onOverlayHide);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-footer\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderGroupChildren\",\n value: function renderGroupChildren(optionGroup) {\n var _this3 = this;\n\n var groupChildren = this.props.getOptionGroupChildren(optionGroup);\n return groupChildren.map(function (option, j) {\n var optionLabel = _this3.props.getOptionLabel(option);\n\n var optionKey = j + '_' + _this3.props.getOptionRenderKey(option);\n\n var disabled = _this3.props.isOptionDisabled(option);\n\n var tabIndex = disabled ? null : _this3.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(MultiSelectItem, {\n key: optionKey,\n label: optionLabel,\n option: option,\n template: _this3.props.itemTemplate,\n selected: _this3.props.isSelected(option),\n onClick: _this3.props.onOptionSelect,\n onKeyDown: _this3.props.onOptionKeyDown,\n tabIndex: tabIndex,\n disabled: disabled\n });\n });\n }\n }, {\n key: \"renderEmptyFilter\",\n value: function renderEmptyFilter() {\n var emptyFilterMessage = ObjectUtils.getJSXElement(this.props.emptyFilterMessage, this.props) || localeOption('emptyFilterMessage');\n return /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-multiselect-empty-message\"\n }, emptyFilterMessage);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(option, index) {\n if (this.props.optionGroupLabel) {\n var groupContent = this.props.optionGroupTemplate ? ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.props.getOptionGroupLabel(option);\n var groupChildrenContent = this.renderGroupChildren(option);\n var key = index + '_' + this.props.getOptionGroupRenderKey(option);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: key\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-multiselect-item-group\"\n }, groupContent), groupChildrenContent);\n } else {\n var optionLabel = this.props.getOptionLabel(option);\n var optionKey = index + '_' + this.props.getOptionRenderKey(option);\n var disabled = this.props.isOptionDisabled(option);\n var tabIndex = disabled ? null : this.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(MultiSelectItem, {\n key: optionKey,\n label: optionLabel,\n option: option,\n template: this.props.itemTemplate,\n selected: this.props.isSelected(option),\n onClick: this.props.onOptionSelect,\n onKeyDown: this.props.onOptionKeyDown,\n tabIndex: tabIndex,\n disabled: disabled\n });\n }\n }\n }, {\n key: \"renderItems\",\n value: function renderItems() {\n var _this4 = this;\n\n if (this.props.visibleOptions && this.props.visibleOptions.length) {\n return this.props.visibleOptions.map(function (option, index) {\n return _this4.renderItem(option, index);\n });\n } else if (this.props.hasFilter()) {\n return this.renderEmptyFilter();\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this5 = this;\n\n if (this.props.virtualScrollerOptions) {\n var virtualScrollerProps = _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions), {\n style: _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions.style), {\n height: this.props.scrollHeight\n }),\n className: classNames('p-multiselect-items-wrapper', this.props.virtualScrollerOptions.className),\n items: this.props.visibleOptions,\n onLazyLoad: function onLazyLoad(event) {\n return _this5.props.virtualScrollerOptions.onLazyLoad(_objectSpread$1(_objectSpread$1({}, event), {\n filter: _this5.props.filterValue\n }));\n },\n itemTemplate: function itemTemplate(item, options) {\n return item && _this5.renderItem(item, options.index);\n },\n contentTemplate: function contentTemplate(options) {\n var className = classNames('p-multiselect-items p-component', options.className);\n var content = _this5.isEmptyFilter() ? _this5.renderEmptyFilter() : options.children;\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: options.contentRef,\n className: className,\n role: \"listbox\",\n \"aria-multiselectable\": true\n }, content);\n }\n });\n\n return /*#__PURE__*/React.createElement(VirtualScroller, _extends({\n ref: function ref(el) {\n return _this5.virtualScrollerRef = el;\n }\n }, virtualScrollerProps));\n } else {\n var items = this.renderItems();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-items-wrapper\",\n style: {\n maxHeight: this.props.scrollHeight\n }\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-multiselect-items p-component\",\n role: \"listbox\",\n \"aria-multiselectable\": true\n }, items));\n }\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n var panelClassName = classNames('p-multiselect-panel p-component', {\n 'p-multiselect-limited': !this.props.allowOptionSelect()\n }, this.props.panelClassName);\n var header = this.renderHeader();\n var content = this.renderContent();\n var footer = this.renderFooter();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.props.forwardRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.props[\"in\"],\n timeout: {\n enter: 120,\n exit: 100\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.onEnter,\n onEntered: this.props.onEntered,\n onExit: this.props.onExit,\n onExited: this.props.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.props.forwardRef,\n className: panelClassName,\n style: this.props.panelStyle,\n onClick: this.props.onClick\n }, header, content, footer));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return MultiSelectPanelComponent;\n}(Component);\n\nvar MultiSelectPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(MultiSelectPanelComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar MultiSelect = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelect, _Component);\n\n var _super = _createSuper(MultiSelect);\n\n function MultiSelect(props) {\n var _this;\n\n _classCallCheck(this, MultiSelect);\n\n _this = _super.call(this, props);\n _this.state = {\n filter: '',\n focused: false,\n overlayVisible: false\n };\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.onOptionSelect = _this.onOptionSelect.bind(_assertThisInitialized(_this));\n _this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n _this.onCloseClick = _this.onCloseClick.bind(_assertThisInitialized(_this));\n _this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));\n _this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this));\n _this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this));\n _this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this));\n _this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.getOptionLabel = _this.getOptionLabel.bind(_assertThisInitialized(_this));\n _this.getOptionRenderKey = _this.getOptionRenderKey.bind(_assertThisInitialized(_this));\n _this.isOptionDisabled = _this.isOptionDisabled.bind(_assertThisInitialized(_this));\n _this.getOptionGroupChildren = _this.getOptionGroupChildren.bind(_assertThisInitialized(_this));\n _this.getOptionGroupLabel = _this.getOptionGroupLabel.bind(_assertThisInitialized(_this));\n _this.getOptionGroupRenderKey = _this.getOptionGroupRenderKey.bind(_assertThisInitialized(_this));\n _this.allowOptionSelect = _this.allowOptionSelect.bind(_assertThisInitialized(_this));\n _this.isSelected = _this.isSelected.bind(_assertThisInitialized(_this));\n _this.isAllSelected = _this.isAllSelected.bind(_assertThisInitialized(_this));\n _this.hasFilter = _this.hasFilter.bind(_assertThisInitialized(_this));\n _this.getSelectedOptionIndex = _this.getSelectedOptionIndex.bind(_assertThisInitialized(_this));\n _this.hide = _this.hide.bind(_assertThisInitialized(_this));\n _this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));\n _this.overlayRef = /*#__PURE__*/createRef();\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(MultiSelect, [{\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.container\n });\n }\n }, {\n key: \"allowOptionSelect\",\n value: function allowOptionSelect() {\n return !this.props.selectionLimit || !this.props.value || this.props.value && this.props.value.length < this.props.selectionLimit;\n }\n }, {\n key: \"onOptionSelect\",\n value: function onOptionSelect(event) {\n var _this2 = this;\n\n var originalEvent = event.originalEvent,\n option = event.option;\n\n if (this.props.disabled || this.isOptionDisabled(option)) {\n return;\n }\n\n var optionValue = this.getOptionValue(option);\n var isOptionValueUsed = this.isOptionValueUsed(option);\n var selected = this.isSelected(option);\n var allowOptionSelect = this.allowOptionSelect();\n if (selected) this.updateModel(originalEvent, this.props.value.filter(function (val) {\n return !ObjectUtils.equals(isOptionValueUsed ? val : _this2.getOptionValue(val), optionValue, _this2.equalityKey());\n }));else if (allowOptionSelect) this.updateModel(originalEvent, [].concat(_toConsumableArray(this.props.value || []), [optionValue]));\n }\n }, {\n key: \"onOptionKeyDown\",\n value: function onOptionKeyDown(event) {\n var originalEvent = event.originalEvent;\n var listItem = originalEvent.currentTarget;\n\n switch (originalEvent.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.focus();\n }\n\n originalEvent.preventDefault();\n break;\n //up\n\n case 38:\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.focus();\n }\n\n originalEvent.preventDefault();\n break;\n //enter and space\n\n case 13:\n case 32:\n this.onOptionSelect(event);\n originalEvent.preventDefault();\n break;\n //escape\n\n case 27:\n this.hide();\n this.inputRef.current.focus();\n break;\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.hasClass(nextItem, 'p-multiselect-item-group') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.hasClass(prevItem, 'p-multiselect-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (!this.props.disabled && !this.isPanelClicked(event) && !DomHandler.hasClass(event.target, 'p-multiselect-token-icon') && !this.isClearClicked(event)) {\n if (this.state.overlayVisible) {\n this.hide();\n } else {\n this.show();\n }\n\n this.inputRef.current.focus();\n event.preventDefault();\n }\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n switch (event.which) {\n //down\n case 40:\n if (!this.state.overlayVisible && event.altKey) {\n this.show();\n event.preventDefault();\n }\n\n break;\n //space\n\n case 32:\n if (this.state.overlayVisible) this.hide();else this.show();\n event.preventDefault();\n break;\n //escape\n\n case 27:\n this.hide();\n break;\n //tab\n\n case 9:\n if (this.state.overlayVisible) {\n var firstFocusableElement = DomHandler.getFirstFocusableElement(this.overlayRef.current);\n\n if (firstFocusableElement) {\n firstFocusableElement.focus();\n event.preventDefault();\n }\n }\n\n break;\n }\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(event) {\n var _this3 = this;\n\n if (this.props.onSelectAll) {\n this.props.onSelectAll(event);\n } else {\n var value = null;\n var visibleOptions = this.getVisibleOptions();\n\n if (event.checked) {\n value = [];\n\n if (visibleOptions) {\n var selectedOptions = visibleOptions.filter(function (option) {\n return _this3.isOptionDisabled(option) && _this3.isSelected(option);\n });\n value = selectedOptions.map(function (option) {\n return _this3.getOptionValue(option);\n });\n }\n } else if (visibleOptions) {\n visibleOptions = visibleOptions.filter(function (option) {\n return !_this3.isOptionDisabled(option);\n });\n\n if (this.props.optionGroupLabel) {\n value = [];\n visibleOptions.forEach(function (optionGroup) {\n return value = [].concat(_toConsumableArray(value), _toConsumableArray(_this3.getOptionGroupChildren(optionGroup).filter(function (option) {\n return !_this3.isOptionDisabled(option);\n }).map(function (option) {\n return _this3.getOptionValue(option);\n })));\n });\n } else {\n value = visibleOptions.map(function (option) {\n return _this3.getOptionValue(option);\n });\n }\n }\n\n this.updateModel(event.originalEvent, value);\n }\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(event, value) {\n if (this.props.onChange) {\n this.props.onChange({\n originalEvent: event,\n value: value,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: value\n }\n });\n }\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n var _this4 = this;\n\n var filter = event.query;\n this.setState({\n filter: filter\n }, function () {\n if (_this4.props.onFilter) {\n _this4.props.onFilter({\n originalEvent: event,\n filter: filter\n });\n }\n });\n }\n }, {\n key: \"resetFilter\",\n value: function resetFilter() {\n var _this5 = this;\n\n var filter = '';\n this.setState({\n filter: filter\n }, function () {\n _this5.props.onFilter && _this5.props.onFilter({\n filter: filter\n });\n });\n }\n }, {\n key: \"show\",\n value: function show() {\n this.setState({\n overlayVisible: true\n });\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.setState({\n overlayVisible: false\n });\n }\n }, {\n key: \"onOverlayEnter\",\n value: function onOverlayEnter(callback) {\n ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);\n this.alignOverlay();\n this.scrollInView();\n callback && callback();\n }\n }, {\n key: \"onOverlayEntered\",\n value: function onOverlayEntered() {\n this.bindDocumentClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.props.onShow && this.props.onShow();\n }\n }, {\n key: \"onOverlayExit\",\n value: function onOverlayExit() {\n this.unbindDocumentClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n }\n }, {\n key: \"onOverlayExited\",\n value: function onOverlayExited() {\n if (this.props.filter && this.props.resetFilterOnHide) {\n this.resetFilter();\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n this.props.onHide && this.props.onHide();\n }\n }, {\n key: \"alignOverlay\",\n value: function alignOverlay() {\n DomHandler.alignOverlay(this.overlayRef.current, this.label.parentElement, this.props.appendTo || PrimeReact.appendTo);\n }\n }, {\n key: \"scrollInView\",\n value: function scrollInView() {\n var highlightItem = DomHandler.findSingle(this.overlayRef.current, 'li.p-highlight');\n\n if (highlightItem) {\n highlightItem.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n }\n }, {\n key: \"onCloseClick\",\n value: function onCloseClick(event) {\n this.hide();\n this.inputRef.current.focus();\n event.preventDefault();\n event.stopPropagation();\n }\n }, {\n key: \"getSelectedOptionIndex\",\n value: function getSelectedOptionIndex() {\n if (this.props.value != null && this.props.options) {\n if (this.props.optionGroupLabel) {\n for (var i = 0; i < this.props.options.length; i++) {\n var selectedOptionIndex = this.findOptionIndexInList(this.props.value, this.getOptionGroupChildren(this.props.options[i]));\n\n if (selectedOptionIndex !== -1) {\n return {\n group: i,\n option: selectedOptionIndex\n };\n }\n }\n } else {\n return this.findOptionIndexInList(this.props.value, this.props.options);\n }\n }\n\n return -1;\n }\n }, {\n key: \"findOptionIndexInList\",\n value: function findOptionIndexInList(value, list) {\n var _this6 = this;\n\n var key = this.equalityKey();\n return list.findIndex(function (item) {\n return value.some(function (val) {\n return ObjectUtils.equals(val, _this6.getOptionValue(item), key);\n });\n });\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(option) {\n var _this7 = this;\n\n var selected = false;\n\n if (this.props.value) {\n var optionValue = this.getOptionValue(option);\n var isOptionValueUsed = this.isOptionValueUsed(option);\n var key = this.equalityKey();\n selected = this.props.value.some(function (val) {\n return ObjectUtils.equals(isOptionValueUsed ? val : _this7.getOptionValue(val), optionValue, key);\n });\n }\n\n return selected;\n }\n }, {\n key: \"getLabelByValue\",\n value: function getLabelByValue(val) {\n var option;\n\n if (this.props.options) {\n if (this.props.optionGroupLabel) {\n var _iterator = _createForOfIteratorHelper(this.props.options),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var optionGroup = _step.value;\n option = this.findOptionByValue(val, this.getOptionGroupChildren(optionGroup));\n\n if (option) {\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n } else {\n option = this.findOptionByValue(val, this.props.options);\n }\n }\n\n return option ? this.getOptionLabel(option) : null;\n }\n }, {\n key: \"findOptionByValue\",\n value: function findOptionByValue(val, list) {\n var key = this.equalityKey();\n\n var _iterator2 = _createForOfIteratorHelper(list),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var option = _step2.value;\n var optionValue = this.getOptionValue(option);\n\n if (ObjectUtils.equals(optionValue, val, key)) {\n return option;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return null;\n }\n }, {\n key: \"onFocus\",\n value: function onFocus(event) {\n var _this8 = this;\n\n event.persist();\n this.setState({\n focused: true\n }, function () {\n if (_this8.props.onFocus) {\n _this8.props.onFocus(event);\n }\n });\n }\n }, {\n key: \"onBlur\",\n value: function onBlur(event) {\n var _this9 = this;\n\n event.persist();\n this.setState({\n focused: false\n }, function () {\n if (_this9.props.onBlur) {\n _this9.props.onBlur(event);\n }\n });\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this10 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this10.state.overlayVisible && _this10.isOutsideClicked(event)) {\n _this10.hide();\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this11 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.container, function () {\n if (_this11.state.overlayVisible) {\n _this11.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n }, {\n key: \"bindResizeListener\",\n value: function bindResizeListener() {\n var _this12 = this;\n\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this12.state.overlayVisible && !DomHandler.isTouchDevice()) {\n _this12.hide();\n }\n };\n\n window.addEventListener('resize', this.resizeListener);\n }\n }\n }, {\n key: \"unbindResizeListener\",\n value: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.container && !(this.container.isSameNode(event.target) || this.isClearClicked(event) || this.container.contains(event.target) || this.isPanelClicked(event));\n }\n }, {\n key: \"isClearClicked\",\n value: function isClearClicked(event) {\n return DomHandler.hasClass(event.target, 'p-multiselect-clear-icon');\n }\n }, {\n key: \"isPanelClicked\",\n value: function isPanelClicked(event) {\n return this.overlayRef && this.overlayRef.current && this.overlayRef.current.contains(event.target);\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (this.state.overlayVisible && this.hasFilter()) {\n this.alignOverlay();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentClickListener();\n this.unbindResizeListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n }\n }, {\n key: \"hasFilter\",\n value: function hasFilter() {\n return this.state.filter && this.state.filter.trim().length > 0;\n }\n }, {\n key: \"isAllSelected\",\n value: function isAllSelected() {\n var _this13 = this;\n\n if (this.props.onSelectAll) {\n return this.props.selectAll;\n } else {\n var visibleOptions = this.getVisibleOptions();\n\n if (ObjectUtils.isEmpty(visibleOptions)) {\n return false;\n }\n\n visibleOptions = visibleOptions.filter(function (option) {\n return !_this13.isOptionDisabled(option);\n });\n\n if (this.props.optionGroupLabel) {\n var _iterator3 = _createForOfIteratorHelper(visibleOptions),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var optionGroup = _step3.value;\n var visibleOptionsGroupChildren = this.getOptionGroupChildren(optionGroup).filter(function (option) {\n return !_this13.isOptionDisabled(option);\n });\n\n var _iterator4 = _createForOfIteratorHelper(visibleOptionsGroupChildren),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var option = _step4.value;\n\n if (!this.isSelected(option)) {\n return false;\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n } else {\n var _iterator5 = _createForOfIteratorHelper(visibleOptions),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _option = _step5.value;\n\n if (!this.isSelected(_option)) {\n return false;\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n }\n\n return true;\n }\n }, {\n key: \"getOptionLabel\",\n value: function getOptionLabel(option) {\n return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;\n }\n }, {\n key: \"getOptionValue\",\n value: function getOptionValue(option) {\n if (this.props.optionValue) {\n var data = ObjectUtils.resolveFieldData(option, this.props.optionValue);\n return data !== null ? data : option;\n }\n\n return option && option['value'] !== undefined ? option['value'] : option;\n }\n }, {\n key: \"getOptionRenderKey\",\n value: function getOptionRenderKey(option) {\n return this.props.dataKey ? ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option);\n }\n }, {\n key: \"getOptionGroupRenderKey\",\n value: function getOptionGroupRenderKey(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);\n }\n }, {\n key: \"getOptionGroupLabel\",\n value: function getOptionGroupLabel(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);\n }\n }, {\n key: \"getOptionGroupChildren\",\n value: function getOptionGroupChildren(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren);\n }\n }, {\n key: \"isOptionDisabled\",\n value: function isOptionDisabled(option) {\n if (this.props.optionDisabled) {\n return ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, this.props.optionDisabled);\n }\n\n return option && option['disabled'] !== undefined ? option['disabled'] : false;\n }\n }, {\n key: \"isOptionValueUsed\",\n value: function isOptionValueUsed(option) {\n return this.props.optionValue || option && option['value'] !== undefined;\n }\n }, {\n key: \"getVisibleOptions\",\n value: function getVisibleOptions() {\n if (this.hasFilter()) {\n var filterValue = this.state.filter.trim().toLocaleLowerCase(this.props.filterLocale);\n var searchFields = this.props.filterBy ? this.props.filterBy.split(',') : [this.props.optionLabel || 'label'];\n\n if (this.props.optionGroupLabel) {\n var filteredGroups = [];\n\n var _iterator6 = _createForOfIteratorHelper(this.props.options),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var optgroup = _step6.value;\n var filteredSubOptions = FilterService.filter(this.getOptionGroupChildren(optgroup), searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);\n\n if (filteredSubOptions && filteredSubOptions.length) {\n filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {\n items: filteredSubOptions\n }));\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return filteredGroups;\n } else {\n return FilterService.filter(this.props.options, searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);\n }\n } else {\n return this.props.options;\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n return !this.props.value || this.props.value.length === 0;\n }\n }, {\n key: \"equalityKey\",\n value: function equalityKey() {\n return this.props.optionValue ? null : this.props.dataKey;\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity() {\n return this.inputRef.current.checkValidity();\n }\n }, {\n key: \"removeChip\",\n value: function removeChip(event, item) {\n var key = this.equalityKey();\n var value = this.props.value.filter(function (val) {\n return !ObjectUtils.equals(val, item, key);\n });\n this.updateModel(event, value);\n }\n }, {\n key: \"getSelectedItemsLabel\",\n value: function getSelectedItemsLabel() {\n var pattern = /{(.*?)}/;\n\n if (pattern.test(this.props.selectedItemsLabel)) {\n return this.props.selectedItemsLabel.replace(this.props.selectedItemsLabel.match(pattern)[0], this.props.value.length + '');\n }\n\n return this.props.selectedItemsLabel;\n }\n }, {\n key: \"getLabel\",\n value: function getLabel() {\n var label;\n\n if (!this.isEmpty() && !this.props.fixedPlaceholder) {\n if (this.props.maxSelectedLabels && this.props.value.length > this.props.maxSelectedLabels) {\n return this.getSelectedItemsLabel();\n } else {\n label = '';\n\n for (var i = 0; i < this.props.value.length; i++) {\n if (i !== 0) {\n label += ',';\n }\n\n label += this.getLabelByValue(this.props.value[i]);\n }\n\n return label;\n }\n }\n\n return label;\n }\n }, {\n key: \"getLabelContent\",\n value: function getLabelContent() {\n var _this14 = this;\n\n if (this.props.selectedItemTemplate) {\n if (!this.isEmpty()) {\n if (this.props.maxSelectedLabels && this.props.value.length > this.props.maxSelectedLabels) {\n return this.getSelectedItemsLabel();\n } else {\n return this.props.value.map(function (val, index) {\n var item = ObjectUtils.getJSXElement(_this14.props.selectedItemTemplate, val);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, item);\n });\n }\n } else {\n return ObjectUtils.getJSXElement(this.props.selectedItemTemplate);\n }\n } else {\n if (this.props.display === 'chip' && !this.isEmpty()) {\n var value = this.props.value.slice(0, this.props.maxSelectedLabels || this.props.value.length);\n return value.map(function (val) {\n var label = _this14.getLabelByValue(val);\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-token\",\n key: label\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-token-label\"\n }, label), !_this14.props.disabled && IconUtils.getJSXIcon(_this14.props.removeIcon, {\n className: 'p-multiselect-token-icon',\n onClick: function onClick(e) {\n return _this14.removeChip(e, val);\n }\n }, {\n props: _this14.props\n }));\n });\n }\n\n return this.getLabel();\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.container,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"renderClearIcon\",\n value: function renderClearIcon() {\n var _this15 = this;\n\n var empty = this.isEmpty();\n\n if (!empty && this.props.showClear && !this.props.disabled) {\n return /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-multiselect-clear-icon pi pi-times\",\n onClick: function onClick(e) {\n return _this15.updateModel(e, null);\n }\n });\n }\n\n return null;\n }\n }, {\n key: \"renderLabel\",\n value: function renderLabel() {\n var _this16 = this;\n\n var empty = this.isEmpty();\n var content = this.getLabelContent();\n var labelClassName = classNames('p-multiselect-label', {\n 'p-placeholder': empty && this.props.placeholder,\n 'p-multiselect-label-empty': empty && !this.props.placeholder && !this.props.selectedItemTemplate,\n 'p-multiselect-items-label': !empty && this.props.display !== 'chip' && this.props.value.length > this.props.maxSelectedLabels\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this16.label = el;\n },\n className: \"p-multiselect-label-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: labelClassName\n }, content || this.props.placeholder || 'empty'));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this17 = this;\n\n var className = classNames('p-multiselect p-component p-inputwrapper', {\n 'p-multiselect-chip': this.props.display === 'chip',\n 'p-disabled': this.props.disabled,\n 'p-multiselect-clearable': this.props.showClear && !this.props.disabled,\n 'p-focus': this.state.focused,\n 'p-inputwrapper-filled': this.props.value && this.props.value.length > 0,\n 'p-inputwrapper-focus': this.state.focused || this.state.overlayVisible\n }, this.props.className);\n var visibleOptions = this.getVisibleOptions();\n var label = this.renderLabel();\n var clearIcon = this.renderClearIcon();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n onClick: this.onClick,\n ref: function ref(el) {\n return _this17.container = el;\n },\n style: this.props.style\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hidden-accessible\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n ref: this.inputRef,\n id: this.props.inputId,\n name: this.props.name,\n readOnly: true,\n type: \"text\",\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: this.onKeyDown,\n role: \"listbox\",\n \"aria-haspopup\": \"listbox\",\n \"aria-labelledby\": this.props.ariaLabelledBy,\n \"aria-expanded\": this.state.overlayVisible,\n disabled: this.props.disabled,\n tabIndex: this.props.tabIndex\n })), label, clearIcon, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-trigger\"\n }, IconUtils.getJSXIcon(this.props.dropdownIcon, {\n className: 'p-multiselect-trigger-icon p-c'\n }, {\n props: this.props\n })), /*#__PURE__*/React.createElement(MultiSelectPanel, _extends({\n ref: this.overlayRef,\n visibleOptions: visibleOptions\n }, this.props, {\n onClick: this.onPanelClick,\n onOverlayHide: this.hide,\n filterValue: this.state.filter,\n hasFilter: this.hasFilter,\n onFilterInputChange: this.onFilterInputChange,\n onCloseClick: this.onCloseClick,\n onSelectAll: this.onSelectAll,\n getOptionLabel: this.getOptionLabel,\n getOptionRenderKey: this.getOptionRenderKey,\n isOptionDisabled: this.isOptionDisabled,\n getOptionGroupChildren: this.getOptionGroupChildren,\n getOptionGroupLabel: this.getOptionGroupLabel,\n getOptionGroupRenderKey: this.getOptionGroupRenderKey,\n isSelected: this.isSelected,\n getSelectedOptionIndex: this.getSelectedOptionIndex,\n isAllSelected: this.isAllSelected,\n onOptionSelect: this.onOptionSelect,\n allowOptionSelect: this.allowOptionSelect,\n onOptionKeyDown: this.onOptionKeyDown,\n \"in\": this.state.overlayVisible,\n onEnter: this.onOverlayEnter,\n onEntered: this.onOverlayEntered,\n onExit: this.onOverlayExit,\n onExited: this.onOverlayExited\n })));\n }\n }]);\n\n return MultiSelect;\n}(Component);\n\n_defineProperty(MultiSelect, \"defaultProps\", {\n id: null,\n inputRef: null,\n name: null,\n value: null,\n options: null,\n optionLabel: null,\n optionValue: null,\n optionDisabled: null,\n optionGroupLabel: null,\n optionGroupChildren: null,\n optionGroupTemplate: null,\n display: 'comma',\n style: null,\n className: null,\n panelClassName: null,\n panelStyle: null,\n virtualScrollerOptions: null,\n scrollHeight: '200px',\n placeholder: null,\n fixedPlaceholder: false,\n disabled: false,\n showClear: false,\n filter: false,\n filterBy: null,\n filterMatchMode: 'contains',\n filterPlaceholder: null,\n filterLocale: undefined,\n emptyFilterMessage: null,\n resetFilterOnHide: false,\n tabIndex: 0,\n dataKey: null,\n inputId: null,\n appendTo: null,\n tooltip: null,\n tooltipOptions: null,\n maxSelectedLabels: null,\n selectionLimit: null,\n selectedItemsLabel: '{0} items selected',\n ariaLabelledBy: null,\n itemTemplate: null,\n selectedItemTemplate: null,\n panelHeaderTemplate: null,\n panelFooterTemplate: null,\n transitionOptions: null,\n dropdownIcon: 'pi pi-chevron-down',\n removeIcon: 'pi pi-times-circle',\n showSelectAll: true,\n selectAll: false,\n onChange: null,\n onFocus: null,\n onBlur: null,\n onShow: null,\n onHide: null,\n onFilter: null,\n onSelectAll: null\n});\n\nexport { MultiSelect };","map":{"version":3,"names":["React","createRef","Component","classNames","IconUtils","ObjectUtils","DomHandler","ZIndexUtils","ConnectedOverlayScrollHandler","tip","CSSTransition","Portal","InputText","Ripple","VirtualScroller","PrimeReact","localeOption","FilterService","OverlayService","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_arrayLikeToArray$1","arr","len","arr2","Array","_arrayWithoutHoles","isArray","_iterableToArray","iter","Symbol","iterator","from","_unsupportedIterableToArray$1","o","minLen","n","toString","slice","constructor","name","test","_nonIterableSpread","TypeError","_toConsumableArray","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","value","_typeof","obj","_possibleConstructorReturn","_getPrototypeOf","getPrototypeOf","_defineProperty","ownKeys$2","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","_objectSpread$2","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper$4","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct$4","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","Checkbox","_Component","_super","_this","state","focused","onClick","bind","onFocus","onBlur","onKeyDown","inputRef","disabled","readOnly","onChange","isChecked","falseValue","trueValue","originalEvent","checked","stopPropagation","preventDefault","type","id","current","focus","updateInputRef","ref","componentDidMount","tooltip","renderTooltip","componentWillUnmount","destroy","componentDidUpdate","prevProps","tooltipOptions","update","content","setState","event","element","options","render","_this2","containerClass","className","boxClass","icon","createElement","el","style","onContextMenu","onMouseDown","ariaLabelledBy","inputId","tabIndex","defaultChecked","required","box","role","getJSXIcon","_createSuper$3","_isNativeReflectConstruct$3","MultiSelectHeader","onFilter","onSelectAll","query","selectAll","renderFilterElement","filterValue","placeholder","filterPlaceholder","filterElement","checkboxElement","showSelectAll","closeElement","onClose","template","defaultOptions","closeElementClassName","closeIconClassName","onCloseClick","getJSXElement","_createSuper$2","_isNativeReflectConstruct$2","MultiSelectItem","option","selected","checkboxClassName","checkboxIcon","label","ownKeys$1","_objectSpread$1","_createSuper$1","_isNativeReflectConstruct$1","MultiSelectPanelComponent","onEnter","onFilterInputChange","virtualScrollerRef","selectedIndex","getSelectedOptionIndex","scrollToIndex","isEmptyFilter","visibleOptions","hasFilter","renderHeader","isAllSelected","panelHeaderTemplate","renderFooter","panelFooterTemplate","onOverlayHide","renderGroupChildren","optionGroup","_this3","groupChildren","getOptionGroupChildren","map","j","optionLabel","getOptionLabel","optionKey","getOptionRenderKey","isOptionDisabled","itemTemplate","isSelected","onOptionSelect","onOptionKeyDown","renderEmptyFilter","emptyFilterMessage","renderItem","index","optionGroupLabel","groupContent","optionGroupTemplate","getOptionGroupLabel","groupChildrenContent","getOptionGroupRenderKey","Fragment","renderItems","_this4","renderContent","_this5","virtualScrollerOptions","virtualScrollerProps","height","scrollHeight","items","onLazyLoad","item","contentTemplate","children","contentRef","maxHeight","renderElement","panelClassName","allowOptionSelect","header","footer","nodeRef","forwardRef","timeout","enter","exit","transitionOptions","unmountOnExit","onEntered","onExit","onExited","panelStyle","appendTo","MultiSelectPanel","ownKeys","_objectSpread","_createForOfIteratorHelper","allowArrayLike","it","_unsupportedIterableToArray","F","s","done","_e","f","normalCompletion","didErr","err","step","next","_e2","_arrayLikeToArray","_createSuper","_isNativeReflectConstruct","MultiSelect","overlayVisible","onOverlayEnter","onOverlayEntered","onOverlayExit","onOverlayExited","onPanelClick","hide","overlayRef","emit","container","selectionLimit","optionValue","getOptionValue","isOptionValueUsed","updateModel","val","equals","equalityKey","concat","listItem","currentTarget","which","nextItem","findNextItem","prevItem","findPrevItem","nextElementSibling","hasClass","previousElementSibling","isPanelClicked","isClearClicked","show","altKey","firstFocusableElement","getFirstFocusableElement","getVisibleOptions","selectedOptions","resetFilter","callback","set","autoZIndex","zIndex","alignOverlay","scrollInView","bindDocumentClickListener","bindScrollListener","bindResizeListener","onShow","unbindDocumentClickListener","unbindScrollListener","unbindResizeListener","resetFilterOnHide","clear","onHide","parentElement","highlightItem","findSingle","scrollIntoView","block","inline","selectedOptionIndex","findOptionIndexInList","group","list","_this6","findIndex","some","_this7","getLabelByValue","_iterator","_step","findOptionByValue","_iterator2","_step2","_this8","persist","_this9","_this10","documentClickListener","isOutsideClicked","document","addEventListener","_this11","scrollHandler","_this12","resizeListener","isTouchDevice","window","removeEventListener","isSameNode","contains","trim","_this13","isEmpty","_iterator3","_step3","visibleOptionsGroupChildren","_iterator4","_step4","_iterator5","_step5","_option","resolveFieldData","undefined","data","dataKey","optionGroupChildren","optionDisabled","isFunction","toLocaleLowerCase","filterLocale","searchFields","filterBy","split","filteredGroups","_iterator6","_step6","optgroup","filteredSubOptions","filterMatchMode","checkValidity","removeChip","getSelectedItemsLabel","pattern","selectedItemsLabel","replace","match","getLabel","fixedPlaceholder","maxSelectedLabels","getLabelContent","_this14","selectedItemTemplate","display","removeIcon","renderClearIcon","_this15","empty","showClear","renderLabel","_this16","labelClassName","_this17","clearIcon","dropdownIcon"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/multiselect/multiselect.esm.js"],"sourcesContent":["import React, { createRef, Component } from 'react';\nimport { classNames, IconUtils, ObjectUtils, DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';\nimport { tip } from 'primereact/tooltip';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Portal } from 'primereact/portal';\nimport { InputText } from 'primereact/inputtext';\nimport { Ripple } from 'primereact/ripple';\nimport { VirtualScroller } from 'primereact/virtualscroller';\nimport PrimeReact, { localeOption, FilterService } from 'primereact/api';\nimport { OverlayService } from 'primereact/overlayservice';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _arrayLikeToArray$1(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$1(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys$2(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; }\n\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$4() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar Checkbox = /*#__PURE__*/function (_Component) {\n _inherits(Checkbox, _Component);\n\n var _super = _createSuper$4(Checkbox);\n\n function Checkbox(props) {\n var _this;\n\n _classCallCheck(this, Checkbox);\n\n _this = _super.call(this, props);\n _this.state = {\n focused: false\n };\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(Checkbox, [{\n key: \"onClick\",\n value: function onClick(e) {\n if (!this.props.disabled && !this.props.readOnly && this.props.onChange) {\n var value = this.isChecked() ? this.props.falseValue : this.props.trueValue;\n this.props.onChange({\n originalEvent: e,\n value: this.props.value,\n checked: value,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n type: 'checkbox',\n name: this.props.name,\n id: this.props.id,\n value: this.props.value,\n checked: value\n }\n });\n this.inputRef.current.checked = !this.isChecked();\n this.inputRef.current.focus();\n e.preventDefault();\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n this.inputRef.current.checked = this.isChecked();\n\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread$2({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n }\n }, {\n key: \"onFocus\",\n value: function onFocus() {\n this.setState({\n focused: true\n });\n }\n }, {\n key: \"onBlur\",\n value: function onBlur() {\n this.setState({\n focused: false\n });\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n if (event.key === 'Enter') {\n this.onClick(event);\n event.preventDefault();\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.element,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"isChecked\",\n value: function isChecked() {\n return this.props.checked === this.props.trueValue;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var checked = this.isChecked();\n var containerClass = classNames('p-checkbox p-component', {\n 'p-checkbox-checked': checked,\n 'p-checkbox-disabled': this.props.disabled,\n 'p-checkbox-focused': this.state.focused\n }, this.props.className);\n var boxClass = classNames('p-checkbox-box', {\n 'p-highlight': checked,\n 'p-disabled': this.props.disabled,\n 'p-focus': this.state.focused\n });\n var icon = checked && this.props.icon;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this2.element = el;\n },\n id: this.props.id,\n className: containerClass,\n style: this.props.style,\n onClick: this.onClick,\n onContextMenu: this.props.onContextMenu,\n onMouseDown: this.props.onMouseDown\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hidden-accessible\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n ref: this.inputRef,\n type: \"checkbox\",\n \"aria-labelledby\": this.props.ariaLabelledBy,\n id: this.props.inputId,\n name: this.props.name,\n tabIndex: this.props.tabIndex,\n defaultChecked: checked,\n onKeyDown: this.onKeyDown,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n disabled: this.props.disabled,\n readOnly: this.props.readOnly,\n required: this.props.required\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: boxClass,\n ref: function ref(el) {\n return _this2.box = el;\n },\n role: \"checkbox\",\n \"aria-checked\": checked\n }, IconUtils.getJSXIcon(icon, {\n className: 'p-checkbox-icon p-c'\n }, {\n props: this.props,\n checked: checked\n })));\n }\n }]);\n\n return Checkbox;\n}(Component);\n\n_defineProperty(Checkbox, \"defaultProps\", {\n id: null,\n inputRef: null,\n inputId: null,\n value: null,\n name: null,\n checked: false,\n trueValue: true,\n falseValue: false,\n style: null,\n className: null,\n disabled: false,\n required: false,\n readOnly: false,\n tabIndex: null,\n icon: 'pi pi-check',\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n onChange: null,\n onMouseDown: null,\n onContextMenu: null\n});\n\nfunction _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$3() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar MultiSelectHeader = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectHeader, _Component);\n\n var _super = _createSuper$3(MultiSelectHeader);\n\n function MultiSelectHeader(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectHeader);\n\n _this = _super.call(this, props);\n _this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this));\n _this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectHeader, [{\n key: \"onFilter\",\n value: function onFilter(event) {\n if (this.props.onFilter) {\n this.props.onFilter({\n originalEvent: event,\n query: event.target.value\n });\n }\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(event) {\n if (this.props.onSelectAll) {\n this.props.onSelectAll({\n originalEvent: event,\n checked: this.props.selectAll\n });\n }\n }\n }, {\n key: \"renderFilterElement\",\n value: function renderFilterElement() {\n if (this.props.filter) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-filter-container\"\n }, /*#__PURE__*/React.createElement(InputText, {\n type: \"text\",\n role: \"textbox\",\n value: this.props.filterValue,\n onChange: this.onFilter,\n className: \"p-multiselect-filter\",\n placeholder: this.props.filterPlaceholder\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-filter-icon pi pi-search\"\n }));\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var filterElement = this.renderFilterElement();\n var checkboxElement = this.props.showSelectAll && /*#__PURE__*/React.createElement(Checkbox, {\n checked: this.props.selectAll,\n onChange: this.onSelectAll,\n role: \"checkbox\",\n \"aria-checked\": this.props.selectAll\n });\n var closeElement = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-multiselect-close p-link\",\n onClick: this.props.onClose\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-close-icon pi pi-times\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n var element = /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-header\"\n }, checkboxElement, filterElement, closeElement);\n\n if (this.props.template) {\n var defaultOptions = {\n className: 'p-multiselect-header',\n checkboxElement: checkboxElement,\n checked: this.props.selectAll,\n onChange: this.onSelectAll,\n filterElement: filterElement,\n closeElement: closeElement,\n closeElementClassName: 'p-multiselect-close p-link',\n closeIconClassName: 'p-multiselect-close-icon pi pi-times',\n onCloseClick: this.props.onClose,\n element: element,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.template, defaultOptions);\n }\n\n return element;\n }\n }]);\n\n return MultiSelectHeader;\n}(Component);\n\nfunction _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$2() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar MultiSelectItem = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectItem, _Component);\n\n var _super = _createSuper$2(MultiSelectItem);\n\n function MultiSelectItem(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectItem);\n\n _this = _super.call(this, props);\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectItem, [{\n key: \"onClick\",\n value: function onClick(event) {\n if (this.props.onClick) {\n this.props.onClick({\n originalEvent: event,\n option: this.props.option\n });\n }\n\n event.preventDefault();\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n if (this.props.onKeyDown) {\n this.props.onKeyDown({\n originalEvent: event,\n option: this.props.option\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-multiselect-item', {\n 'p-highlight': this.props.selected,\n 'p-disabled': this.props.disabled\n }, this.props.option.className);\n var checkboxClassName = classNames('p-checkbox-box', {\n 'p-highlight': this.props.selected\n });\n var checkboxIcon = classNames('p-checkbox-icon p-c', {\n 'pi pi-check': this.props.selected\n });\n var content = this.props.template ? ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label;\n var tabIndex = this.props.disabled ? null : this.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n onClick: this.onClick,\n tabIndex: tabIndex,\n onKeyDown: this.onKeyDown,\n role: \"option\",\n \"aria-selected\": this.props.selected\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-checkbox p-component\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: checkboxClassName\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: checkboxIcon\n }))), /*#__PURE__*/React.createElement(\"span\", null, content), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }]);\n\n return MultiSelectItem;\n}(Component);\n\n_defineProperty(MultiSelectItem, \"defaultProps\", {\n option: null,\n label: null,\n selected: false,\n disabled: false,\n tabIndex: null,\n template: null,\n onClick: null,\n onKeyDown: null\n});\n\nfunction ownKeys$1(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; }\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar MultiSelectPanelComponent = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelectPanelComponent, _Component);\n\n var _super = _createSuper$1(MultiSelectPanelComponent);\n\n function MultiSelectPanelComponent(props) {\n var _this;\n\n _classCallCheck(this, MultiSelectPanelComponent);\n\n _this = _super.call(this, props);\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MultiSelectPanelComponent, [{\n key: \"onEnter\",\n value: function onEnter() {\n var _this2 = this;\n\n this.props.onEnter(function () {\n if (_this2.virtualScrollerRef) {\n var selectedIndex = _this2.props.getSelectedOptionIndex();\n\n if (selectedIndex !== -1) {\n _this2.virtualScrollerRef.scrollToIndex(selectedIndex);\n }\n }\n });\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n if (this.virtualScrollerRef) {\n this.virtualScrollerRef.scrollToIndex(0);\n }\n\n this.props.onFilterInputChange && this.props.onFilterInputChange(event);\n }\n }, {\n key: \"isEmptyFilter\",\n value: function isEmptyFilter() {\n return !(this.props.visibleOptions && this.props.visibleOptions.length) && this.props.hasFilter();\n }\n }, {\n key: \"renderHeader\",\n value: function renderHeader() {\n return /*#__PURE__*/React.createElement(MultiSelectHeader, {\n filter: this.props.filter,\n filterValue: this.props.filterValue,\n onFilter: this.onFilterInputChange,\n filterPlaceholder: this.props.filterPlaceholder,\n onClose: this.props.onCloseClick,\n showSelectAll: this.props.showSelectAll,\n selectAll: this.props.isAllSelected(),\n onSelectAll: this.props.onSelectAll,\n template: this.props.panelHeaderTemplate\n });\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n if (this.props.panelFooterTemplate) {\n var content = ObjectUtils.getJSXElement(this.props.panelFooterTemplate, this.props, this.props.onOverlayHide);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-footer\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderGroupChildren\",\n value: function renderGroupChildren(optionGroup) {\n var _this3 = this;\n\n var groupChildren = this.props.getOptionGroupChildren(optionGroup);\n return groupChildren.map(function (option, j) {\n var optionLabel = _this3.props.getOptionLabel(option);\n\n var optionKey = j + '_' + _this3.props.getOptionRenderKey(option);\n\n var disabled = _this3.props.isOptionDisabled(option);\n\n var tabIndex = disabled ? null : _this3.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(MultiSelectItem, {\n key: optionKey,\n label: optionLabel,\n option: option,\n template: _this3.props.itemTemplate,\n selected: _this3.props.isSelected(option),\n onClick: _this3.props.onOptionSelect,\n onKeyDown: _this3.props.onOptionKeyDown,\n tabIndex: tabIndex,\n disabled: disabled\n });\n });\n }\n }, {\n key: \"renderEmptyFilter\",\n value: function renderEmptyFilter() {\n var emptyFilterMessage = ObjectUtils.getJSXElement(this.props.emptyFilterMessage, this.props) || localeOption('emptyFilterMessage');\n return /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-multiselect-empty-message\"\n }, emptyFilterMessage);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(option, index) {\n if (this.props.optionGroupLabel) {\n var groupContent = this.props.optionGroupTemplate ? ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.props.getOptionGroupLabel(option);\n var groupChildrenContent = this.renderGroupChildren(option);\n var key = index + '_' + this.props.getOptionGroupRenderKey(option);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: key\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-multiselect-item-group\"\n }, groupContent), groupChildrenContent);\n } else {\n var optionLabel = this.props.getOptionLabel(option);\n var optionKey = index + '_' + this.props.getOptionRenderKey(option);\n var disabled = this.props.isOptionDisabled(option);\n var tabIndex = disabled ? null : this.props.tabIndex || 0;\n return /*#__PURE__*/React.createElement(MultiSelectItem, {\n key: optionKey,\n label: optionLabel,\n option: option,\n template: this.props.itemTemplate,\n selected: this.props.isSelected(option),\n onClick: this.props.onOptionSelect,\n onKeyDown: this.props.onOptionKeyDown,\n tabIndex: tabIndex,\n disabled: disabled\n });\n }\n }\n }, {\n key: \"renderItems\",\n value: function renderItems() {\n var _this4 = this;\n\n if (this.props.visibleOptions && this.props.visibleOptions.length) {\n return this.props.visibleOptions.map(function (option, index) {\n return _this4.renderItem(option, index);\n });\n } else if (this.props.hasFilter()) {\n return this.renderEmptyFilter();\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this5 = this;\n\n if (this.props.virtualScrollerOptions) {\n var virtualScrollerProps = _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions), {\n style: _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions.style), {\n height: this.props.scrollHeight\n }),\n className: classNames('p-multiselect-items-wrapper', this.props.virtualScrollerOptions.className),\n items: this.props.visibleOptions,\n onLazyLoad: function onLazyLoad(event) {\n return _this5.props.virtualScrollerOptions.onLazyLoad(_objectSpread$1(_objectSpread$1({}, event), {\n filter: _this5.props.filterValue\n }));\n },\n itemTemplate: function itemTemplate(item, options) {\n return item && _this5.renderItem(item, options.index);\n },\n contentTemplate: function contentTemplate(options) {\n var className = classNames('p-multiselect-items p-component', options.className);\n var content = _this5.isEmptyFilter() ? _this5.renderEmptyFilter() : options.children;\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: options.contentRef,\n className: className,\n role: \"listbox\",\n \"aria-multiselectable\": true\n }, content);\n }\n });\n\n return /*#__PURE__*/React.createElement(VirtualScroller, _extends({\n ref: function ref(el) {\n return _this5.virtualScrollerRef = el;\n }\n }, virtualScrollerProps));\n } else {\n var items = this.renderItems();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-items-wrapper\",\n style: {\n maxHeight: this.props.scrollHeight\n }\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-multiselect-items p-component\",\n role: \"listbox\",\n \"aria-multiselectable\": true\n }, items));\n }\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n var panelClassName = classNames('p-multiselect-panel p-component', {\n 'p-multiselect-limited': !this.props.allowOptionSelect()\n }, this.props.panelClassName);\n var header = this.renderHeader();\n var content = this.renderContent();\n var footer = this.renderFooter();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.props.forwardRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.props[\"in\"],\n timeout: {\n enter: 120,\n exit: 100\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.onEnter,\n onEntered: this.props.onEntered,\n onExit: this.props.onExit,\n onExited: this.props.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.props.forwardRef,\n className: panelClassName,\n style: this.props.panelStyle,\n onClick: this.props.onClick\n }, header, content, footer));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return MultiSelectPanelComponent;\n}(Component);\n\nvar MultiSelectPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(MultiSelectPanelComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction 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; }\n\nfunction _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; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar MultiSelect = /*#__PURE__*/function (_Component) {\n _inherits(MultiSelect, _Component);\n\n var _super = _createSuper(MultiSelect);\n\n function MultiSelect(props) {\n var _this;\n\n _classCallCheck(this, MultiSelect);\n\n _this = _super.call(this, props);\n _this.state = {\n filter: '',\n focused: false,\n overlayVisible: false\n };\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.onOptionSelect = _this.onOptionSelect.bind(_assertThisInitialized(_this));\n _this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n _this.onCloseClick = _this.onCloseClick.bind(_assertThisInitialized(_this));\n _this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));\n _this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this));\n _this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this));\n _this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this));\n _this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.getOptionLabel = _this.getOptionLabel.bind(_assertThisInitialized(_this));\n _this.getOptionRenderKey = _this.getOptionRenderKey.bind(_assertThisInitialized(_this));\n _this.isOptionDisabled = _this.isOptionDisabled.bind(_assertThisInitialized(_this));\n _this.getOptionGroupChildren = _this.getOptionGroupChildren.bind(_assertThisInitialized(_this));\n _this.getOptionGroupLabel = _this.getOptionGroupLabel.bind(_assertThisInitialized(_this));\n _this.getOptionGroupRenderKey = _this.getOptionGroupRenderKey.bind(_assertThisInitialized(_this));\n _this.allowOptionSelect = _this.allowOptionSelect.bind(_assertThisInitialized(_this));\n _this.isSelected = _this.isSelected.bind(_assertThisInitialized(_this));\n _this.isAllSelected = _this.isAllSelected.bind(_assertThisInitialized(_this));\n _this.hasFilter = _this.hasFilter.bind(_assertThisInitialized(_this));\n _this.getSelectedOptionIndex = _this.getSelectedOptionIndex.bind(_assertThisInitialized(_this));\n _this.hide = _this.hide.bind(_assertThisInitialized(_this));\n _this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));\n _this.overlayRef = /*#__PURE__*/createRef();\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(MultiSelect, [{\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.container\n });\n }\n }, {\n key: \"allowOptionSelect\",\n value: function allowOptionSelect() {\n return !this.props.selectionLimit || !this.props.value || this.props.value && this.props.value.length < this.props.selectionLimit;\n }\n }, {\n key: \"onOptionSelect\",\n value: function onOptionSelect(event) {\n var _this2 = this;\n\n var originalEvent = event.originalEvent,\n option = event.option;\n\n if (this.props.disabled || this.isOptionDisabled(option)) {\n return;\n }\n\n var optionValue = this.getOptionValue(option);\n var isOptionValueUsed = this.isOptionValueUsed(option);\n var selected = this.isSelected(option);\n var allowOptionSelect = this.allowOptionSelect();\n if (selected) this.updateModel(originalEvent, this.props.value.filter(function (val) {\n return !ObjectUtils.equals(isOptionValueUsed ? val : _this2.getOptionValue(val), optionValue, _this2.equalityKey());\n }));else if (allowOptionSelect) this.updateModel(originalEvent, [].concat(_toConsumableArray(this.props.value || []), [optionValue]));\n }\n }, {\n key: \"onOptionKeyDown\",\n value: function onOptionKeyDown(event) {\n var originalEvent = event.originalEvent;\n var listItem = originalEvent.currentTarget;\n\n switch (originalEvent.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.focus();\n }\n\n originalEvent.preventDefault();\n break;\n //up\n\n case 38:\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.focus();\n }\n\n originalEvent.preventDefault();\n break;\n //enter and space\n\n case 13:\n case 32:\n this.onOptionSelect(event);\n originalEvent.preventDefault();\n break;\n //escape\n\n case 27:\n this.hide();\n this.inputRef.current.focus();\n break;\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.hasClass(nextItem, 'p-multiselect-item-group') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.hasClass(prevItem, 'p-multiselect-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (!this.props.disabled && !this.isPanelClicked(event) && !DomHandler.hasClass(event.target, 'p-multiselect-token-icon') && !this.isClearClicked(event)) {\n if (this.state.overlayVisible) {\n this.hide();\n } else {\n this.show();\n }\n\n this.inputRef.current.focus();\n event.preventDefault();\n }\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n switch (event.which) {\n //down\n case 40:\n if (!this.state.overlayVisible && event.altKey) {\n this.show();\n event.preventDefault();\n }\n\n break;\n //space\n\n case 32:\n if (this.state.overlayVisible) this.hide();else this.show();\n event.preventDefault();\n break;\n //escape\n\n case 27:\n this.hide();\n break;\n //tab\n\n case 9:\n if (this.state.overlayVisible) {\n var firstFocusableElement = DomHandler.getFirstFocusableElement(this.overlayRef.current);\n\n if (firstFocusableElement) {\n firstFocusableElement.focus();\n event.preventDefault();\n }\n }\n\n break;\n }\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(event) {\n var _this3 = this;\n\n if (this.props.onSelectAll) {\n this.props.onSelectAll(event);\n } else {\n var value = null;\n var visibleOptions = this.getVisibleOptions();\n\n if (event.checked) {\n value = [];\n\n if (visibleOptions) {\n var selectedOptions = visibleOptions.filter(function (option) {\n return _this3.isOptionDisabled(option) && _this3.isSelected(option);\n });\n value = selectedOptions.map(function (option) {\n return _this3.getOptionValue(option);\n });\n }\n } else if (visibleOptions) {\n visibleOptions = visibleOptions.filter(function (option) {\n return !_this3.isOptionDisabled(option);\n });\n\n if (this.props.optionGroupLabel) {\n value = [];\n visibleOptions.forEach(function (optionGroup) {\n return value = [].concat(_toConsumableArray(value), _toConsumableArray(_this3.getOptionGroupChildren(optionGroup).filter(function (option) {\n return !_this3.isOptionDisabled(option);\n }).map(function (option) {\n return _this3.getOptionValue(option);\n })));\n });\n } else {\n value = visibleOptions.map(function (option) {\n return _this3.getOptionValue(option);\n });\n }\n }\n\n this.updateModel(event.originalEvent, value);\n }\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(event, value) {\n if (this.props.onChange) {\n this.props.onChange({\n originalEvent: event,\n value: value,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: value\n }\n });\n }\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n var _this4 = this;\n\n var filter = event.query;\n this.setState({\n filter: filter\n }, function () {\n if (_this4.props.onFilter) {\n _this4.props.onFilter({\n originalEvent: event,\n filter: filter\n });\n }\n });\n }\n }, {\n key: \"resetFilter\",\n value: function resetFilter() {\n var _this5 = this;\n\n var filter = '';\n this.setState({\n filter: filter\n }, function () {\n _this5.props.onFilter && _this5.props.onFilter({\n filter: filter\n });\n });\n }\n }, {\n key: \"show\",\n value: function show() {\n this.setState({\n overlayVisible: true\n });\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.setState({\n overlayVisible: false\n });\n }\n }, {\n key: \"onOverlayEnter\",\n value: function onOverlayEnter(callback) {\n ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);\n this.alignOverlay();\n this.scrollInView();\n callback && callback();\n }\n }, {\n key: \"onOverlayEntered\",\n value: function onOverlayEntered() {\n this.bindDocumentClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.props.onShow && this.props.onShow();\n }\n }, {\n key: \"onOverlayExit\",\n value: function onOverlayExit() {\n this.unbindDocumentClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n }\n }, {\n key: \"onOverlayExited\",\n value: function onOverlayExited() {\n if (this.props.filter && this.props.resetFilterOnHide) {\n this.resetFilter();\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n this.props.onHide && this.props.onHide();\n }\n }, {\n key: \"alignOverlay\",\n value: function alignOverlay() {\n DomHandler.alignOverlay(this.overlayRef.current, this.label.parentElement, this.props.appendTo || PrimeReact.appendTo);\n }\n }, {\n key: \"scrollInView\",\n value: function scrollInView() {\n var highlightItem = DomHandler.findSingle(this.overlayRef.current, 'li.p-highlight');\n\n if (highlightItem) {\n highlightItem.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n }\n }, {\n key: \"onCloseClick\",\n value: function onCloseClick(event) {\n this.hide();\n this.inputRef.current.focus();\n event.preventDefault();\n event.stopPropagation();\n }\n }, {\n key: \"getSelectedOptionIndex\",\n value: function getSelectedOptionIndex() {\n if (this.props.value != null && this.props.options) {\n if (this.props.optionGroupLabel) {\n for (var i = 0; i < this.props.options.length; i++) {\n var selectedOptionIndex = this.findOptionIndexInList(this.props.value, this.getOptionGroupChildren(this.props.options[i]));\n\n if (selectedOptionIndex !== -1) {\n return {\n group: i,\n option: selectedOptionIndex\n };\n }\n }\n } else {\n return this.findOptionIndexInList(this.props.value, this.props.options);\n }\n }\n\n return -1;\n }\n }, {\n key: \"findOptionIndexInList\",\n value: function findOptionIndexInList(value, list) {\n var _this6 = this;\n\n var key = this.equalityKey();\n return list.findIndex(function (item) {\n return value.some(function (val) {\n return ObjectUtils.equals(val, _this6.getOptionValue(item), key);\n });\n });\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(option) {\n var _this7 = this;\n\n var selected = false;\n\n if (this.props.value) {\n var optionValue = this.getOptionValue(option);\n var isOptionValueUsed = this.isOptionValueUsed(option);\n var key = this.equalityKey();\n selected = this.props.value.some(function (val) {\n return ObjectUtils.equals(isOptionValueUsed ? val : _this7.getOptionValue(val), optionValue, key);\n });\n }\n\n return selected;\n }\n }, {\n key: \"getLabelByValue\",\n value: function getLabelByValue(val) {\n var option;\n\n if (this.props.options) {\n if (this.props.optionGroupLabel) {\n var _iterator = _createForOfIteratorHelper(this.props.options),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var optionGroup = _step.value;\n option = this.findOptionByValue(val, this.getOptionGroupChildren(optionGroup));\n\n if (option) {\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n } else {\n option = this.findOptionByValue(val, this.props.options);\n }\n }\n\n return option ? this.getOptionLabel(option) : null;\n }\n }, {\n key: \"findOptionByValue\",\n value: function findOptionByValue(val, list) {\n var key = this.equalityKey();\n\n var _iterator2 = _createForOfIteratorHelper(list),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var option = _step2.value;\n var optionValue = this.getOptionValue(option);\n\n if (ObjectUtils.equals(optionValue, val, key)) {\n return option;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return null;\n }\n }, {\n key: \"onFocus\",\n value: function onFocus(event) {\n var _this8 = this;\n\n event.persist();\n this.setState({\n focused: true\n }, function () {\n if (_this8.props.onFocus) {\n _this8.props.onFocus(event);\n }\n });\n }\n }, {\n key: \"onBlur\",\n value: function onBlur(event) {\n var _this9 = this;\n\n event.persist();\n this.setState({\n focused: false\n }, function () {\n if (_this9.props.onBlur) {\n _this9.props.onBlur(event);\n }\n });\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this10 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this10.state.overlayVisible && _this10.isOutsideClicked(event)) {\n _this10.hide();\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this11 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.container, function () {\n if (_this11.state.overlayVisible) {\n _this11.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n }, {\n key: \"bindResizeListener\",\n value: function bindResizeListener() {\n var _this12 = this;\n\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this12.state.overlayVisible && !DomHandler.isTouchDevice()) {\n _this12.hide();\n }\n };\n\n window.addEventListener('resize', this.resizeListener);\n }\n }\n }, {\n key: \"unbindResizeListener\",\n value: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.container && !(this.container.isSameNode(event.target) || this.isClearClicked(event) || this.container.contains(event.target) || this.isPanelClicked(event));\n }\n }, {\n key: \"isClearClicked\",\n value: function isClearClicked(event) {\n return DomHandler.hasClass(event.target, 'p-multiselect-clear-icon');\n }\n }, {\n key: \"isPanelClicked\",\n value: function isPanelClicked(event) {\n return this.overlayRef && this.overlayRef.current && this.overlayRef.current.contains(event.target);\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (this.state.overlayVisible && this.hasFilter()) {\n this.alignOverlay();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentClickListener();\n this.unbindResizeListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n }\n }, {\n key: \"hasFilter\",\n value: function hasFilter() {\n return this.state.filter && this.state.filter.trim().length > 0;\n }\n }, {\n key: \"isAllSelected\",\n value: function isAllSelected() {\n var _this13 = this;\n\n if (this.props.onSelectAll) {\n return this.props.selectAll;\n } else {\n var visibleOptions = this.getVisibleOptions();\n\n if (ObjectUtils.isEmpty(visibleOptions)) {\n return false;\n }\n\n visibleOptions = visibleOptions.filter(function (option) {\n return !_this13.isOptionDisabled(option);\n });\n\n if (this.props.optionGroupLabel) {\n var _iterator3 = _createForOfIteratorHelper(visibleOptions),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var optionGroup = _step3.value;\n var visibleOptionsGroupChildren = this.getOptionGroupChildren(optionGroup).filter(function (option) {\n return !_this13.isOptionDisabled(option);\n });\n\n var _iterator4 = _createForOfIteratorHelper(visibleOptionsGroupChildren),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var option = _step4.value;\n\n if (!this.isSelected(option)) {\n return false;\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n } else {\n var _iterator5 = _createForOfIteratorHelper(visibleOptions),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _option = _step5.value;\n\n if (!this.isSelected(_option)) {\n return false;\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n }\n\n return true;\n }\n }, {\n key: \"getOptionLabel\",\n value: function getOptionLabel(option) {\n return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;\n }\n }, {\n key: \"getOptionValue\",\n value: function getOptionValue(option) {\n if (this.props.optionValue) {\n var data = ObjectUtils.resolveFieldData(option, this.props.optionValue);\n return data !== null ? data : option;\n }\n\n return option && option['value'] !== undefined ? option['value'] : option;\n }\n }, {\n key: \"getOptionRenderKey\",\n value: function getOptionRenderKey(option) {\n return this.props.dataKey ? ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option);\n }\n }, {\n key: \"getOptionGroupRenderKey\",\n value: function getOptionGroupRenderKey(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);\n }\n }, {\n key: \"getOptionGroupLabel\",\n value: function getOptionGroupLabel(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);\n }\n }, {\n key: \"getOptionGroupChildren\",\n value: function getOptionGroupChildren(optionGroup) {\n return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren);\n }\n }, {\n key: \"isOptionDisabled\",\n value: function isOptionDisabled(option) {\n if (this.props.optionDisabled) {\n return ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, this.props.optionDisabled);\n }\n\n return option && option['disabled'] !== undefined ? option['disabled'] : false;\n }\n }, {\n key: \"isOptionValueUsed\",\n value: function isOptionValueUsed(option) {\n return this.props.optionValue || option && option['value'] !== undefined;\n }\n }, {\n key: \"getVisibleOptions\",\n value: function getVisibleOptions() {\n if (this.hasFilter()) {\n var filterValue = this.state.filter.trim().toLocaleLowerCase(this.props.filterLocale);\n var searchFields = this.props.filterBy ? this.props.filterBy.split(',') : [this.props.optionLabel || 'label'];\n\n if (this.props.optionGroupLabel) {\n var filteredGroups = [];\n\n var _iterator6 = _createForOfIteratorHelper(this.props.options),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var optgroup = _step6.value;\n var filteredSubOptions = FilterService.filter(this.getOptionGroupChildren(optgroup), searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);\n\n if (filteredSubOptions && filteredSubOptions.length) {\n filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {\n items: filteredSubOptions\n }));\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return filteredGroups;\n } else {\n return FilterService.filter(this.props.options, searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);\n }\n } else {\n return this.props.options;\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n return !this.props.value || this.props.value.length === 0;\n }\n }, {\n key: \"equalityKey\",\n value: function equalityKey() {\n return this.props.optionValue ? null : this.props.dataKey;\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity() {\n return this.inputRef.current.checkValidity();\n }\n }, {\n key: \"removeChip\",\n value: function removeChip(event, item) {\n var key = this.equalityKey();\n var value = this.props.value.filter(function (val) {\n return !ObjectUtils.equals(val, item, key);\n });\n this.updateModel(event, value);\n }\n }, {\n key: \"getSelectedItemsLabel\",\n value: function getSelectedItemsLabel() {\n var pattern = /{(.*?)}/;\n\n if (pattern.test(this.props.selectedItemsLabel)) {\n return this.props.selectedItemsLabel.replace(this.props.selectedItemsLabel.match(pattern)[0], this.props.value.length + '');\n }\n\n return this.props.selectedItemsLabel;\n }\n }, {\n key: \"getLabel\",\n value: function getLabel() {\n var label;\n\n if (!this.isEmpty() && !this.props.fixedPlaceholder) {\n if (this.props.maxSelectedLabels && this.props.value.length > this.props.maxSelectedLabels) {\n return this.getSelectedItemsLabel();\n } else {\n label = '';\n\n for (var i = 0; i < this.props.value.length; i++) {\n if (i !== 0) {\n label += ',';\n }\n\n label += this.getLabelByValue(this.props.value[i]);\n }\n\n return label;\n }\n }\n\n return label;\n }\n }, {\n key: \"getLabelContent\",\n value: function getLabelContent() {\n var _this14 = this;\n\n if (this.props.selectedItemTemplate) {\n if (!this.isEmpty()) {\n if (this.props.maxSelectedLabels && this.props.value.length > this.props.maxSelectedLabels) {\n return this.getSelectedItemsLabel();\n } else {\n return this.props.value.map(function (val, index) {\n var item = ObjectUtils.getJSXElement(_this14.props.selectedItemTemplate, val);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, item);\n });\n }\n } else {\n return ObjectUtils.getJSXElement(this.props.selectedItemTemplate);\n }\n } else {\n if (this.props.display === 'chip' && !this.isEmpty()) {\n var value = this.props.value.slice(0, this.props.maxSelectedLabels || this.props.value.length);\n return value.map(function (val) {\n var label = _this14.getLabelByValue(val);\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-token\",\n key: label\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-multiselect-token-label\"\n }, label), !_this14.props.disabled && IconUtils.getJSXIcon(_this14.props.removeIcon, {\n className: 'p-multiselect-token-icon',\n onClick: function onClick(e) {\n return _this14.removeChip(e, val);\n }\n }, {\n props: _this14.props\n }));\n });\n }\n\n return this.getLabel();\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.container,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"renderClearIcon\",\n value: function renderClearIcon() {\n var _this15 = this;\n\n var empty = this.isEmpty();\n\n if (!empty && this.props.showClear && !this.props.disabled) {\n return /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-multiselect-clear-icon pi pi-times\",\n onClick: function onClick(e) {\n return _this15.updateModel(e, null);\n }\n });\n }\n\n return null;\n }\n }, {\n key: \"renderLabel\",\n value: function renderLabel() {\n var _this16 = this;\n\n var empty = this.isEmpty();\n var content = this.getLabelContent();\n var labelClassName = classNames('p-multiselect-label', {\n 'p-placeholder': empty && this.props.placeholder,\n 'p-multiselect-label-empty': empty && !this.props.placeholder && !this.props.selectedItemTemplate,\n 'p-multiselect-items-label': !empty && this.props.display !== 'chip' && this.props.value.length > this.props.maxSelectedLabels\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this16.label = el;\n },\n className: \"p-multiselect-label-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: labelClassName\n }, content || this.props.placeholder || 'empty'));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this17 = this;\n\n var className = classNames('p-multiselect p-component p-inputwrapper', {\n 'p-multiselect-chip': this.props.display === 'chip',\n 'p-disabled': this.props.disabled,\n 'p-multiselect-clearable': this.props.showClear && !this.props.disabled,\n 'p-focus': this.state.focused,\n 'p-inputwrapper-filled': this.props.value && this.props.value.length > 0,\n 'p-inputwrapper-focus': this.state.focused || this.state.overlayVisible\n }, this.props.className);\n var visibleOptions = this.getVisibleOptions();\n var label = this.renderLabel();\n var clearIcon = this.renderClearIcon();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n onClick: this.onClick,\n ref: function ref(el) {\n return _this17.container = el;\n },\n style: this.props.style\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hidden-accessible\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n ref: this.inputRef,\n id: this.props.inputId,\n name: this.props.name,\n readOnly: true,\n type: \"text\",\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: this.onKeyDown,\n role: \"listbox\",\n \"aria-haspopup\": \"listbox\",\n \"aria-labelledby\": this.props.ariaLabelledBy,\n \"aria-expanded\": this.state.overlayVisible,\n disabled: this.props.disabled,\n tabIndex: this.props.tabIndex\n })), label, clearIcon, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-multiselect-trigger\"\n }, IconUtils.getJSXIcon(this.props.dropdownIcon, {\n className: 'p-multiselect-trigger-icon p-c'\n }, {\n props: this.props\n })), /*#__PURE__*/React.createElement(MultiSelectPanel, _extends({\n ref: this.overlayRef,\n visibleOptions: visibleOptions\n }, this.props, {\n onClick: this.onPanelClick,\n onOverlayHide: this.hide,\n filterValue: this.state.filter,\n hasFilter: this.hasFilter,\n onFilterInputChange: this.onFilterInputChange,\n onCloseClick: this.onCloseClick,\n onSelectAll: this.onSelectAll,\n getOptionLabel: this.getOptionLabel,\n getOptionRenderKey: this.getOptionRenderKey,\n isOptionDisabled: this.isOptionDisabled,\n getOptionGroupChildren: this.getOptionGroupChildren,\n getOptionGroupLabel: this.getOptionGroupLabel,\n getOptionGroupRenderKey: this.getOptionGroupRenderKey,\n isSelected: this.isSelected,\n getSelectedOptionIndex: this.getSelectedOptionIndex,\n isAllSelected: this.isAllSelected,\n onOptionSelect: this.onOptionSelect,\n allowOptionSelect: this.allowOptionSelect,\n onOptionKeyDown: this.onOptionKeyDown,\n \"in\": this.state.overlayVisible,\n onEnter: this.onOverlayEnter,\n onEntered: this.onOverlayEntered,\n onExit: this.onOverlayExit,\n onExited: this.onOverlayExited\n })));\n }\n }]);\n\n return MultiSelect;\n}(Component);\n\n_defineProperty(MultiSelect, \"defaultProps\", {\n id: null,\n inputRef: null,\n name: null,\n value: null,\n options: null,\n optionLabel: null,\n optionValue: null,\n optionDisabled: null,\n optionGroupLabel: null,\n optionGroupChildren: null,\n optionGroupTemplate: null,\n display: 'comma',\n style: null,\n className: null,\n panelClassName: null,\n panelStyle: null,\n virtualScrollerOptions: null,\n scrollHeight: '200px',\n placeholder: null,\n fixedPlaceholder: false,\n disabled: false,\n showClear: false,\n filter: false,\n filterBy: null,\n filterMatchMode: 'contains',\n filterPlaceholder: null,\n filterLocale: undefined,\n emptyFilterMessage: null,\n resetFilterOnHide: false,\n tabIndex: 0,\n dataKey: null,\n inputId: null,\n appendTo: null,\n tooltip: null,\n tooltipOptions: null,\n maxSelectedLabels: null,\n selectionLimit: null,\n selectedItemsLabel: '{0} items selected',\n ariaLabelledBy: null,\n itemTemplate: null,\n selectedItemTemplate: null,\n panelHeaderTemplate: null,\n panelFooterTemplate: null,\n transitionOptions: null,\n dropdownIcon: 'pi pi-chevron-down',\n removeIcon: 'pi pi-times-circle',\n showSelectAll: true,\n selectAll: false,\n onChange: null,\n onFocus: null,\n onBlur: null,\n onShow: null,\n onHide: null,\n onFilter: null,\n onSelectAll: null\n});\n\nexport { MultiSelect };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,SAA3B,QAA4C,OAA5C;AACA,SAASC,UAAT,EAAqBC,SAArB,EAAgCC,WAAhC,EAA6CC,UAA7C,EAAyDC,WAAzD,EAAsEC,6BAAtE,QAA2G,kBAA3G;AACA,SAASC,GAAT,QAAoB,oBAApB;AACA,SAASC,aAAT,QAA8B,0BAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,SAAT,QAA0B,sBAA1B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,eAAT,QAAgC,4BAAhC;AACA,OAAOC,UAAP,IAAqBC,YAArB,EAAmCC,aAAnC,QAAwD,gBAAxD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