lavkach3

Форк
0
2829 строк · 155.8 Кб
1
/*! For license information please see choices.min.js.LICENSE.txt */
2
!function () {
3
    "use strict";
4
    var e = {
5
        282: function (e, t, i) {
6
            Object.defineProperty(t, "__esModule", {value: !0}), t.clearChoices = t.activateChoices = t.filterChoices = t.addChoice = void 0;
7
            var n = i(883);
8
            t.addChoice = function (e) {
9
                var t = e.value, i = e.label, r = e.id, s = e.groupId, o = e.disabled, a = e.elementId,
10
                    c = e.customProperties, l = e.placeholder, h = e.keyCode;
11
                return {
12
                    type: n.ACTION_TYPES.ADD_CHOICE,
13
                    value: t,
14
                    label: i,
15
                    id: r,
16
                    groupId: s,
17
                    disabled: o,
18
                    elementId: a,
19
                    customProperties: c,
20
                    placeholder: l,
21
                    keyCode: h
22
                }
23
            }, t.filterChoices = function (e) {
24
                return {type: n.ACTION_TYPES.FILTER_CHOICES, results: e}
25
            }, t.activateChoices = function (e) {
26
                return void 0 === e && (e = !0), {type: n.ACTION_TYPES.ACTIVATE_CHOICES, active: e}
27
            }, t.clearChoices = function () {
28
                return {type: n.ACTION_TYPES.CLEAR_CHOICES}
29
            }
30
        }, 783: function (e, t, i) {
31
            Object.defineProperty(t, "__esModule", {value: !0}), t.addGroup = void 0;
32
            var n = i(883);
33
            t.addGroup = function (e) {
34
                var t = e.value, i = e.id, r = e.active, s = e.disabled;
35
                return {type: n.ACTION_TYPES.ADD_GROUP, value: t, id: i, active: r, disabled: s}
36
            }
37
        }, 464: function (e, t, i) {
38
            Object.defineProperty(t, "__esModule", {value: !0}), t.highlightItem = t.removeItem = t.addItem = void 0;
39
            var n = i(883);
40
            t.addItem = function (e) {
41
                var t = e.value, i = e.label, r = e.id, s = e.choiceId, o = e.groupId, a = e.customProperties,
42
                    c = e.placeholder, l = e.keyCode;
43
                return {
44
                    type: n.ACTION_TYPES.ADD_ITEM,
45
                    value: t,
46
                    label: i,
47
                    id: r,
48
                    choiceId: s,
49
                    groupId: o,
50
                    customProperties: a,
51
                    placeholder: c,
52
                    keyCode: l
53
                }
54
            }, t.removeItem = function (e, t) {
55
                return {type: n.ACTION_TYPES.REMOVE_ITEM, id: e, choiceId: t}
56
            }, t.highlightItem = function (e, t) {
57
                return {type: n.ACTION_TYPES.HIGHLIGHT_ITEM, id: e, highlighted: t}
58
            }
59
        }, 137: function (e, t, i) {
60
            Object.defineProperty(t, "__esModule", {value: !0}), t.setIsLoading = t.resetTo = t.clearAll = void 0;
61
            var n = i(883);
62
            t.clearAll = function () {
63
                return {type: n.ACTION_TYPES.CLEAR_ALL}
64
            }, t.resetTo = function (e) {
65
                return {type: n.ACTION_TYPES.RESET_TO, state: e}
66
            }, t.setIsLoading = function (e) {
67
                return {type: n.ACTION_TYPES.SET_IS_LOADING, isLoading: e}
68
            }
69
        }, 373: function (e, t, i) {
70
            var n = this && this.__spreadArray || function (e, t, i) {
71
                if (i || 2 === arguments.length) for (var n, r = 0, s = t.length; r < s; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
72
                return e.concat(n || Array.prototype.slice.call(t))
73
            }, r = this && this.__importDefault || function (e) {
74
                return e && e.__esModule ? e : {default: e}
75
            };
76
            Object.defineProperty(t, "__esModule", {value: !0});
77
            var s = r(i(996)), o = r(i(221)), a = i(282), c = i(783), l = i(464), h = i(137), u = i(520), d = i(883),
78
                p = i(789), f = i(799), m = i(655), v = r(i(744)), g = r(i(686)),
79
                _ = "-ms-scroll-limit" in document.documentElement.style && "-ms-ime-align" in document.documentElement.style,
80
                y = {}, E = function () {
81
                    function e(t, i) {
82
                        void 0 === t && (t = "[data-choice]"), void 0 === i && (i = {});
83
                        var r = this;
84
                        void 0 === i.allowHTML && console.warn("Deprecation warning: allowHTML will default to false in a future release. To render HTML in Choices, you will need to set it to true. Setting allowHTML will suppress this message."), this.config = s.default.all([p.DEFAULT_CONFIG, e.defaults.options, i], {
85
                            arrayMerge: function (e, t) {
86
                                return n([], t, !0)
87
                            }
88
                        });
89
                        var o = (0, f.diff)(this.config, p.DEFAULT_CONFIG);
90
                        o.length && console.warn("Unknown config option(s) passed", o.join(", "));
91
                        var a = "string" == typeof t ? document.querySelector(t) : t;
92
                        if (!(a instanceof HTMLInputElement || a instanceof HTMLSelectElement)) throw TypeError("Expected one of the following types text|select-one|select-multiple");
93
                        if (this._isTextElement = a.type === d.TEXT_TYPE, this._isSelectOneElement = a.type === d.SELECT_ONE_TYPE, this._isSelectMultipleElement = a.type === d.SELECT_MULTIPLE_TYPE, this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement, this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled, ["auto", "always"].includes("".concat(this.config.renderSelectedChoices)) || (this.config.renderSelectedChoices = "auto"), i.addItemFilter && "function" != typeof i.addItemFilter) {
94
                            var c = i.addItemFilter instanceof RegExp ? i.addItemFilter : new RegExp(i.addItemFilter);
95
                            this.config.addItemFilter = c.test.bind(c)
96
                        }
97
                        if (this._isTextElement ? this.passedElement = new u.WrappedInput({
98
                            element: a,
99
                            classNames: this.config.classNames,
100
                            delimiter: this.config.delimiter
101
                        }) : this.passedElement = new u.WrappedSelect({
102
                            element: a,
103
                            classNames: this.config.classNames,
104
                            template: function (e) {
105
                                return r._templates.option(e)
106
                            }
107
                        }), this.initialised = !1, this._store = new v.default, this._initialState = m.defaultState, this._currentState = m.defaultState, this._prevState = m.defaultState, this._currentValue = "", this._canSearch = !!this.config.searchEnabled, this._isScrollingOnIe = !1, this._highlightPosition = 0, this._wasTap = !0, this._placeholderValue = this._generatePlaceholderValue(), this._baseId = (0, f.generateId)(this.passedElement.element, "choices-"), this._direction = this.passedElement.dir, !this._direction) {
108
                            var l = window.getComputedStyle(this.passedElement.element).direction;
109
                            l !== window.getComputedStyle(document.documentElement).direction && (this._direction = l)
110
                        }
111
                        if (this._idNames = {itemChoice: "item-choice"}, this._isSelectElement && (this._presetGroups = this.passedElement.optionGroups, this._presetOptions = this.passedElement.options), this._presetChoices = this.config.choices, this._presetItems = this.config.items, this.passedElement.value && this._isTextElement) {
112
                            var h = this.passedElement.value.split(this.config.delimiter);
113
                            this._presetItems = this._presetItems.concat(h)
114
                        }
115
                        if (this.passedElement.options && this.passedElement.options.forEach((function (e) {
116
                            r._presetChoices.push({
117
                                value: e.value,
118
                                label: e.innerHTML,
119
                                selected: !!e.selected,
120
                                disabled: e.disabled || e.parentNode.disabled,
121
                                placeholder: "" === e.value || e.hasAttribute("placeholder"),
122
                                customProperties: (0, f.parseCustomProperties)(e.dataset.customProperties)
123
                            })
124
                        })), this._render = this._render.bind(this), this._onFocus = this._onFocus.bind(this), this._onBlur = this._onBlur.bind(this), this._onKeyUp = this._onKeyUp.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onClick = this._onClick.bind(this), this._onTouchMove = this._onTouchMove.bind(this), this._onTouchEnd = this._onTouchEnd.bind(this), this._onMouseDown = this._onMouseDown.bind(this), this._onMouseOver = this._onMouseOver.bind(this), this._onFormReset = this._onFormReset.bind(this), this._onSelectKey = this._onSelectKey.bind(this), this._onEnterKey = this._onEnterKey.bind(this), this._onEscapeKey = this._onEscapeKey.bind(this), this._onDirectionKey = this._onDirectionKey.bind(this), this._onDeleteKey = this._onDeleteKey.bind(this), this.passedElement.isActive) return this.config.silent || console.warn("Trying to initialise Choices on element already initialised", {element: t}), void (this.initialised = !0);
125
                        this.init()
126
                    }
127

128
                    return Object.defineProperty(e, "defaults", {
129
                        get: function () {
130
                            return Object.preventExtensions({
131
                                get options() {
132
                                    return y
133
                                }, get templates() {
134
                                    return g.default
135
                                }
136
                            })
137
                        }, enumerable: !1, configurable: !0
138
                    }), e.prototype.init = function () {
139
                        if (!this.initialised) {
140
                            this._createTemplates(), this._createElements(), this._createStructure(), this._store.subscribe(this._render), this._render(), this._addEventListeners(), (!this.config.addItems || this.passedElement.element.hasAttribute("disabled")) && this.disable(), this.initialised = !0;
141
                            var e = this.config.callbackOnInit;
142
                            e && "function" == typeof e && e.call(this)
143
                        }
144
                    }, e.prototype.destroy = function () {
145
                        this.initialised && (this._removeEventListeners(), this.passedElement.reveal(), this.containerOuter.unwrap(this.passedElement.element), this.clearStore(), this._isSelectElement && (this.passedElement.options = this._presetOptions), this._templates = g.default, this.initialised = !1)
146
                    }, e.prototype.enable = function () {
147
                        return this.passedElement.isDisabled && this.passedElement.enable(), this.containerOuter.isDisabled && (this._addEventListeners(), this.input.enable(), this.containerOuter.enable()), this
148
                    }, e.prototype.disable = function () {
149
                        return this.passedElement.isDisabled || this.passedElement.disable(), this.containerOuter.isDisabled || (this._removeEventListeners(), this.input.disable(), this.containerOuter.disable()), this
150
                    }, e.prototype.highlightItem = function (e, t) {
151
                        if (void 0 === t && (t = !0), !e || !e.id) return this;
152
                        var i = e.id, n = e.groupId, r = void 0 === n ? -1 : n, s = e.value, o = void 0 === s ? "" : s,
153
                            a = e.label, c = void 0 === a ? "" : a, h = r >= 0 ? this._store.getGroupById(r) : null;
154
                        return this._store.dispatch((0, l.highlightItem)(i, !0)), t && this.passedElement.triggerEvent(d.EVENTS.highlightItem, {
155
                            id: i,
156
                            value: o,
157
                            label: c,
158
                            groupValue: h && h.value ? h.value : null
159
                        }), this
160
                    }, e.prototype.unhighlightItem = function (e) {
161
                        if (!e || !e.id) return this;
162
                        var t = e.id, i = e.groupId, n = void 0 === i ? -1 : i, r = e.value, s = void 0 === r ? "" : r,
163
                            o = e.label, a = void 0 === o ? "" : o, c = n >= 0 ? this._store.getGroupById(n) : null;
164
                        return this._store.dispatch((0, l.highlightItem)(t, !1)), this.passedElement.triggerEvent(d.EVENTS.highlightItem, {
165
                            id: t,
166
                            value: s,
167
                            label: a,
168
                            groupValue: c && c.value ? c.value : null
169
                        }), this
170
                    }, e.prototype.highlightAll = function () {
171
                        var e = this;
172
                        return this._store.items.forEach((function (t) {
173
                            return e.highlightItem(t)
174
                        })), this
175
                    }, e.prototype.unhighlightAll = function () {
176
                        var e = this;
177
                        return this._store.items.forEach((function (t) {
178
                            return e.unhighlightItem(t)
179
                        })), this
180
                    }, e.prototype.removeActiveItemsByValue = function (e) {
181
                        var t = this;
182
                        return this._store.activeItems.filter((function (t) {
183
                            return t.value === e
184
                        })).forEach((function (e) {
185
                            return t._removeItem(e)
186
                        })), this
187
                    }, e.prototype.removeActiveItems = function (e) {
188
                        var t = this;
189
                        return this._store.activeItems.filter((function (t) {
190
                            return t.id !== e
191
                        })).forEach((function (e) {
192
                            return t._removeItem(e)
193
                        })), this
194
                    }, e.prototype.removeHighlightedItems = function (e) {
195
                        var t = this;
196
                        return void 0 === e && (e = !1), this._store.highlightedActiveItems.forEach((function (i) {
197
                            t._removeItem(i), e && t._triggerChange(i.value)
198
                        })), this
199
                    }, e.prototype.showDropdown = function (e) {
200
                        var t = this;
201
                        return this.dropdown.isActive || requestAnimationFrame((function () {
202
                            t.dropdown.show(), t.containerOuter.open(t.dropdown.distanceFromTopWindow), !e && t._canSearch && t.input.focus(), t.passedElement.triggerEvent(d.EVENTS.showDropdown, {})
203
                        })), this
204
                    }, e.prototype.hideDropdown = function (e) {
205
                        var t = this;
206
                        return this.dropdown.isActive ? (requestAnimationFrame((function () {
207
                            t.dropdown.hide(), t.containerOuter.close(), !e && t._canSearch && (t.input.removeActiveDescendant(), t.input.blur()), t.passedElement.triggerEvent(d.EVENTS.hideDropdown, {})
208
                        })), this) : this
209
                    }, e.prototype.getValue = function (e) {
210
                        void 0 === e && (e = !1);
211
                        var t = this._store.activeItems.reduce((function (t, i) {
212
                            var n = e ? i.value : i;
213
                            return t.push(n), t
214
                        }), []);
215
                        return this._isSelectOneElement ? t[0] : t
216
                    }, e.prototype.setValue = function (e) {
217
                        var t = this;
218
                        return this.initialised ? (e.forEach((function (e) {
219
                            return t._setChoiceOrItem(e)
220
                        })), this) : this
221
                    }, e.prototype.setChoiceByValue = function (e) {
222
                        var t = this;
223
                        return !this.initialised || this._isTextElement || (Array.isArray(e) ? e : [e]).forEach((function (e) {
224
                            return t._findAndSelectChoiceByValue(e)
225
                        })), this
226
                    }, e.prototype.setChoices = function (e, t, i, n) {
227
                        var r = this;
228
                        if (void 0 === e && (e = []), void 0 === t && (t = "value"), void 0 === i && (i = "label"), void 0 === n && (n = !1), !this.initialised) throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");
229
                        if (!this._isSelectElement) throw new TypeError("setChoices can't be used with INPUT based Choices");
230
                        if ("string" != typeof t || !t) throw new TypeError("value parameter must be a name of 'value' field in passed objects");
231
                        if (n && this.clearChoices(), "function" == typeof e) {
232
                            var s = e(this);
233
                            if ("function" == typeof Promise && s instanceof Promise) return new Promise((function (e) {
234
                                return requestAnimationFrame(e)
235
                            })).then((function () {
236
                                return r._handleLoadingState(!0)
237
                            })).then((function () {
238
                                return s
239
                            })).then((function (e) {
240
                                return r.setChoices(e, t, i, n)
241
                            })).catch((function (e) {
242
                                r.config.silent || console.error(e)
243
                            })).then((function () {
244
                                return r._handleLoadingState(!1)
245
                            })).then((function () {
246
                                return r
247
                            }));
248
                            if (!Array.isArray(s)) throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof s));
249
                            return this.setChoices(s, t, i, !1)
250
                        }
251
                        if (!Array.isArray(e)) throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");
252
                        return this.containerOuter.removeLoadingState(), this._startLoading(), e.forEach((function (e) {
253
                            if (e.choices) r._addGroup({
254
                                id: e.id ? parseInt("".concat(e.id), 10) : null,
255
                                group: e,
256
                                valueKey: t,
257
                                labelKey: i
258
                            }); else {
259
                                var n = e;
260
                                r._addChoice({
261
                                    value: n[t],
262
                                    label: n[i],
263
                                    isSelected: !!n.selected,
264
                                    isDisabled: !!n.disabled,
265
                                    placeholder: !!n.placeholder,
266
                                    customProperties: n.customProperties
267
                                })
268
                            }
269
                        })), this._stopLoading(), this
270
                    }, e.prototype.clearChoices = function () {
271
                        return this._store.dispatch((0, a.clearChoices)()), this
272
                    }, e.prototype.clearStore = function () {
273
                        return this._store.dispatch((0, h.clearAll)()), this
274
                    }, e.prototype.clearInput = function () {
275
                        var e = !this._isSelectOneElement;
276
                        return this.input.clear(e), !this._isTextElement && this._canSearch && (this._isSearching = !1, this._store.dispatch((0, a.activateChoices)(!0))), this
277
                    }, e.prototype._render = function () {
278
                        if (!this._store.isLoading()) {
279
                            this._currentState = this._store.state;
280
                            var e = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items,
281
                                t = this._isSelectElement, i = this._currentState.items !== this._prevState.items;
282
                            e && (t && this._renderChoices(), i && this._renderItems(), this._prevState = this._currentState)
283
                        }
284
                    }, e.prototype._renderChoices = function () {
285
                        var e = this, t = this._store, i = t.activeGroups, n = t.activeChoices,
286
                            r = document.createDocumentFragment();
287
                        if (this.choiceList.clear(), this.config.resetScrollPosition && requestAnimationFrame((function () {
288
                            return e.choiceList.scrollToTop()
289
                        })), i.length >= 1 && !this._isSearching) {
290
                            var s = n.filter((function (e) {
291
                                return !0 === e.placeholder && -1 === e.groupId
292
                            }));
293
                            s.length >= 1 && (r = this._createChoicesFragment(s, r)), r = this._createGroupsFragment(i, n, r)
294
                        } else n.length >= 1 && (r = this._createChoicesFragment(n, r));
295
                        if (r.childNodes && r.childNodes.length > 0) {
296
                            var o = this._store.activeItems, a = this._canAddItem(o, this.input.value);
297
                            if (a.response) this.choiceList.append(r), this._highlightChoice(); else {
298
                                var c = this._getTemplate("notice", a.notice);
299
                                this.choiceList.append(c)
300
                            }
301
                        } else {
302
                            var l = void 0;
303
                            c = void 0, this._isSearching ? (c = "function" == typeof this.config.noResultsText ? this.config.noResultsText() : this.config.noResultsText, l = this._getTemplate("notice", c, "no-results")) : (c = "function" == typeof this.config.noChoicesText ? this.config.noChoicesText() : this.config.noChoicesText, l = this._getTemplate("notice", c, "no-choices")), this.choiceList.append(l)
304
                        }
305
                    }, e.prototype._renderItems = function () {
306
                        var e = this._store.activeItems || [];
307
                        this.itemList.clear();
308
                        var t = this._createItemsFragment(e);
309
                        t.childNodes && this.itemList.append(t)
310
                    }, e.prototype._createGroupsFragment = function (e, t, i) {
311
                        var n = this;
312
                        return void 0 === i && (i = document.createDocumentFragment()), this.config.shouldSort && e.sort(this.config.sorter), e.forEach((function (e) {
313
                            var r = function (e) {
314
                                return t.filter((function (t) {
315
                                    return n._isSelectOneElement ? t.groupId === e.id : t.groupId === e.id && ("always" === n.config.renderSelectedChoices || !t.selected)
316
                                }))
317
                            }(e);
318
                            if (r.length >= 1) {
319
                                var s = n._getTemplate("choiceGroup", e);
320
                                i.appendChild(s), n._createChoicesFragment(r, i, !0)
321
                            }
322
                        })), i
323
                    }, e.prototype._createChoicesFragment = function (e, t, i) {
324
                        var r = this;
325
                        void 0 === t && (t = document.createDocumentFragment()), void 0 === i && (i = !1);
326
                        var s = this.config, o = s.renderSelectedChoices, a = s.searchResultLimit, c = s.renderChoiceLimit,
327
                            l = this._isSearching ? f.sortByScore : this.config.sorter, h = function (e) {
328
                                if ("auto" !== o || r._isSelectOneElement || !e.selected) {
329
                                    var i = r._getTemplate("choice", e, r.config.itemSelectText);
330
                                    t.appendChild(i)
331
                                }
332
                            }, u = e;
333
                        "auto" !== o || this._isSelectOneElement || (u = e.filter((function (e) {
334
                            return !e.selected
335
                        })));
336
                        var d = u.reduce((function (e, t) {
337
                            return t.placeholder ? e.placeholderChoices.push(t) : e.normalChoices.push(t), e
338
                        }), {placeholderChoices: [], normalChoices: []}), p = d.placeholderChoices, m = d.normalChoices;
339
                        (this.config.shouldSort || this._isSearching) && m.sort(l);
340
                        var v = u.length, g = this._isSelectOneElement ? n(n([], p, !0), m, !0) : m;
341
                        this._isSearching ? v = a : c && c > 0 && !i && (v = c);
342
                        for (var _ = 0; _ < v; _ += 1) g[_] && h(g[_]);
343
                        return t
344
                    }, e.prototype._createItemsFragment = function (e, t) {
345
                        var i = this;
346
                        void 0 === t && (t = document.createDocumentFragment());
347
                        var n = this.config, r = n.shouldSortItems, s = n.sorter, o = n.removeItemButton;
348
                        return r && !this._isSelectOneElement && e.sort(s), this._isTextElement ? this.passedElement.value = e.map((function (e) {
349
                            return e.value
350
                        })).join(this.config.delimiter) : this.passedElement.options = e, e.forEach((function (e) {
351
                            var n = i._getTemplate("item", e, o);
352
                            t.appendChild(n)
353
                        })), t
354
                    }, e.prototype._triggerChange = function (e) {
355
                        null != e && this.passedElement.triggerEvent(d.EVENTS.change, {value: e})
356
                    }, e.prototype._selectPlaceholderChoice = function (e) {
357
                        this._addItem({
358
                            value: e.value,
359
                            label: e.label,
360
                            choiceId: e.id,
361
                            groupId: e.groupId,
362
                            placeholder: e.placeholder
363
                        }), this._triggerChange(e.value)
364
                    }, e.prototype._handleButtonAction = function (e, t) {
365
                        if (e && t && this.config.removeItems && this.config.removeItemButton) {
366
                            var i = t.parentNode && t.parentNode.dataset.id, n = i && e.find((function (e) {
367
                                return e.id === parseInt(i, 10)
368
                            }));
369
                            n && (this._removeItem(n), this._triggerChange(n.value), this._isSelectOneElement && this._store.placeholderChoice && this._selectPlaceholderChoice(this._store.placeholderChoice))
370
                        }
371
                    }, e.prototype._handleItemAction = function (e, t, i) {
372
                        var n = this;
373
                        if (void 0 === i && (i = !1), e && t && this.config.removeItems && !this._isSelectOneElement) {
374
                            var r = t.dataset.id;
375
                            e.forEach((function (e) {
376
                                e.id !== parseInt("".concat(r), 10) || e.highlighted ? !i && e.highlighted && n.unhighlightItem(e) : n.highlightItem(e)
377
                            })), this.input.focus()
378
                        }
379
                    }, e.prototype._handleChoiceAction = function (e, t) {
380
                        if (e && t) {
381
                            var i = t.dataset.id, n = i && this._store.getChoiceById(i);
382
                            if (n) {
383
                                var r = e[0] && e[0].keyCode ? e[0].keyCode : void 0, s = this.dropdown.isActive;
384
                                n.keyCode = r, this.passedElement.triggerEvent(d.EVENTS.choice, {choice: n}), n.selected || n.disabled || this._canAddItem(e, n.value).response && (this._addItem({
385
                                    value: n.value,
386
                                    label: n.label,
387
                                    choiceId: n.id,
388
                                    groupId: n.groupId,
389
                                    customProperties: n.customProperties,
390
                                    placeholder: n.placeholder,
391
                                    keyCode: n.keyCode
392
                                }), this._triggerChange(n.value)), this.clearInput(), s && this._isSelectOneElement && (this.hideDropdown(!0), this.containerOuter.focus())
393
                            }
394
                        }
395
                    }, e.prototype._handleBackspace = function (e) {
396
                        if (this.config.removeItems && e) {
397
                            var t = e[e.length - 1], i = e.some((function (e) {
398
                                return e.highlighted
399
                            }));
400
                            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))
401
                        }
402
                    }, e.prototype._startLoading = function () {
403
                        this._store.dispatch((0, h.setIsLoading)(!0))
404
                    }, e.prototype._stopLoading = function () {
405
                        this._store.dispatch((0, h.setIsLoading)(!1))
406
                    }, e.prototype._handleLoadingState = function (e) {
407
                        void 0 === e && (e = !0);
408
                        var t = this.itemList.getChild(".".concat(this.config.classNames.placeholder));
409
                        e ? (this.disable(), this.containerOuter.addLoadingState(), this._isSelectOneElement ? t ? t.innerHTML = this.config.loadingText : (t = this._getTemplate("placeholder", 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 || "")
410
                    }, e.prototype._handleSearch = function (e) {
411
                        if (this.input.isFocussed) {
412
                            var t = this._store.choices, i = this.config, n = i.searchFloor, r = i.searchChoices,
413
                                s = t.some((function (e) {
414
                                    return !e.active
415
                                }));
416
                            if (null != e && e.length >= n) {
417
                                var o = r ? this._searchChoices(e) : 0;
418
                                this.passedElement.triggerEvent(d.EVENTS.search, {value: e, resultCount: o})
419
                            } else s && (this._isSearching = !1, this._store.dispatch((0, a.activateChoices)(!0)))
420
                        }
421
                    }, e.prototype._canAddItem = function (e, t) {
422
                        var i = !0,
423
                            n = "function" == typeof this.config.addItemText ? this.config.addItemText(t) : this.config.addItemText;
424
                        if (!this._isSelectOneElement) {
425
                            var r = (0, f.existsInArray)(e, t);
426
                            this.config.maxItemCount > 0 && this.config.maxItemCount <= e.length && (i = !1, n = "function" == typeof this.config.maxItemText ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText), !this.config.duplicateItemsAllowed && r && i && (i = !1, n = "function" == typeof this.config.uniqueItemText ? this.config.uniqueItemText(t) : this.config.uniqueItemText), this._isTextElement && this.config.addItems && i && "function" == typeof this.config.addItemFilter && !this.config.addItemFilter(t) && (i = !1, n = "function" == typeof this.config.customAddItemText ? this.config.customAddItemText(t) : this.config.customAddItemText)
427
                        }
428
                        return {response: i, notice: n}
429
                    }, e.prototype._searchChoices = function (e) {
430
                        var t = "string" == typeof e ? e.trim() : e,
431
                            i = "string" == typeof this._currentValue ? this._currentValue.trim() : this._currentValue;
432
                        if (t.length < 1 && t === "".concat(i, " ")) return 0;
433
                        var r = this._store.searchableChoices, s = t, c = Object.assign(this.config.fuseOptions, {
434
                            keys: n([], this.config.searchFields, !0),
435
                            includeMatches: !0
436
                        }), l = new o.default(r, c).search(s);
437
                        return this._currentValue = t, this._highlightPosition = 0, this._isSearching = !0, this._store.dispatch((0, a.filterChoices)(l)), l.length
438
                    }, e.prototype._addEventListeners = function () {
439
                        var e = document.documentElement;
440
                        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("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()
441
                    }, e.prototype._removeEventListeners = function () {
442
                        var e = document.documentElement;
443
                        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("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()
444
                    }, e.prototype._onKeyDown = function (e) {
445
                        var t = e.keyCode, i = this._store.activeItems, n = this.input.isFocussed,
446
                            r = this.dropdown.isActive, s = this.itemList.hasChildren(), o = String.fromCharCode(t),
447
                            a = /[^\x00-\x1F]/.test(o), c = d.KEY_CODES.BACK_KEY, l = d.KEY_CODES.DELETE_KEY,
448
                            h = d.KEY_CODES.ENTER_KEY, u = d.KEY_CODES.A_KEY, p = d.KEY_CODES.ESC_KEY,
449
                            f = d.KEY_CODES.UP_KEY, m = d.KEY_CODES.DOWN_KEY, v = d.KEY_CODES.PAGE_UP_KEY,
450
                            g = d.KEY_CODES.PAGE_DOWN_KEY;
451
                        switch (this._isTextElement || r || !a || (this.showDropdown(), this.input.isFocussed || (this.input.value += e.key.toLowerCase())), t) {
452
                            case u:
453
                                return this._onSelectKey(e, s);
454
                            case h:
455
                                return this._onEnterKey(e, i, r);
456
                            case p:
457
                                return this._onEscapeKey(r);
458
                            case f:
459
                            case v:
460
                            case m:
461
                            case g:
462
                                return this._onDirectionKey(e, r);
463
                            case l:
464
                            case c:
465
                                return this._onDeleteKey(e, i, n)
466
                        }
467
                    }, e.prototype._onKeyUp = function (e) {
468
                        var t = e.target, i = e.keyCode, n = this.input.value, r = this._store.activeItems,
469
                            s = this._canAddItem(r, n), o = d.KEY_CODES.BACK_KEY, c = d.KEY_CODES.DELETE_KEY;
470
                        if (this._isTextElement) if (s.notice && n) {
471
                            var l = this._getTemplate("notice", s.notice);
472
                            this.dropdown.element.innerHTML = l.outerHTML, this.showDropdown(!0)
473
                        } else this.hideDropdown(!0); else {
474
                            var h = (i === o || i === c) && t && !t.value, u = !this._isTextElement && this._isSearching,
475
                                p = this._canSearch && s.response;
476
                            h && u ? (this._isSearching = !1, this._store.dispatch((0, a.activateChoices)(!0))) : p && this._handleSearch(this.input.rawValue)
477
                        }
478
                        this._canSearch = this.config.searchEnabled
479
                    }, e.prototype._onSelectKey = function (e, t) {
480
                        var i = e.ctrlKey, n = e.metaKey;
481
                        (i || n) && t && (this._canSearch = !1, this.config.removeItems && !this.input.value && this.input.element === document.activeElement && this.highlightAll())
482
                    }, e.prototype._onEnterKey = function (e, t, i) {
483
                        var n = e.target, r = d.KEY_CODES.ENTER_KEY, s = n && n.hasAttribute("data-button");
484
                        if (this._isTextElement && n && n.value) {
485
                            var o = this.input.value;
486
                            this._canAddItem(t, o).response && (this.hideDropdown(!0), this._addItem({value: o}), this._triggerChange(o), this.clearInput())
487
                        }
488
                        if (s && (this._handleButtonAction(t, n), e.preventDefault()), i) {
489
                            var a = this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));
490
                            a && (t[0] && (t[0].keyCode = r), this._handleChoiceAction(t, a)), e.preventDefault()
491
                        } else this._isSelectOneElement && (this.showDropdown(), e.preventDefault())
492
                    }, e.prototype._onEscapeKey = function (e) {
493
                        e && (this.hideDropdown(!0), this.containerOuter.focus())
494
                    }, e.prototype._onDirectionKey = function (e, t) {
495
                        var i = e.keyCode, n = e.metaKey, r = d.KEY_CODES.DOWN_KEY, s = d.KEY_CODES.PAGE_UP_KEY,
496
                            o = d.KEY_CODES.PAGE_DOWN_KEY;
497
                        if (t || this._isSelectOneElement) {
498
                            this.showDropdown(), this._canSearch = !1;
499
                            var a = i === r || i === o ? 1 : -1, c = "[data-choice-selectable]", l = void 0;
500
                            if (n || i === o || i === s) l = a > 0 ? this.dropdown.element.querySelector("".concat(c, ":last-of-type")) : this.dropdown.element.querySelector(c); else {
501
                                var h = this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));
502
                                l = h ? (0, f.getAdjacentEl)(h, c, a) : this.dropdown.element.querySelector(c)
503
                            }
504
                            l && ((0, f.isScrolledIntoView)(l, this.choiceList.element, a) || this.choiceList.scrollToChildElement(l, a), this._highlightChoice(l)), e.preventDefault()
505
                        }
506
                    }, e.prototype._onDeleteKey = function (e, t, i) {
507
                        var n = e.target;
508
                        this._isSelectOneElement || n.value || !i || (this._handleBackspace(t), e.preventDefault())
509
                    }, e.prototype._onTouchMove = function () {
510
                        this._wasTap && (this._wasTap = !1)
511
                    }, e.prototype._onTouchEnd = function (e) {
512
                        var t = (e || e.touches[0]).target;
513
                        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
514
                    }, e.prototype._onMouseDown = function (e) {
515
                        var t = e.target;
516
                        if (t instanceof HTMLElement) {
517
                            if (_ && this.choiceList.element.contains(t)) {
518
                                var i = this.choiceList.element.firstElementChild,
519
                                    n = "ltr" === this._direction ? e.offsetX >= i.offsetWidth : e.offsetX < i.offsetLeft;
520
                                this._isScrollingOnIe = n
521
                            }
522
                            if (t !== this.input.element) {
523
                                var r = t.closest("[data-button],[data-item],[data-choice]");
524
                                if (r instanceof HTMLElement) {
525
                                    var s = e.shiftKey, o = this._store.activeItems, a = r.dataset;
526
                                    "button" in a ? this._handleButtonAction(o, r) : "item" in a ? this._handleItemAction(o, r, s) : "choice" in a && this._handleChoiceAction(o, r)
527
                                }
528
                                e.preventDefault()
529
                            }
530
                        }
531
                    }, e.prototype._onMouseOver = function (e) {
532
                        var t = e.target;
533
                        t instanceof HTMLElement && "choice" in t.dataset && this._highlightChoice(t)
534
                    }, e.prototype._onClick = function (e) {
535
                        var t = e.target;
536
                        this.containerOuter.element.contains(t) ? this.dropdown.isActive || this.containerOuter.isDisabled ? this._isSelectOneElement && t !== this.input.element && !this.dropdown.element.contains(t) && this.hideDropdown() : this._isTextElement ? document.activeElement !== this.input.element && this.input.focus() : (this.showDropdown(), this.containerOuter.focus()) : (this._store.highlightedActiveItems.length > 0 && this.unhighlightAll(), this.containerOuter.removeFocusState(), this.hideDropdown(!0))
537
                    }, e.prototype._onFocus = function (e) {
538
                        var t, i = this, n = e.target;
539
                        n && this.containerOuter.element.contains(n) && ((t = {})[d.TEXT_TYPE] = function () {
540
                            n === i.input.element && i.containerOuter.addFocusState()
541
                        }, t[d.SELECT_ONE_TYPE] = function () {
542
                            i.containerOuter.addFocusState(), n === i.input.element && i.showDropdown(!0)
543
                        }, t[d.SELECT_MULTIPLE_TYPE] = function () {
544
                            n === i.input.element && (i.showDropdown(!0), i.containerOuter.addFocusState())
545
                        }, t)[this.passedElement.element.type]()
546
                    }, e.prototype._onBlur = function (e) {
547
                        var t, i = this, n = e.target;
548
                        if (n && this.containerOuter.element.contains(n) && !this._isScrollingOnIe) {
549
                            var r = this._store.activeItems.some((function (e) {
550
                                return e.highlighted
551
                            }));
552
                            ((t = {})[d.TEXT_TYPE] = function () {
553
                                n === i.input.element && (i.containerOuter.removeFocusState(), r && i.unhighlightAll(), i.hideDropdown(!0))
554
                            }, t[d.SELECT_ONE_TYPE] = function () {
555
                                i.containerOuter.removeFocusState(), (n === i.input.element || n === i.containerOuter.element && !i._canSearch) && i.hideDropdown(!0)
556
                            }, t[d.SELECT_MULTIPLE_TYPE] = function () {
557
                                n === i.input.element && (i.containerOuter.removeFocusState(), i.hideDropdown(!0), r && i.unhighlightAll())
558
                            }, t)[this.passedElement.element.type]()
559
                        } else this._isScrollingOnIe = !1, this.input.element.focus()
560
                    }, e.prototype._onFormReset = function () {
561
                        this._store.dispatch((0, h.resetTo)(this._initialState))
562
                    }, e.prototype._highlightChoice = function (e) {
563
                        var t = this;
564
                        void 0 === e && (e = null);
565
                        var i = Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));
