From a801021386c62624427c9f558cb2b6533508d081 Mon Sep 17 00:00:00 2001 From: Xon <635541+Xon@users.noreply.github.com> Date: Tue, 6 Aug 2024 13:18:20 +0800 Subject: [PATCH] Fix disabled options where skipped from being rendered --- public/assets/scripts/choices.js | 2 +- public/assets/scripts/choices.min.js | 2 +- src/scripts/store/store.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/scripts/choices.js b/public/assets/scripts/choices.js index 0c55c74b9..ba2d1898e 100644 --- a/public/assets/scripts/choices.js +++ b/public/assets/scripts/choices.js @@ -3706,7 +3706,7 @@ var Store = /** @class */function () { */ get: function () { return this.choices.filter(function (choice) { - return !choice.disabled && choice.active; + return choice.active; }); }, enumerable: false, diff --git a/public/assets/scripts/choices.min.js b/public/assets/scripts/choices.min.js index 91d4c6aaf..b6aabe079 100644 --- a/public/assets/scripts/choices.min.js +++ b/public/assets/scripts/choices.min.js @@ -1,2 +1,2 @@ /*! For license information please see choices.min.js.LICENSE.txt */ -(()=>{"use strict";var e={808:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearChoices=t.activateChoices=t.filterChoices=t.removeChoice=t.addChoice=void 0,t.addChoice=function(e){return{type:"ADD_CHOICE",choice:e}},t.removeChoice=function(e){return{type:"REMOVE_CHOICE",value:e}},t.filterChoices=function(e){return{type:"FILTER_CHOICES",results:e}},t.activateChoices=function(e){return void 0===e&&(e=!0),{type:"ACTIVATE_CHOICES",active:e}},t.clearChoices=function(){return{type:"CLEAR_CHOICES"}}},18:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGroup=void 0,t.addGroup=function(e){return{type:"ADD_GROUP",group:e}}},956:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.highlightItem=t.removeItem=t.addItem=void 0,t.addItem=function(e){return{type:"ADD_ITEM",item:e}},t.removeItem=function(e){return{type:"REMOVE_ITEM",item:e}},t.highlightItem=function(e,t){return{type:"HIGHLIGHT_ITEM",id:e,highlighted:t}}},278:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setIsLoading=t.clearAll=void 0,t.clearAll=function(){return{type:"CLEAR_ALL"}},t.setIsLoading=function(e){return{type:"SET_IS_LOADING",isLoading:e}}},472:function(e,t,i){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i element"),this)},e.prototype.removeChoice=function(e){return this._store.dispatch((0,h.removeChoice)(e)),this},e.prototype.clearChoices=function(){return this._store.dispatch((0,h.clearChoices)()),this},e.prototype.clearStore=function(){return this._store.dispatch((0,p.clearAll)()),this._lastAddedChoiceId=0,this._lastAddedGroupId=0,this},e.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),this._isSearching&&this._stopSearch(),this},e.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.items!==this._prevState.items;(this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||e)&&(this._isSelectElement&&this._renderChoices(),e&&this._renderItems(),this._prevState=this._currentState)}},e.prototype._renderChoices=function(){var e=this,t=this._store,i=t.activeGroups,n=t.activeChoices,s=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame((function(){return e.choiceList.scrollToTop()})),i.length>=1&&!this._isSearching){var o=n.filter((function(e){return e.placeholder&&-1===e.groupId}));o.length>=1&&(s=this._createChoicesFragment(o,s)),s=this._createGroupsFragment(i,n,s)}else n.length>=1&&(s=this._createChoicesFragment(n,s));var r=this.input.value,a=this._canAddItem(this._store.items,r);if(s.childNodes&&s.childNodes.length>0){var c=!a.response;if(a.response&&(this.choiceList.append(s),this._highlightChoice(),this._canAddUserChoices&&r&&a.notice&&(c=!n.find((function(t){return e.config.valueComparer(t.value,r)})))),c){var l=this._templates.notice(this.config,a.notice,this._canAddUserChoices?"add-choice":"");this.choiceList.prepend(l)}}else{var h=void 0;a.response&&this._canAddUserChoices&&r?h=this._templates.notice(this.config,a.notice,"add-choice"):this._isSearching?(l="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,h=this._templates.notice(this.config,l,"no-results")):(l="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,h=this._templates.notice(this.config,l,"no-choices")),this.choiceList.append(h)}},e.prototype._renderItems=function(){var e=this._store.items||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},e.prototype._createGroupsFragment=function(e,t,i){var n=this;void 0===i&&(i=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sorter);var s=t.filter((function(e){return 0===e.groupId}));return s.length>0&&this._createChoicesFragment(s,i,!1),e.forEach((function(e){var s=function(e){return t.filter((function(t){return n._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===n.config.renderSelectedChoices||!t.selected)}))}(e);if(s.length>=1){var o=n._templates.choiceGroup(n.config,e);i.appendChild(o),n._createChoicesFragment(s,i,!0)}})),i},e.prototype._createChoicesFragment=function(e,t,i){var n=this;void 0===t&&(t=document.createDocumentFragment()),void 0===i&&(i=!1);var s=this.config,o=s.renderSelectedChoices,r=s.searchResultLimit,c=s.renderChoiceLimit,l=s.appendGroupInSearch,h=this._isSearching?_.sortByScore:this.config.sorter,u=function(e){if("auto"!==o||n._isSelectOneElement||!e.selected){var i=n._templates.choice(n.config,e,n.config.itemSelectText);if(l){var s="";n._store.groups.every((function(t){return t.id!==e.groupId||(s=t.label,!1)})),s&&n._isSearching&&(i.innerHTML+=" (".concat(s,")"))}t.appendChild(i)}},d=e;if("auto"!==o||this._isSelectOneElement||(d=e.filter((function(e){return!e.selected}))),this._isSelectElement){var p=e.filter((function(e){return!e.element}));0!==p.length&&this.passedElement.addOptions(p)}var f=d.reduce((function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e}),{placeholderChoices:[],normalChoices:[]}),m=f.placeholderChoices,g=f.normalChoices;(this.config.shouldSort||this._isSearching)&&g.sort(h);var v=d.length,y=this._isSelectOneElement?a(a([],m,!0),g,!0):g;this._isSearching?v=r:c&&c>0&&!i&&(v=c);for(var b=0;b0?this._store.getGroupById(i.groupId):null;return{id:i.id,highlighted:i.highlighted,labelClass:i.labelClass,labelDescription:i.labelDescription,customProperties:i.customProperties,disabled:i.disabled,active:i.active,label:i.label,placeholder:i.placeholder,value:i.value,groupValue:n&&n.label?n.label:void 0,element:i.element,keyCode:t}}},e.prototype._triggerChange=function(e){null!=e&&this.passedElement.triggerEvent("change",{value:e})},e.prototype._selectPlaceholderChoice=function(e){this._addItem(e),e.value&&this._triggerChange(e.value)},e.prototype._handleButtonAction=function(e,t){if(0!==e.length&&this.config.removeItems&&this.config.removeItemButton){var i=t&&O(t.parentNode),n=i&&e.find((function(e){return e.id===i}));if(n&&(this._removeItem(n),this._triggerChange(n.value),this._isSelectOneElement&&!this._hasNonChoicePlaceholder)){var s=this._store.placeholderChoice;s&&this._selectPlaceholderChoice(s)}}},e.prototype._handleItemAction=function(e,t,i){var n=this;if(void 0===i&&(i=!1),0!==e.length&&this.config.removeItems&&!this._isSelectOneElement){var s=O(t);s&&(e.forEach((function(e){e.id!==s||e.highlighted?!i&&e.highlighted&&n.unhighlightItem(e):n.highlightItem(e)})),this.input.focus())}},e.prototype._handleChoiceAction=function(e,t,i){var n=this,s=O(t),o=s&&this._store.getChoiceById(s);if(!o)return!1;var r=this.dropdown.isActive,a=!1;return this._store.withDeferRendering((function(){if(!o.selected&&!o.disabled&&n._canAddItem(e,o.value).response){if(n.config.singleModeForMultiSelect&&0!==e.length){var t=e[e.length-1];n._removeItem(t)}n.passedElement.triggerEvent("choice",n._getChoiceForOutput(o,i)),n._addItem(o),n.clearInput(),a=!0}})),!!a&&(this._triggerChange(o.value),r&&(this.config.singleModeForMultiSelect||this._isSelectOneElement)&&(this.hideDropdown(!0),this.containerOuter.focus()),!0)},e.prototype._handleBackspace=function(e){if(this.config.removeItems&&0!==e.length){var t=e[e.length-1],i=e.some((function(e){return e.highlighted}));this.config.editItems&&!i&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(i||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},e.prototype._loadChoices=function(){var e;if(this._isTextElement){this._presetItems=this.config.items.map((function(e){return(0,C.mapInputToChoice)(e,!1)}));var t=this.passedElement.value;if(t){var i=t.split(this.config.delimiter).map((function(e){return(0,C.mapInputToChoice)(e,!1)}));this._presetItems=this._presetItems.concat(i)}this._presetItems.forEach((function(e){e.selected=!0}))}else if(this._isSelectElement){this._presetChoices=this.config.choices.map((function(e){return(0,C.mapInputToChoice)(e,!0)}));var n=this.passedElement.optionsAsChoices();n&&(e=this._presetChoices).push.apply(e,n)}},e.prototype._startLoading=function(){this._store.startDeferRendering()},e.prototype._stopLoading=function(){this._store.stopDeferRendering()},e.prototype._handleLoadingState=function(e){void 0===e&&(e=!0);var t=this.itemList.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._templates.placeholder(this.config,this.config.loadingText))&&this.itemList.append(t):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},e.prototype._handleSearch=function(e){if(this.input.isFocussed){var t=this._store.choices,i=this.config,n=i.searchFloor,s=i.searchChoices,o=t.some((function(e){return!e.active}));if(null!=e&&e.length>=n){var r=s?this._searchChoices(e):0;null!==r&&this.passedElement.triggerEvent("search",{value:e,resultCount:r})}else o&&this._stopSearch()}},e.prototype._canAddItem=function(e,t){var i=this,n=!0,s="";return this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(this.config.singleModeForMultiSelect||(n=!1,s="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText)),n&&this._canAddUserChoices&&""!==t&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(n=!1,s="function"==typeof this.config.customAddItemText?this.config.customAddItemText((0,_.sanitise)(t),t):this.config.customAddItemText),!n||""===t||!this._isSelectElement&&this.config.duplicateItemsAllowed||this._store.items.find((function(e){return i.config.valueComparer(e.value,t)}))&&(n=!1,s="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText((0,_.sanitise)(t),t):this.config.uniqueItemText),n&&(s="function"==typeof this.config.addItemText?this.config.addItemText((0,_.sanitise)(t),t):this.config.addItemText),{response:n,notice:{trusted:s}}},e.prototype._searchChoices=function(e){var t=e.trim().replace(/\s{2,}/," ");if(0===t.length||t===this._currentValue)return null;var i=this._store.searchableChoices,n=t,s=Object.assign(this.config.fuseOptions,{keys:a([],this.config.searchFields,!0),includeMatches:!0}),o=new l.default(i,s).search(n);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,h.filterChoices)(o)),o.length},e.prototype._stopSearch=function(){var e=this._isSearching;this._currentValue="",this._isSearching=!1,e&&this._store.dispatch((0,h.activateChoices)(!0))},e.prototype._addEventListeners=function(){var e=this.config.shadowRoot||document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("input",this._onInput,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},e.prototype._removeEventListeners=function(){var e=this.config.shadowRoot||document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("input",this._onInput),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},e.prototype._onKeyDown=function(e){var t=e.keyCode,i=this._store.items,n=this.input.isFocussed,s=this.dropdown.isActive,o=this.itemList.hasChildren(),r=1===e.key.length||2===e.key.length&&e.key.charCodeAt(0)>=55296||"Unidentified"===e.key;switch(this._isTextElement||s||(this.showDropdown(),!this.input.isFocussed&&r&&(this.input.value+=e.key)),t){case 65:return this._onSelectKey(e,o);case 13:return this._onEnterKey(e,i,s);case 27:return this._onEscapeKey(e,s);case 38:case 33:case 40:case 34:return this._onDirectionKey(e,s);case 8:case 46:return this._onDeleteKey(e,i,n)}},e.prototype._onKeyUp=function(){this._canSearch=this.config.searchEnabled},e.prototype._onInput=function(){var e=this.input.value;if(e){if(this._isTextElement){var t=this._canAddItem(this._store.items,e);t.notice&&(this._displayAddItemNotice(t),this.showDropdown(!0))}if(this._canSearch){this._handleSearch(e);var i=this._canAddItem(this._store.items,e);i.response||this._displayAddItemNotice(i),this._canAddUserChoices&&(this._highlightPosition=0,this._highlightChoice())}}else this._isTextElement?this.hideDropdown(!0):this._stopSearch()},e.prototype._displayAddItemNotice=function(e){var t=this._templates.notice(this.config,e.notice,"add-choice"),i="".concat((0,_.getClassNamesSelector)(this.config.classNames.addChoice),"[data-choice-selectable]"),n=this.choiceList.element.querySelector(i);n?n.outerHTML=t.outerHTML:this.choiceList.prepend(t)},e.prototype._onSelectKey=function(e,t){var i=e.ctrlKey,n=e.metaKey;(i||n)&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},e.prototype._onEnterKey=function(e,t,i){var n=this,s=this.input.value,o=e.target;if(o&&o.hasAttribute("data-button"))return e.preventDefault(),void this._handleButtonAction(t,o);if(!i&&this._isSelectOneElement)return e.preventDefault(),void this.showDropdown();if(i){var r=this.dropdown.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.highlightedState));if(r&&this._handleChoiceAction(t,r,13))return e.preventDefault(),void this.unhighlightAll();s||this.hideDropdown(!0)}o&&s&&this._canAddUserChoices&&this._canAddItem(t,s).response&&(this._store.withDeferRendering((function(){if((n._isSelectOneElement||n.config.singleModeForMultiSelect)&&0!==t.length){var e=t[t.length-1];n._removeItem(e)}var i=!0;if(!n._isSelectElement&&n.config.duplicateItemsAllowed||(i=!n._findAndSelectChoiceByValue(s)),i){var o=(0,_.sanitise)(s),r=n.config.allowHtmlUserInput||o===s?s:{escaped:o,raw:s};n._addChoice((0,C.mapInputToChoice)({value:r,label:r,selected:!0},!1))}n.clearInput(),n.unhighlightAll(),n._triggerChange(s)})),(this._isTextElement||this._isSelectOneElement)&&this.hideDropdown(!0))},e.prototype._onEscapeKey=function(e,t){t&&(e.stopPropagation(),this.hideDropdown(!0),this.containerOuter.focus())},e.prototype._onDirectionKey=function(e,t){var i=e.keyCode,n=e.metaKey;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var s=40===i||34===i?1:-1,o="[data-choice-selectable]",r=void 0;if(n||34===i||33===i)r=s>0?this.dropdown.element.querySelector("".concat(o,":last-of-type")):this.dropdown.element.querySelector(o);else{var a=this.dropdown.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.highlightedState));r=a?(0,_.getAdjacentEl)(a,o,s):this.dropdown.element.querySelector(o)}r&&((0,_.isScrolledIntoView)(r,this.choiceList.element,s)||this.choiceList.scrollToChildElement(r,s),this._highlightChoice(r)),e.preventDefault()}},e.prototype._onDeleteKey=function(e,t,i){var n=e.target;this._isSelectOneElement||n.value||!i||(this._handleBackspace(t),e.preventDefault())},e.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},e.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},e.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(S&&this.choiceList.element.contains(t)){var i=this.choiceList.element.firstElementChild,n="ltr"===this._direction?e.offsetX>=i.offsetWidth:e.offsetX0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},e.prototype._onFocus=function(e){var t,i=this,n=e.target;n&&this.containerOuter.element.contains(n)&&((t={})[m.TEXT_TYPE]=function(){n===i.input.element&&i.containerOuter.addFocusState()},t[m.SELECT_ONE_TYPE]=function(){i.containerOuter.addFocusState(),n===i.input.element&&i.showDropdown(!0)},t[m.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.showDropdown(!0),i.containerOuter.addFocusState())},t)[this._elementType]()},e.prototype._onBlur=function(e){var t,i=this,n=e.target;if(n&&this.containerOuter.element.contains(n)&&!this._isScrollingOnIe){var s=this._store.activeChoices.some((function(e){return e.highlighted}));((t={})[m.TEXT_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),s&&i.unhighlightAll(),i.hideDropdown(!0))},t[m.SELECT_ONE_TYPE]=function(){i.containerOuter.removeFocusState(),(n===i.input.element||n===i.containerOuter.element&&!i._canSearch)&&i.hideDropdown(!0)},t[m.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),i.hideDropdown(!0),s&&i.unhighlightAll())},t)[this._elementType]()}else this._isScrollingOnIe=!1,this.input.element.focus()},e.prototype._onFormReset=function(){var e=this;this._store.withDeferRendering((function(){e.clearInput(),e.hideDropdown(),e.refresh(!1,!1,!0),0!==e._initialItems.length&&e.setChoiceByValue(e._initialItems)}))},e.prototype._highlightChoice=function(e){var t,i=this;void 0===e&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var s=e;Array.from(this.dropdown.element.querySelectorAll((0,_.getClassNamesSelector)(this.config.classNames.highlightedState))).forEach((function(e){var t;(t=e.classList).remove.apply(t,(0,_.getClassNames)(i.config.classNames.highlightedState)),e.setAttribute("aria-selected","false")})),s?this._highlightPosition=n.indexOf(s):(s=n.length>this._highlightPosition?n[this._highlightPosition]:n[n.length-1])||(s=n[0]),(t=s.classList).add.apply(t,(0,_.getClassNames)(this.config.classNames.highlightedState)),s.setAttribute("aria-selected","true"),this.passedElement.triggerEvent("highlightChoice",{el:s}),this.dropdown.isActive&&(this.input.setActiveDescendant(s.id),this.containerOuter.setActiveDescendant(s.id))}},e.prototype._addItem=function(e,t){void 0===t&&(t=!0);var i=e.id;if(0===i)throw new TypeError("item.id must be set before _addItem is called for a choice/item");this._store.dispatch((0,d.addItem)(e)),this._isSelectOneElement&&this.removeActiveItems(i),t&&this.passedElement.triggerEvent("addItem",this._getChoiceForOutput(e))},e.prototype._removeItem=function(e){e.id&&(this._store.dispatch((0,d.removeItem)(e)),this.passedElement.triggerEvent("removeItem",this._getChoiceForOutput(e)))},e.prototype._addChoice=function(e,t){if(void 0===t&&(t=!0),0!==e.id)throw new TypeError("Can not re-add a choice which has already been added");var i=e;this._lastAddedChoiceId++,i.id=this._lastAddedChoiceId,i.elementId="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(i.id),this.config.prependValue&&(i.value=this.config.prependValue+i.value),this.config.appendValue&&(i.value+=this.config.appendValue.toString()),(this.config.prependValue||this.config.appendValue)&&i.element&&(i.element.value=i.value),this._store.dispatch((0,h.addChoice)(e)),e.selected&&this._addItem(e,t)},e.prototype._addGroup=function(e,t){var i=this;if(void 0===t&&(t=!0),0!==e.id)throw new TypeError("Can not re-add a group which has already been added");if(this._store.dispatch((0,u.addGroup)(e)),e.choices){var n=e;this._lastAddedGroupId++,n.id=this._lastAddedGroupId;var s=e.id,o=e.choices;n.choices=[],o.forEach((function(n){var o=n;o.groupId=s,e.disabled&&(o.disabled=!0),i._addChoice(o,t)}))}},e.prototype._getTemplate=function(e){for(var t,i=[],n=1;n{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=i(493),o=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,s=e.position;this.element=t,this.classNames=n,this.type=i,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isDisabled=!1,this.isLoading=!1}return e.prototype.shouldFlip=function(e){var t=!1;return"auto"===this.position?t=!window.matchMedia("(min-height: ".concat(e+1,"px)")).matches:"top"===this.position&&(t=!0),t},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype.open=function(e){var t,i;(t=this.element.classList).add.apply(t,(0,n.getClassNames)(this.classNames.openState)),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&((i=this.element.classList).add.apply(i,(0,n.getClassNames)(this.classNames.flippedState)),this.isFlipped=!0)},e.prototype.close=function(){var e,t;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.openState)),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&((t=this.element.classList).remove.apply(t,(0,n.getClassNames)(this.classNames.flippedState)),this.isFlipped=!1)},e.prototype.focus=function(){this.element.focus()},e.prototype.addFocusState=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.focusState))},e.prototype.removeFocusState=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.focusState))},e.prototype.enable=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.disabledState)),this.element.removeAttribute("aria-disabled"),this.type===s.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},e.prototype.disable=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.disabledState)),this.element.setAttribute("aria-disabled","true"),this.type===s.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},e.prototype.wrap=function(e){e.parentNode&&(e.nextSibling?e.parentNode.insertBefore(this.element,e.nextSibling):e.parentNode.appendChild(this.element)),this.element.appendChild(e)},e.prototype.unwrap=function(e){this.element.parentNode&&(this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element))},e.prototype.addLoadingState=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.loadingState)),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},e.prototype.removeLoadingState=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.loadingState)),this.element.removeAttribute("aria-busy"),this.isLoading=!1},e}();t.default=o},836:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=function(){function e(e){var t=e.element,i=e.type,n=e.classNames;this.element=t,this.classNames=n,this.type=i,this.isActive=!1}return Object.defineProperty(e.prototype,"distanceFromTopWindow",{get:function(){return this.element.getBoundingClientRect().bottom},enumerable:!1,configurable:!0}),e.prototype.show=function(){var e;return(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.activeState)),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},e.prototype.hide=function(){var e;return(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.activeState)),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},e}();t.default=s},253:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedSelect=t.WrappedInput=t.List=t.Input=t.Container=t.Dropdown=void 0;var s=n(i(836));t.Dropdown=s.default;var o=n(i(382));t.Container=o.default;var r=n(i(37));t.Input=r.default;var a=n(i(937));t.List=a.default;var c=n(i(733));t.WrappedInput=c.default;var l=n(i(129));t.WrappedSelect=l.default},37:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(493),s=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,s=e.preventPaste;this.element=t,this.type=i,this.classNames=n,this.preventPaste=s,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=t.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(e.prototype,"placeholder",{set:function(e){this.element.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},e.prototype.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.blur=function(){this.isFocussed&&this.element.blur()},e.prototype.clear=function(e){return void 0===e&&(e=!0),this.element.value&&(this.element.value=""),e&&this.setWidth(),this},e.prototype.setWidth=function(){var e=this.element,t=e.style,i=e.value,n=e.placeholder;t.minWidth="".concat(n.length+1,"ch"),t.width="".concat(i.length+1,"ch")},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype._onInput=function(){this.type!==n.SELECT_ONE_TYPE&&this.setWidth()},e.prototype._onPaste=function(e){this.preventPaste&&e.preventDefault()},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=s},937:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(493),s=function(){function e(e){var t=e.element;this.element=t,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return e.prototype.clear=function(){this.element.innerHTML=""},e.prototype.prepend=function(e){var t=this.element.firstElementChild;t?this.element.insertBefore(e,t):this.element.append(e)},e.prototype.append=function(e){this.element.appendChild(e)},e.prototype.hasChildren=function(){return this.element.hasChildNodes()},e.prototype.scrollToTop=function(){this.element.scrollTop=0},e.prototype.scrollToChildElement=function(e,t){var i=this;if(e){var n=this.element.offsetHeight,s=this.element.scrollTop+n,o=e.offsetHeight,r=e.offsetTop+o,a=t>0?this.element.scrollTop+r-s:e.offsetTop;requestAnimationFrame((function(){i._animateScroll(a,t)}))}},e.prototype._scrollDown=function(e,t,i){var n=(i-e)/t,s=n>1?n:1;this.element.scrollTop=e+s},e.prototype._scrollUp=function(e,t,i){var n=(e-i)/t,s=n>1?n:1;this.element.scrollTop=e-s},e.prototype._animateScroll=function(e,t){var i=this,s=n.SCROLLING_SPEED,o=this.element.scrollTop,r=!1;t>0?(this._scrollDown(o,s,e),oe&&(r=!0)),r&&requestAnimationFrame((function(){i._animateScroll(e,t)}))},e}();t.default=s},617:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=function(){function e(e){var t=e.element,i=e.classNames;this.element=t,this.classNames=i,this.isDisabled=!1}return Object.defineProperty(e.prototype,"isActive",{get:function(){return"active"===this.element.dataset.choice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.setAttribute("value",e),this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.conceal=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.input)),this.element.hidden=!0,this.element.tabIndex=-1;var t=this.element.getAttribute("style");t&&this.element.setAttribute("data-choice-orig-style",t),this.element.setAttribute("data-choice","active")},e.prototype.reveal=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.input)),this.element.hidden=!1,this.element.removeAttribute("tabindex");var t=this.element.getAttribute("data-choice-orig-style");t?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",t)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},e.prototype.triggerEvent=function(e,t){(0,n.dispatchEvent)(this.element,e,t)},e}();t.default=s},733:function(e,t,i){var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(o(i(617)).default);t.default=r},129:function(e,t,i){var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(705),a=o(i(617)),c=i(200),l=function(e){function t(t){var i=t.element,n=t.classNames,s=t.template,o=t.extractPlaceholder,r=e.call(this,{element:i,classNames:n})||this;return r.template=s,r.extractPlaceholder=o,r}return s(t,e),Object.defineProperty(t.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),t.prototype.addOptions=function(e){var t=this;e.forEach((function(e){var i=e;if(!i.element){var n=t.template(i);t.element.appendChild(n),i.element=n}}))},t.prototype.optionsAsChoices=function(){var e=this,t=[];return this.element.querySelectorAll(":scope > option, :scope > optgroup").forEach((function(i){!function(e){return"OPTION"===e.tagName}(i)?function(e){return"OPTGROUP"===e.tagName}(i)&&t.push(e._optgroupToChoice(i)):t.push(e._optionToChoice(i))})),t},t.prototype._optionToChoice=function(e){return{id:0,groupId:0,score:0,value:e.value,label:e.innerHTML,element:e,active:!0,selected:this.extractPlaceholder?e.selected:e.hasAttribute("selected"),disabled:e.disabled,highlighted:!1,placeholder:this.extractPlaceholder&&(""===e.value||e.hasAttribute("placeholder")),labelClass:void 0!==e.dataset.labelClass?(0,c.stringToHtmlClass)(e.dataset.labelClass):void 0,labelDescription:void 0!==e.dataset.labelDescription?e.dataset.labelDescription:void 0,customProperties:(0,r.parseCustomProperties)(e.dataset.customProperties)}},t.prototype._optgroupToChoice=function(e){var t=this,i=e.querySelectorAll("option"),n=Array.from(i).map((function(e){return t._optionToChoice(e)}));return{id:0,label:e.label||"",element:e,active:0!==n.length,disabled:e.disabled,choices:n}},t}(a.default);t.default=l},493:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SCROLLING_SPEED=t.SELECT_MULTIPLE_TYPE=t.SELECT_ONE_TYPE=t.TEXT_TYPE=void 0,t.TEXT_TYPE="text",t.SELECT_ONE_TYPE="select-one",t.SELECT_MULTIPLE_TYPE="select-multiple",t.SCROLLING_SPEED=4},468:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIG=t.DEFAULT_CLASSNAMES=void 0;var n=i(705);t.DEFAULT_CLASSNAMES={containerOuter:["choices"],containerInner:["choices__inner"],input:["choices__input"],inputCloned:["choices__input--cloned"],list:["choices__list"],listItems:["choices__list--multiple"],listSingle:["choices__list--single"],listDropdown:["choices__list--dropdown"],item:["choices__item"],itemSelectable:["choices__item--selectable"],itemDisabled:["choices__item--disabled"],itemChoice:["choices__item--choice"],description:["choices__description"],placeholder:["choices__placeholder"],group:["choices__group"],groupHeading:["choices__heading"],button:["choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],addChoice:["choices__item","choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]},t.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,singleModeForMultiSelect:!1,addChoices:!1,addItems:!0,addItemFilter:function(e){return!!e&&""!==e},removeItems:!0,removeItemButton:!1,removeItemButtonAlignLeft:!1,editItems:!1,allowHTML:!1,allowHtmlUserInput:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:n.sortByAlpha,shadowRoot:null,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(e){return'Press Enter to add "'.concat(e,'"')},removeItemIconText:function(){return"Remove item"},removeItemLabelText:function(e){return"Remove item: ".concat(e)},maxItemText:function(e){return"Only ".concat(e," values can be added")},valueComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:t.DEFAULT_CLASSNAMES,appendGroupInSearch:!1}},411:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectsInConfig=void 0,t.ObjectsInConfig=["fuseOptions","classNames"]},200:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapInputToChoice=t.stringToHtmlClass=void 0;var n=i(705),s=function(e,t){return void 0===t&&(t=!0),void 0===e?t:!!e};t.stringToHtmlClass=function(e){if("string"==typeof e&&(e=e.split(" ").filter((function(e){return 0!==e.length}))),Array.isArray(e)&&0!==e.length)return e},t.mapInputToChoice=function(e,i){if("string"==typeof e)return(0,t.mapInputToChoice)({value:e,label:e},!1);var o=e;if("choices"in o){if(!i)throw new TypeError("optGroup is not allowed");var r=o,a=r.choices.map((function(e){return(0,t.mapInputToChoice)(e,!1)}));return{id:0,label:(0,n.unwrapStringForRaw)(r.label)||r.value,active:0!==a.length,disabled:!!r.disabled,choices:a}}var c=o;return{id:0,groupId:0,score:0,value:c.value,label:c.label||c.value,active:s(c.active),selected:s(c.selected,!1),disabled:s(c.disabled,!1),placeholder:s(c.placeholder,!1),highlighted:!1,labelClass:(0,t.stringToHtmlClass)(c.labelClass),labelDescription:c.labelDescription,customProperties:c.customProperties}}},705:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCustomProperties=t.getClassNamesSelector=t.getClassNames=t.diff=t.cloneObject=t.dispatchEvent=t.sortByScore=t.sortByAlpha=t.unwrapStringForEscaped=t.unwrapStringForRaw=t.strToEl=t.sanitise=t.isScrolledIntoView=t.getAdjacentEl=t.generateId=void 0;var i,n=function(e){return Array.from({length:e},(function(){return Math.floor(36*Math.random()+0).toString(36)})).join("")};t.generateId=function(e,t){var i=e.id||e.name&&"".concat(e.name,"-").concat(n(2))||n(4);return i=i.replace(/(:|\.|\[|\]|,)/g,""),"".concat(t,"-").concat(i)},t.getAdjacentEl=function(e,t,i){void 0===i&&(i=1);for(var n="".concat(i>0?"next":"previous","ElementSibling"),s=e[n];s;){if(s.matches(t))return s;s=s[n]}return s},t.isScrolledIntoView=function(e,t,i){return void 0===i&&(i=1),!!e&&(i>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop)},t.sanitise=function(e){if("string"!=typeof e){if(null==e)return"";if("object"==typeof e){if("raw"in e)return(0,t.sanitise)(e.raw);if("trusted"in e)return e.trusted}return e}return e.replace(/&/g,"&").replace(/>/g,">").replace(/{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),"SET_IS_LOADING"===t.type?t.isLoading?e+1:Math.max(0,e-1):e}},771:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,s=0,o=t.length;s0},e.prototype.getChoiceById=function(e){return this.activeChoices.find((function(t){return t.id===e}))},e.prototype.getGroupById=function(e){return this.groups.find((function(t){return t.id===e}))},e}();t.default=c},543:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,s=0,o=t.length;s0?"treeitem":"option"),Object.assign(A.dataset,{choice:"",id:y,value:b,selectText:n}),I&&(A.dataset.labelClass=(0,s.getClassNames)(I).join(" ")),O&&(A.dataset.labelDescription=O),w?((c=A.classList).add.apply(c,(0,s.getClassNames)(g)),A.dataset.choiceDisabled="",A.setAttribute("aria-disabled","true")):((l=A.classList).add.apply(l,(0,s.getClassNames)(f)),A.dataset.choiceSelectable=""),A},input:function(e,t){var i=e.classNames,n=i.input,o=i.inputCloned,r=Object.assign(document.createElement("input"),{type:"search",className:"".concat((0,s.getClassNames)(n).join(" ")," ").concat((0,s.getClassNames)(o).join(" ")),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return r.setAttribute("role","textbox"),r.setAttribute("aria-autocomplete","list"),t&&r.setAttribute("aria-label",t),r},dropdown:function(e){var t,i,n=e.classNames,o=n.list,r=n.listDropdown,a=document.createElement("div");return(t=a.classList).add.apply(t,(0,s.getClassNames)(o)),(i=a.classList).add.apply(i,(0,s.getClassNames)(r)),a.setAttribute("aria-expanded","false"),a},notice:function(e,i,o){var r=e.allowHTML,a=e.classNames,c=a.item,l=a.itemChoice,h=a.addChoice,u=a.noResults,d=a.noChoices;void 0===o&&(o="");var p=n(n([],(0,s.getClassNames)(c),!0),(0,s.getClassNames)(l),!0);switch(o){case"add-choice":p.push.apply(p,(0,s.getClassNames)(h));break;case"no-results":p.push.apply(p,(0,s.getClassNames)(u));break;case"no-choices":p.push.apply(p,(0,s.getClassNames)(d))}var f=Object.assign(document.createElement("div"),{innerHTML:(0,t.escapeForTemplate)(r,i),className:p.join(" ")});return"add-choice"===o&&(f.dataset.choiceSelectable="",f.dataset.choice=""),f},option:function(e){var t=e.label,i=e.value,n=e.labelClass,r=e.labelDescription,a=e.customProperties,c=e.active,l=e.disabled,h=(0,s.unwrapStringForRaw)(t),u=new Option(h,i,!1,c);return n&&(u.dataset.labelClass=(0,s.getClassNames)(n).join(" ")),r&&(u.dataset.labelDescription=r),o(u,a),u.disabled=l,u}};t.default=r},120:(e,t,i)=>{function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===l(e)}i.r(t),i.d(t,{default:()=>U});function s(e){return"string"==typeof e}function o(e){return"number"==typeof e}function r(e){return"object"==typeof e}function a(e){return null!=e}function c(e){return!e.trim().length}function l(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const h=e=>`Missing ${e} property in key`,u=e=>`Property 'weight' in key '${e}' must be a positive integer`,d=Object.prototype.hasOwnProperty;class p{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let i=f(e);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function f(e){let t=null,i=null,o=null,r=1,a=null;if(s(e)||n(e))o=e,t=m(e),i=g(e);else{if(!d.call(e,"name"))throw new Error(h("name"));const n=e.name;if(o=n,d.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(u(n));t=m(n),i=g(n),a=e.getFn}return{path:t,id:i,weight:r,src:o,getFn:a}}function m(e){return n(e)?e:e.split(".")}function g(e){return n(e)?e.join("."):e}var v={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(a(e))if(t[u]){const d=e[t[u]];if(!a(d))return;if(u===t.length-1&&(s(d)||o(d)||function(e){return!0===e||!1===e||function(e){return r(e)&&null!==e}(e)&&"[object Boolean]"==l(e)}(d)))i.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(d));else if(n(d)){c=!0;for(let e=0,i=d.length;e{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,s(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();s(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(a(r))if(n(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:i,value:o}=t.pop();if(a(o))if(s(o)&&!c(o)){let t={v:o,i,n:this.norm.get(o)};e.push(t)}else n(o)&&o.forEach(((e,i)=>{t.push({nestedArrIndex:i,value:e})}))}i.$[o]=e}else if(s(r)&&!c(r)){let e={v:r,n:this.norm.get(r)};i.$[o]=e}})),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function b(e,t,{getFn:i=v.getFn,fieldNormWeight:n=v.fieldNormWeight}={}){const s=new y({getFn:i,fieldNormWeight:n});return s.setKeys(e.map(f)),s.setSources(t),s.create(),s}function E(e,{errors:t=0,currentLocation:i=0,expectedLocation:n=0,distance:s=v.distance,ignoreLocation:o=v.ignoreLocation}={}){const r=t/e.length;if(o)return r;const a=Math.abs(n-i);return s?r+a/s:a?1:r}const C=32;function S(e){let t={};for(let i=0,n=e.length;i{this.chunks.push({pattern:e,alphabet:S(e),startIndex:t})},h=this.pattern.length;if(h>C){let e=0;const t=h%C,i=h-t;for(;e{const{isMatch:f,score:m,indices:g}=function(e,t,i,{location:n=v.location,distance:s=v.distance,threshold:o=v.threshold,findAllMatches:r=v.findAllMatches,minMatchCharLength:a=v.minMatchCharLength,includeMatches:c=v.includeMatches,ignoreLocation:l=v.ignoreLocation}={}){if(t.length>C)throw new Error("Pattern length exceeds max of 32.");const h=t.length,u=e.length,d=Math.max(0,Math.min(n,u));let p=o,f=d;const m=a>1||c,g=m?Array(u):[];let _;for(;(_=e.indexOf(t,f))>-1;){let e=E(t,{currentLocation:_,expectedLocation:d,distance:s,ignoreLocation:l});if(p=Math.min(e,p),f=_+h,m){let e=0;for(;e=c;o-=1){let r=o-1,a=i[e.charAt(r)];if(m&&(g[r]=+!!a),_[o]=(_[o+1]<<1|1)&a,n&&(_[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),_[o]&I&&(b=E(t,{errors:n,currentLocation:r,expectedLocation:d,distance:s,ignoreLocation:l}),b<=p)){if(p=b,f=r,f<=d)break;c=Math.max(1,2*d-f)}}if(E(t,{errors:n+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:l})>p)break;y=_}const O={isMatch:f>=0,score:Math.max(.001,b)};if(m){const e=function(e=[],t=v.minMatchCharLength){let i=[],n=-1,s=-1,o=0;for(let r=e.length;o=t&&i.push([n,s]),n=-1)}return e[o-1]&&o-n>=t&&i.push([n,o-1]),i}(g,a);e.length?c&&(O.indices=e):O.isMatch=!1}return O}(e,t,d,{location:n+p,distance:s,threshold:o,findAllMatches:r,minMatchCharLength:a,includeMatches:i,ignoreLocation:c});f&&(u=!0),h+=m,f&&g&&(l=[...l,...g])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&i&&(d.indices=l),d}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return w(e,this.multiRegex)}static isSingleMatch(e){return w(e,this.singleRegex)}search(){}}function w(e,t){const i=e.match(t);return i?i[1]:null}class L extends O{constructor(e,{location:t=v.location,threshold:i=v.threshold,distance:n=v.distance,includeMatches:s=v.includeMatches,findAllMatches:o=v.findAllMatches,minMatchCharLength:r=v.minMatchCharLength,isCaseSensitive:a=v.isCaseSensitive,ignoreLocation:c=v.ignoreLocation}={}){super(e),this._bitapSearch=new I(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:a,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class T extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,i=0;const n=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,i))>-1;)i=t+s,n.push([t,i-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const A=[class extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},T,class extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},L],M=A.length,N=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,x=new Set([L.type,T.type]);const P=[];function j(e,t){for(let i=0,n=P.length;i!(!e[D]&&!e.$or),k=e=>({[D]:Object.keys(e).map((t=>({[t]:e[t]})))});function H(e,t,{auto:i=!0}={}){const o=e=>{let a=Object.keys(e);const c=(e=>!!e[F])(e);if(!c&&a.length>1&&!R(e))return o(k(e));if((e=>!n(e)&&r(e)&&!R(e))(e)){const n=c?e[F]:a[0],o=c?e.$val:e[n];if(!s(o))throw new Error((e=>`Invalid value for key ${e}`)(n));const r={keyId:g(n),pattern:o};return i&&(r.searcher=j(o,t)),r}let l={children:[],operator:a[0]};return a.forEach((t=>{const i=e[t];n(i)&&i.forEach((e=>{l.children.push(o(e))}))})),l};return R(e)||(e=k(e)),o(e)}function V(e,t){const i=e.matches;t.matches=[],a(i)&&i.forEach((e=>{if(!a(e.indices)||!e.indices.length)return;const{indices:i,value:n}=e;let s={indices:i,value:n};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)}))}function B(e,t){t.score=e.score}class U{constructor(e,t={},i){this.options={...v,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof y))throw new Error("Incorrect 'index' type");this._myIndex=t||b(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){a(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i{let i=1;e.matches.forEach((({key:e,norm:n,score:s})=>{const o=e?e.weight:null;i*=Math.pow(0===s&&o?Number.EPSILON:s,(o||1)*(t?1:n))})),e.score=i}))}(l,{ignoreFieldNorm:c}),r&&l.sort(a),o(t)&&t>-1&&(l=l.slice(0,t)),function(e,t,{includeMatches:i=v.includeMatches,includeScore:n=v.includeScore}={}){const s=[];return i&&s.push(V),n&&s.push(B),e.map((e=>{const{idx:i}=e,n={item:t[i],refIndex:i};return s.length&&s.forEach((t=>{t(e,n)})),n}))}(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=j(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach((({v:e,i,n:s})=>{if(!a(e))return;const{isMatch:o,score:r,indices:c}=t.searchIn(e);o&&n.push({item:e,idx:i,matches:[{score:r,value:e,norm:s,indices:c}]})})),n}_searchLogical(e){const t=H(e,this.options),i=(e,t,n)=>{if(!e.children){const{keyId:i,searcher:s}=e,o=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:s});return o&&o.length?[{idx:n,item:t,matches:o}]:[]}const s=[];for(let o=0,r=e.children.length;o{if(a(e)){let r=i(t,e,n);r.length&&(s[n]||(s[n]={idx:n,item:e,matches:[]},o.push(s[n])),r.forEach((({matches:e})=>{s[n].matches.push(...e)})))}})),o}_searchObjectList(e){const t=j(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach((({$:e,i:n})=>{if(!a(e))return;let o=[];i.forEach(((i,n)=>{o.push(...this._findMatches({key:i,value:e[n],searcher:t}))})),o.length&&s.push({idx:n,item:e,matches:o})})),s}_findMatches({key:e,value:t,searcher:i}){if(!a(t))return[];let s=[];if(n(t))t.forEach((({v:t,i:n,n:o})=>{if(!a(t))return;const{isMatch:r,score:c,indices:l}=i.searchIn(t);r&&s.push({score:c,key:e,value:t,idx:n,norm:o,indices:l})}));else{const{v:n,n:o}=t,{isMatch:r,score:a,indices:c}=i.searchIn(n);r&&s.push({score:a,key:e,value:n,norm:o,indices:c})}return s}}U.version="6.6.2",U.createIndex=b,U.parseIndex=function(e,{getFn:t=v.getFn,fieldNormWeight:i=v.fieldNormWeight}={}){const{keys:n,records:s}=e,o=new y({getFn:t,fieldNormWeight:i});return o.setKeys(n),o.setIndexRecords(s),o},U.config=v,U.parseQuery=H,function(...e){P.push(...e)}(class{constructor(e,{isCaseSensitive:t=v.isCaseSensitive,includeMatches:i=v.includeMatches,minMatchCharLength:n=v.minMatchCharLength,ignoreLocation:s=v.ignoreLocation,findAllMatches:o=v.findAllMatches,location:r=v.location,threshold:a=v.threshold,distance:c=v.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:r,threshold:a,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let i=e.trim().split(N).filter((e=>e&&!!e.trim())),n=[];for(let e=0,s=i.length;e{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function s(e,t,i){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;th,applyMiddleware:()=>v,bindActionCreators:()=>m,combineReducers:()=>p,compose:()=>g,createStore:()=>u,legacy_createStore:()=>d});var c="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},h={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(a(1));return i(u)(e,t)}if("function"!=typeof e)throw new Error(a(2));var s=e,o=t,r=[],l=r,d=!1;function p(){l===r&&(l=r.slice())}function f(){if(d)throw new Error(a(3));return o}function m(e){if("function"!=typeof e)throw new Error(a(4));if(d)throw new Error(a(5));var t=!0;return p(),l.push(e),function(){if(t){if(d)throw new Error(a(6));t=!1,p();var i=l.indexOf(e);l.splice(i,1),r=null}}}function g(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(d)throw new Error(a(9));try{d=!0,o=s(o,e)}finally{d=!1}for(var t=r=l,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.d(n,{default:()=>o});var s=i(472);const o=i.n(s)();window.Choices=n.default})(); \ No newline at end of file +(()=>{"use strict";var e={808:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearChoices=t.activateChoices=t.filterChoices=t.removeChoice=t.addChoice=void 0,t.addChoice=function(e){return{type:"ADD_CHOICE",choice:e}},t.removeChoice=function(e){return{type:"REMOVE_CHOICE",value:e}},t.filterChoices=function(e){return{type:"FILTER_CHOICES",results:e}},t.activateChoices=function(e){return void 0===e&&(e=!0),{type:"ACTIVATE_CHOICES",active:e}},t.clearChoices=function(){return{type:"CLEAR_CHOICES"}}},18:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGroup=void 0,t.addGroup=function(e){return{type:"ADD_GROUP",group:e}}},956:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.highlightItem=t.removeItem=t.addItem=void 0,t.addItem=function(e){return{type:"ADD_ITEM",item:e}},t.removeItem=function(e){return{type:"REMOVE_ITEM",item:e}},t.highlightItem=function(e,t){return{type:"HIGHLIGHT_ITEM",id:e,highlighted:t}}},278:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setIsLoading=t.clearAll=void 0,t.clearAll=function(){return{type:"CLEAR_ALL"}},t.setIsLoading=function(e){return{type:"SET_IS_LOADING",isLoading:e}}},472:function(e,t,i){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i element"),this)},e.prototype.removeChoice=function(e){return this._store.dispatch((0,h.removeChoice)(e)),this},e.prototype.clearChoices=function(){return this._store.dispatch((0,h.clearChoices)()),this},e.prototype.clearStore=function(){return this._store.dispatch((0,p.clearAll)()),this._lastAddedChoiceId=0,this._lastAddedGroupId=0,this},e.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),this._isSearching&&this._stopSearch(),this},e.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.items!==this._prevState.items;(this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||e)&&(this._isSelectElement&&this._renderChoices(),e&&this._renderItems(),this._prevState=this._currentState)}},e.prototype._renderChoices=function(){var e=this,t=this._store,i=t.activeGroups,n=t.activeChoices,s=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame((function(){return e.choiceList.scrollToTop()})),i.length>=1&&!this._isSearching){var o=n.filter((function(e){return e.placeholder&&-1===e.groupId}));o.length>=1&&(s=this._createChoicesFragment(o,s)),s=this._createGroupsFragment(i,n,s)}else n.length>=1&&(s=this._createChoicesFragment(n,s));var r=this.input.value,a=this._canAddItem(this._store.items,r);if(s.childNodes&&s.childNodes.length>0){var c=!a.response;if(a.response&&(this.choiceList.append(s),this._highlightChoice(),this._canAddUserChoices&&r&&a.notice&&(c=!n.find((function(t){return e.config.valueComparer(t.value,r)})))),c){var l=this._templates.notice(this.config,a.notice,this._canAddUserChoices?"add-choice":"");this.choiceList.prepend(l)}}else{var h=void 0;a.response&&this._canAddUserChoices&&r?h=this._templates.notice(this.config,a.notice,"add-choice"):this._isSearching?(l="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,h=this._templates.notice(this.config,l,"no-results")):(l="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,h=this._templates.notice(this.config,l,"no-choices")),this.choiceList.append(h)}},e.prototype._renderItems=function(){var e=this._store.items||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},e.prototype._createGroupsFragment=function(e,t,i){var n=this;void 0===i&&(i=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sorter);var s=t.filter((function(e){return 0===e.groupId}));return s.length>0&&this._createChoicesFragment(s,i,!1),e.forEach((function(e){var s=function(e){return t.filter((function(t){return n._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===n.config.renderSelectedChoices||!t.selected)}))}(e);if(s.length>=1){var o=n._templates.choiceGroup(n.config,e);i.appendChild(o),n._createChoicesFragment(s,i,!0)}})),i},e.prototype._createChoicesFragment=function(e,t,i){var n=this;void 0===t&&(t=document.createDocumentFragment()),void 0===i&&(i=!1);var s=this.config,o=s.renderSelectedChoices,r=s.searchResultLimit,c=s.renderChoiceLimit,l=s.appendGroupInSearch,h=this._isSearching?_.sortByScore:this.config.sorter,u=function(e){if("auto"!==o||n._isSelectOneElement||!e.selected){var i=n._templates.choice(n.config,e,n.config.itemSelectText);if(l){var s="";n._store.groups.every((function(t){return t.id!==e.groupId||(s=t.label,!1)})),s&&n._isSearching&&(i.innerHTML+=" (".concat(s,")"))}t.appendChild(i)}},d=e;if("auto"!==o||this._isSelectOneElement||(d=e.filter((function(e){return!e.selected}))),this._isSelectElement){var p=e.filter((function(e){return!e.element}));0!==p.length&&this.passedElement.addOptions(p)}var f=d.reduce((function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e}),{placeholderChoices:[],normalChoices:[]}),m=f.placeholderChoices,g=f.normalChoices;(this.config.shouldSort||this._isSearching)&&g.sort(h);var v=d.length,y=this._isSelectOneElement?a(a([],m,!0),g,!0):g;this._isSearching?v=r:c&&c>0&&!i&&(v=c);for(var b=0;b0?this._store.getGroupById(i.groupId):null;return{id:i.id,highlighted:i.highlighted,labelClass:i.labelClass,labelDescription:i.labelDescription,customProperties:i.customProperties,disabled:i.disabled,active:i.active,label:i.label,placeholder:i.placeholder,value:i.value,groupValue:n&&n.label?n.label:void 0,element:i.element,keyCode:t}}},e.prototype._triggerChange=function(e){null!=e&&this.passedElement.triggerEvent("change",{value:e})},e.prototype._selectPlaceholderChoice=function(e){this._addItem(e),e.value&&this._triggerChange(e.value)},e.prototype._handleButtonAction=function(e,t){if(0!==e.length&&this.config.removeItems&&this.config.removeItemButton){var i=t&&O(t.parentNode),n=i&&e.find((function(e){return e.id===i}));if(n&&(this._removeItem(n),this._triggerChange(n.value),this._isSelectOneElement&&!this._hasNonChoicePlaceholder)){var s=this._store.placeholderChoice;s&&this._selectPlaceholderChoice(s)}}},e.prototype._handleItemAction=function(e,t,i){var n=this;if(void 0===i&&(i=!1),0!==e.length&&this.config.removeItems&&!this._isSelectOneElement){var s=O(t);s&&(e.forEach((function(e){e.id!==s||e.highlighted?!i&&e.highlighted&&n.unhighlightItem(e):n.highlightItem(e)})),this.input.focus())}},e.prototype._handleChoiceAction=function(e,t,i){var n=this,s=O(t),o=s&&this._store.getChoiceById(s);if(!o)return!1;var r=this.dropdown.isActive,a=!1;return this._store.withDeferRendering((function(){if(!o.selected&&!o.disabled&&n._canAddItem(e,o.value).response){if(n.config.singleModeForMultiSelect&&0!==e.length){var t=e[e.length-1];n._removeItem(t)}n.passedElement.triggerEvent("choice",n._getChoiceForOutput(o,i)),n._addItem(o),n.clearInput(),a=!0}})),!!a&&(this._triggerChange(o.value),r&&(this.config.singleModeForMultiSelect||this._isSelectOneElement)&&(this.hideDropdown(!0),this.containerOuter.focus()),!0)},e.prototype._handleBackspace=function(e){if(this.config.removeItems&&0!==e.length){var t=e[e.length-1],i=e.some((function(e){return e.highlighted}));this.config.editItems&&!i&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(i||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},e.prototype._loadChoices=function(){var e;if(this._isTextElement){this._presetItems=this.config.items.map((function(e){return(0,C.mapInputToChoice)(e,!1)}));var t=this.passedElement.value;if(t){var i=t.split(this.config.delimiter).map((function(e){return(0,C.mapInputToChoice)(e,!1)}));this._presetItems=this._presetItems.concat(i)}this._presetItems.forEach((function(e){e.selected=!0}))}else if(this._isSelectElement){this._presetChoices=this.config.choices.map((function(e){return(0,C.mapInputToChoice)(e,!0)}));var n=this.passedElement.optionsAsChoices();n&&(e=this._presetChoices).push.apply(e,n)}},e.prototype._startLoading=function(){this._store.startDeferRendering()},e.prototype._stopLoading=function(){this._store.stopDeferRendering()},e.prototype._handleLoadingState=function(e){void 0===e&&(e=!0);var t=this.itemList.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._templates.placeholder(this.config,this.config.loadingText))&&this.itemList.append(t):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},e.prototype._handleSearch=function(e){if(this.input.isFocussed){var t=this._store.choices,i=this.config,n=i.searchFloor,s=i.searchChoices,o=t.some((function(e){return!e.active}));if(null!=e&&e.length>=n){var r=s?this._searchChoices(e):0;null!==r&&this.passedElement.triggerEvent("search",{value:e,resultCount:r})}else o&&this._stopSearch()}},e.prototype._canAddItem=function(e,t){var i=this,n=!0,s="";return this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(this.config.singleModeForMultiSelect||(n=!1,s="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText)),n&&this._canAddUserChoices&&""!==t&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(n=!1,s="function"==typeof this.config.customAddItemText?this.config.customAddItemText((0,_.sanitise)(t),t):this.config.customAddItemText),!n||""===t||!this._isSelectElement&&this.config.duplicateItemsAllowed||this._store.items.find((function(e){return i.config.valueComparer(e.value,t)}))&&(n=!1,s="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText((0,_.sanitise)(t),t):this.config.uniqueItemText),n&&(s="function"==typeof this.config.addItemText?this.config.addItemText((0,_.sanitise)(t),t):this.config.addItemText),{response:n,notice:{trusted:s}}},e.prototype._searchChoices=function(e){var t=e.trim().replace(/\s{2,}/," ");if(0===t.length||t===this._currentValue)return null;var i=this._store.searchableChoices,n=t,s=Object.assign(this.config.fuseOptions,{keys:a([],this.config.searchFields,!0),includeMatches:!0}),o=new l.default(i,s).search(n);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,h.filterChoices)(o)),o.length},e.prototype._stopSearch=function(){var e=this._isSearching;this._currentValue="",this._isSearching=!1,e&&this._store.dispatch((0,h.activateChoices)(!0))},e.prototype._addEventListeners=function(){var e=this.config.shadowRoot||document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("input",this._onInput,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},e.prototype._removeEventListeners=function(){var e=this.config.shadowRoot||document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("input",this._onInput),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},e.prototype._onKeyDown=function(e){var t=e.keyCode,i=this._store.items,n=this.input.isFocussed,s=this.dropdown.isActive,o=this.itemList.hasChildren(),r=1===e.key.length||2===e.key.length&&e.key.charCodeAt(0)>=55296||"Unidentified"===e.key;switch(this._isTextElement||s||(this.showDropdown(),!this.input.isFocussed&&r&&(this.input.value+=e.key)),t){case 65:return this._onSelectKey(e,o);case 13:return this._onEnterKey(e,i,s);case 27:return this._onEscapeKey(e,s);case 38:case 33:case 40:case 34:return this._onDirectionKey(e,s);case 8:case 46:return this._onDeleteKey(e,i,n)}},e.prototype._onKeyUp=function(){this._canSearch=this.config.searchEnabled},e.prototype._onInput=function(){var e=this.input.value;if(e){if(this._isTextElement){var t=this._canAddItem(this._store.items,e);t.notice&&(this._displayAddItemNotice(t),this.showDropdown(!0))}if(this._canSearch){this._handleSearch(e);var i=this._canAddItem(this._store.items,e);i.response||this._displayAddItemNotice(i),this._canAddUserChoices&&(this._highlightPosition=0,this._highlightChoice())}}else this._isTextElement?this.hideDropdown(!0):this._stopSearch()},e.prototype._displayAddItemNotice=function(e){var t=this._templates.notice(this.config,e.notice,"add-choice"),i="".concat((0,_.getClassNamesSelector)(this.config.classNames.addChoice),"[data-choice-selectable]"),n=this.choiceList.element.querySelector(i);n?n.outerHTML=t.outerHTML:this.choiceList.prepend(t)},e.prototype._onSelectKey=function(e,t){var i=e.ctrlKey,n=e.metaKey;(i||n)&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},e.prototype._onEnterKey=function(e,t,i){var n=this,s=this.input.value,o=e.target;if(o&&o.hasAttribute("data-button"))return e.preventDefault(),void this._handleButtonAction(t,o);if(!i&&this._isSelectOneElement)return e.preventDefault(),void this.showDropdown();if(i){var r=this.dropdown.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.highlightedState));if(r&&this._handleChoiceAction(t,r,13))return e.preventDefault(),void this.unhighlightAll();s||this.hideDropdown(!0)}o&&s&&this._canAddUserChoices&&this._canAddItem(t,s).response&&(this._store.withDeferRendering((function(){if((n._isSelectOneElement||n.config.singleModeForMultiSelect)&&0!==t.length){var e=t[t.length-1];n._removeItem(e)}var i=!0;if(!n._isSelectElement&&n.config.duplicateItemsAllowed||(i=!n._findAndSelectChoiceByValue(s)),i){var o=(0,_.sanitise)(s),r=n.config.allowHtmlUserInput||o===s?s:{escaped:o,raw:s};n._addChoice((0,C.mapInputToChoice)({value:r,label:r,selected:!0},!1))}n.clearInput(),n.unhighlightAll(),n._triggerChange(s)})),(this._isTextElement||this._isSelectOneElement)&&this.hideDropdown(!0))},e.prototype._onEscapeKey=function(e,t){t&&(e.stopPropagation(),this.hideDropdown(!0),this.containerOuter.focus())},e.prototype._onDirectionKey=function(e,t){var i=e.keyCode,n=e.metaKey;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var s=40===i||34===i?1:-1,o="[data-choice-selectable]",r=void 0;if(n||34===i||33===i)r=s>0?this.dropdown.element.querySelector("".concat(o,":last-of-type")):this.dropdown.element.querySelector(o);else{var a=this.dropdown.element.querySelector((0,_.getClassNamesSelector)(this.config.classNames.highlightedState));r=a?(0,_.getAdjacentEl)(a,o,s):this.dropdown.element.querySelector(o)}r&&((0,_.isScrolledIntoView)(r,this.choiceList.element,s)||this.choiceList.scrollToChildElement(r,s),this._highlightChoice(r)),e.preventDefault()}},e.prototype._onDeleteKey=function(e,t,i){var n=e.target;this._isSelectOneElement||n.value||!i||(this._handleBackspace(t),e.preventDefault())},e.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},e.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},e.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(S&&this.choiceList.element.contains(t)){var i=this.choiceList.element.firstElementChild,n="ltr"===this._direction?e.offsetX>=i.offsetWidth:e.offsetX0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},e.prototype._onFocus=function(e){var t,i=this,n=e.target;n&&this.containerOuter.element.contains(n)&&((t={})[m.TEXT_TYPE]=function(){n===i.input.element&&i.containerOuter.addFocusState()},t[m.SELECT_ONE_TYPE]=function(){i.containerOuter.addFocusState(),n===i.input.element&&i.showDropdown(!0)},t[m.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.showDropdown(!0),i.containerOuter.addFocusState())},t)[this._elementType]()},e.prototype._onBlur=function(e){var t,i=this,n=e.target;if(n&&this.containerOuter.element.contains(n)&&!this._isScrollingOnIe){var s=this._store.activeChoices.some((function(e){return e.highlighted}));((t={})[m.TEXT_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),s&&i.unhighlightAll(),i.hideDropdown(!0))},t[m.SELECT_ONE_TYPE]=function(){i.containerOuter.removeFocusState(),(n===i.input.element||n===i.containerOuter.element&&!i._canSearch)&&i.hideDropdown(!0)},t[m.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),i.hideDropdown(!0),s&&i.unhighlightAll())},t)[this._elementType]()}else this._isScrollingOnIe=!1,this.input.element.focus()},e.prototype._onFormReset=function(){var e=this;this._store.withDeferRendering((function(){e.clearInput(),e.hideDropdown(),e.refresh(!1,!1,!0),0!==e._initialItems.length&&e.setChoiceByValue(e._initialItems)}))},e.prototype._highlightChoice=function(e){var t,i=this;void 0===e&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var s=e;Array.from(this.dropdown.element.querySelectorAll((0,_.getClassNamesSelector)(this.config.classNames.highlightedState))).forEach((function(e){var t;(t=e.classList).remove.apply(t,(0,_.getClassNames)(i.config.classNames.highlightedState)),e.setAttribute("aria-selected","false")})),s?this._highlightPosition=n.indexOf(s):(s=n.length>this._highlightPosition?n[this._highlightPosition]:n[n.length-1])||(s=n[0]),(t=s.classList).add.apply(t,(0,_.getClassNames)(this.config.classNames.highlightedState)),s.setAttribute("aria-selected","true"),this.passedElement.triggerEvent("highlightChoice",{el:s}),this.dropdown.isActive&&(this.input.setActiveDescendant(s.id),this.containerOuter.setActiveDescendant(s.id))}},e.prototype._addItem=function(e,t){void 0===t&&(t=!0);var i=e.id;if(0===i)throw new TypeError("item.id must be set before _addItem is called for a choice/item");this._store.dispatch((0,d.addItem)(e)),this._isSelectOneElement&&this.removeActiveItems(i),t&&this.passedElement.triggerEvent("addItem",this._getChoiceForOutput(e))},e.prototype._removeItem=function(e){e.id&&(this._store.dispatch((0,d.removeItem)(e)),this.passedElement.triggerEvent("removeItem",this._getChoiceForOutput(e)))},e.prototype._addChoice=function(e,t){if(void 0===t&&(t=!0),0!==e.id)throw new TypeError("Can not re-add a choice which has already been added");var i=e;this._lastAddedChoiceId++,i.id=this._lastAddedChoiceId,i.elementId="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(i.id),this.config.prependValue&&(i.value=this.config.prependValue+i.value),this.config.appendValue&&(i.value+=this.config.appendValue.toString()),(this.config.prependValue||this.config.appendValue)&&i.element&&(i.element.value=i.value),this._store.dispatch((0,h.addChoice)(e)),e.selected&&this._addItem(e,t)},e.prototype._addGroup=function(e,t){var i=this;if(void 0===t&&(t=!0),0!==e.id)throw new TypeError("Can not re-add a group which has already been added");if(this._store.dispatch((0,u.addGroup)(e)),e.choices){var n=e;this._lastAddedGroupId++,n.id=this._lastAddedGroupId;var s=e.id,o=e.choices;n.choices=[],o.forEach((function(n){var o=n;o.groupId=s,e.disabled&&(o.disabled=!0),i._addChoice(o,t)}))}},e.prototype._getTemplate=function(e){for(var t,i=[],n=1;n{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=i(493),o=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,s=e.position;this.element=t,this.classNames=n,this.type=i,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isDisabled=!1,this.isLoading=!1}return e.prototype.shouldFlip=function(e){var t=!1;return"auto"===this.position?t=!window.matchMedia("(min-height: ".concat(e+1,"px)")).matches:"top"===this.position&&(t=!0),t},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype.open=function(e){var t,i;(t=this.element.classList).add.apply(t,(0,n.getClassNames)(this.classNames.openState)),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&((i=this.element.classList).add.apply(i,(0,n.getClassNames)(this.classNames.flippedState)),this.isFlipped=!0)},e.prototype.close=function(){var e,t;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.openState)),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&((t=this.element.classList).remove.apply(t,(0,n.getClassNames)(this.classNames.flippedState)),this.isFlipped=!1)},e.prototype.focus=function(){this.element.focus()},e.prototype.addFocusState=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.focusState))},e.prototype.removeFocusState=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.focusState))},e.prototype.enable=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.disabledState)),this.element.removeAttribute("aria-disabled"),this.type===s.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},e.prototype.disable=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.disabledState)),this.element.setAttribute("aria-disabled","true"),this.type===s.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},e.prototype.wrap=function(e){e.parentNode&&(e.nextSibling?e.parentNode.insertBefore(this.element,e.nextSibling):e.parentNode.appendChild(this.element)),this.element.appendChild(e)},e.prototype.unwrap=function(e){this.element.parentNode&&(this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element))},e.prototype.addLoadingState=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.loadingState)),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},e.prototype.removeLoadingState=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.loadingState)),this.element.removeAttribute("aria-busy"),this.isLoading=!1},e}();t.default=o},836:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=function(){function e(e){var t=e.element,i=e.type,n=e.classNames;this.element=t,this.classNames=n,this.type=i,this.isActive=!1}return Object.defineProperty(e.prototype,"distanceFromTopWindow",{get:function(){return this.element.getBoundingClientRect().bottom},enumerable:!1,configurable:!0}),e.prototype.show=function(){var e;return(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.activeState)),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},e.prototype.hide=function(){var e;return(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.activeState)),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},e}();t.default=s},253:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedSelect=t.WrappedInput=t.List=t.Input=t.Container=t.Dropdown=void 0;var s=n(i(836));t.Dropdown=s.default;var o=n(i(382));t.Container=o.default;var r=n(i(37));t.Input=r.default;var a=n(i(937));t.List=a.default;var c=n(i(733));t.WrappedInput=c.default;var l=n(i(129));t.WrappedSelect=l.default},37:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(493),s=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,s=e.preventPaste;this.element=t,this.type=i,this.classNames=n,this.preventPaste=s,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=t.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(e.prototype,"placeholder",{set:function(e){this.element.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},e.prototype.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.blur=function(){this.isFocussed&&this.element.blur()},e.prototype.clear=function(e){return void 0===e&&(e=!0),this.element.value&&(this.element.value=""),e&&this.setWidth(),this},e.prototype.setWidth=function(){var e=this.element,t=e.style,i=e.value,n=e.placeholder;t.minWidth="".concat(n.length+1,"ch"),t.width="".concat(i.length+1,"ch")},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype._onInput=function(){this.type!==n.SELECT_ONE_TYPE&&this.setWidth()},e.prototype._onPaste=function(e){this.preventPaste&&e.preventDefault()},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=s},937:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(493),s=function(){function e(e){var t=e.element;this.element=t,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return e.prototype.clear=function(){this.element.innerHTML=""},e.prototype.prepend=function(e){var t=this.element.firstElementChild;t?this.element.insertBefore(e,t):this.element.append(e)},e.prototype.append=function(e){this.element.appendChild(e)},e.prototype.hasChildren=function(){return this.element.hasChildNodes()},e.prototype.scrollToTop=function(){this.element.scrollTop=0},e.prototype.scrollToChildElement=function(e,t){var i=this;if(e){var n=this.element.offsetHeight,s=this.element.scrollTop+n,o=e.offsetHeight,r=e.offsetTop+o,a=t>0?this.element.scrollTop+r-s:e.offsetTop;requestAnimationFrame((function(){i._animateScroll(a,t)}))}},e.prototype._scrollDown=function(e,t,i){var n=(i-e)/t,s=n>1?n:1;this.element.scrollTop=e+s},e.prototype._scrollUp=function(e,t,i){var n=(e-i)/t,s=n>1?n:1;this.element.scrollTop=e-s},e.prototype._animateScroll=function(e,t){var i=this,s=n.SCROLLING_SPEED,o=this.element.scrollTop,r=!1;t>0?(this._scrollDown(o,s,e),oe&&(r=!0)),r&&requestAnimationFrame((function(){i._animateScroll(e,t)}))},e}();t.default=s},617:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(705),s=function(){function e(e){var t=e.element,i=e.classNames;this.element=t,this.classNames=i,this.isDisabled=!1}return Object.defineProperty(e.prototype,"isActive",{get:function(){return"active"===this.element.dataset.choice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.setAttribute("value",e),this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.conceal=function(){var e;(e=this.element.classList).add.apply(e,(0,n.getClassNames)(this.classNames.input)),this.element.hidden=!0,this.element.tabIndex=-1;var t=this.element.getAttribute("style");t&&this.element.setAttribute("data-choice-orig-style",t),this.element.setAttribute("data-choice","active")},e.prototype.reveal=function(){var e;(e=this.element.classList).remove.apply(e,(0,n.getClassNames)(this.classNames.input)),this.element.hidden=!1,this.element.removeAttribute("tabindex");var t=this.element.getAttribute("data-choice-orig-style");t?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",t)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},e.prototype.triggerEvent=function(e,t){(0,n.dispatchEvent)(this.element,e,t)},e}();t.default=s},733:function(e,t,i){var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(o(i(617)).default);t.default=r},129:function(e,t,i){var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(705),a=o(i(617)),c=i(200),l=function(e){function t(t){var i=t.element,n=t.classNames,s=t.template,o=t.extractPlaceholder,r=e.call(this,{element:i,classNames:n})||this;return r.template=s,r.extractPlaceholder=o,r}return s(t,e),Object.defineProperty(t.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),t.prototype.addOptions=function(e){var t=this;e.forEach((function(e){var i=e;if(!i.element){var n=t.template(i);t.element.appendChild(n),i.element=n}}))},t.prototype.optionsAsChoices=function(){var e=this,t=[];return this.element.querySelectorAll(":scope > option, :scope > optgroup").forEach((function(i){!function(e){return"OPTION"===e.tagName}(i)?function(e){return"OPTGROUP"===e.tagName}(i)&&t.push(e._optgroupToChoice(i)):t.push(e._optionToChoice(i))})),t},t.prototype._optionToChoice=function(e){return{id:0,groupId:0,score:0,value:e.value,label:e.innerHTML,element:e,active:!0,selected:this.extractPlaceholder?e.selected:e.hasAttribute("selected"),disabled:e.disabled,highlighted:!1,placeholder:this.extractPlaceholder&&(""===e.value||e.hasAttribute("placeholder")),labelClass:void 0!==e.dataset.labelClass?(0,c.stringToHtmlClass)(e.dataset.labelClass):void 0,labelDescription:void 0!==e.dataset.labelDescription?e.dataset.labelDescription:void 0,customProperties:(0,r.parseCustomProperties)(e.dataset.customProperties)}},t.prototype._optgroupToChoice=function(e){var t=this,i=e.querySelectorAll("option"),n=Array.from(i).map((function(e){return t._optionToChoice(e)}));return{id:0,label:e.label||"",element:e,active:0!==n.length,disabled:e.disabled,choices:n}},t}(a.default);t.default=l},493:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SCROLLING_SPEED=t.SELECT_MULTIPLE_TYPE=t.SELECT_ONE_TYPE=t.TEXT_TYPE=void 0,t.TEXT_TYPE="text",t.SELECT_ONE_TYPE="select-one",t.SELECT_MULTIPLE_TYPE="select-multiple",t.SCROLLING_SPEED=4},468:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIG=t.DEFAULT_CLASSNAMES=void 0;var n=i(705);t.DEFAULT_CLASSNAMES={containerOuter:["choices"],containerInner:["choices__inner"],input:["choices__input"],inputCloned:["choices__input--cloned"],list:["choices__list"],listItems:["choices__list--multiple"],listSingle:["choices__list--single"],listDropdown:["choices__list--dropdown"],item:["choices__item"],itemSelectable:["choices__item--selectable"],itemDisabled:["choices__item--disabled"],itemChoice:["choices__item--choice"],description:["choices__description"],placeholder:["choices__placeholder"],group:["choices__group"],groupHeading:["choices__heading"],button:["choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],addChoice:["choices__item","choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]},t.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,singleModeForMultiSelect:!1,addChoices:!1,addItems:!0,addItemFilter:function(e){return!!e&&""!==e},removeItems:!0,removeItemButton:!1,removeItemButtonAlignLeft:!1,editItems:!1,allowHTML:!1,allowHtmlUserInput:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:n.sortByAlpha,shadowRoot:null,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(e){return'Press Enter to add "'.concat(e,'"')},removeItemIconText:function(){return"Remove item"},removeItemLabelText:function(e){return"Remove item: ".concat(e)},maxItemText:function(e){return"Only ".concat(e," values can be added")},valueComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:t.DEFAULT_CLASSNAMES,appendGroupInSearch:!1}},411:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectsInConfig=void 0,t.ObjectsInConfig=["fuseOptions","classNames"]},200:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapInputToChoice=t.stringToHtmlClass=void 0;var n=i(705),s=function(e,t){return void 0===t&&(t=!0),void 0===e?t:!!e};t.stringToHtmlClass=function(e){if("string"==typeof e&&(e=e.split(" ").filter((function(e){return 0!==e.length}))),Array.isArray(e)&&0!==e.length)return e},t.mapInputToChoice=function(e,i){if("string"==typeof e)return(0,t.mapInputToChoice)({value:e,label:e},!1);var o=e;if("choices"in o){if(!i)throw new TypeError("optGroup is not allowed");var r=o,a=r.choices.map((function(e){return(0,t.mapInputToChoice)(e,!1)}));return{id:0,label:(0,n.unwrapStringForRaw)(r.label)||r.value,active:0!==a.length,disabled:!!r.disabled,choices:a}}var c=o;return{id:0,groupId:0,score:0,value:c.value,label:c.label||c.value,active:s(c.active),selected:s(c.selected,!1),disabled:s(c.disabled,!1),placeholder:s(c.placeholder,!1),highlighted:!1,labelClass:(0,t.stringToHtmlClass)(c.labelClass),labelDescription:c.labelDescription,customProperties:c.customProperties}}},705:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCustomProperties=t.getClassNamesSelector=t.getClassNames=t.diff=t.cloneObject=t.dispatchEvent=t.sortByScore=t.sortByAlpha=t.unwrapStringForEscaped=t.unwrapStringForRaw=t.strToEl=t.sanitise=t.isScrolledIntoView=t.getAdjacentEl=t.generateId=void 0;var i,n=function(e){return Array.from({length:e},(function(){return Math.floor(36*Math.random()+0).toString(36)})).join("")};t.generateId=function(e,t){var i=e.id||e.name&&"".concat(e.name,"-").concat(n(2))||n(4);return i=i.replace(/(:|\.|\[|\]|,)/g,""),"".concat(t,"-").concat(i)},t.getAdjacentEl=function(e,t,i){void 0===i&&(i=1);for(var n="".concat(i>0?"next":"previous","ElementSibling"),s=e[n];s;){if(s.matches(t))return s;s=s[n]}return s},t.isScrolledIntoView=function(e,t,i){return void 0===i&&(i=1),!!e&&(i>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop)},t.sanitise=function(e){if("string"!=typeof e){if(null==e)return"";if("object"==typeof e){if("raw"in e)return(0,t.sanitise)(e.raw);if("trusted"in e)return e.trusted}return e}return e.replace(/&/g,"&").replace(/>/g,">").replace(/{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),"SET_IS_LOADING"===t.type?t.isLoading?e+1:Math.max(0,e-1):e}},771:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,s=0,o=t.length;s0},e.prototype.getChoiceById=function(e){return this.activeChoices.find((function(t){return t.id===e}))},e.prototype.getGroupById=function(e){return this.groups.find((function(t){return t.id===e}))},e}();t.default=c},543:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,s=0,o=t.length;s0?"treeitem":"option"),Object.assign(A.dataset,{choice:"",id:y,value:b,selectText:n}),I&&(A.dataset.labelClass=(0,s.getClassNames)(I).join(" ")),O&&(A.dataset.labelDescription=O),w?((c=A.classList).add.apply(c,(0,s.getClassNames)(g)),A.dataset.choiceDisabled="",A.setAttribute("aria-disabled","true")):((l=A.classList).add.apply(l,(0,s.getClassNames)(f)),A.dataset.choiceSelectable=""),A},input:function(e,t){var i=e.classNames,n=i.input,o=i.inputCloned,r=Object.assign(document.createElement("input"),{type:"search",className:"".concat((0,s.getClassNames)(n).join(" ")," ").concat((0,s.getClassNames)(o).join(" ")),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return r.setAttribute("role","textbox"),r.setAttribute("aria-autocomplete","list"),t&&r.setAttribute("aria-label",t),r},dropdown:function(e){var t,i,n=e.classNames,o=n.list,r=n.listDropdown,a=document.createElement("div");return(t=a.classList).add.apply(t,(0,s.getClassNames)(o)),(i=a.classList).add.apply(i,(0,s.getClassNames)(r)),a.setAttribute("aria-expanded","false"),a},notice:function(e,i,o){var r=e.allowHTML,a=e.classNames,c=a.item,l=a.itemChoice,h=a.addChoice,u=a.noResults,d=a.noChoices;void 0===o&&(o="");var p=n(n([],(0,s.getClassNames)(c),!0),(0,s.getClassNames)(l),!0);switch(o){case"add-choice":p.push.apply(p,(0,s.getClassNames)(h));break;case"no-results":p.push.apply(p,(0,s.getClassNames)(u));break;case"no-choices":p.push.apply(p,(0,s.getClassNames)(d))}var f=Object.assign(document.createElement("div"),{innerHTML:(0,t.escapeForTemplate)(r,i),className:p.join(" ")});return"add-choice"===o&&(f.dataset.choiceSelectable="",f.dataset.choice=""),f},option:function(e){var t=e.label,i=e.value,n=e.labelClass,r=e.labelDescription,a=e.customProperties,c=e.active,l=e.disabled,h=(0,s.unwrapStringForRaw)(t),u=new Option(h,i,!1,c);return n&&(u.dataset.labelClass=(0,s.getClassNames)(n).join(" ")),r&&(u.dataset.labelDescription=r),o(u,a),u.disabled=l,u}};t.default=r},120:(e,t,i)=>{function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===l(e)}i.r(t),i.d(t,{default:()=>U});function s(e){return"string"==typeof e}function o(e){return"number"==typeof e}function r(e){return"object"==typeof e}function a(e){return null!=e}function c(e){return!e.trim().length}function l(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const h=e=>`Missing ${e} property in key`,u=e=>`Property 'weight' in key '${e}' must be a positive integer`,d=Object.prototype.hasOwnProperty;class p{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let i=f(e);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function f(e){let t=null,i=null,o=null,r=1,a=null;if(s(e)||n(e))o=e,t=m(e),i=g(e);else{if(!d.call(e,"name"))throw new Error(h("name"));const n=e.name;if(o=n,d.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(u(n));t=m(n),i=g(n),a=e.getFn}return{path:t,id:i,weight:r,src:o,getFn:a}}function m(e){return n(e)?e:e.split(".")}function g(e){return n(e)?e.join("."):e}var v={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(a(e))if(t[u]){const d=e[t[u]];if(!a(d))return;if(u===t.length-1&&(s(d)||o(d)||function(e){return!0===e||!1===e||function(e){return r(e)&&null!==e}(e)&&"[object Boolean]"==l(e)}(d)))i.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(d));else if(n(d)){c=!0;for(let e=0,i=d.length;e{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,s(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();s(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(a(r))if(n(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:i,value:o}=t.pop();if(a(o))if(s(o)&&!c(o)){let t={v:o,i,n:this.norm.get(o)};e.push(t)}else n(o)&&o.forEach(((e,i)=>{t.push({nestedArrIndex:i,value:e})}))}i.$[o]=e}else if(s(r)&&!c(r)){let e={v:r,n:this.norm.get(r)};i.$[o]=e}})),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function b(e,t,{getFn:i=v.getFn,fieldNormWeight:n=v.fieldNormWeight}={}){const s=new y({getFn:i,fieldNormWeight:n});return s.setKeys(e.map(f)),s.setSources(t),s.create(),s}function E(e,{errors:t=0,currentLocation:i=0,expectedLocation:n=0,distance:s=v.distance,ignoreLocation:o=v.ignoreLocation}={}){const r=t/e.length;if(o)return r;const a=Math.abs(n-i);return s?r+a/s:a?1:r}const C=32;function S(e){let t={};for(let i=0,n=e.length;i{this.chunks.push({pattern:e,alphabet:S(e),startIndex:t})},h=this.pattern.length;if(h>C){let e=0;const t=h%C,i=h-t;for(;e{const{isMatch:f,score:m,indices:g}=function(e,t,i,{location:n=v.location,distance:s=v.distance,threshold:o=v.threshold,findAllMatches:r=v.findAllMatches,minMatchCharLength:a=v.minMatchCharLength,includeMatches:c=v.includeMatches,ignoreLocation:l=v.ignoreLocation}={}){if(t.length>C)throw new Error("Pattern length exceeds max of 32.");const h=t.length,u=e.length,d=Math.max(0,Math.min(n,u));let p=o,f=d;const m=a>1||c,g=m?Array(u):[];let _;for(;(_=e.indexOf(t,f))>-1;){let e=E(t,{currentLocation:_,expectedLocation:d,distance:s,ignoreLocation:l});if(p=Math.min(e,p),f=_+h,m){let e=0;for(;e=c;o-=1){let r=o-1,a=i[e.charAt(r)];if(m&&(g[r]=+!!a),_[o]=(_[o+1]<<1|1)&a,n&&(_[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),_[o]&I&&(b=E(t,{errors:n,currentLocation:r,expectedLocation:d,distance:s,ignoreLocation:l}),b<=p)){if(p=b,f=r,f<=d)break;c=Math.max(1,2*d-f)}}if(E(t,{errors:n+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:l})>p)break;y=_}const O={isMatch:f>=0,score:Math.max(.001,b)};if(m){const e=function(e=[],t=v.minMatchCharLength){let i=[],n=-1,s=-1,o=0;for(let r=e.length;o=t&&i.push([n,s]),n=-1)}return e[o-1]&&o-n>=t&&i.push([n,o-1]),i}(g,a);e.length?c&&(O.indices=e):O.isMatch=!1}return O}(e,t,d,{location:n+p,distance:s,threshold:o,findAllMatches:r,minMatchCharLength:a,includeMatches:i,ignoreLocation:c});f&&(u=!0),h+=m,f&&g&&(l=[...l,...g])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&i&&(d.indices=l),d}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return w(e,this.multiRegex)}static isSingleMatch(e){return w(e,this.singleRegex)}search(){}}function w(e,t){const i=e.match(t);return i?i[1]:null}class L extends O{constructor(e,{location:t=v.location,threshold:i=v.threshold,distance:n=v.distance,includeMatches:s=v.includeMatches,findAllMatches:o=v.findAllMatches,minMatchCharLength:r=v.minMatchCharLength,isCaseSensitive:a=v.isCaseSensitive,ignoreLocation:c=v.ignoreLocation}={}){super(e),this._bitapSearch=new I(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:a,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class T extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,i=0;const n=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,i))>-1;)i=t+s,n.push([t,i-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const A=[class extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},T,class extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},L],M=A.length,N=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,x=new Set([L.type,T.type]);const P=[];function j(e,t){for(let i=0,n=P.length;i!(!e[D]&&!e.$or),k=e=>({[D]:Object.keys(e).map((t=>({[t]:e[t]})))});function H(e,t,{auto:i=!0}={}){const o=e=>{let a=Object.keys(e);const c=(e=>!!e[F])(e);if(!c&&a.length>1&&!R(e))return o(k(e));if((e=>!n(e)&&r(e)&&!R(e))(e)){const n=c?e[F]:a[0],o=c?e.$val:e[n];if(!s(o))throw new Error((e=>`Invalid value for key ${e}`)(n));const r={keyId:g(n),pattern:o};return i&&(r.searcher=j(o,t)),r}let l={children:[],operator:a[0]};return a.forEach((t=>{const i=e[t];n(i)&&i.forEach((e=>{l.children.push(o(e))}))})),l};return R(e)||(e=k(e)),o(e)}function V(e,t){const i=e.matches;t.matches=[],a(i)&&i.forEach((e=>{if(!a(e.indices)||!e.indices.length)return;const{indices:i,value:n}=e;let s={indices:i,value:n};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)}))}function B(e,t){t.score=e.score}class U{constructor(e,t={},i){this.options={...v,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof y))throw new Error("Incorrect 'index' type");this._myIndex=t||b(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){a(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i{let i=1;e.matches.forEach((({key:e,norm:n,score:s})=>{const o=e?e.weight:null;i*=Math.pow(0===s&&o?Number.EPSILON:s,(o||1)*(t?1:n))})),e.score=i}))}(l,{ignoreFieldNorm:c}),r&&l.sort(a),o(t)&&t>-1&&(l=l.slice(0,t)),function(e,t,{includeMatches:i=v.includeMatches,includeScore:n=v.includeScore}={}){const s=[];return i&&s.push(V),n&&s.push(B),e.map((e=>{const{idx:i}=e,n={item:t[i],refIndex:i};return s.length&&s.forEach((t=>{t(e,n)})),n}))}(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=j(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach((({v:e,i,n:s})=>{if(!a(e))return;const{isMatch:o,score:r,indices:c}=t.searchIn(e);o&&n.push({item:e,idx:i,matches:[{score:r,value:e,norm:s,indices:c}]})})),n}_searchLogical(e){const t=H(e,this.options),i=(e,t,n)=>{if(!e.children){const{keyId:i,searcher:s}=e,o=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:s});return o&&o.length?[{idx:n,item:t,matches:o}]:[]}const s=[];for(let o=0,r=e.children.length;o{if(a(e)){let r=i(t,e,n);r.length&&(s[n]||(s[n]={idx:n,item:e,matches:[]},o.push(s[n])),r.forEach((({matches:e})=>{s[n].matches.push(...e)})))}})),o}_searchObjectList(e){const t=j(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach((({$:e,i:n})=>{if(!a(e))return;let o=[];i.forEach(((i,n)=>{o.push(...this._findMatches({key:i,value:e[n],searcher:t}))})),o.length&&s.push({idx:n,item:e,matches:o})})),s}_findMatches({key:e,value:t,searcher:i}){if(!a(t))return[];let s=[];if(n(t))t.forEach((({v:t,i:n,n:o})=>{if(!a(t))return;const{isMatch:r,score:c,indices:l}=i.searchIn(t);r&&s.push({score:c,key:e,value:t,idx:n,norm:o,indices:l})}));else{const{v:n,n:o}=t,{isMatch:r,score:a,indices:c}=i.searchIn(n);r&&s.push({score:a,key:e,value:n,norm:o,indices:c})}return s}}U.version="6.6.2",U.createIndex=b,U.parseIndex=function(e,{getFn:t=v.getFn,fieldNormWeight:i=v.fieldNormWeight}={}){const{keys:n,records:s}=e,o=new y({getFn:t,fieldNormWeight:i});return o.setKeys(n),o.setIndexRecords(s),o},U.config=v,U.parseQuery=H,function(...e){P.push(...e)}(class{constructor(e,{isCaseSensitive:t=v.isCaseSensitive,includeMatches:i=v.includeMatches,minMatchCharLength:n=v.minMatchCharLength,ignoreLocation:s=v.ignoreLocation,findAllMatches:o=v.findAllMatches,location:r=v.location,threshold:a=v.threshold,distance:c=v.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:r,threshold:a,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let i=e.trim().split(N).filter((e=>e&&!!e.trim())),n=[];for(let e=0,s=i.length;e{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function s(e,t,i){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;th,applyMiddleware:()=>v,bindActionCreators:()=>m,combineReducers:()=>p,compose:()=>g,createStore:()=>u,legacy_createStore:()=>d});var c="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},h={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(a(1));return i(u)(e,t)}if("function"!=typeof e)throw new Error(a(2));var s=e,o=t,r=[],l=r,d=!1;function p(){l===r&&(l=r.slice())}function f(){if(d)throw new Error(a(3));return o}function m(e){if("function"!=typeof e)throw new Error(a(4));if(d)throw new Error(a(5));var t=!0;return p(),l.push(e),function(){if(t){if(d)throw new Error(a(6));t=!1,p();var i=l.indexOf(e);l.splice(i,1),r=null}}}function g(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(d)throw new Error(a(9));try{d=!0,o=s(o,e)}finally{d=!1}for(var t=r=l,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.d(n,{default:()=>o});var s=i(472);const o=i.n(s)();window.Choices=n.default})(); \ No newline at end of file diff --git a/src/scripts/store/store.ts b/src/scripts/store/store.ts index 87c2a04fb..9ff850541 100644 --- a/src/scripts/store/store.ts +++ b/src/scripts/store/store.ts @@ -83,7 +83,7 @@ export default class Store implements IStore { * Get active choices from store */ get activeChoices(): ChoiceFull[] { - return this.choices.filter((choice) => !choice.disabled && choice.active); + return this.choices.filter((choice) => choice.active); } /**