566
                        if (i.length) {
567
                            var n = e;
568
                            Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState))).forEach((function (e) {
569
                                e.classList.remove(t.config.classNames.highlightedState), e.setAttribute("aria-selected", "false")
570
                            })), n ? this._highlightPosition = i.indexOf(n) : (n = i.length > this._highlightPosition ? i[this._highlightPosition] : i[i.length - 1]) || (n = i[0]), n.classList.add(this.config.classNames.highlightedState), n.setAttribute("aria-selected", "true"), this.passedElement.triggerEvent(d.EVENTS.highlightChoice, {el: n}), this.dropdown.isActive && (this.input.setActiveDescendant(n.id), this.containerOuter.setActiveDescendant(n.id))
571
                        }
572
                    }, e.prototype._addItem = function (e) {
573
                        var t = e.value, i = e.label, n = void 0 === i ? null : i, r = e.choiceId,
574
                            s = void 0 === r ? -1 : r, o = e.groupId, a = void 0 === o ? -1 : o, c = e.customProperties,
575
                            h = void 0 === c ? {} : c, u = e.placeholder, p = void 0 !== u && u, f = e.keyCode,
576
                            m = void 0 === f ? -1 : f, v = "string" == typeof t ? t.trim() : t, g = this._store.items,
577
                            _ = n || v, y = s || -1, E = a >= 0 ? this._store.getGroupById(a) : null,
578
                            b = g ? g.length + 1 : 1;
579
                        this.config.prependValue && (v = this.config.prependValue + v.toString()), this.config.appendValue && (v += this.config.appendValue.toString()), this._store.dispatch((0, l.addItem)({
580
                            value: v,
581
                            label: _,
582
                            id: b,
583
                            choiceId: y,
584
                            groupId: a,
585
                            customProperties: h,
586
                            placeholder: p,
587
                            keyCode: m
588
                        })), this._isSelectOneElement && this.removeActiveItems(b), this.passedElement.triggerEvent(d.EVENTS.addItem, {
589
                            id: b,
590
                            value: v,
591
                            label: _,
592
                            customProperties: h,
593
                            groupValue: E && E.value ? E.value : null,
594
                            keyCode: m
595
                        })
596
                    }, e.prototype._removeItem = function (e) {
597
                        var t = e.id, i = e.value, n = e.label, r = e.customProperties, s = e.choiceId, o = e.groupId,
598
                            a = o && o >= 0 ? this._store.getGroupById(o) : null;
599
                        t && s && (this._store.dispatch((0, l.removeItem)(t, s)), this.passedElement.triggerEvent(d.EVENTS.removeItem, {
600
                            id: t,
601
                            value: i,
602
                            label: n,
603
                            customProperties: r,
604
                            groupValue: a && a.value ? a.value : null
605
                        }))
606
                    }, e.prototype._addChoice = function (e) {
607
                        var t = e.value, i = e.label, n = void 0 === i ? null : i, r = e.isSelected, s = void 0 !== r && r,
608
                            o = e.isDisabled, c = void 0 !== o && o, l = e.groupId, h = void 0 === l ? -1 : l,
609
                            u = e.customProperties, d = void 0 === u ? {} : u, p = e.placeholder, f = void 0 !== p && p,
610
                            m = e.keyCode, v = void 0 === m ? -1 : m;
611
                        if (null != t) {
612
                            var g = this._store.choices, _ = n || t, y = g ? g.length + 1 : 1,
613
                                E = "".concat(this._baseId, "-").concat(this._idNames.itemChoice, "-").concat(y);
614
                            this._store.dispatch((0, a.addChoice)({
615
                                id: y,
616
                                groupId: h,
617
                                elementId: E,
618
                                value: t,
619
                                label: _,
620
                                disabled: c,
621
                                customProperties: d,
622
                                placeholder: f,
623
                                keyCode: v
624
                            })), s && this._addItem({
625
                                value: t,
626
                                label: _,
627
                                choiceId: y,
628
                                customProperties: d,
629
                                placeholder: f,
630
                                keyCode: v
631
                            })
632
                        }
633
                    }, e.prototype._addGroup = function (e) {
634
                        var t = this, i = e.group, n = e.id, r = e.valueKey, s = void 0 === r ? "value" : r, o = e.labelKey,
635
                            a = void 0 === o ? "label" : o,
636
                            l = (0, f.isType)("Object", i) ? i.choices : Array.from(i.getElementsByTagName("OPTION")),
637
                            h = n || Math.floor((new Date).valueOf() * Math.random()), u = !!i.disabled && i.disabled;
638
                        l ? (this._store.dispatch((0, c.addGroup)({
639
                            value: i.label,
640
                            id: h,
641
                            active: !0,
642
                            disabled: u
643
                        })), l.forEach((function (e) {
644
                            var i = e.disabled || e.parentNode && e.parentNode.disabled;
645
                            t._addChoice({
646
                                value: e[s],
647
                                label: (0, f.isType)("Object", e) ? e[a] : e.innerHTML,
648
                                isSelected: e.selected,
649
                                isDisabled: i,
650
                                groupId: h,
651
                                customProperties: e.customProperties,
652
                                placeholder: e.placeholder
653
                            })
654
                        }))) : this._store.dispatch((0, c.addGroup)({
655
                            value: i.label,
656
                            id: i.id,
657
                            active: !1,
658
                            disabled: i.disabled
659
                        }))
660
                    }, e.prototype._getTemplate = function (e) {
661
                        for (var t, i = [], r = 1; r < arguments.length; r++) i[r - 1] = arguments[r];
662
                        return (t = this._templates[e]).call.apply(t, n([this, this.config], i, !1))
663
                    }, e.prototype._createTemplates = function () {
664
                        var e = this.config.callbackOnCreateTemplates, t = {};
665
                        e && "function" == typeof e && (t = e.call(this, f.strToEl)), this._templates = (0, s.default)(g.default, t)
666
                    }, e.prototype._createElements = function () {
667
                        this.containerOuter = new u.Container({
668
                            element: this._getTemplate("containerOuter", this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type, this.config.labelId),
669
                            classNames: this.config.classNames,
670
                            type: this.passedElement.element.type,
671
                            position: this.config.position
672
                        }), this.containerInner = new u.Container({
673
                            element: this._getTemplate("containerInner"),
674
                            classNames: this.config.classNames,
675
                            type: this.passedElement.element.type,
676
                            position: this.config.position
677
                        }), this.input = new u.Input({
678
                            element: this._getTemplate("input", this._placeholderValue),
679
                            classNames: this.config.classNames,
680
                            type: this.passedElement.element.type,
681
                            preventPaste: !this.config.paste
682
                        }), this.choiceList = new u.List({element: this._getTemplate("choiceList", this._isSelectOneElement)}), this.itemList = new u.List({element: this._getTemplate("itemList", this._isSelectOneElement)}), this.dropdown = new u.Dropdown({
683
                            element: this._getTemplate("dropdown"),
684
                            classNames: this.config.classNames,
685
                            type: this.passedElement.element.type
686
                        })
687
                    }, e.prototype._createStructure = function () {
688
                        this.passedElement.conceal(), this.containerInner.wrap(this.passedElement.element), this.containerOuter.wrap(this.containerInner.element), this._isSelectOneElement ? this.input.placeholder = this.config.searchPlaceholderValue || "" : this._placeholderValue && (this.input.placeholder = this._placeholderValue, this.input.setWidth()), this.containerOuter.element.appendChild(this.containerInner.element), this.containerOuter.element.appendChild(this.dropdown.element), this.containerInner.element.appendChild(this.itemList.element), this._isTextElement || this.dropdown.element.appendChild(this.choiceList.element), this._isSelectOneElement ? this.config.searchEnabled && this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild) : this.containerInner.element.appendChild(this.input.element), this._isSelectElement && (this._highlightPosition = 0, this._isSearching = !1, this._startLoading(), this._presetGroups.length ? this._addPredefinedGroups(this._presetGroups) : this._addPredefinedChoices(this._presetChoices), this._stopLoading()), this._isTextElement && this._addPredefinedItems(this._presetItems)
689
                    }, e.prototype._addPredefinedGroups = function (e) {
690
                        var t = this, i = this.passedElement.placeholderOption;
691
                        i && i.parentNode && "SELECT" === i.parentNode.tagName && this._addChoice({
692
                            value: i.value,
693
                            label: i.innerHTML,
694
                            isSelected: i.selected,
695
                            isDisabled: i.disabled,
696
                            placeholder: !0
697
                        }), e.forEach((function (e) {
698
                            return t._addGroup({group: e, id: e.id || null})
699
                        }))
700
                    }, e.prototype._addPredefinedChoices = function (e) {
701
                        var t = this;
702
                        this.config.shouldSort && e.sort(this.config.sorter);
703
                        var i = e.some((function (e) {
704
                            return e.selected
705
                        })), n = e.findIndex((function (e) {
706
                            return void 0 === e.disabled || !e.disabled
707
                        }));
708
                        e.forEach((function (e, r) {
709
                            var s = e.value, o = void 0 === s ? "" : s, a = e.label, c = e.customProperties,
710
                                l = e.placeholder;
711
                            if (t._isSelectElement) if (e.choices) t._addGroup({group: e, id: e.id || null}); else {
712
                                var h = !(!t._isSelectOneElement || i || r !== n) || e.selected, u = e.disabled;
713
                                t._addChoice({
714
                                    value: o,
715
                                    label: a,
716
                                    isSelected: !!h,
717
                                    isDisabled: !!u,
718
                                    placeholder: !!l,
719
                                    customProperties: c
720
                                })
721
                            } else t._addChoice({
722
                                value: o,
723
                                label: a,
724
                                isSelected: !!e.selected,
725
                                isDisabled: !!e.disabled,
726
                                placeholder: !!e.placeholder,
727
                                customProperties: c
728
                            })
729
                        }))
730
                    }, e.prototype._addPredefinedItems = function (e) {
731
                        var t = this;
732
                        e.forEach((function (e) {
733
                            "object" == typeof e && e.value && t._addItem({
734
                                value: e.value,
735
                                label: e.label,
736
                                choiceId: e.id,
737
                                customProperties: e.customProperties,
738
                                placeholder: e.placeholder
739
                            }), "string" == typeof e && t._addItem({value: e})
740
                        }))
741
                    }, e.prototype._setChoiceOrItem = function (e) {
742
                        var t = this;
743
                        ({
744
                            object: function () {
745
                                e.value && (t._isTextElement ? t._addItem({
746
                                    value: e.value,
747
                                    label: e.label,
748
                                    choiceId: e.id,
749
                                    customProperties: e.customProperties,
750
                                    placeholder: e.placeholder
751
                                }) : t._addChoice({
752
                                    value: e.value,
753
                                    label: e.label,
754
                                    isSelected: !0,
755
                                    isDisabled: !1,
756
                                    customProperties: e.customProperties,
757
                                    placeholder: e.placeholder
758
                                }))
759
                            }, string: function () {
760
                                t._isTextElement ? t._addItem({value: e}) : t._addChoice({
761
                                    value: e,
762
                                    label: e,
763
                                    isSelected: !0,
764
                                    isDisabled: !1
765
                                })
766
                            }
767
                        })[(0, f.getType)(e).toLowerCase()]()
768
                    }, e.prototype._findAndSelectChoiceByValue = function (e) {
769
                        var t = this, i = this._store.choices.find((function (i) {
770
                            return t.config.valueComparer(i.value, e)
771
                        }));
772
                        i && !i.selected && this._addItem({
773
                            value: i.value,
774
                            label: i.label,
775
                            choiceId: i.id,
776
                            groupId: i.groupId,
777
                            customProperties: i.customProperties,
778
                            placeholder: i.placeholder,
779
                            keyCode: i.keyCode
780
                        })
781
                    }, e.prototype._generatePlaceholderValue = function () {
782
                        if (this._isSelectElement && this.passedElement.placeholderOption) {
783
                            var e = this.passedElement.placeholderOption;
784
                            return e ? e.text : null
785
                        }
786
                        var t = this.config, i = t.placeholder, n = t.placeholderValue,
787
                            r = this.passedElement.element.dataset;
788
                        if (i) {
789
                            if (n) return n;
790
                            if (r.placeholder) return r.placeholder
791
                        }
792
                        return null
793
                    }, e
794
                }();
795
            t.default = E
796
        }, 613: function (e, t, i) {
797
            Object.defineProperty(t, "__esModule", {value: !0});
798
            var n = i(799), r = i(883), s = function () {
799
                function e(e) {
800
                    var t = e.element, i = e.type, n = e.classNames, r = e.position;
801
                    this.element = t, this.classNames = n, this.type = i, this.position = r, this.isOpen = !1, this.isFlipped = !1, this.isFocussed = !1, this.isDisabled = !1, this.isLoading = !1, this._onFocus = this._onFocus.bind(this), this._onBlur = this._onBlur.bind(this)
802
                }
803

804
                return e.prototype.addEventListeners = function () {
805
                    this.element.addEventListener("focus", this._onFocus), this.element.addEventListener("blur", this._onBlur)
806
                }, e.prototype.removeEventListeners = function () {
807
                    this.element.removeEventListener("focus", this._onFocus), this.element.removeEventListener("blur", this._onBlur)
808
                }, e.prototype.shouldFlip = function (e) {
809
                    if ("number" != typeof e) return !1;
810
                    var t = !1;
811
                    return "auto" === this.position ? t = !window.matchMedia("(min-height: ".concat(e + 1, "px)")).matches : "top" === this.position && (t = !0), t
812
                }, e.prototype.setActiveDescendant = function (e) {
813
                    this.element.setAttribute("aria-activedescendant", e)
814
                }, e.prototype.removeActiveDescendant = function () {
815
                    this.element.removeAttribute("aria-activedescendant")
816
                }, e.prototype.open = function (e) {
817
                    this.element.classList.add(this.classNames.openState), this.element.setAttribute("aria-expanded", "true"), this.isOpen = !0, this.shouldFlip(e) && (this.element.classList.add(this.classNames.flippedState), this.isFlipped = !0)
818
                }, e.prototype.close = function () {
819
                    this.element.classList.remove(this.classNames.openState), this.element.setAttribute("aria-expanded", "false"), this.removeActiveDescendant(), this.isOpen = !1, this.isFlipped && (this.element.classList.remove(this.classNames.flippedState), this.isFlipped = !1)
820
                }, e.prototype.focus = function () {
821
                    this.isFocussed || this.element.focus()
822
                }, e.prototype.addFocusState = function () {
823
                    this.element.classList.add(this.classNames.focusState)
824
                }, e.prototype.removeFocusState = function () {
825
                    this.element.classList.remove(this.classNames.focusState)
826
                }, e.prototype.enable = function () {
827
                    this.element.classList.remove(this.classNames.disabledState), this.element.removeAttribute("aria-disabled"), this.type === r.SELECT_ONE_TYPE && this.element.setAttribute("tabindex", "0"), this.isDisabled = !1
828
                }, e.prototype.disable = function () {
829
                    this.element.classList.add(this.classNames.disabledState), this.element.setAttribute("aria-disabled", "true"), this.type === r.SELECT_ONE_TYPE && this.element.setAttribute("tabindex", "-1"), this.isDisabled = !0
830
                }, e.prototype.wrap = function (e) {
831
                    (0, n.wrap)(e, this.element)
832
                }, e.prototype.unwrap = function (e) {
833
                    this.element.parentNode && (this.element.parentNode.insertBefore(e, this.element), this.element.parentNode.removeChild(this.element))
834
                }, e.prototype.addLoadingState = function () {
835
                    this.element.classList.add(this.classNames.loadingState), this.element.setAttribute("aria-busy", "true"), this.isLoading = !0
836
                }, e.prototype.removeLoadingState = function () {
837
                    this.element.classList.remove(this.classNames.loadingState), this.element.removeAttribute("aria-busy"), this.isLoading = !1
838
                }, e.prototype._onFocus = function () {
839
                    this.isFocussed = !0
840
                }, e.prototype._onBlur = function () {
841
                    this.isFocussed = !1
842
                }, e
843
            }();
844
            t.default = s
845
        }, 217: function (e, t) {
846
            Object.defineProperty(t, "__esModule", {value: !0});
847
            var i = function () {
848
                function e(e) {
849
                    var t = e.element, i = e.type, n = e.classNames;
850
                    this.element = t, this.classNames = n, this.type = i, this.isActive = !1
851
                }
852

853
                return Object.defineProperty(e.prototype, "distanceFromTopWindow", {
854
                    get: function () {
855
                        return this.element.getBoundingClientRect().bottom
856
                    }, enumerable: !1, configurable: !0
857
                }), e.prototype.getChild = function (e) {
858
                    return this.element.querySelector(e)
859
                }, e.prototype.show = function () {
860
                    return this.element.classList.add(this.classNames.activeState), this.element.setAttribute("aria-expanded", "true"), this.isActive = !0, this
861
                }, e.prototype.hide = function () {
862
                    return this.element.classList.remove(this.classNames.activeState), this.element.setAttribute("aria-expanded", "false"), this.isActive = !1, this
863
                }, e
864
            }();
865
            t.default = i
866
        }, 520: function (e, t, i) {
867
            var n = this && this.__importDefault || function (e) {
868
                return e && e.__esModule ? e : {default: e}
869
            };
870
            Object.defineProperty(t, "__esModule", {value: !0}), t.WrappedSelect = t.WrappedInput = t.List = t.Input = t.Container = t.Dropdown = void 0;
871
            var r = n(i(217));
872
            t.Dropdown = r.default;
873
            var s = n(i(613));
874
            t.Container = s.default;
875
            var o = n(i(11));
876
            t.Input = o.default;
877
            var a = n(i(624));
878
            t.List = a.default;
879
            var c = n(i(541));
880
            t.WrappedInput = c.default;
881
            var l = n(i(982));
882
            t.WrappedSelect = l.default
883
        }, 11: function (e, t, i) {
884
            Object.defineProperty(t, "__esModule", {value: !0});
885
            var n = i(799), r = i(883), s = function () {
886
                function e(e) {
887
                    var t = e.element, i = e.type, n = e.classNames, r = e.preventPaste;
888
                    this.element = t, this.type = i, this.classNames = n, this.preventPaste = r, 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)
889
                }
890

891
                return Object.defineProperty(e.prototype, "placeholder", {
892
                    set: function (e) {
893
                        this.element.placeholder = e
894
                    }, enumerable: !1, configurable: !0
895
                }), Object.defineProperty(e.prototype, "value", {
896
                    get: function () {
897
                        return (0, n.sanitise)(this.element.value)
898
                    }, set: function (e) {
899
                        this.element.value = e
900
                    }, enumerable: !1, configurable: !0
901
                }), Object.defineProperty(e.prototype, "rawValue", {
902
                    get: function () {
903
                        return this.element.value
904
                    }, enumerable: !1, configurable: !0
905
                }), e.prototype.addEventListeners = function () {
906
                    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})
907
                }, e.prototype.removeEventListeners = function () {
908
                    this.element.removeEventListener("input", this._onInput), this.element.removeEventListener("paste", this._onPaste), this.element.removeEventListener("focus", this._onFocus), this.element.removeEventListener("blur", this._onBlur)
909
                }, e.prototype.enable = function () {
910
                    this.element.removeAttribute("disabled"), this.isDisabled = !1
911
                }, e.prototype.disable = function () {
912
                    this.element.setAttribute("disabled", ""), this.isDisabled = !0
913
                }, e.prototype.focus = function () {
914
                    this.isFocussed || this.element.focus()
915
                }, e.prototype.blur = function () {
916
                    this.isFocussed && this.element.blur()
917
                }, e.prototype.clear = function (e) {
918
                    return void 0 === e && (e = !0), this.element.value && (this.element.value = ""), e && this.setWidth(), this
919
                }, e.prototype.setWidth = function () {
920
                    var e = this.element, t = e.style, i = e.value, n = e.placeholder;
921
                    t.minWidth = "".concat(n.length + 1, "ch"), t.width = "".concat(i.length + 1, "ch")
922
                }, e.prototype.setActiveDescendant = function (e) {
923
                    this.element.setAttribute("aria-activedescendant", e)
924
                }, e.prototype.removeActiveDescendant = function () {
925
                    this.element.removeAttribute("aria-activedescendant")
926
                }, e.prototype._onInput = function () {
927
                    this.type !== r.SELECT_ONE_TYPE && this.setWidth()
928
                }, e.prototype._onPaste = function (e) {
929
                    this.preventPaste && e.preventDefault()
930
                }, e.prototype._onFocus = function () {
931
                    this.isFocussed = !0
932
                }, e.prototype._onBlur = function () {
933
                    this.isFocussed = !1
934
                }, e
935
            }();
936
            t.default = s
937
        }, 624: function (e, t, i) {
938
            Object.defineProperty(t, "__esModule", {value: !0});
939
            var n = i(883), r = function () {
940
                function e(e) {
941
                    var t = e.element;
942
                    this.element = t, this.scrollPos = this.element.scrollTop, this.height = this.element.offsetHeight
943
                }
944

945
                return e.prototype.clear = function () {
946
                    this.element.innerHTML = ""
947
                }, e.prototype.append = function (e) {
948
                    this.element.appendChild(e)
949
                }, e.prototype.getChild = function (e) {
950
                    return this.element.querySelector(e)
951
                }, e.prototype.hasChildren = function () {
952
                    return this.element.hasChildNodes()
953
                }, e.prototype.scrollToTop = function () {
954
                    this.element.scrollTop = 0
955
                }, e.prototype.scrollToChildElement = function (e, t) {
956
                    var i = this;
957
                    if (e) {
958
                        var n = this.element.offsetHeight, r = this.element.scrollTop + n, s = e.offsetHeight,
959
                            o = e.offsetTop + s, a = t > 0 ? this.element.scrollTop + o - r : e.offsetTop;
960
                        requestAnimationFrame((function () {
961
                            i._animateScroll(a, t)
962
                        }))
963
                    }
964
                }, e.prototype._scrollDown = function (e, t, i) {
965
                    var n = (i - e) / t, r = n > 1 ? n : 1;
966
                    this.element.scrollTop = e + r
967
                }, e.prototype._scrollUp = function (e, t, i) {
968
                    var n = (e - i) / t, r = n > 1 ? n : 1;
969
                    this.element.scrollTop = e - r
970
                }, e.prototype._animateScroll = function (e, t) {
971
                    var i = this, r = n.SCROLLING_SPEED, s = this.element.scrollTop, o = !1;
972
                    t > 0 ? (this._scrollDown(s, r, e), s < e && (o = !0)) : (this._scrollUp(s, r, e), s > e && (o = !0)), o && requestAnimationFrame((function () {
973
                        i._animateScroll(e, t)
974
                    }))
975
                }, e
976
            }();
977
            t.default = r
978
        }, 730: function (e, t, i) {
979
            Object.defineProperty(t, "__esModule", {value: !0});
980
            var n = i(799), r = function () {
981
                function e(e) {
982
                    var t = e.element, i = e.classNames;
983
                    if (this.element = t, this.classNames = i, !(t instanceof HTMLInputElement || t instanceof HTMLSelectElement)) throw new TypeError("Invalid element passed");
984
                    this.isDisabled = !1
985
                }
986

987
                return Object.defineProperty(e.prototype, "isActive", {
988
                    get: function () {
989
                        return "active" === this.element.dataset.choice
990
                    }, enumerable: !1, configurable: !0
991
                }), Object.defineProperty(e.prototype, "dir", {
992
                    get: function () {
993
                        return this.element.dir
994
                    }, enumerable: !1, configurable: !0
995
                }), Object.defineProperty(e.prototype, "value", {
996
                    get: function () {
997
                        return this.element.value
998
                    }, set: function (e) {
999
                        this.element.value = e
1000
                    }, enumerable: !1, configurable: !0
1001
                }), e.prototype.conceal = function () {
1002
                    this.element.classList.add(this.classNames.input), this.element.hidden = !0, this.element.tabIndex = -1;
1003
                    var e = this.element.getAttribute("style");
1004
                    e && this.element.setAttribute("data-choice-orig-style", e), this.element.setAttribute("data-choice", "active")
1005
                }, e.prototype.reveal = function () {
1006
                    this.element.classList.remove(this.classNames.input), this.element.hidden = !1, this.element.removeAttribute("tabindex");
1007
                    var e = this.element.getAttribute("data-choice-orig-style");
1008
                    e ? (this.element.removeAttribute("data-choice-orig-style"), this.element.setAttribute("style", e)) : this.element.removeAttribute("style"), this.element.removeAttribute("data-choice"), this.element.value = this.element.value
1009
                }, e.prototype.enable = function () {
1010
                    this.element.removeAttribute("disabled"), this.element.disabled = !1, this.isDisabled = !1
1011
                }, e.prototype.disable = function () {
1012
                    this.element.setAttribute("disabled", ""), this.element.disabled = !0, this.isDisabled = !0
1013
                }, e.prototype.triggerEvent = function (e, t) {
1014
                    (0, n.dispatchEvent)(this.element, e, t)
1015
                }, e
1016
            }();
1017
            t.default = r
1018
        }, 541: function (e, t, i) {
1019
            var n, r = this && this.__extends || (n = function (e, t) {
1020
                return n = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (e, t) {
1021
                    e.__proto__ = t
1022
                } || function (e, t) {
1023
                    for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i])
1024
                }, n(e, t)
1025
            }, function (e, t) {
1026
                if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1027

1028
                function i() {
1029
                    this.constructor = e
1030
                }
1031

1032
                n(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
1033
            }), s = this && this.__importDefault || function (e) {
1034
                return e && e.__esModule ? e : {default: e}
1035
            };
1036
            Object.defineProperty(t, "__esModule", {value: !0});
1037
            var o = function (e) {
1038
                function t(t) {
1039
                    var i = t.element, n = t.classNames, r = t.delimiter,
1040
                        s = e.call(this, {element: i, classNames: n}) || this;
1041
                    return s.delimiter = r, s
1042
                }
1043

1044
                return r(t, e), Object.defineProperty(t.prototype, "value", {
1045
                    get: function () {
1046
                        return this.element.value
1047
                    }, set: function (e) {
1048
                        this.element.setAttribute("value", e), this.element.value = e
1049
                    }, enumerable: !1, configurable: !0
1050
                }), t
1051
            }(s(i(730)).default);
1052
            t.default = o
1053
        }, 982: function (e, t, i) {
1054
            var n, r = this && this.__extends || (n = function (e, t) {
1055
                return n = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (e, t) {
1056
                    e.__proto__ = t
1057
                } || function (e, t) {
1058
                    for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i])
1059
                }, n(e, t)
1060
            }, function (e, t) {
1061
                if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1062

1063
                function i() {
1064
                    this.constructor = e
1065
                }
1066

1067
                n(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
1068
            }), s = this && this.__importDefault || function (e) {
1069
                return e && e.__esModule ? e : {default: e}
1070
            };
1071
            Object.defineProperty(t, "__esModule", {value: !0});
1072
            var o = function (e) {
1073
                function t(t) {
1074
                    var i = t.element, n = t.classNames, r = t.template,
1075
                        s = e.call(this, {element: i, classNames: n}) || this;
1076
                    return s.template = r, s
1077
                }
1078

1079
                return r(t, e), Object.defineProperty(t.prototype, "placeholderOption", {
1080
                    get: function () {
1081
                        return this.element.querySelector('option[value=""]') || this.element.querySelector("option[placeholder]")
1082
                    }, enumerable: !1, configurable: !0
1083
                }), Object.defineProperty(t.prototype, "optionGroups", {
1084
                    get: function () {
1085
                        return Array.from(this.element.getElementsByTagName("OPTGROUP"))
1086
                    }, enumerable: !1, configurable: !0
1087
                }), Object.defineProperty(t.prototype, "options", {
1088
                    get: function () {
1089
                        return Array.from(this.element.options)
1090
                    }, set: function (e) {
1091
                        var t = this, i = document.createDocumentFragment();
1092
                        e.forEach((function (e) {
1093
                            return n = e, r = t.template(n), void i.appendChild(r);
1094
                            var n, r
1095
                        })), this.appendDocFragment(i)
1096
                    }, enumerable: !1, configurable: !0
1097
                }), t.prototype.appendDocFragment = function (e) {
1098
                    this.element.innerHTML = "", this.element.appendChild(e)
1099
                }, t
1100
            }(s(i(730)).default);
1101
            t.default = o
1102
        }, 883: function (e, t) {
1103
            Object.defineProperty(t, "__esModule", {value: !0}), t.SCROLLING_SPEED = t.SELECT_MULTIPLE_TYPE = t.SELECT_ONE_TYPE = t.TEXT_TYPE = t.KEY_CODES = t.ACTION_TYPES = t.EVENTS = void 0, t.EVENTS = {
1104
                showDropdown: "showDropdown",
1105
                hideDropdown: "hideDropdown",
1106
                change: "change",
1107
                choice: "choice",
1108
                search: "search",
1109
                addItem: "addItem",
1110
                removeItem: "removeItem",
1111
                highlightItem: "highlightItem",
1112
                highlightChoice: "highlightChoice",
1113
                unhighlightItem: "unhighlightItem"
1114
            }, t.ACTION_TYPES = {
1115
                ADD_CHOICE: "ADD_CHOICE",
1116
                FILTER_CHOICES: "FILTER_CHOICES",
1117
                ACTIVATE_CHOICES: "ACTIVATE_CHOICES",
1118
                CLEAR_CHOICES: "CLEAR_CHOICES",
1119
                ADD_GROUP: "ADD_GROUP",
1120
                ADD_ITEM: "ADD_ITEM",
1121
                REMOVE_ITEM: "REMOVE_ITEM",
1122
                HIGHLIGHT_ITEM: "HIGHLIGHT_ITEM",
1123
                CLEAR_ALL: "CLEAR_ALL",
1124
                RESET_TO: "RESET_TO",
1125
                SET_IS_LOADING: "SET_IS_LOADING"
1126
            }, t.KEY_CODES = {
1127
                BACK_KEY: 46,
1128
                DELETE_KEY: 8,
1129
                ENTER_KEY: 13,
1130
                A_KEY: 65,
1131
                ESC_KEY: 27,
1132
                UP_KEY: 38,
1133
                DOWN_KEY: 40,
1134
                PAGE_UP_KEY: 33,
1135
                PAGE_DOWN_KEY: 34
1136
            }, t.TEXT_TYPE = "text", t.SELECT_ONE_TYPE = "select-one", t.SELECT_MULTIPLE_TYPE = "select-multiple", t.SCROLLING_SPEED = 4
1137
        }, 789: function (e, t, i) {
1138
            Object.defineProperty(t, "__esModule", {value: !0}), t.DEFAULT_CONFIG = t.DEFAULT_CLASSNAMES = void 0;
1139
            var n = i(799);
1140
            t.DEFAULT_CLASSNAMES = {
1141
                containerOuter: "choices",
1142
                containerInner: "choices__inner",
1143
                input: "choices__input",
1144
                inputCloned: "choices__input--cloned",
1145
                list: "choices__list",
1146
                listItems: "choices__list--multiple",
1147
                listSingle: "choices__list--single",
1148
                listDropdown: "choices__list--dropdown",
1149
                item: "choices__item",
1150
                itemSelectable: "choices__item--selectable",
1151
                itemDisabled: "choices__item--disabled",
1152
                itemChoice: "choices__item--choice",
1153
                placeholder: "choices__placeholder",
1154
                group: "choices__group",
1155
                groupHeading: "choices__heading",
1156
                button: "choices__button",
1157
                activeState: "is-active",
1158
                focusState: "is-focused",
1159
                openState: "is-open",
1160
                disabledState: "is-disabled",
1161
                highlightedState: "is-highlighted",
1162
                selectedState: "is-selected",
1163
                flippedState: "is-flipped",
1164
                loadingState: "is-loading",
1165
                noResults: "has-no-results",
1166
                noChoices: "has-no-choices"
1167
            }, t.DEFAULT_CONFIG = {
1168
                items: [],
1169
                choices: [],
1170
                silent: !1,
1171
                renderChoiceLimit: -1,
1172
                maxItemCount: -1,
1173
                addItems: !0,
1174
                addItemFilter: null,
1175
                removeItems: !0,
1176
                removeItemButton: !1,
1177
                editItems: !1,
1178
                allowHTML: !0,
1179
                duplicateItemsAllowed: !0,
1180
                delimiter: ",",
1181
                paste: !0,
1182
                searchEnabled: !0,
1183
                searchChoices: !0,
1184
                searchFloor: 1,
1185
                searchResultLimit: 4,
1186
                searchFields: ["label", "value"],
1187
                position: "auto",
1188
                resetScrollPosition: !0,
1189
                shouldSort: !0,
1190
                shouldSortItems: !1,
1191
                sorter: n.sortByAlpha,
1192
                placeholder: !0,
1193
                placeholderValue: null,
1194
                searchPlaceholderValue: null,
1195
                prependValue: null,
1196
                appendValue: null,
1197
                renderSelectedChoices: "auto",
1198
                loadingText: "Loading...",
1199
                noResultsText: "No results found",
1200
                noChoicesText: "No choices to choose from",
1201
                itemSelectText: "Press to select",
1202
                uniqueItemText: "Only unique values can be added",
1203
                customAddItemText: "Only values matching specific conditions can be added",
1204
                addItemText: function (e) {
1205
                    return 'Press Enter to add <b>"'.concat((0, n.sanitise)(e), '"</b>')
1206
                },
1207
                maxItemText: function (e) {
1208
                    return "Only ".concat(e, " values can be added")
1209
                },
1210
                valueComparer: function (e, t) {
1211
                    return e === t
1212
                },
1213
                fuseOptions: {includeScore: !0},
1214
                labelId: "",
1215
                callbackOnInit: null,
1216
                callbackOnCreateTemplates: null,
1217
                classNames: t.DEFAULT_CLASSNAMES
1218
            }
1219
        }, 18: function (e, t) {
1220
            Object.defineProperty(t, "__esModule", {value: !0})
1221
        }, 978: function (e, t) {
1222
            Object.defineProperty(t, "__esModule", {value: !0})
1223
        }, 948: function (e, t) {
1224
            Object.defineProperty(t, "__esModule", {value: !0})
1225
        }, 359: function (e, t) {
1226
            Object.defineProperty(t, "__esModule", {value: !0})
1227
        }, 285: function (e, t) {
1228
            Object.defineProperty(t, "__esModule", {value: !0})
1229
        }, 533: function (e, t) {
1230
            Object.defineProperty(t, "__esModule", {value: !0})
1231
        }, 187: function (e, t, i) {
1232
            var n = this && this.__createBinding || (Object.create ? function (e, t, i, n) {
1233
                void 0 === n && (n = i);
1234
                var r = Object.getOwnPropertyDescriptor(t, i);
1235
                r && !("get" in r ? !t.__esModule : r.writable || r.configurable) || (r = {
1236
                    enumerable: !0,
1237
                    get: function () {
1238
                        return t[i]
1239
                    }
1240
                }), Object.defineProperty(e, n, r)
1241
            } : function (e, t, i, n) {
1242
                void 0 === n && (n = i), e[n] = t[i]
1243
            }), r = this && this.__exportStar || function (e, t) {
1244
                for (var i in e) "default" === i || Object.prototype.hasOwnProperty.call(t, i) || n(t, e, i)
1245
            };
1246
            Object.defineProperty(t, "__esModule", {value: !0}), r(i(18), t), r(i(978), t), r(i(948), t), r(i(359), t), r(i(285), t), r(i(533), t), r(i(287), t), r(i(132), t), r(i(837), t), r(i(598), t), r(i(369), t), r(i(37), t), r(i(47), t), r(i(923), t), r(i(876), t)
1247
        }, 287: function (e, t) {
1248
            Object.defineProperty(t, "__esModule", {value: !0})
1249
        }, 132: function (e, t) {
1250
            Object.defineProperty(t, "__esModule", {value: !0})
1251
        }, 837: function (e, t) {
1252
            Object.defineProperty(t, "__esModule", {value: !0})
1253
        }, 598: function (e, t) {
1254
            Object.defineProperty(t, "__esModule", {value: !0})
1255
        }, 37: function (e, t) {
1256
            Object.defineProperty(t, "__esModule", {value: !0})
1257
        }, 369: function (e, t) {
1258
            Object.defineProperty(t, "__esModule", {value: !0})
1259
        }, 47: function (e, t) {
1260
            Object.defineProperty(t, "__esModule", {value: !0})
1261
        }, 923: function (e, t) {
1262
            Object.defineProperty(t, "__esModule", {value: !0})
1263
        }, 876: function (e, t) {
1264
            Object.defineProperty(t, "__esModule", {value: !0})
1265
        }, 799: function (e, t) {
1266
            var i;
1267
            Object.defineProperty(t, "__esModule", {value: !0}), t.parseCustomProperties = t.diff = t.cloneObject = t.existsInArray = t.dispatchEvent = t.sortByScore = t.sortByAlpha = t.strToEl = t.sanitise = t.isScrolledIntoView = t.getAdjacentEl = t.wrap = t.isType = t.getType = t.generateId = t.generateChars = t.getRandomNumber = void 0, t.getRandomNumber = function (e, t) {
1268
                return Math.floor(Math.random() * (t - e) + e)
1269
            }, t.generateChars = function (e) {
1270
                return Array.from({length: e}, (function () {
1271
                    return (0, t.getRandomNumber)(0, 36).toString(36)
1272
                })).join("")
1273
            }, t.generateId = function (e, i) {
1274
                var n = e.id || e.name && "".concat(e.name, "-").concat((0, t.generateChars)(2)) || (0, t.generateChars)(4);
1275
                return n = n.replace(/(:|\.|\[|\]|,)/g, ""), "".concat(i, "-").concat(n)
1276
            }, t.getType = function (e) {
1277
                return Object.prototype.toString.call(e).slice(8, -1)
1278
            }, t.isType = function (e, i) {
1279
                return null != i && (0, t.getType)(i) === e
1280
            }, t.wrap = function (e, t) {
1281
                return void 0 === t && (t = document.createElement("div")), e.parentNode && (e.nextSibling ? e.parentNode.insertBefore(t, e.nextSibling) : e.parentNode.appendChild(t)), t.appendChild(e)
1282
            }, t.getAdjacentEl = function (e, t, i) {
1283
                void 0 === i && (i = 1);
1284
                for (var n = "".concat(i > 0 ? "next" : "previous", "ElementSibling"), r = e[n]; r;) {
1285
                    if (r.matches(t)) return r;
1286
                    r = r[n]
1287
                }
1288
                return r
1289
            }, t.isScrolledIntoView = function (e, t, i) {
1290
                return void 0 === i && (i = 1), !!e && (i > 0 ? t.scrollTop + t.offsetHeight >= e.offsetTop + e.offsetHeight : e.offsetTop >= t.scrollTop)
1291
            }, t.sanitise = function (e) {
1292
                return "string" != typeof e ? e : e.replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;")
1293
            }, t.strToEl = (i = document.createElement("div"), function (e) {
1294
                var t = e.trim();
1295
                i.innerHTML = t;
1296
                for (var n = i.children[0]; i.firstChild;) i.removeChild(i.firstChild);
1297
                return n
1298
            }), t.sortByAlpha = function (e, t) {
1299
                var i = e.value, n = e.label, r = void 0 === n ? i : n, s = t.value, o = t.label,
1300
                    a = void 0 === o ? s : o;
1301
                return r.localeCompare(a, [], {sensitivity: "base", ignorePunctuation: !0, numeric: !0})
1302
            }, t.sortByScore = function (e, t) {
1303
                var i = e.score, n = void 0 === i ? 0 : i, r = t.score;
1304
                return n - (void 0 === r ? 0 : r)
1305
            }, t.dispatchEvent = function (e, t, i) {
1306
                void 0 === i && (i = null);
1307
                var n = new CustomEvent(t, {detail: i, bubbles: !0, cancelable: !0});
1308
                return e.dispatchEvent(n)
1309
            }, t.existsInArray = function (e, t, i) {
1310
                return void 0 === i && (i = "value"), e.some((function (e) {
1311
                    return "string" == typeof t ? e[i] === t.trim() : e[i] === t
1312
                }))
1313
            }, t.cloneObject = function (e) {
1314
                return JSON.parse(JSON.stringify(e))
1315
            }, t.diff = function (e, t) {
1316
                var i = Object.keys(e).sort(), n = Object.keys(t).sort();
1317
                return i.filter((function (e) {
1318
                    return n.indexOf(e) < 0
1319
                }))
1320
            }, t.parseCustomProperties = function (e) {
1321
                if (void 0 !== e) try {
1322
                    return JSON.parse(e)
1323
                } catch (t) {
1324
                    return e
1325
                }
1326
                return {}
1327
            }
1328
        }, 273: function (e, t) {
1329
            var i = this && this.__spreadArray || function (e, t, i) {
1330
                if (i || 2 === arguments.length) for (var n, r = 0, s = t.length; r < s; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1331
                return e.concat(n || Array.prototype.slice.call(t))
1332
            };
1333
            Object.defineProperty(t, "__esModule", {value: !0}), t.defaultState = void 0, t.defaultState = [], t.default = function (e, n) {
1334
                switch (void 0 === e && (e = t.defaultState), void 0 === n && (n = {}), n.type) {
1335
                    case"ADD_CHOICE":
1336
                        var r = n, s = {
1337
                            id: r.id,
1338
                            elementId: r.elementId,
1339
                            groupId: r.groupId,
1340
                            value: r.value,
1341
                            label: r.label || r.value,
1342
                            disabled: r.disabled || !1,
1343
                            selected: !1,
1344
                            active: !0,
1345
                            score: 9999,
1346
                            customProperties: r.customProperties,
1347
                            placeholder: r.placeholder || !1
1348
                        };
1349
                        return i(i([], e, !0), [s], !1);
1350
                    case"ADD_ITEM":
1351
                        var o = n;
1352
                        return o.choiceId > -1 ? e.map((function (e) {
1353
                            var t = e;
1354
                            return t.id === parseInt("".concat(o.choiceId), 10) && (t.selected = !0), t
1355
                        })) : e;
1356
                    case"REMOVE_ITEM":
1357
                        var a = n;
1358
                        return a.choiceId && a.choiceId > -1 ? e.map((function (e) {
1359
                            var t = e;
1360
                            return t.id === parseInt("".concat(a.choiceId), 10) && (t.selected = !1), t
1361
                        })) : e;
1362
                    case"FILTER_CHOICES":
1363
                        var c = n;
1364
                        return e.map((function (e) {
1365
                            var t = e;
1366
                            return t.active = c.results.some((function (e) {
1367
                                var i = e.item, n = e.score;
1368
                                return i.id === t.id && (t.score = n, !0)
1369
                            })), t
1370
                        }));
1371
                    case"ACTIVATE_CHOICES":
1372
                        var l = n;
1373
                        return e.map((function (e) {
1374
                            var t = e;
1375
                            return t.active = l.active, t
1376
                        }));
1377
                    case"CLEAR_CHOICES":
1378
                        return t.defaultState;
1379
                    default:
1380
                        return e
1381
                }
1382
            }
1383
        }, 871: function (e, t) {
1384
            var i = this && this.__spreadArray || function (e, t, i) {
1385
                if (i || 2 === arguments.length) for (var n, r = 0, s = t.length; r < s; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1386
                return e.concat(n || Array.prototype.slice.call(t))
1387
            };
1388
            Object.defineProperty(t, "__esModule", {value: !0}), t.defaultState = void 0, t.defaultState = [], t.default = function (e, n) {
1389
                switch (void 0 === e && (e = t.defaultState), void 0 === n && (n = {}), n.type) {
1390
                    case"ADD_GROUP":
1391
                        var r = n;
1392
                        return i(i([], e, !0), [{
1393
                            id: r.id,
1394
                            value: r.value,
1395
                            active: r.active,
1396
                            disabled: r.disabled
1397
                        }], !1);
1398
                    case"CLEAR_CHOICES":
1399
                        return [];
1400
                    default:
1401
                        return e
1402
                }
1403
            }
1404
        }, 655: function (e, t, i) {
1405
            var n = this && this.__importDefault || function (e) {
1406
                return e && e.__esModule ? e : {default: e}
1407
            };
1408
            Object.defineProperty(t, "__esModule", {value: !0}), t.defaultState = void 0;
1409
            var r = i(791), s = n(i(52)), o = n(i(871)), a = n(i(273)), c = n(i(502)), l = i(799);
1410
            t.defaultState = {groups: [], items: [], choices: [], loading: !1};
1411
            var h = (0, r.combineReducers)({
1412
                items: s.default,
1413
                groups: o.default,
1414
                choices: a.default,
1415
                loading: c.default
1416
            });
1417
            t.default = function (e, i) {
1418
                var n = e;
1419
                if ("CLEAR_ALL" === i.type) n = t.defaultState; else if ("RESET_TO" === i.type) return (0, l.cloneObject)(i.state);
1420
                return h(n, i)
1421
            }
1422
        }, 52: function (e, t) {
1423
            var i = this && this.__spreadArray || function (e, t, i) {
1424
                if (i || 2 === arguments.length) for (var n, r = 0, s = t.length; r < s; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1425
                return e.concat(n || Array.prototype.slice.call(t))
1426
            };
1427
            Object.defineProperty(t, "__esModule", {value: !0}), t.defaultState = void 0, t.defaultState = [], t.default = function (e, n) {
1428
                switch (void 0 === e && (e = t.defaultState), void 0 === n && (n = {}), n.type) {
1429
                    case"ADD_ITEM":
1430
                        var r = n;
1431
                        return i(i([], e, !0), [{
1432
                            id: r.id,
1433
                            choiceId: r.choiceId,
1434
                            groupId: r.groupId,
1435
                            value: r.value,
1436
                            label: r.label,
1437
                            active: !0,
1438
                            highlighted: !1,
1439
                            customProperties: r.customProperties,
1440
                            placeholder: r.placeholder || !1,
1441
                            keyCode: null
1442
                        }], !1).map((function (e) {
1443
                            var t = e;
1444
                            return t.highlighted = !1, t
1445
                        }));
1446
                    case"REMOVE_ITEM":
1447
                        return e.map((function (e) {
1448
                            var t = e;
1449
                            return t.id === n.id && (t.active = !1), t
1450
                        }));
1451
                    case"HIGHLIGHT_ITEM":
1452
                        var s = n;
1453
                        return e.map((function (e) {
1454
                            var t = e;
1455
                            return t.id === s.id && (t.highlighted = s.highlighted), t
1456
                        }));
1457
                    default:
1458
                        return e
1459
                }
1460
            }
1461
        }, 502: function (e, t) {
1462
            Object.defineProperty(t, "__esModule", {value: !0}), t.defaultState = void 0, t.defaultState = !1, t.default = function (e, i) {
1463
                return void 0 === e && (e = t.defaultState), void 0 === i && (i = {}), "SET_IS_LOADING" === i.type ? i.isLoading : e
1464
            }
1465
        }, 744: function (e, t, i) {
1466
            var n = this && this.__spreadArray || function (e, t, i) {
1467
                if (i || 2 === arguments.length) for (var n, r = 0, s = t.length; r < s; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1468
                return e.concat(n || Array.prototype.slice.call(t))
1469
            }, r = this && this.__importDefault || function (e) {
1470
                return e && e.__esModule ? e : {default: e}
1471
            };
1472
            Object.defineProperty(t, "__esModule", {value: !0});
1473
            var s = i(791), o = r(i(655)), a = function () {
1474
                function e() {
1475
                    this._store = (0, s.createStore)(o.default, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())
1476
                }
1477

1478
                return e.prototype.subscribe = function (e) {
1479
                    this._store.subscribe(e)
1480
                }, e.prototype.dispatch = function (e) {
1481
                    this._store.dispatch(e)
1482
                }, Object.defineProperty(e.prototype, "state", {
1483
                    get: function () {
1484
                        return this._store.getState()
1485
                    }, enumerable: !1, configurable: !0
1486
                }), Object.defineProperty(e.prototype, "items", {
1487
                    get: function () {
1488
                        return this.state.items
1489
                    }, enumerable: !1, configurable: !0
1490
                }), Object.defineProperty(e.prototype, "activeItems", {
1491
                    get: function () {
1492
                        return this.items.filter((function (e) {
1493
                            return !0 === e.active
1494
                        }))
1495
                    }, enumerable: !1, configurable: !0
1496
                }), Object.defineProperty(e.prototype, "highlightedActiveItems", {
1497
                    get: function () {
1498
                        return this.items.filter((function (e) {
1499
                            return e.active && e.highlighted
1500
                        }))
1501
                    }, enumerable: !1, configurable: !0
1502
                }), Object.defineProperty(e.prototype, "choices", {
1503
                    get: function () {
1504
                        return this.state.choices
1505
                    }, enumerable: !1, configurable: !0
1506
                }), Object.defineProperty(e.prototype, "activeChoices", {
1507
                    get: function () {
1508
                        return this.choices.filter((function (e) {
1509
                            return !0 === e.active
1510
                        }))
1511
                    }, enumerable: !1, configurable: !0
1512
                }), Object.defineProperty(e.prototype, "selectableChoices", {
1513
                    get: function () {
1514
                        return this.choices.filter((function (e) {
1515
                            return !0 !== e.disabled
1516
                        }))
1517
                    }, enumerable: !1, configurable: !0
1518
                }), Object.defineProperty(e.prototype, "searchableChoices", {
1519
                    get: function () {
1520
                        return this.selectableChoices.filter((function (e) {
1521
                            return !0 !== e.placeholder
1522
                        }))
1523
                    }, enumerable: !1, configurable: !0
1524
                }), Object.defineProperty(e.prototype, "placeholderChoice", {
1525
                    get: function () {
1526
                        return n([], this.choices, !0).reverse().find((function (e) {
1527
                            return !0 === e.placeholder
1528
                        }))
1529
                    }, enumerable: !1, configurable: !0
1530
                }), Object.defineProperty(e.prototype, "groups", {
1531
                    get: function () {
1532
                        return this.state.groups
1533
                    }, enumerable: !1, configurable: !0
1534
                }), Object.defineProperty(e.prototype, "activeGroups", {
1535
                    get: function () {
1536
                        var e = this.groups, t = this.choices;
1537
                        return e.filter((function (e) {
1538
                            var i = !0 === e.active && !1 === e.disabled, n = t.some((function (e) {
1539
                                return !0 === e.active && !1 === e.disabled
1540
                            }));
1541
                            return i && n
1542
                        }), [])
1543
                    }, enumerable: !1, configurable: !0
1544
                }), e.prototype.isLoading = function () {
1545
                    return this.state.loading
1546
                }, e.prototype.getChoiceById = function (e) {
1547
                    return this.activeChoices.find((function (t) {
1548
                        return t.id === parseInt(e, 10)
1549
                    }))
1550
                }, e.prototype.getGroupById = function (e) {
1551
                    return this.groups.find((function (t) {
1552
                        return t.id === e
1553
                    }))
1554
                }, e
1555
            }();
1556
            t.default = a
1557
        }, 686: function (e, t) {
1558
            Object.defineProperty(t, "__esModule", {value: !0});
1559
            var i = {
1560
                containerOuter: function (e, t, i, n, r, s, o) {
1561
                    var a = e.classNames.containerOuter,
1562
                        c = Object.assign(document.createElement("div"), {className: a});
1563
                    return c.dataset.type = s, t && (c.dir = t), n && (c.tabIndex = 0), i && (c.setAttribute("role", r ? "combobox" : "listbox"), r && c.setAttribute("aria-autocomplete", "list")), c.setAttribute("aria-haspopup", "true"), c.setAttribute("aria-expanded", "false"), o && c.setAttribute("aria-labelledby", o), c
1564
                }, containerInner: function (e) {
1565
                    var t = e.classNames.containerInner;
1566
                    return Object.assign(document.createElement("div"), {className: t})
1567
                }, itemList: function (e, t) {
1568
                    var i = e.classNames, n = i.list, r = i.listSingle, s = i.listItems;
1569
                    return Object.assign(document.createElement("div"), {className: "".concat(n, " ").concat(t ? r : s)})
1570
                }, placeholder: function (e, t) {
1571
                    var i, n = e.allowHTML, r = e.classNames.placeholder;
1572
                    return Object.assign(document.createElement("div"), ((i = {className: r})[n ? "innerHTML" : "innerText"] = t, i))
1573
                }, item: function (e, t, i) {
1574
                    var n, r, s = e.allowHTML, o = e.classNames, a = o.item, c = o.button, l = o.highlightedState,
1575
                        h = o.itemSelectable, u = o.placeholder, d = t.id, p = t.value, f = t.label,
1576
                        m = t.customProperties, v = t.active, g = t.disabled, _ = t.highlighted, y = t.placeholder,
1577
                        E = Object.assign(document.createElement("div"), ((n = {className: a})[s ? "innerHTML" : "innerText"] = f, n));
1578
                    if (Object.assign(E.dataset, {
1579
                        item: "",
1580
                        id: d,
1581
                        value: p,
1582
                        customProperties: m
1583
                    }), v && E.setAttribute("aria-selected", "true"), g && E.setAttribute("aria-disabled", "true"), y && E.classList.add(u), E.classList.add(_ ? l : h), i) {
1584
                        g && E.classList.remove(h), E.dataset.deletable = "";
1585
                        var b = "Remove item", S = Object.assign(document.createElement("button"), ((r = {
1586
                            type: "button",
1587
                            className: c
1588
                        })[s ? "innerHTML" : "innerText"] = b, r));
1589
                        S.setAttribute("aria-label", "".concat(b, ": '").concat(p, "'")), S.dataset.button = "", E.appendChild(S)
1590
                    }
1591
                    return E
1592
                }, choiceList: function (e, t) {
1593
                    var i = e.classNames.list, n = Object.assign(document.createElement("div"), {className: i});
1594
                    return t || n.setAttribute("aria-multiselectable", "true"), n.setAttribute("role", "listbox"), n
1595
                }, choiceGroup: function (e, t) {
1596
                    var i, n = e.allowHTML, r = e.classNames, s = r.group, o = r.groupHeading, a = r.itemDisabled,
1597
                        c = t.id, l = t.value, h = t.disabled,
1598
                        u = Object.assign(document.createElement("div"), {className: "".concat(s, " ").concat(h ? a : "")});
1599
                    return u.setAttribute("role", "group"), Object.assign(u.dataset, {
1600
                        group: "",
1601
                        id: c,
1602
                        value: l
1603
                    }), h && u.setAttribute("aria-disabled", "true"), u.appendChild(Object.assign(document.createElement("div"), ((i = {className: o})[n ? "innerHTML" : "innerText"] = l, i))), u
1604
                }, choice: function (e, t, i) {
1605
                    var n, r = e.allowHTML, s = e.classNames, o = s.item, a = s.itemChoice, c = s.itemSelectable,
1606
                        l = s.selectedState, h = s.itemDisabled, u = s.placeholder, d = t.id, p = t.value, f = t.label,
1607
                        m = t.groupId, v = t.elementId, g = t.disabled, _ = t.selected, y = t.placeholder,
1608
                        E = Object.assign(document.createElement("div"), ((n = {id: v})[r ? "innerHTML" : "innerText"] = f, n.className = "".concat(o, " ").concat(a), n));
1609
                    return _ && E.classList.add(l), y && E.classList.add(u), E.setAttribute("role", m && m > 0 ? "treeitem" : "option"), Object.assign(E.dataset, {
1610
                        choice: "",
1611
                        id: d,
1612
                        value: p,
1613
                        selectText: i
1614
                    }), g ? (E.classList.add(h), E.dataset.choiceDisabled = "", E.setAttribute("aria-disabled", "true")) : (E.classList.add(c), E.dataset.choiceSelectable = ""), E
1615
                }, input: function (e, t) {
1616
                    var i = e.classNames, n = i.input, r = i.inputCloned,
1617
                        s = Object.assign(document.createElement("input"), {
1618
                            type: "search",
1619
                            name: "search_terms",
1620
                            className: "".concat(n, " ").concat(r),
1621
                            autocomplete: "off",
1622
                            autocapitalize: "off",
1623
                            spellcheck: !1
1624
                        });
1625
                    return s.setAttribute("role", "textbox"), s.setAttribute("aria-autocomplete", "list"), s.setAttribute("aria-label", t), s
1626
                }, dropdown: function (e) {
1627
                    var t = e.classNames, i = t.list, n = t.listDropdown, r = document.createElement("div");
1628
                    return r.classList.add(i, n), r.setAttribute("aria-expanded", "false"), r
1629
                }, notice: function (e, t, i) {
1630
                    var n, r = e.allowHTML, s = e.classNames, o = s.item, a = s.itemChoice, c = s.noResults,
1631
                        l = s.noChoices;
1632
                    void 0 === i && (i = "");
1633
                    var h = [o, a];
1634
                    return "no-choices" === i ? h.push(l) : "no-results" === i && h.push(c), Object.assign(document.createElement("div"), ((n = {})[r ? "innerHTML" : "innerText"] = t, n.className = h.join(" "), n))
1635
                }, option: function (e) {
1636
                    var t = e.label, i = e.value, n = e.customProperties, r = e.active, s = e.disabled,
1637
                        o = new Option(t, i, !1, r);
1638
                    return n && (o.dataset.customProperties = "".concat(n)), o.disabled = !!s, o
1639
                }
1640
            };
1641
            t.default = i
1642
        }, 996: function (e) {
1643
            var t = function (e) {
1644
                return function (e) {
1645
                    return !!e && "object" == typeof e
1646
                }(e) && !function (e) {
1647
                    var t = Object.prototype.toString.call(e);
1648
                    return "[object RegExp]" === t || "[object Date]" === t || function (e) {
1649
                        return e.$$typeof === i
1650
                    }(e)
1651
                }(e)
1652
            }, i = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103;
1653

1654
            function n(e, t) {
1655
                return !1 !== t.clone && t.isMergeableObject(e) ? a((i = e, Array.isArray(i) ? [] : {}), e, t) : e;
1656
                var i
1657
            }
1658

1659
            function r(e, t, i) {
1660
                return e.concat(t).map((function (e) {
1661
                    return n(e, i)
1662
                }))
1663
            }
1664

1665
            function s(e) {
1666
                return Object.keys(e).concat(function (e) {
1667
                    return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter((function (t) {
1668
                        return e.propertyIsEnumerable(t)
1669
                    })) : []
1670
                }(e))
1671
            }
1672

1673
            function o(e, t) {
1674
                try {
1675
                    return t in e
1676
                } catch (e) {
1677
                    return !1
1678
                }
1679
            }
1680

1681
            function a(e, i, c) {
1682
                (c = c || {}).arrayMerge = c.arrayMerge || r, c.isMergeableObject = c.isMergeableObject || t, c.cloneUnlessOtherwiseSpecified = n;
1683
                var l = Array.isArray(i);
1684
                return l === Array.isArray(e) ? l ? c.arrayMerge(e, i, c) : function (e, t, i) {
1685
                    var r = {};
1686
                    return i.isMergeableObject(e) && s(e).forEach((function (t) {
1687
                        r[t] = n(e[t], i)
1688
                    })), s(t).forEach((function (s) {
1689
                        (function (e, t) {
1690
                            return o(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t))
1691
                        })(e, s) || (o(e, s) && i.isMergeableObject(t[s]) ? r[s] = function (e, t) {
1692
                            if (!t.customMerge) return a;
1693
                            var i = t.customMerge(e);
1694
                            return "function" == typeof i ? i : a
1695
                        }(s, i)(e[s], t[s], i) : r[s] = n(t[s], i))
1696
                    })), r
1697
                }(e, i, c) : n(i, c)
1698
            }
1699

1700
            a.all = function (e, t) {
1701
                if (!Array.isArray(e)) throw new Error("first argument should be an array");
1702
                return e.reduce((function (e, i) {
1703
                    return a(e, i, t)
1704
                }), {})
1705
            };
1706
            var c = a;
1707
            e.exports = c
1708
        }, 221: function (e, t, i) {
1709
            function n(e) {
1710
                return Array.isArray ? Array.isArray(e) : "[object Array]" === l(e)
1711
            }
1712

1713
            function r(e) {
1714
                return "string" == typeof e
1715
            }
1716

1717
            function s(e) {
1718
                return "number" == typeof e
1719
            }
1720

1721
            function o(e) {
1722
                return "object" == typeof e
1723
            }
1724

1725
            function a(e) {
1726
                return null != e
1727
            }
1728

1729
            function c(e) {
1730
                return !e.trim().length
1731
            }
1732

1733
            function l(e) {
1734
                return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e)
1735
            }
1736

1737
            i.r(t), i.d(t, {
1738
                default: function () {
1739
                    return R
1740
                }
1741
            });
1742
            const h = Object.prototype.hasOwnProperty;
1743

1744
            class u {
1745
                constructor(e) {
1746
                    this._keys = [], this._keyMap = {};
1747
                    let t = 0;
1748
                    e.forEach((e => {
1749
                        let i = d(e);
1750
                        t += i.weight, this._keys.push(i), this._keyMap[i.id] = i, t += i.weight
1751
                    })), this._keys.forEach((e => {
1752
                        e.weight /= t
1753
                    }))
1754
                }
1755

1756
                get(e) {
1757
                    return this._keyMap[e]
1758
                }
1759

1760
                keys() {
1761
                    return this._keys
1762
                }
1763

1764
                toJSON() {
1765
                    return JSON.stringify(this._keys)
1766
                }
1767
            }
1768

1769
            function d(e) {
1770
                let t = null, i = null, s = null, o = 1, a = null;
1771
                if (r(e) || n(e)) s = e, t = p(e), i = f(e); else {
1772
                    if (!h.call(e, "name")) throw new Error("Missing name property in key");
1773
                    const n = e.name;
1774
                    if (s = n, h.call(e, "weight") && (o = e.weight, o <= 0)) throw new Error((e => `Property 'weight' in key '${e}' must be a positive integer`)(n));
1775
                    t = p(n), i = f(n), a = e.getFn
1776
                }
1777
                return {path: t, id: i, weight: o, src: s, getFn: a}
1778
            }
1779

1780
            function p(e) {
1781
                return n(e) ? e : e.split(".")
1782
            }
1783

1784
            function f(e) {
1785
                return n(e) ? e.join(".") : e
1786
            }
1787

1788
            var m = {
1789
                isCaseSensitive: !1,
1790
                includeScore: !1,
1791
                keys: [],
1792
                shouldSort: !0,
1793
                sortFn: (e, t) => e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1,
1794
                includeMatches: !1,
1795
                findAllMatches: !1,
1796
                minMatchCharLength: 1,
1797
                location: 0,
1798
                threshold: .6,
1799
                distance: 100,
1800
                useExtendedSearch: !1,
1801
                getFn: function (e, t) {
1802
                    let i = [], c = !1;
1803
                    const h = (e, t, u) => {
1804
                        if (a(e)) if (t[u]) {
1805
                            const d = e[t[u]];
1806
                            if (!a(d)) return;
1807
                            if (u === t.length - 1 && (r(d) || s(d) || function (e) {
1808
                                return !0 === e || !1 === e || function (e) {
1809
                                    return o(e) && null !== e
1810
                                }(e) && "[object Boolean]" == l(e)
1811
                            }(d))) i.push(function (e) {
1812
                                return null == e ? "" : function (e) {
1813
                                    if ("string" == typeof e) return e;
1814
                                    let t = e + "";
1815
                                    return "0" == t && 1 / e == -1 / 0 ? "-0" : t
1816
                                }(e)
1817
                            }(d)); else if (n(d)) {
1818
                                c = !0;
1819
                                for (let e = 0, i = d.length; e < i; e += 1) h(d[e], t, u + 1)
1820
                            } else t.length && h(d, t, u + 1)
1821
                        } else i.push(e)
1822
                    };
1823
                    return h(e, r(t) ? t.split(".") : t, 0), c ? i : i[0]
1824
                },
1825
                ignoreLocation: !1,
1826
                ignoreFieldNorm: !1,
1827
                fieldNormWeight: 1
1828
            };
1829
            const v = /[^ ]+/g;
1830

1831
            class g {
1832
                constructor({getFn: e = m.getFn, fieldNormWeight: t = m.fieldNormWeight} = {}) {
1833
                    this.norm = function (e = 1, t = 3) {
1834
                        const i = new Map, n = Math.pow(10, t);
1835
                        return {
1836
                            get(t) {
1837
                                const r = t.match(v).length;
1838
                                if (i.has(r)) return i.get(r);
1839
                                const s = 1 / Math.pow(r, .5 * e), o = parseFloat(Math.round(s * n) / n);
1840
                                return i.set(r, o), o
1841
                            }, clear() {
1842
                                i.clear()
1843
                            }
1844
                        }
1845
                    }(t, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords()
1846
                }
1847

1848
                setSources(e = []) {
1849
                    this.docs = e
1850
                }
1851

1852
                setIndexRecords(e = []) {
1853
                    this.records = e
1854
                }
1855

1856
                setKeys(e = []) {
1857
                    this.keys = e, this._keysMap = {}, e.forEach(((e, t) => {
1858
                        this._keysMap[e.id] = t
1859
                    }))
1860
                }
1861

1862
                create() {
1863
                    !this.isCreated && this.docs.length && (this.isCreated = !0, r(this.docs[0]) ? this.docs.forEach(((e, t) => {
1864
                        this._addString(e, t)
1865
                    })) : this.docs.forEach(((e, t) => {
1866
                        this._addObject(e, t)
1867
                    })), this.norm.clear())
1868
                }
1869

1870
                add(e) {
1871
                    const t = this.size();
1872
                    r(e) ? this._addString(e, t) : this._addObject(e, t)
1873
                }
1874

1875
                removeAt(e) {
1876
                    this.records.splice(e, 1);
1877
                    for (let t = e, i = this.size(); t < i; t += 1) this.records[t].i -= 1
1878
                }
1879

1880
                getValueForItemAtKeyId(e, t) {
1881
                    return e[this._keysMap[t]]
1882
                }
1883

1884
                size() {
1885
                    return this.records.length
1886
                }
1887

1888
                _addString(e, t) {
1889
                    if (!a(e) || c(e)) return;
1890
                    let i = {v: e, i: t, n: this.norm.get(e)};
1891
                    this.records.push(i)
1892
                }
1893

1894
                _addObject(e, t) {
1895
                    let i = {i: t, $: {}};
1896
                    this.keys.forEach(((t, s) => {
1897
                        let o = t.getFn ? t.getFn(e) : this.getFn(e, t.path);
1898
                        if (a(o)) if (n(o)) {
1899
                            let e = [];
1900
                            const t = [{nestedArrIndex: -1, value: o}];
1901
                            for (; t.length;) {
1902
                                const {nestedArrIndex: i, value: s} = t.pop();
1903
                                if (a(s)) if (r(s) && !c(s)) {
1904
                                    let t = {v: s, i: i, n: this.norm.get(s)};
1905
                                    e.push(t)
1906
                                } else n(s) && s.forEach(((e, i) => {
1907
                                    t.push({nestedArrIndex: i, value: e})
1908
                                }))
1909
                            }
1910
                            i.$[s] = e
1911
                        } else if (r(o) && !c(o)) {
1912
                            let e = {v: o, n: this.norm.get(o)};
1913
                            i.$[s] = e
1914
                        }
1915
                    })), this.records.push(i)
1916
                }
1917

1918
                toJSON() {
1919
                    return {keys: this.keys, records: this.records}
1920
                }
1921
            }
1922

1923
            function _(e, t, {getFn: i = m.getFn, fieldNormWeight: n = m.fieldNormWeight} = {}) {
1924
                const r = new g({getFn: i, fieldNormWeight: n});
1925
                return r.setKeys(e.map(d)), r.setSources(t), r.create(), r
1926
            }
1927

1928
            function y(e, {
1929
                errors: t = 0,
1930
                currentLocation: i = 0,
1931
                expectedLocation: n = 0,
1932
                distance: r = m.distance,
1933
                ignoreLocation: s = m.ignoreLocation
1934
            } = {}) {
1935
                const o = t / e.length;
1936
                if (s) return o;
1937
                const a = Math.abs(n - i);
1938
                return r ? o + a / r : a ? 1 : o
1939
            }
1940

1941
            const E = 32;
1942

1943
            function b(e) {
1944
                let t = {};
1945
                for (let i = 0, n = e.length; i < n; i += 1) {
1946
                    const r = e.charAt(i);
1947
                    t[r] = (t[r] || 0) | 1 << n - i - 1
1948
                }
1949
                return t
1950
            }
1951

1952
            class S {
1953
                constructor(e, {
1954
                    location: t = m.location,
1955
                    threshold: i = m.threshold,
1956
                    distance: n = m.distance,
1957
                    includeMatches: r = m.includeMatches,
1958
                    findAllMatches: s = m.findAllMatches,
1959
                    minMatchCharLength: o = m.minMatchCharLength,
1960
                    isCaseSensitive: a = m.isCaseSensitive,
1961
                    ignoreLocation: c = m.ignoreLocation
1962
                } = {}) {
1963
                    if (this.options = {
1964
                        location: t,
1965
                        threshold: i,
1966
                        distance: n,
1967
                        includeMatches: r,
1968
                        findAllMatches: s,
1969
                        minMatchCharLength: o,
1970
                        isCaseSensitive: a,
1971
                        ignoreLocation: c
1972
                    }, this.pattern = a ? e : e.toLowerCase(), this.chunks = [], !this.pattern.length) return;
1973
                    const l = (e, t) => {
1974
                        this.chunks.push({pattern: e, alphabet: b(e), startIndex: t})
1975
                    }, h = this.pattern.length;
1976
                    if (h > E) {
1977
                        let e = 0;
1978
                        const t = h % E, i = h - t;
1979
                        for (; e < i;) l(this.pattern.substr(e, E), e), e += E;
1980
                        if (t) {
1981
                            const e = h - E;
1982
                            l(this.pattern.substr(e), e)
1983
                        }
1984
                    } else l(this.pattern, 0)
1985
                }
1986

1987
                searchIn(e) {
1988
                    const {isCaseSensitive: t, includeMatches: i} = this.options;
1989
                    if (t || (e = e.toLowerCase()), this.pattern === e) {
1990
                        let t = {isMatch: !0, score: 0};
1991
                        return i && (t.indices = [[0, e.length - 1]]), t
1992
                    }
1993
                    const {
1994
                        location: n,
1995
                        distance: r,
1996
                        threshold: s,
1997
                        findAllMatches: o,
1998
                        minMatchCharLength: a,
1999
                        ignoreLocation: c
2000
                    } = this.options;
2001
                    let l = [], h = 0, u = !1;
2002
                    this.chunks.forEach((({pattern: t, alphabet: d, startIndex: p}) => {
2003
                        const {isMatch: f, score: v, indices: g} = function (e, t, i, {
2004
                            location: n = m.location,
2005
                            distance: r = m.distance,
2006
                            threshold: s = m.threshold,
2007
                            findAllMatches: o = m.findAllMatches,
2008
                            minMatchCharLength: a = m.minMatchCharLength,
2009
                            includeMatches: c = m.includeMatches,
2010
                            ignoreLocation: l = m.ignoreLocation
2011
                        } = {}) {
2012
                            if (t.length > E) throw new Error("Pattern length exceeds max of 32.");
2013
                            const h = t.length, u = e.length, d = Math.max(0, Math.min(n, u));
2014
                            let p = s, f = d;
2015
                            const v = a > 1 || c, g = v ? Array(u) : [];
2016
                            let _;
2017
                            for (; (_ = e.indexOf(t, f)) > -1;) {
2018
                                let e = y(t, {currentLocation: _, expectedLocation: d, distance: r, ignoreLocation: l});
2019
                                if (p = Math.min(e, p), f = _ + h, v) {
2020
                                    let e = 0;
2021
                                    for (; e < h;) g[_ + e] = 1, e += 1
2022
                                }
2023
                            }
2024
                            f = -1;
2025
                            let b = [], S = 1, O = h + u;
2026
                            const I = 1 << h - 1;
2027
                            for (let n = 0; n < h; n += 1) {
2028
                                let s = 0, a = O;
2029
                                for (; s < a;) y(t, {
2030
                                    errors: n,
2031
                                    currentLocation: d + a,
2032
                                    expectedLocation: d,
2033
                                    distance: r,
2034
                                    ignoreLocation: l
2035
                                }) <= p ? s = a : O = a, a = Math.floor((O - s) / 2 + s);
2036
                                O = a;
2037
                                let c = Math.max(1, d - a + 1), m = o ? u : Math.min(d + a, u) + h, _ = Array(m + 2);
2038
                                _[m + 1] = (1 << n) - 1;
2039
                                for (let s = m; s >= c; s -= 1) {
2040
                                    let o = s - 1, a = i[e.charAt(o)];
2041
                                    if (v && (g[o] = +!!a), _[s] = (_[s + 1] << 1 | 1) & a, n && (_[s] |= (b[s + 1] | b[s]) << 1 | 1 | b[s + 1]), _[s] & I && (S = y(t, {
2042
                                        errors: n,
2043
                                        currentLocation: o,
2044
                                        expectedLocation: d,
2045
                                        distance: r,
2046
                                        ignoreLocation: l
2047
                                    }), S <= p)) {
2048
                                        if (p = S, f = o, f <= d) break;
2049
                                        c = Math.max(1, 2 * d - f)
2050
                                    }
2051
                                }
2052
                                if (y(t, {
2053
                                    errors: n + 1,
2054
                                    currentLocation: d,
2055
                                    expectedLocation: d,
2056
                                    distance: r,
2057
                                    ignoreLocation: l
2058
                                }) > p) break;
2059
                                b = _
2060
                            }
2061
                            const C = {isMatch: f >= 0, score: Math.max(.001, S)};
2062
                            if (v) {
2063
                                const e = function (e = [], t = m.minMatchCharLength) {
2064
                                    let i = [], n = -1, r = -1, s = 0;
2065
                                    for (let o = e.length; s < o; s += 1) {
2066
                                        let o = e[s];
2067
                                        o && -1 === n ? n = s : o || -1 === n || (r = s - 1, r - n + 1 >= t && i.push([n, r]), n = -1)
2068
                                    }
2069
                                    return e[s - 1] && s - n >= t && i.push([n, s - 1]), i
2070
                                }(g, a);
2071
                                e.length ? c && (C.indices = e) : C.isMatch = !1
2072
                            }
2073
                            return C
2074
                        }(e, t, d, {
2075
                            location: n + p,
2076
                            distance: r,
2077
                            threshold: s,
2078
                            findAllMatches: o,
2079
                            minMatchCharLength: a,
2080
                            includeMatches: i,
2081
                            ignoreLocation: c
2082
                        });
2083
                        f && (u = !0), h += v, f && g && (l = [...l, ...g])
2084
                    }));
2085
                    let d = {isMatch: u, score: u ? h / this.chunks.length : 1};
2086
                    return u && i && (d.indices = l), d
2087
                }
2088
            }
2089

2090
            class O {
2091
                constructor(e) {
2092
                    this.pattern = e
2093
                }
2094

2095
                static isMultiMatch(e) {
2096
                    return I(e, this.multiRegex)
2097
                }
2098

2099
                static isSingleMatch(e) {
2100
                    return I(e, this.singleRegex)
2101
                }
2102

2103
                search() {
2104
                }
2105
            }
2106

2107
            function I(e, t) {
2108
                const i = e.match(t);
2109
                return i ? i[1] : null
2110
            }
2111

2112
            class C extends O {
2113
                constructor(e, {
2114
                    location: t = m.location,
2115
                    threshold: i = m.threshold,
2116
                    distance: n = m.distance,
2117
                    includeMatches: r = m.includeMatches,
2118
                    findAllMatches: s = m.findAllMatches,
2119
                    minMatchCharLength: o = m.minMatchCharLength,
2120
                    isCaseSensitive: a = m.isCaseSensitive,
2121
                    ignoreLocation: c = m.ignoreLocation
2122
                } = {}) {
2123
                    super(e), this._bitapSearch = new S(e, {
2124
                        location: t,
2125
                        threshold: i,
2126
                        distance: n,
2127
                        includeMatches: r,
2128
                        findAllMatches: s,
2129
                        minMatchCharLength: o,
2130
                        isCaseSensitive: a,
2131
                        ignoreLocation: c
2132
                    })
2133
                }
2134

2135
                static get type() {
2136
                    return "fuzzy"
2137
                }
2138

2139
                static get multiRegex() {
2140
                    return /^"(.*)"$/
2141
                }
2142

2143
                static get singleRegex() {
2144
                    return /^(.*)$/
2145
                }
2146

2147
                search(e) {
2148
                    return this._bitapSearch.searchIn(e)
2149
                }
2150
            }
2151

2152
            class T extends O {
2153
                constructor(e) {
2154
                    super(e)
2155
                }
2156

2157
                static get type() {
2158
                    return "include"
2159
                }
2160

2161
                static get multiRegex() {
2162
                    return /^'"(.*)"$/
2163
                }
2164

2165
                static get singleRegex() {
2166
                    return /^'(.*)$/
2167
                }
2168

2169
                search(e) {
2170
                    let t, i = 0;
2171
                    const n = [], r = this.pattern.length;
2172
                    for (; (t = e.indexOf(this.pattern, i)) > -1;) i = t + r, n.push([t, i - 1]);
2173
                    const s = !!n.length;
2174
                    return {isMatch: s, score: s ? 0 : 1, indices: n}
2175
                }
2176
            }
2177

2178
            const L = [class extends O {
2179
                constructor(e) {
2180
                    super(e)
2181
                }
2182

2183
                static get type() {
2184
                    return "exact"
2185
                }
2186

2187
                static get multiRegex() {
2188
                    return /^="(.*)"$/
2189
                }
2190

2191
                static get singleRegex() {
2192
                    return /^=(.*)$/
2193
                }
2194

2195
                search(e) {
2196
                    const t = e === this.pattern;
2197
                    return {isMatch: t, score: t ? 0 : 1, indices: [0, this.pattern.length - 1]}
2198
                }
2199
            }, T, class extends O {
2200
                constructor(e) {
2201
                    super(e)
2202
                }
2203

2204
                static get type() {
2205
                    return "prefix-exact"
2206
                }
2207

2208
                static get multiRegex() {
2209
                    return /^\^"(.*)"$/
2210
                }
2211

2212
                static get singleRegex() {
2213
                    return /^\^(.*)$/
2214
                }
2215

2216
                search(e) {
2217
                    const t = e.startsWith(this.pattern);
2218
                    return {isMatch: t, score: t ? 0 : 1, indices: [0, this.pattern.length - 1]}
2219
                }
2220
            }, class extends O {
2221
                constructor(e) {
2222
                    super(e)
2223
                }
2224

2225
                static get type() {
2226
                    return "inverse-prefix-exact"
2227
                }
2228

2229
                static get multiRegex() {
2230
                    return /^!\^"(.*)"$/
2231
                }
2232

2233
                static get singleRegex() {
2234
                    return /^!\^(.*)$/
2235
                }
2236

2237
                search(e) {
2238
                    const t = !e.startsWith(this.pattern);
2239
                    return {isMatch: t, score: t ? 0 : 1, indices: [0, e.length - 1]}
2240
                }
2241
            }, class extends O {
2242
                constructor(e) {
2243
                    super(e)
2244
                }
2245

2246
                static get type() {
2247
                    return "inverse-suffix-exact"
2248
                }
2249

2250
                static get multiRegex() {
2251
                    return /^!"(.*)"\$$/
2252
                }
2253

2254
                static get singleRegex() {
2255
                    return /^!(.*)\$$/
2256
                }
2257

2258
                search(e) {
2259
                    const t = !e.endsWith(this.pattern);
2260
                    return {isMatch: t, score: t ? 0 : 1, indices: [0, e.length - 1]}
2261
                }
2262
            }, class extends O {
2263
                constructor(e) {
2264
                    super(e)
2265
                }
2266

2267
                static get type() {
2268
                    return "suffix-exact"
2269
                }
2270

2271
                static get multiRegex() {
2272
                    return /^"(.*)"\$$/
2273
                }
2274

2275
                static get singleRegex() {
2276
                    return /^(.*)\$$/
2277
                }
2278

2279
                search(e) {
2280
                    const t = e.endsWith(this.pattern);
2281
                    return {isMatch: t, score: t ? 0 : 1, indices: [e.length - this.pattern.length, e.length - 1]}
2282
                }
2283
            }, class extends O {
2284
                constructor(e) {
2285
                    super(e)
2286
                }
2287

2288
                static get type() {
2289
                    return "inverse-exact"
2290
                }
2291

2292
                static get multiRegex() {
2293
                    return /^!"(.*)"$/
2294
                }
2295

2296
                static get singleRegex() {
2297
                    return /^!(.*)$/
2298
                }
2299

2300
                search(e) {
2301
                    const t = -1 === e.indexOf(this.pattern);
2302
                    return {isMatch: t, score: t ? 0 : 1, indices: [0, e.length - 1]}
2303
                }
2304
            }, C], w = L.length, A = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, M = new Set([C.type, T.type]);
2305
            const P = [];
2306

2307
            function x(e, t) {
2308
                for (let i = 0, n = P.length; i < n; i += 1) {
2309
                    let n = P[i];
2310
                    if (n.condition(e, t)) return new n(e, t)
2311
                }
2312
                return new S(e, t)
2313
            }
2314

2315
            const N = "$and", D = e => !(!e.$and && !e.$or), j = e => ({[N]: Object.keys(e).map((t => ({[t]: e[t]})))});
2316

2317
            function F(e, t, {auto: i = !0} = {}) {
2318
                const s = e => {
2319
                    let a = Object.keys(e);
2320
                    const c = (e => !!e.$path)(e);
2321
                    if (!c && a.length > 1 && !D(e)) return s(j(e));
2322
                    if ((e => !n(e) && o(e) && !D(e))(e)) {
2323
                        const n = c ? e.$path : a[0], s = c ? e.$val : e[n];
2324
                        if (!r(s)) throw new Error((e => `Invalid value for key ${e}`)(n));
2325
                        const o = {keyId: f(n), pattern: s};
2326
                        return i && (o.searcher = x(s, t)), o
2327
                    }
2328
                    let l = {children: [], operator: a[0]};
2329
                    return a.forEach((t => {
2330
                        const i = e[t];
2331
                        n(i) && i.forEach((e => {
2332
                            l.children.push(s(e))
2333
                        }))
2334
                    })), l
2335
                };
2336
                return D(e) || (e = j(e)), s(e)
2337
            }
2338

2339
            function k(e, t) {
2340
                const i = e.matches;
2341
                t.matches = [], a(i) && i.forEach((e => {
2342
                    if (!a(e.indices) || !e.indices.length) return;
2343
                    const {indices: i, value: n} = e;
2344
                    let r = {indices: i, value: n};
2345
                    e.key && (r.key = e.key.src), e.idx > -1 && (r.refIndex = e.idx), t.matches.push(r)
2346
                }))
2347
            }
2348

2349
            function K(e, t) {
2350
                t.score = e.score
2351
            }
2352

2353
            class R {
2354
                constructor(e, t = {}, i) {
2355
                    this.options = {...m, ...t}, this.options.useExtendedSearch, this._keyStore = new u(this.options.keys), this.setCollection(e, i)
2356
                }
2357

2358
                setCollection(e, t) {
2359
                    if (this._docs = e, t && !(t instanceof g)) throw new Error("Incorrect 'index' type");
2360
                    this._myIndex = t || _(this.options.keys, this._docs, {
2361
                        getFn: this.options.getFn,
2362
                        fieldNormWeight: this.options.fieldNormWeight
2363
                    })
2364
                }
2365

2366
                add(e) {
2367
                    a(e) && (this._docs.push(e), this._myIndex.add(e))
2368
                }
2369

2370
                remove(e = (() => !1)) {
2371
                    const t = [];
2372
                    for (let i = 0, n = this._docs.length; i < n; i += 1) {
2373
                        const r = this._docs[i];
2374
                        e(r, i) && (this.removeAt(i), i -= 1, n -= 1, t.push(r))
2375
                    }
2376
                    return t
2377
                }
2378

2379
                removeAt(e) {
2380
                    this._docs.splice(e, 1), this._myIndex.removeAt(e)
2381
                }
2382

2383
                getIndex() {
2384
                    return this._myIndex
2385
                }
2386

2387
                search(e, {limit: t = -1} = {}) {
2388
                    const {
2389
                        includeMatches: i,
2390
                        includeScore: n,
2391
                        shouldSort: o,
2392
                        sortFn: a,
2393
                        ignoreFieldNorm: c
2394
                    } = this.options;
2395
                    let l = r(e) ? r(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
2396
                    return function (e, {ignoreFieldNorm: t = m.ignoreFieldNorm}) {
2397
                        e.forEach((e => {
2398
                            let i = 1;
2399
                            e.matches.forEach((({key: e, norm: n, score: r}) => {
2400
                                const s = e ? e.weight : null;
2401
                                i *= Math.pow(0 === r && s ? Number.EPSILON : r, (s || 1) * (t ? 1 : n))
2402
                            })), e.score = i
2403
                        }))
2404
                    }(l, {ignoreFieldNorm: c}), o && l.sort(a), s(t) && t > -1 && (l = l.slice(0, t)), function (e, t, {
2405
                        includeMatches: i = m.includeMatches,
2406
                        includeScore: n = m.includeScore
2407
                    } = {}) {
2408
                        const r = [];
2409
                        return i && r.push(k), n && r.push(K), e.map((e => {
2410
                            const {idx: i} = e, n = {item: t[i], refIndex: i};
2411
                            return r.length && r.forEach((t => {
2412
                                t(e, n)
2413
                            })), n
2414
                        }))
2415
                    }(l, this._docs, {includeMatches: i, includeScore: n})
2416
                }
2417

2418
                _searchStringList(e) {
2419
                    const t = x(e, this.options), {records: i} = this._myIndex, n = [];
2420
                    return i.forEach((({v: e, i: i, n: r}) => {
2421
                        if (!a(e)) return;
2422
                        const {isMatch: s, score: o, indices: c} = t.searchIn(e);
2423
                        s && n.push({item: e, idx: i, matches: [{score: o, value: e, norm: r, indices: c}]})
2424
                    })), n
2425
                }
2426

2427
                _searchLogical(e) {
2428
                    const t = F(e, this.options), i = (e, t, n) => {
2429
                        if (!e.children) {
2430
                            const {keyId: i, searcher: r} = e, s = this._findMatches({
2431
                                key: this._keyStore.get(i),
2432
                                value: this._myIndex.getValueForItemAtKeyId(t, i),
2433
                                searcher: r
2434
                            });
2435
                            return s && s.length ? [{idx: n, item: t, matches: s}] : []
2436
                        }
2437
                        const r = [];
2438
                        for (let s = 0, o = e.children.length; s < o; s += 1) {
2439
                            const o = e.children[s], a = i(o, t, n);
2440
                            if (a.length) r.push(...a); else if (e.operator === N) return []
2441
                        }
2442
                        return r
2443
                    }, n = this._myIndex.records, r = {}, s = [];
2444
                    return n.forEach((({$: e, i: n}) => {
2445
                        if (a(e)) {
2446
                            let o = i(t, e, n);
2447
                            o.length && (r[n] || (r[n] = {
2448
                                idx: n,
2449
                                item: e,
2450
                                matches: []
2451
                            }, s.push(r[n])), o.forEach((({matches: e}) => {
2452
                                r[n].matches.push(...e)
2453
                            })))
2454
                        }
2455
                    })), s
2456
                }
2457

2458
                _searchObjectList(e) {
2459
                    const t = x(e, this.options), {keys: i, records: n} = this._myIndex, r = [];
2460
                    return n.forEach((({$: e, i: n}) => {
2461
                        if (!a(e)) return;
2462
                        let s = [];
2463
                        i.forEach(((i, n) => {
2464
                            s.push(...this._findMatches({key: i, value: e[n], searcher: t}))
2465
                        })), s.length && r.push({idx: n, item: e, matches: s})
2466
                    })), r
2467
                }
2468

2469
                _findMatches({key: e, value: t, searcher: i}) {
2470
                    if (!a(t)) return [];
2471
                    let r = [];
2472
                    if (n(t)) t.forEach((({v: t, i: n, n: s}) => {
2473
                        if (!a(t)) return;
2474
                        const {isMatch: o, score: c, indices: l} = i.searchIn(t);
2475
                        o && r.push({score: c, key: e, value: t, idx: n, norm: s, indices: l})
2476
                    })); else {
2477
                        const {v: n, n: s} = t, {isMatch: o, score: a, indices: c} = i.searchIn(n);
2478
                        o && r.push({score: a, key: e, value: n, norm: s, indices: c})
2479
                    }
2480
                    return r
2481
                }
2482
            }
2483

2484
            R.version = "6.6.2", R.createIndex = _, R.parseIndex = function (e, {
2485
                getFn: t = m.getFn,
2486
                fieldNormWeight: i = m.fieldNormWeight
2487
            } = {}) {
2488
                const {keys: n, records: r} = e, s = new g({getFn: t, fieldNormWeight: i});
2489
                return s.setKeys(n), s.setIndexRecords(r), s
2490
            }, R.config = m, R.parseQuery = F, function (...e) {
2491
                P.push(...e)
2492
            }(class {
2493
                constructor(e, {
2494
                    isCaseSensitive: t = m.isCaseSensitive,
2495
                    includeMatches: i = m.includeMatches,
2496
                    minMatchCharLength: n = m.minMatchCharLength,
2497
                    ignoreLocation: r = m.ignoreLocation,
2498
                    findAllMatches: s = m.findAllMatches,
2499
                    location: o = m.location,
2500
                    threshold: a = m.threshold,
2501
                    distance: c = m.distance
2502
                } = {}) {
2503
                    this.query = null, this.options = {
2504
                        isCaseSensitive: t,
2505
                        includeMatches: i,
2506
                        minMatchCharLength: n,
2507
                        findAllMatches: s,
2508
                        ignoreLocation: r,
2509
                        location: o,
2510
                        threshold: a,
2511
                        distance: c
2512
                    }, this.pattern = t ? e : e.toLowerCase(), this.query = function (e, t = {}) {
2513
                        return e.split("|").map((e => {
2514
                            let i = e.trim().split(A).filter((e => e && !!e.trim())), n = [];
2515
                            for (let e = 0, r = i.length; e < r; e += 1) {
2516
                                const r = i[e];
2517
                                let s = !1, o = -1;
2518
                                for (; !s && ++o < w;) {
2519
                                    const e = L[o];
2520
                                    let i = e.isMultiMatch(r);
2521
                                    i && (n.push(new e(i, t)), s = !0)
2522
                                }
2523
                                if (!s) for (o = -1; ++o < w;) {
2524
                                    const e = L[o];
2525
                                    let i = e.isSingleMatch(r);
2526
                                    if (i) {
2527
                                        n.push(new e(i, t));
2528
                                        break
2529
                                    }
2530
                                }
2531
                            }
2532
                            return n
2533
                        }))
2534
                    }(this.pattern, this.options)
2535
                }
2536

2537
                static condition(e, t) {
2538
                    return t.useExtendedSearch
2539
                }
2540

2541
                searchIn(e) {
2542
                    const t = this.query;
2543
                    if (!t) return {isMatch: !1, score: 1};
2544
                    const {includeMatches: i, isCaseSensitive: n} = this.options;
2545
                    e = n ? e : e.toLowerCase();
2546
                    let r = 0, s = [], o = 0;
2547
                    for (let n = 0, a = t.length; n < a; n += 1) {
2548
                        const a = t[n];
2549
                        s.length = 0, r = 0;
2550
                        for (let t = 0, n = a.length; t < n; t += 1) {
2551
                            const n = a[t], {isMatch: c, indices: l, score: h} = n.search(e);
2552
                            if (!c) {
2553
                                o = 0, r = 0, s.length = 0;
2554
                                break
2555
                            }
2556
                            if (r += 1, o += h, i) {
2557
                                const e = n.constructor.type;
2558
                                M.has(e) ? s = [...s, ...l] : s.push(l)
2559
                            }
2560
                        }
2561
                        if (r) {
2562
                            let e = {isMatch: !0, score: o / r};
2563
                            return i && (e.indices = s), e
2564
                        }
2565
                    }
2566
                    return {isMatch: !1, score: 1}
2567
                }
2568
            })
2569
        }, 791: function (e, t, i) {
2570
            function n(e) {
2571
                return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
2572
                    return typeof e
2573
                } : function (e) {
2574
                    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
2575
                }, n(e)
2576
            }
2577

2578
            function r(e, t, i) {
2579
                return (t = function (e) {
2580
                    var t = function (e, t) {
2581
                        if ("object" !== n(e) || null === e) return e;
2582
                        var i = e[Symbol.toPrimitive];
2583
                        if (void 0 !== i) {
2584
                            var r = i.call(e, t);
2585
                            if ("object" !== n(r)) return r;
2586
                            throw new TypeError("@@toPrimitive must return a primitive value.")
2587
                        }
2588
                        return String(e)
2589
                    }(e, "string");
2590
                    return "symbol" === n(t) ? t : String(t)
2591
                }(t)) in e ? Object.defineProperty(e, t, {
2592
                    value: i,
2593
                    enumerable: !0,
2594
                    configurable: !0,
2595
                    writable: !0
2596
                }) : e[t] = i, e
2597
            }
2598

2599
            function s(e, t) {
2600
                var i = Object.keys(e);
2601
                if (Object.getOwnPropertySymbols) {
2602
                    var n = Object.getOwnPropertySymbols(e);
2603
                    t && (n = n.filter((function (t) {
2604
                        return Object.getOwnPropertyDescriptor(e, t).enumerable
2605
                    }))), i.push.apply(i, n)
2606
                }
2607
                return i
2608
            }
2609

2610
            function o(e) {
2611
                for (var t = 1; t < arguments.length; t++) {
2612
                    var i = null != arguments[t] ? arguments[t] : {};
2613
                    t % 2 ? s(Object(i), !0).forEach((function (t) {
2614
                        r(e, t, i[t])
2615
                    })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : s(Object(i)).forEach((function (t) {
2616
                        Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t))
2617
                    }))
2618
                }
2619
                return e
2620
            }
2621

2622
            function a(e) {
2623
                return "Minified Redux error #" + e + "; visit https://redux.js.org/Errors?code=" + e + " for the full message or use the non-minified dev environment for full errors. "
2624
            }
2625

2626
            i.r(t), i.d(t, {
2627
                __DO_NOT_USE__ActionTypes: function () {
2628
                    return h
2629
                }, applyMiddleware: function () {
2630
                    return _
2631
                }, bindActionCreators: function () {
2632
                    return v
2633
                }, combineReducers: function () {
2634
                    return f
2635
                }, compose: function () {
2636
                    return g
2637
                }, createStore: function () {
2638
                    return d
2639
                }, legacy_createStore: function () {
2640
                    return p
2641
                }
2642
            });
2643
            var c = "function" == typeof Symbol && Symbol.observable || "@@observable", l = function () {
2644
                return Math.random().toString(36).substring(7).split("").join(".")
2645
            }, h = {
2646
                INIT: "@@redux/INIT" + l(), REPLACE: "@@redux/REPLACE" + l(), PROBE_UNKNOWN_ACTION: function () {
2647
                    return "@@redux/PROBE_UNKNOWN_ACTION" + l()
2648
                }
2649
            };
2650

2651
            function u(e) {
2652
                if ("object" != typeof e || null === e) return !1;
2653
                for (var t = e; null !== Object.getPrototypeOf(t);) t = Object.getPrototypeOf(t);
2654
                return Object.getPrototypeOf(e) === t
2655
            }
2656

2657
            function d(e, t, i) {
2658
                var n;
2659
                if ("function" == typeof t && "function" == typeof i || "function" == typeof i && "function" == typeof arguments[3]) throw new Error(a(0));
2660
                if ("function" == typeof t && void 0 === i && (i = t, t = void 0), void 0 !== i) {
2661
                    if ("function" != typeof i) throw new Error(a(1));
2662
                    return i(d)(e, t)
2663
                }
2664
                if ("function" != typeof e) throw new Error(a(2));
2665
                var r = e, s = t, o = [], l = o, p = !1;
2666

2667
                function f() {
2668
                    l === o && (l = o.slice())
2669
                }
2670

2671
                function m() {
2672
                    if (p) throw new Error(a(3));
2673
                    return s
2674
                }
2675

2676
                function v(e) {
2677
                    if ("function" != typeof e) throw new Error(a(4));
2678
                    if (p) throw new Error(a(5));
2679
                    var t = !0;
2680
                    return f(), l.push(e), function () {
2681
                        if (t) {
2682
                            if (p) throw new Error(a(6));
2683
                            t = !1, f();
2684
                            var i = l.indexOf(e);
2685
                            l.splice(i, 1), o = null
2686
                        }
2687
                    }
2688
                }
2689

2690
                function g(e) {
2691
                    if (!u(e)) throw new Error(a(7));
2692
                    if (void 0 === e.type) throw new Error(a(8));
2693
                    if (p) throw new Error(a(9));
2694
                    try {
2695
                        p = !0, s = r(s, e)
2696
                    } finally {
2697
                        p = !1
2698
                    }
2699
                    for (var t = o = l, i = 0; i < t.length; i++) (0, t[i])();
2700
                    return e
2701
                }
2702

2703
                function _(e) {
2704
                    if ("function" != typeof e) throw new Error(a(10));
2705
                    r = e, g({type: h.REPLACE})
2706
                }
2707

2708
                function y() {
2709
                    var e, t = v;
2710
                    return (e = {
2711
                        subscribe: function (e) {
2712
                            if ("object" != typeof e || null === e) throw new Error(a(11));
2713

2714
                            function i() {
2715
                                e.next && e.next(m())
2716
                            }
2717

2718
                            return i(), {unsubscribe: t(i)}
2719
                        }
2720
                    })[c] = function () {
2721
                        return this
2722
                    }, e
2723
                }
2724

2725
                return g({type: h.INIT}), (n = {dispatch: g, subscribe: v, getState: m, replaceReducer: _})[c] = y, n
2726
            }
2727

2728
            var p = d;
2729

2730
            function f(e) {
2731
                for (var t = Object.keys(e), i = {}, n = 0; n < t.length; n++) {
2732
                    var r = t[n];
2733
                    "function" == typeof e[r] && (i[r] = e[r])
2734
                }
2735
                var s, o = Object.keys(i);
2736
                try {
2737
                    !function (e) {
2738
                        Object.keys(e).forEach((function (t) {
2739
                            var i = e[t];
2740
                            if (void 0 === i(void 0, {type: h.INIT})) throw new Error(a(12));
2741
                            if (void 0 === i(void 0, {type: h.PROBE_UNKNOWN_ACTION()})) throw new Error(a(13))
2742
                        }))
2743
                    }(i)
2744
                } catch (e) {
2745
                    s = e
2746
                }
2747
                return function (e, t) {
2748
                    if (void 0 === e && (e = {}), s) throw s;
2749
                    for (var n = !1, r = {}, c = 0; c < o.length; c++) {
2750
                        var l = o[c], h = i[l], u = e[l], d = h(u, t);
2751
                        if (void 0 === d) throw t && t.type, new Error(a(14));
2752
                        r[l] = d, n = n || d !== u
2753
                    }
2754
                    return (n = n || o.length !== Object.keys(e).length) ? r : e
2755
                }
2756
            }
2757

2758
            function m(e, t) {
2759
                return function () {
2760
                    return t(e.apply(this, arguments))
2761
                }
2762
            }
2763

2764
            function v(e, t) {
2765
                if ("function" == typeof e) return m(e, t);
2766
                if ("object" != typeof e || null === e) throw new Error(a(16));
2767
                var i = {};
2768
                for (var n in e) {
2769
                    var r = e[n];
2770
                    "function" == typeof r && (i[n] = m(r, t))
2771
                }
2772
                return i
2773
            }
2774

2775
            function g() {
2776
                for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
2777
                return 0 === t.length ? function (e) {
2778
                    return e
2779
                } : 1 === t.length ? t[0] : t.reduce((function (e, t) {
2780
                    return function () {
2781
                        return e(t.apply(void 0, arguments))
2782
                    }
2783
                }))
2784
            }
2785

2786
            function _() {
2787
                for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
2788
                return function (e) {
2789
                    return function () {
2790
                        var i = e.apply(void 0, arguments), n = function () {
2791
                            throw new Error(a(15))
2792
                        }, r = {
2793
                            getState: i.getState, dispatch: function () {
2794
                                return n.apply(void 0, arguments)
2795
                            }
2796
                        }, s = t.map((function (e) {
2797
                            return e(r)
2798
                        }));
2799
                        return n = g.apply(void 0, s)(i.dispatch), o(o({}, i), {}, {dispatch: n})
2800
                    }
2801
                }
2802
            }
2803
        }
2804
    }, t = {};
2805

2806
    function i(n) {
2807
        var r = t[n];
2808
        if (void 0 !== r) return r.exports;
2809
        var s = t[n] = {exports: {}};
2810
        return e[n].call(s.exports, s, s.exports, i), s.exports
2811
    }
2812

2813
    i.n = function (e) {
2814
        var t = e && e.__esModule ? function () {
2815
            return e.default
2816
        } : function () {
2817
            return e
2818
        };
2819
        return i.d(t, {a: t}), t
2820
    }, i.d = function (e, t) {
2821
        for (var n in t) i.o(t, n) && !i.o(e, n) && Object.defineProperty(e, n, {enumerable: !0, get: t[n]})
2822
    }, i.o = function (e, t) {
2823
        return Object.prototype.hasOwnProperty.call(e, t)
2824
    }, i.r = function (e) {
2825
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
2826
    };
2827
    var n, r, s = {};
2828
    n = i(373), r = i.n(n), i(187), i(883), i(789), i(686), s.default = r(), window.Choices = s.default
2829
}();

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.