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AY/lB,SAG3B,EAEAsB,EAAO+S,0BAA4B,WACjC,GAAI3hB,KAAK4gB,iBAAkB,CACzB,IAAI+R,EAAoB3yB,KAAKwgB,cAAcmS,kBAC3C,QAAOA,GAAoBA,EAAkBW,IAC/C,CAEA,IAAIC,EAAgBvzB,KAAKigB,OACrB5S,EAAckmB,EAAclmB,YAC5B8E,EAAmBohB,EAAcphB,iBACjCoJ,EAAUvb,KAAKwgB,cAActiB,QAAQqd,QAEzC,GAAIlO,EAAa,CACf,GAAI8E,EACF,OAAOA,EAGT,GAAIoJ,EAAQlO,YACV,OAAOkO,EAAQlO,WAEnB,CAEA,OAAO,CACT,EAEO0S,CACT,CA5wEA,GA8wEmDrgB,EAA6B,QAAI,EAE7E,IACc,OACrB,EAliLE9E,EAAOD,QAAUL,G,uBCHnB,IAAI2D,EAAM,CACT,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,IACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,IACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,IACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,aAAc,CACb,KACA,KAED,aAAc,CACb,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,IACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,IACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,KACA,KAED,UAAW,CACV,KACA,KAED,gBAAiB,CAChB,IACA,KAED,UAAW,CACV,KACA,KAED,UAAW,CACV,KACA,KAED,mBAAoB,CACnB,KACA,KAED,aAAc,CACb,KACA,KAED,aAAc,CACb,IACA,MAGF,SAASu1B,EAAoBC,GAC5B,IAAI72B,EAAoBvB,EAAE4C,EAAKw1B,GAC9B,OAAOvM,QAAQC,UAAUC,MAAK,WAC7B,IAAInnB,EAAI,IAAIZ,MAAM,uBAAyBo0B,EAAM,KAEjD,MADAxzB,EAAEyzB,KAAO,mBACHzzB,CACP,IAGD,IAAI0zB,EAAM11B,EAAIw1B,GAAMhyB,EAAKkyB,EAAI,GAC7B,OAAO/2B,EAAoBqD,EAAE0zB,EAAI,IAAIvM,MAAK,WACzC,OAAOxqB,EAAoBd,EAAE2F,EAAI,GAClC,GACD,CACA+xB,EAAoBp1B,KAAO,WAAa,O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EAAW,IAAI,CACrE,IAAI/G,KAAY+hC,EACZ7/B,EAAoBvB,EAAEohC,EAAa/hC,KACrCkC,EAAoB5B,EAAEN,GAAY+hC,EAAY/hC,IAGhD,GAAGgiC,EAAS,IAAI38B,EAAS28B,EAAQ9/B,EAClC,CAEA,IADG4/B,GAA4BA,EAA2BxhB,GACrDngB,EAAI4gC,EAASp7B,OAAQxF,IACzByhC,EAAUb,EAAS5gC,GAChB+B,EAAoBvB,EAAEghC,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO1/B,EAAoB2F,EAAExC,EAC9B,EAEI48B,EAAqB78B,KAAmB,aAAIA,KAAmB,cAAK,GACxE68B,EAAmB/9B,QAAQ29B,EAAqBngC,KAAK,KAAM,IAC3DugC,EAAmBn4B,KAAO+3B,EAAqBngC,KAAK,KAAMugC,EAAmBn4B,KAAKpI,KAAKugC,G,IC/CvF,IAAIj9B,EAAsB9C,EAAoB2F,OAAEmG,EAAW,CAAC,MAAM,WAAa,OAAO9L,EAAoB,KAAO,IACjH8C,EAAsB9C,EAAoB2F,EAAE7C,E","sources":["webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/create fake namespace object","webpack:///../../custom_node_modules/choices.js/public/assets/scripts/choices.js","webpack:///../../node_modules/parsleyjs/dist/i18n|lazy|/^/.*/.js$/|groupOptions: {}|namespace object","webpack:///./modules/common.js","webpack:///./ms.js","webpack:///../../assets/js/app.js","webpack:///./site.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/runtimeId","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Choices\"] = factory();\n\telse\n\t\troot[\"Choices\"] = factory();\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/public/assets/scripts/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\ttry {\n\t\treturn (key in target) // Properties are safe to merge if they don't exist in the target yet,\n\t\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n\t} catch (unused) {\n\t\t// Counterintuitively, it's safe to merge any property on a target that causes the `in` operator to throw.\n\t\t// This happens when trying to copy an object in the source over a plain string in the target.\n\t\treturn false\n\t}\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* global window */\n\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {}\n\nvar result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(root);\n/* harmony default export */ __webpack_exports__[\"a\"] = (result);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(6)(module)))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)\n * \n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n */\n!function(e,t){ true?module.exports=t():undefined}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&\"number\"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if(\"string\"==typeof n[0]){for(var i=0,a=n.length;i1)throw new Error(\"Key weight has to be > 0 and <= 1\");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:\"_analyze\",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if(\"string\"==typeof i){this._log(\"\\nKey: \".concat(\"\"===n?\"-\":n));var S=f.search(i);if(this._log('Full text: \"'.concat(i,'\", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M-1&&(P=(P+m)/2),this._log(\"Score average:\",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log(\"\\nCheck Matches: \".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;in)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,\"\\\\$&\").replace(r,\"|\")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n// CONCATENATED MODULE: ./src/scripts/reducers/items.js\nvar defaultState = [];\nfunction items_items(state, action) {\n if (state === void 0) {\n state = defaultState;\n }\n\n switch (action.type) {\n case 'ADD_ITEM':\n {\n // Add object to items array\n var newState = [].concat(state, [{\n id: action.id,\n choiceId: action.choiceId,\n groupId: action.groupId,\n value: action.value,\n label: action.label,\n active: true,\n highlighted: false,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.active = false;\n }\n\n return item;\n });\n }\n\n case 'HIGHLIGHT_ITEM':\n {\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.highlighted = action.highlighted;\n }\n\n return item;\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/groups.js\nvar groups_defaultState = [];\nfunction groups(state, action) {\n if (state === void 0) {\n state = groups_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_GROUP':\n {\n return [].concat(state, [{\n id: action.id,\n value: action.value,\n active: action.active,\n disabled: action.disabled\n }]);\n }\n\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/choices.js\nvar choices_defaultState = [];\nfunction choices_choices(state, action) {\n if (state === void 0) {\n state = choices_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_CHOICE':\n {\n /*\n A disabled choice appears in the choice dropdown but cannot be selected\n A selected choice has been added to the passed input's value (added as an item)\n An active choice appears within the choice dropdown\n */\n return [].concat(state, [{\n id: action.id,\n elementId: action.elementId,\n groupId: action.groupId,\n value: action.value,\n label: action.label || action.value,\n disabled: action.disabled || false,\n selected: false,\n active: true,\n score: 9999,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n }\n\n case 'ADD_ITEM':\n {\n // If all choices need to be activated\n if (action.activateOptions) {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n } // When an item is added and it has an associated choice,\n // we want to disable it so it can't be chosen again\n\n\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = true;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'REMOVE_ITEM':\n {\n // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = false;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'FILTER_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj; // Set active state based on whether choice is\n // within filtered results\n\n choice.active = action.results.some(function (_ref) {\n var item = _ref.item,\n score = _ref.score;\n\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n\n return false;\n });\n return choice;\n });\n }\n\n case 'ACTIVATE_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n }\n\n case 'CLEAR_CHOICES':\n {\n return choices_defaultState;\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/general.js\nvar general_defaultState = {\n loading: false\n};\n\nvar general = function general(state, action) {\n if (state === void 0) {\n state = general_defaultState;\n }\n\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return {\n loading: action.isLoading\n };\n }\n\n default:\n {\n return state;\n }\n }\n};\n\n/* harmony default export */ var reducers_general = (general);\n// CONCATENATED MODULE: ./src/scripts/lib/utils.js\n/**\n * @param {number} min\n * @param {number} max\n * @returns {number}\n */\nvar getRandomNumber = function getRandomNumber(min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\n/**\n * @param {number} length\n * @returns {string}\n */\n\nvar generateChars = function generateChars(length) {\n return Array.from({\n length: length\n }, function () {\n return getRandomNumber(0, 36).toString(36);\n }).join('');\n};\n/**\n * @param {HTMLInputElement | HTMLSelectElement} element\n * @param {string} prefix\n * @returns {string}\n */\n\nvar generateId = function generateId(element, prefix) {\n var id = element.id || element.name && element.name + \"-\" + generateChars(2) || generateChars(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = prefix + \"-\" + id;\n return id;\n};\n/**\n * @param {any} obj\n * @returns {string}\n */\n\nvar getType = function getType(obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\n/**\n * @param {string} type\n * @param {any} obj\n * @returns {boolean}\n */\n\nvar isType = function isType(type, obj) {\n return obj !== undefined && obj !== null && getType(obj) === type;\n};\n/**\n * @param {HTMLElement} element\n * @param {HTMLElement} [wrapper={HTMLDivElement}]\n * @returns {HTMLElement}\n */\n\nvar utils_wrap = function wrap(element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n\n return wrapper.appendChild(element);\n};\n/**\n * @param {Element} startEl\n * @param {string} selector\n * @param {1 | -1} direction\n * @returns {Element | undefined}\n */\n\nvar getAdjacentEl = function getAdjacentEl(startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!(startEl instanceof Element) || typeof selector !== 'string') {\n return undefined;\n }\n\n var prop = (direction > 0 ? 'next' : 'previous') + \"ElementSibling\";\n var sibling = startEl[prop];\n\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n\n sibling = sibling[prop];\n }\n\n return sibling;\n};\n/**\n * @param {Element} element\n * @param {Element} parent\n * @param {-1 | 1} direction\n * @returns {boolean}\n */\n\nvar isScrolledIntoView = function isScrolledIntoView(element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!element) {\n return false;\n }\n\n var isVisible;\n\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n\n return isVisible;\n};\n/**\n * @param {any} value\n * @returns {any}\n */\n\nvar sanitise = function sanitise(value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n return value.replace(/&/g, '&').replace(/>/g, '&rt;').replace(/ (str: string) => Element}\n */\n\nvar strToEl = function () {\n var tmpEl = document.createElement('div');\n return function (str) {\n var cleanedInput = str.trim();\n tmpEl.innerHTML = cleanedInput;\n var firldChild = tmpEl.children[0];\n\n while (tmpEl.firstChild) {\n tmpEl.removeChild(tmpEl.firstChild);\n }\n\n return firldChild;\n };\n}();\n/**\n * @param {{ label?: string, value: string }} a\n * @param {{ label?: string, value: string }} b\n * @returns {number}\n */\n\nvar sortByAlpha = function sortByAlpha(_ref, _ref2) {\n var value = _ref.value,\n _ref$label = _ref.label,\n label = _ref$label === void 0 ? value : _ref$label;\n var value2 = _ref2.value,\n _ref2$label = _ref2.label,\n label2 = _ref2$label === void 0 ? value2 : _ref2$label;\n return label.localeCompare(label2, [], {\n sensitivity: 'base',\n ignorePunctuation: true,\n numeric: true\n });\n};\n/**\n * @param {{ score: number }} a\n * @param {{ score: number }} b\n */\n\nvar sortByScore = function sortByScore(a, b) {\n return a.score - b.score;\n};\n/**\n * @param {HTMLElement} element\n * @param {string} type\n * @param {object} customArgs\n */\n\nvar dispatchEvent = function dispatchEvent(element, type, customArgs) {\n if (customArgs === void 0) {\n customArgs = null;\n }\n\n var event = new CustomEvent(type, {\n detail: customArgs,\n bubbles: true,\n cancelable: true\n });\n return element.dispatchEvent(event);\n};\n/**\n * @param {array} array\n * @param {any} value\n * @param {string} [key=\"value\"]\n * @returns {boolean}\n */\n\nvar existsInArray = function existsInArray(array, value, key) {\n if (key === void 0) {\n key = 'value';\n }\n\n return array.some(function (item) {\n if (typeof value === 'string') {\n return item[key] === value.trim();\n }\n\n return item[key] === value;\n });\n};\n/**\n * @param {any} obj\n * @returns {any}\n */\n\nvar cloneObject = function cloneObject(obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n/**\n * Returns an array of keys present on the first but missing on the second object\n * @param {object} a\n * @param {object} b\n * @returns {string[]}\n */\n\nvar diff = function diff(a, b) {\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n return aKeys.filter(function (i) {\n return bKeys.indexOf(i) < 0;\n });\n};\n// CONCATENATED MODULE: ./src/scripts/reducers/index.js\n\n\n\n\n\n\nvar appReducer = combineReducers({\n items: items_items,\n groups: groups,\n choices: choices_choices,\n general: reducers_general\n});\n\nvar reducers_rootReducer = function rootReducer(passedState, action) {\n var state = passedState; // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n\n if (action.type === 'CLEAR_ALL') {\n state = undefined;\n } else if (action.type === 'RESET_TO') {\n return cloneObject(action.state);\n }\n\n return appReducer(state, action);\n};\n\n/* harmony default export */ var reducers = (reducers_rootReducer);\n// CONCATENATED MODULE: ./src/scripts/store/store.js\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n * @typedef {import('../../../types/index').Choices.Group} Group\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar store_Store =\n/*#__PURE__*/\nfunction () {\n function Store() {\n this._store = createStore(reducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n * @param {Function} onChange Function to trigger when state changes\n * @return\n */\n\n\n var _proto = Store.prototype;\n\n _proto.subscribe = function subscribe(onChange) {\n this._store.subscribe(onChange);\n }\n /**\n * Dispatch event to store (wrapped Redux method)\n * @param {{ type: string, [x: string]: any }} action Action to trigger\n * @return\n */\n ;\n\n _proto.dispatch = function dispatch(action) {\n this._store.dispatch(action);\n }\n /**\n * Get store object (wrapping Redux method)\n * @returns {object} State\n */\n ;\n\n /**\n * Get loading state from store\n * @returns {boolean} Loading State\n */\n _proto.isLoading = function isLoading() {\n return this.state.general.loading;\n }\n /**\n * Get single choice by it's ID\n * @param {string} id\n * @returns {Choice | undefined} Found choice\n */\n ;\n\n _proto.getChoiceById = function getChoiceById(id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n }\n /**\n * Get group by group id\n * @param {number} id Group ID\n * @returns {Group | undefined} Group data\n */\n ;\n\n _proto.getGroupById = function getGroupById(id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n\n _createClass(Store, [{\n key: \"state\",\n get: function get() {\n return this._store.getState();\n }\n /**\n * Get items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"items\",\n get: function get() {\n return this.state.items;\n }\n /**\n * Get active items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"activeItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n }\n /**\n * Get highlighted items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"highlightedActiveItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n }\n /**\n * Get choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"choices\",\n get: function get() {\n return this.state.choices;\n }\n /**\n * Get active choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"activeChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n }\n /**\n * Get selectable choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"selectableChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n }\n /**\n * Get choices that can be searched (excluding placeholders)\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"searchableChoices\",\n get: function get() {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n }\n /**\n * Get placeholder choice from store\n * @returns {Choice | undefined} Found placeholder\n */\n\n }, {\n key: \"placeholderChoice\",\n get: function get() {\n return [].concat(this.choices).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n }\n /**\n * Get groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"groups\",\n get: function get() {\n return this.state.groups;\n }\n /**\n * Get active groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"activeGroups\",\n get: function get() {\n var groups = this.groups,\n choices = this.choices;\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n }\n }]);\n\n return Store;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/dropdown.js\nfunction dropdown_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction dropdown_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropdown_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropdown_defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\nvar Dropdown =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * }} args\n */\n function Dropdown(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n /**\n * Bottom position of dropdown in viewport coordinates\n * @returns {number} Vertical position\n */\n\n\n var _proto = Dropdown.prototype;\n\n /**\n * Find element that matches passed selector\n * @param {string} selector\n * @returns {HTMLElement | null}\n */\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * Show dropdown to user by adding active state class\n * @returns {this}\n */\n ;\n\n _proto.show = function show() {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n }\n /**\n * Hide dropdown from user\n * @returns {this}\n */\n ;\n\n _proto.hide = function hide() {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n\n dropdown_createClass(Dropdown, [{\n key: \"distanceFromTopWindow\",\n get: function get() {\n return this.element.getBoundingClientRect().bottom;\n }\n }]);\n\n return Dropdown;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/constants.js\n\n/**\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {ClassNames} */\n\nvar DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\n/** @type {Options} */\n\nvar DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: sortByAlpha,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function addItemText(value) {\n return \"Press Enter to add \\\"\" + sanitise(value) + \"\\\"\";\n },\n maxItemText: function maxItemText(maxItemCount) {\n return \"Only \" + maxItemCount + \" values can be added\";\n },\n valueComparer: function valueComparer(value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: DEFAULT_CLASSNAMES\n};\nvar EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice'\n};\nvar ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL'\n};\nvar KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n\tSPACE_KEY: 32,\n\tTAB_KEY: 9,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nvar TEXT_TYPE = 'text';\nvar SELECT_ONE_TYPE = 'select-one';\nvar SELECT_MULTIPLE_TYPE = 'select-multiple';\nvar SCROLLING_SPEED = 4;\n// CONCATENATED MODULE: ./src/scripts/components/container.js\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar container_Container =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * position\n * }} args\n */\n function Container(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n position = _ref.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n var _proto = Container.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n }\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n * @param {number} dropdownPos\n * @returns {boolean}\n */\n ;\n\n _proto.shouldFlip = function shouldFlip(dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n } // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n\n\n var shouldFlip = false;\n\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \" + (dropdownPos + 1) + \"px)\").matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n\n return shouldFlip;\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n }\n /**\n * @param {number} dropdownPos\n */\n ;\n\n _proto.open = function open(dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n\n _proto.close = function close() {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false; // A dropdown flips if it does not have space within the page\n\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.addFocusState = function addFocusState() {\n this.element.classList.add(this.classNames.focusState);\n };\n\n _proto.removeFocusState = function removeFocusState() {\n this.element.classList.remove(this.classNames.focusState);\n };\n\n _proto.enable = function enable() {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n\n this.isDisabled = true;\n }\n /**\n * @param {HTMLElement} element\n */\n ;\n\n _proto.wrap = function wrap(element) {\n utils_wrap(element, this.element);\n }\n /**\n * @param {Element} element\n */\n ;\n\n _proto.unwrap = function unwrap(element) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element); // Remove this element\n\n this.element.parentNode.removeChild(this.element);\n };\n\n _proto.addLoadingState = function addLoadingState() {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n\n _proto.removeLoadingState = function removeLoadingState() {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n return Container;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/input.js\nfunction input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction input_createClass(Constructor, protoProps, staticProps) { if (protoProps) input_defineProperties(Constructor.prototype, protoProps); if (staticProps) input_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar input_Input =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * preventPaste: boolean\n * }} args\n */\n function Input(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n preventPaste = _ref.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element === document.activeElement;\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n\tthis._onInput = this._onInput.bind(this);\n\tthis._onBeforeInput = this._onBeforeInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n /**\n * @param {string} placeholder\n */\n\n\n var _proto = Input.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n\t});\n\tthis.element.addEventListener('beforeinput', this._onBeforeInput);\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('input', this._onInput, {\n passive: true\n\t});\n\tthis.element.removeEventListener('beforeinput', this._onBeforeInput);\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.removeEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.blur = function blur() {\n if (this.isFocussed) {\n this.element.blur();\n }\n }\n /**\n * Set value of input to blank\n * @param {boolean} setWidth\n * @returns {this}\n */\n ;\n\n _proto.clear = function clear(setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n\n if (this.element.value) {\n this.element.value = '';\n }\n\n if (setWidth) {\n this.setWidth();\n }\n\n return this;\n }\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n ;\n\n _proto.setWidth = function setWidth() {\n // Resize input to contents or placeholder\n var _this$element = this.element,\n style = _this$element.style,\n value = _this$element.value,\n placeholder = _this$element.placeholder;\n style.minWidth = placeholder.length + 1 + \"ch\";\n style.width = value.length + 1 + \"ch\";\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n _proto._onInput = function _onInput() {\n if (this.type !== SELECT_ONE_TYPE) {\n this.setWidth();\n }\n }\n\n _proto._onBeforeInput = function _onBeforeInput() {\n function _onBeforeInput(event) {\n\t}\n }\n /**\n * @param {Event} event\n */\n ;\n\n _proto._onPaste = function _onPaste(event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n input_createClass(Input, [{\n key: \"placeholder\",\n set: function set(placeholder) {\n this.element.placeholder = placeholder;\n }\n /**\n * @returns {string}\n */\n\n }, {\n key: \"value\",\n get: function get() {\n return sanitise(this.element.value);\n }\n /**\n * @param {string} value\n */\n ,\n set: function set(value) {\n this.element.value = value;\n }\n }]);\n\n return Input;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/list.js\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar list_List =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{ element: HTMLElement }} args\n */\n function List(_ref) {\n var element = _ref.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n\n var _proto = List.prototype;\n\n _proto.clear = function clear() {\n this.element.innerHTML = '';\n }\n /**\n * @param {Element | DocumentFragment} node\n */\n ;\n\n _proto.append = function append(node) {\n this.element.appendChild(node);\n }\n /**\n * @param {string} selector\n * @returns {Element | null}\n */\n ;\n\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * @returns {boolean}\n */\n ;\n\n _proto.hasChildren = function hasChildren() {\n return this.element.hasChildNodes();\n };\n\n _proto.scrollToTop = function scrollToTop() {\n this.element.scrollTop = 0;\n }\n /**\n * @param {Element} element\n * @param {1 | -1} direction\n */\n ;\n\n _proto.scrollToChildElement = function scrollToChildElement(element, direction) {\n var _this = this;\n\n if (!element) {\n return;\n }\n\n var listHeight = this.element.offsetHeight; // Scroll position of dropdown\n\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight; // Distance from bottom of element to top of parent\n\n var elementPos = element.offsetTop + elementHeight; // Difference between the element and scroll position\n\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollDown = function _scrollDown(scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollUp = function _scrollUp(scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n }\n /**\n * @param {*} destination\n * @param {*} direction\n */\n ;\n\n _proto._animateScroll = function _animateScroll(destination, direction) {\n var _this2 = this;\n\n var strength = SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this2._animateScroll(destination, direction);\n });\n }\n };\n\n return List;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-element.js\nfunction wrapped_element_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_element_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_element_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_element_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar wrapped_element_WrappedElement =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement | HTMLSelectElement,\n * classNames: ClassNames,\n * }} args\n */\n function WrappedElement(_ref) {\n var element = _ref.element,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n\n this.isDisabled = false;\n }\n\n var _proto = WrappedElement.prototype;\n\n _proto.conceal = function conceal() {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true; // Remove element from tab index\n\n this.element.tabIndex = -1; // Backup original styles if any\n\n var origStyle = this.element.getAttribute('style');\n\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n\n this.element.setAttribute('data-choice', 'active');\n };\n\n _proto.reveal = function reveal() {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex'); // Recover original styles if any\n\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n\n this.element.removeAttribute('data-choice'); // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n\n _proto.triggerEvent = function triggerEvent(eventType, data) {\n dispatchEvent(this.element, eventType, data);\n };\n\n wrapped_element_createClass(WrappedElement, [{\n key: \"isActive\",\n get: function get() {\n return this.element.dataset.choice === 'active';\n }\n }, {\n key: \"dir\",\n get: function get() {\n return this.element.dir;\n }\n }, {\n key: \"value\",\n get: function get() {\n return this.element.value;\n },\n set: function set(value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n }\n }]);\n\n return WrappedElement;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-input.js\nfunction wrapped_input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_input_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_input_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_input_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar WrappedInput =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n _inheritsLoose(WrappedInput, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLInputElement,\n * classNames: ClassNames,\n * delimiter: string\n * }} args\n */\n function WrappedInput(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n delimiter = _ref.delimiter;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.delimiter = delimiter;\n return _this;\n }\n /**\n * @returns {string}\n */\n\n\n wrapped_input_createClass(WrappedInput, [{\n key: \"value\",\n get: function get() {\n return this.element.value;\n }\n /**\n * @param {Item[]} items\n */\n ,\n set: function set(items) {\n var itemValues = items.map(function (_ref2) {\n var value = _ref2.value;\n return value;\n });\n var joinedValues = itemValues.join(this.delimiter);\n this.element.setAttribute('value', joinedValues);\n this.element.value = joinedValues;\n }\n }]);\n\n return WrappedInput;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-select.js\nfunction wrapped_select_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_select_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_select_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_select_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction wrapped_select_inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar WrappedSelect =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n wrapped_select_inheritsLoose(WrappedSelect, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLSelectElement,\n * classNames: ClassNames,\n * delimiter: string\n * template: function\n * }} args\n */\n function WrappedSelect(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n template = _ref.template;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.template = template;\n return _this;\n }\n\n var _proto = WrappedSelect.prototype;\n\n /**\n * @param {DocumentFragment} fragment\n */\n _proto.appendDocFragment = function appendDocFragment(fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n\n wrapped_select_createClass(WrappedSelect, [{\n key: \"placeholderOption\",\n get: function get() {\n return this.element.querySelector('option[value=\"\"]') || // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n }\n /**\n * @returns {Element[]}\n */\n\n }, {\n key: \"optionGroups\",\n get: function get() {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n }\n /**\n * @returns {Item[] | Choice[]}\n */\n\n }, {\n key: \"options\",\n get: function get() {\n return Array.from(this.element.options);\n }\n /**\n * @param {Item[] | Choice[]} options\n */\n ,\n set: function set(options) {\n var _this2 = this;\n\n var fragment = document.createDocumentFragment();\n\n var addOptionToFragment = function addOptionToFragment(data) {\n // Create a standard select option\n var option = _this2.template(data); // Append it to fragment\n\n\n fragment.appendChild(option);\n }; // Add each list item to list\n\n\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n }\n }]);\n\n return WrappedSelect;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/index.js\n\n\n\n\n\n\n\n// CONCATENATED MODULE: ./src/scripts/templates.js\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n * @typedef {import('../../types/index').Choices.Templates} Templates\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Group} Group\n */\nvar TEMPLATES =\n/** @type {Templates} */\n{\n /**\n * @param {Partial} classNames\n * @param {\"ltr\" | \"rtl\" | \"auto\"} dir\n * @param {boolean} isSelectElement\n * @param {boolean} isSelectOneElement\n * @param {boolean} searchEnabled\n * @param {\"select-one\" | \"select-multiple\" | \"text\"} passedElementType\n */\n containerOuter: function containerOuter(_ref, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) {\n var _containerOuter = _ref.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: _containerOuter\n });\n div.dataset.type = passedElementType;\n\n if (dir) {\n div.dir = dir;\n }\n\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n * @param {Partial} classNames\n */\n containerInner: function containerInner(_ref2) {\n var _containerInner = _ref2.containerInner;\n return Object.assign(document.createElement('div'), {\n className: _containerInner\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {boolean} isSelectOneElement\n */\n itemList: function itemList(_ref3, isSelectOneElement) {\n var list = _ref3.list,\n listSingle = _ref3.listSingle,\n listItems = _ref3.listItems;\n return Object.assign(document.createElement('div'), {\n className: list + \" \" + (isSelectOneElement ? listSingle : listItems)\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {string} value\n */\n placeholder: function placeholder(_ref4, value) {\n var _placeholder = _ref4.placeholder;\n return Object.assign(document.createElement('div'), {\n className: _placeholder,\n innerHTML: value\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {Item} item\n * @param {boolean} removeItemButton\n */\n item: function item(_ref5, _ref6, removeItemButton) {\n var _item = _ref5.item,\n button = _ref5.button,\n highlightedState = _ref5.highlightedState,\n itemSelectable = _ref5.itemSelectable,\n placeholder = _ref5.placeholder;\n var id = _ref6.id,\n value = _ref6.value,\n label = _ref6.label,\n customProperties = _ref6.customProperties,\n active = _ref6.active,\n disabled = _ref6.disabled,\n highlighted = _ref6.highlighted,\n isPlaceholder = _ref6.placeholder;\n var div = Object.assign(document.createElement('div'), {\n className: _item,\n innerHTML: label\n });\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), {\n type: 'button',\n className: button,\n innerHTML: REMOVE_ITEM_TEXT\n });\n removeButton.setAttribute('aria-label', REMOVE_ITEM_TEXT + \": '\" + value + \"'\");\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {boolean} isSelectOneElement\n */\n choiceList: function choiceList(_ref7, isSelectOneElement) {\n var list = _ref7.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n\n div.setAttribute('role', 'listbox');\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {Group} group\n */\n choiceGroup: function choiceGroup(_ref8, _ref9) {\n var group = _ref8.group,\n groupHeading = _ref8.groupHeading,\n itemDisabled = _ref8.itemDisabled;\n var id = _ref9.id,\n value = _ref9.value,\n disabled = _ref9.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: group + \" \" + (disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n div.appendChild(Object.assign(document.createElement('div'), {\n className: groupHeading,\n innerHTML: value\n }));\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {Choice} choice\n * @param {Options['itemSelectText']} selectText\n */\n choice: function choice(_ref10, _ref11, selectText) {\n var item = _ref10.item,\n itemChoice = _ref10.itemChoice,\n itemSelectable = _ref10.itemSelectable,\n selectedState = _ref10.selectedState,\n itemDisabled = _ref10.itemDisabled,\n placeholder = _ref10.placeholder;\n var id = _ref11.id,\n value = _ref11.value,\n label = _ref11.label,\n groupId = _ref11.groupId,\n elementId = _ref11.elementId,\n isDisabled = _ref11.disabled,\n isSelected = _ref11.selected,\n isPlaceholder = _ref11.placeholder;\n var div = Object.assign(document.createElement('div'), {\n id: elementId,\n innerHTML: label,\n className: item + \" \" + itemChoice\n });\n\n if (isSelected) {\n div.classList.add(selectedState);\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.setAttribute('role', groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {string} placeholderValue\n */\n input: function input(_ref12, placeholderValue) {\n var _input = _ref12.input,\n inputCloned = _ref12.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n className: _input + \" \" + inputCloned,\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n\n /**\n * @param {Partial} classNames\n */\n dropdown: function dropdown(_ref13) {\n var list = _ref13.list,\n listDropdown = _ref13.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n *\n * @param {Partial} classNames\n * @param {string} innerHTML\n * @param {\"no-choices\" | \"no-results\" | \"\"} type\n */\n notice: function notice(_ref14, innerHTML, type) {\n var item = _ref14.item,\n itemChoice = _ref14.itemChoice,\n noResults = _ref14.noResults,\n noChoices = _ref14.noChoices;\n\n if (type === void 0) {\n type = '';\n }\n\n var classes = [item, itemChoice];\n\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n\n return Object.assign(document.createElement('div'), {\n innerHTML: innerHTML,\n className: classes.join(' ')\n });\n },\n\n /**\n * @param {Item} option\n */\n option: function option(_ref15) {\n var label = _ref15.label,\n value = _ref15.value,\n customProperties = _ref15.customProperties,\n active = _ref15.active,\n disabled = _ref15.disabled;\n var opt = new Option(label, value, false, active);\n\n if (customProperties) {\n opt.dataset.customProperties = customProperties;\n }\n\n opt.disabled = disabled;\n return opt;\n }\n};\n/* harmony default export */ var templates = (TEMPLATES);\n// CONCATENATED MODULE: ./src/scripts/actions/choices.js\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\n/**\n * @argument {Choice} choice\n * @returns {Action & Choice}\n */\n\nvar choices_addChoice = function addChoice(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n groupId = _ref.groupId,\n disabled = _ref.disabled,\n elementId = _ref.elementId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @argument {Choice[]} results\n * @returns {Action & { results: Choice[] }}\n */\n\nvar choices_filterChoices = function filterChoices(results) {\n return {\n type: ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\n/**\n * @argument {boolean} active\n * @returns {Action & { active: boolean }}\n */\n\nvar choices_activateChoices = function activateChoices(active) {\n if (active === void 0) {\n active = true;\n }\n\n return {\n type: ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\n/**\n * @returns {Action}\n */\n\nvar choices_clearChoices = function clearChoices() {\n return {\n type: ACTION_TYPES.CLEAR_CHOICES\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/items.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\n/**\n * @param {Item} item\n * @returns {Action & Item}\n */\n\nvar items_addItem = function addItem(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n choiceId = _ref.choiceId,\n groupId = _ref.groupId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @param {string} id\n * @param {string} choiceId\n * @returns {Action & { id: string, choiceId: string }}\n */\n\nvar items_removeItem = function removeItem(id, choiceId) {\n return {\n type: ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\n/**\n * @param {string} id\n * @param {boolean} highlighted\n * @returns {Action & { id: string, highlighted: boolean }}\n */\n\nvar items_highlightItem = function highlightItem(id, highlighted) {\n return {\n type: ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/groups.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Group} Group\n */\n\n/**\n * @param {Group} group\n * @returns {Action & Group}\n */\n\nvar groups_addGroup = function addGroup(_ref) {\n var value = _ref.value,\n id = _ref.id,\n active = _ref.active,\n disabled = _ref.disabled;\n return {\n type: ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/misc.js\n/**\n * @typedef {import('redux').Action} Action\n */\n\n/**\n * @returns {Action}\n */\nvar clearAll = function clearAll() {\n return {\n type: 'CLEAR_ALL'\n };\n};\n/**\n * @param {any} state\n * @returns {Action & { state: object }}\n */\n\nvar resetTo = function resetTo(state) {\n return {\n type: 'RESET_TO',\n state: state\n };\n};\n/**\n * @param {boolean} isLoading\n * @returns {Action & { isLoading: boolean }}\n */\n\nvar setIsLoading = function setIsLoading(isLoading) {\n return {\n type: 'SET_IS_LOADING',\n isLoading: isLoading\n };\n};\n// CONCATENATED MODULE: ./src/scripts/choices.js\nfunction choices_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction choices_createClass(Constructor, protoProps, staticProps) { if (protoProps) choices_defineProperties(Constructor.prototype, protoProps); if (staticProps) choices_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n\n\n\n\n\n\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\n\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\n/**\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Group} Group\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {Partial} */\n\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson\n */\n\nvar choices_Choices =\n/*#__PURE__*/\nfunction () {\n choices_createClass(Choices, null, [{\n key: \"defaults\",\n get: function get() {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n\n get templates() {\n return TEMPLATES;\n }\n\n });\n }\n /**\n * @param {string | HTMLInputElement | HTMLSelectElement} element\n * @param {Partial} userConfig\n */\n\n }]);\n\n function Choices(element, userConfig) {\n var _this = this;\n\n if (element === void 0) {\n element = '[data-choice]';\n }\n\n if (userConfig === void 0) {\n userConfig = {};\n }\n\n /** @type {Partial} */\n this.config = cjs_default.a.all([DEFAULT_CONFIG, Choices.defaults.options, userConfig], // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function arrayMerge(_, sourceArray) {\n return [].concat(sourceArray);\n }\n });\n var invalidConfigOptions = diff(this.config, DEFAULT_CONFIG);\n\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n\n this._isTextElement = passedElement.type === TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n\n if (!['auto', 'always'].includes(this.config.renderSelectedChoices)) {\n this.config.renderSelectedChoices = 'auto';\n }\n\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n\n if (this._isTextElement) {\n this.passedElement = new WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function template(data) {\n return _this._templates.option(data);\n }\n });\n }\n\n this.initialised = false;\n this._store = new store_Store();\n this._initialState = {};\n this._currentState = {};\n this._prevState = {};\n this._currentValue = '';\n this._canSearch = this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = generateId(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n * @type {HTMLElement['dir']}\n */\n\n this._direction = this.passedElement.dir;\n\n if (!this._direction) {\n var _window$getComputedSt = window.getComputedStyle(this.passedElement.element),\n elementDirection = _window$getComputedSt.direction;\n\n var _window$getComputedSt2 = window.getComputedStyle(document.documentElement),\n documentDirection = _window$getComputedSt2.direction;\n\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n\n this._idNames = {\n itemChoice: 'item-choice'\n }; // Assign preset groups from passed element\n\n this._presetGroups = this.passedElement.optionGroups; // Assign preset options from passed element\n\n this._presetOptions = this.passedElement.options; // Assign preset choices from passed object\n\n this._presetChoices = this.config.choices; // Assign preset items from passed object first\n\n this._presetItems = this.config.items; // Add any values passed from attribute\n\n if (this.passedElement.value) {\n this._presetItems = this._presetItems.concat(this.passedElement.value.split(this.config.delimiter));\n } // Create array of choices from option elements\n\n\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (o) {\n _this._presetChoices.push({\n value: o.value,\n label: o.innerHTML,\n selected: o.selected,\n disabled: o.disabled || o.parentNode.disabled,\n placeholder: o.value === '' || o.hasAttribute('placeholder'),\n customProperties: o.getAttribute('data-custom-properties')\n });\n });\n }\n\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onAKey = this._onAKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this); // If element has already been initialised with Choices, fail silently\n\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised');\n }\n\n this.initialised = true;\n return;\n } // Let's go\n\n\n this.init();\n }\n\n var _proto = Choices.prototype;\n\n _proto.init = function init() {\n if (this.initialised) {\n return;\n }\n\n this._createTemplates();\n\n this._createElements();\n\n this._createStructure(); // Set initial state (We need to clone the state because some reducers\n // modify the inner objects properties in the state) 🤢\n\n\n this._initialState = cloneObject(this._store.state);\n\n this._store.subscribe(this._render);\n\n this._render();\n\n this._addEventListeners();\n\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n\n if (shouldDisable) {\n this.disable();\n }\n\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit; // Run callback if it is a function\n\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n\n _proto.destroy = function destroy() {\n if (!this.initialised) {\n return;\n }\n\n this._removeEventListeners();\n\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n\n this._templates = null;\n this.initialised = false;\n };\n\n _proto.enable = function enable() {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n\n this.input.enable();\n this.containerOuter.enable();\n }\n\n return this;\n };\n\n _proto.disable = function disable() {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n\n this.input.disable();\n this.containerOuter.disable();\n }\n\n return this;\n };\n\n _proto.highlightItem = function highlightItem(item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId = item.groupId,\n groupId = _item$groupId === void 0 ? -1 : _item$groupId,\n _item$value = item.value,\n value = _item$value === void 0 ? '' : _item$value,\n _item$label = item.label,\n label = _item$label === void 0 ? '' : _item$label;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, true));\n\n if (runEvent) {\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n\n return this;\n };\n\n _proto.unhighlightItem = function unhighlightItem(item) {\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId2 = item.groupId,\n groupId = _item$groupId2 === void 0 ? -1 : _item$groupId2,\n _item$value2 = item.value,\n value = _item$value2 === void 0 ? '' : _item$value2,\n _item$label2 = item.label,\n label = _item$label2 === void 0 ? '' : _item$label2;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, false));\n\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n\n _proto.highlightAll = function highlightAll() {\n var _this2 = this;\n\n this._store.items.forEach(function (item) {\n return _this2.highlightItem(item);\n });\n\n return this;\n };\n\n _proto.unhighlightAll = function unhighlightAll() {\n var _this3 = this;\n\n this._store.items.forEach(function (item) {\n return _this3.unhighlightItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItemsByValue = function removeActiveItemsByValue(value) {\n var _this4 = this;\n\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this4._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItems = function removeActiveItems(excludedId) {\n var _this5 = this;\n\n this._store.activeItems.filter(function (_ref) {\n var id = _ref.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this5._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeHighlightedItems = function removeHighlightedItems(runEvent) {\n var _this6 = this;\n\n if (runEvent === void 0) {\n runEvent = false;\n }\n\n this._store.highlightedActiveItems.forEach(function (item) {\n _this6._removeItem(item); // If this action was performed by the user\n // trigger the event\n\n\n if (runEvent) {\n _this6._triggerChange(item.value);\n }\n });\n\n return this;\n };\n\n _proto.showDropdown = function showDropdown(preventInputFocus) {\n var _this7 = this;\n\n if (this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this7.dropdown.show();\n\n _this7.containerOuter.open(_this7.dropdown.distanceFromTopWindow);\n\n if (!preventInputFocus && _this7._canSearch) {\n _this7.input.focus();\n }\n\n _this7.passedElement.triggerEvent(EVENTS.showDropdown, {});\n });\n return this;\n };\n\n _proto.hideDropdown = function hideDropdown(preventInputBlur) {\n var _this8 = this;\n\n if (!this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this8.dropdown.hide();\n\n _this8.containerOuter.close();\n\n if (!preventInputBlur && _this8._canSearch) {\n _this8.input.removeActiveDescendant();\n\n _this8.input.blur();\n }\n\n _this8.passedElement.triggerEvent(EVENTS.hideDropdown, {});\n });\n return this;\n };\n\n _proto.getValue = function getValue(valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n\n return this._isSelectOneElement ? values[0] : values;\n }\n /**\n * @param {string[] | import('../../types/index').Choices.Item[]} items\n */\n ;\n\n _proto.setValue = function setValue(items) {\n var _this9 = this;\n\n if (!this.initialised) {\n return this;\n }\n\n items.forEach(function (value) {\n return _this9._setChoiceOrItem(value);\n });\n return this;\n };\n\n _proto.setChoiceByValue = function setChoiceByValue(value) {\n var _this10 = this;\n\n if (!this.initialised || this._isTextElement) {\n return this;\n } // If only one value has been passed, convert to array\n\n\n var choiceValue = Array.isArray(value) ? value : [value]; // Loop through each value and\n\n choiceValue.forEach(function (val) {\n return _this10._findAndSelectChoiceByValue(val);\n });\n return this;\n }\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @template {Choice[] | ((instance: Choices) => object[] | Promise)} T\n * @param {T} [choicesArrayOrFetcher]\n * @param {string} [value = 'value'] - name of `value` field\n * @param {string} [label = 'label'] - name of 'label' field\n * @param {boolean} [replaceChoices = false] - whether to replace of add choices\n * @returns {this | Promise}\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n ;\n\n _proto.setChoices = function setChoices(choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this11 = this;\n\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n\n if (value === void 0) {\n value = 'value';\n }\n\n if (label === void 0) {\n label = 'label';\n }\n\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n } // Clear choices if needed\n\n\n if (replaceChoices) {\n this.clearChoices();\n }\n\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher = choicesArrayOrFetcher(this);\n\n if (typeof Promise === 'function' && fetcher instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line compat/compat\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this11._handleLoadingState(true);\n }).then(function () {\n return fetcher;\n }).then(function (data) {\n return _this11.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this11.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this11._handleLoadingState(false);\n }).then(function () {\n return _this11;\n });\n } // function returned something else than promise, let's check if it's an array of choices\n\n\n if (!Array.isArray(fetcher)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \" + typeof fetcher);\n } // recursion with results, it's sync and choices were cleared already\n\n\n return this.setChoices(fetcher, value, label, false);\n }\n\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n\n this.containerOuter.removeLoadingState();\n\n this._startLoading();\n\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this11._addGroup({\n id: parseInt(groupOrChoice.id, 10) || null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n _this11._addChoice({\n value: groupOrChoice[value],\n label: groupOrChoice[label],\n isSelected: groupOrChoice.selected,\n isDisabled: groupOrChoice.disabled,\n customProperties: groupOrChoice.customProperties,\n placeholder: groupOrChoice.placeholder\n });\n }\n });\n\n this._stopLoading();\n\n return this;\n };\n\n _proto.clearChoices = function clearChoices() {\n this._store.dispatch(choices_clearChoices());\n\n return this;\n };\n\n _proto.clearStore = function clearStore() {\n this._store.dispatch(clearAll());\n\n return this;\n };\n\n _proto.clearInput = function clearInput() {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n\n return this;\n };\n\n _proto._render = function _render() {\n if (this._store.isLoading()) {\n return;\n }\n\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n\n if (!stateChanged) {\n return;\n }\n\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n\n if (shouldRenderItems) {\n this._renderItems();\n }\n\n this._prevState = this._currentState;\n };\n\n _proto._renderChoices = function _renderChoices() {\n var _this12 = this;\n\n var _this$_store = this._store,\n activeGroups = _this$_store.activeGroups,\n activeChoices = _this$_store.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this12.choiceList.scrollToTop();\n });\n } // If we have grouped options\n\n\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n } // If we have choices to show\n\n\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, this.input.value); // ...and we can select them\n\n\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n\n // do not highlight choice in dropdown untill it's selected manually\n \t//this._highlightChoice();\n } else {\n // ...otherwise show a notice\n this.choiceList.append(this._getTemplate('notice', canAddItem.notice));\n }\n } else {\n // Otherwise show a notice\n var dropdownItem;\n var notice;\n\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n\n this.choiceList.append(dropdownItem);\n }\n };\n\n _proto._renderItems = function _renderItems() {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear(); // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n\n var itemListFragment = this._createItemsFragment(activeItems); // If we have items to add, append them\n\n\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n\n _proto._createGroupsFragment = function _createGroupsFragment(groups, choices, fragment) {\n var _this13 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n var getGroupChoices = function getGroupChoices(group) {\n return choices.filter(function (choice) {\n if (_this13._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n\n return choice.groupId === group.id && (_this13.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n }; // If sorting is enabled, filter groups\n\n\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this13._getTemplate('choiceGroup', group);\n\n fragment.appendChild(dropdownGroup);\n\n _this13._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n\n _proto._createChoicesFragment = function _createChoicesFragment(choices, fragment, withinGroup) {\n var _this14 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n if (withinGroup === void 0) {\n withinGroup = false;\n }\n\n // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n var _this$config = this.config,\n renderSelectedChoices = _this$config.renderSelectedChoices,\n searchResultLimit = _this$config.searchResultLimit,\n renderChoiceLimit = _this$config.renderChoiceLimit;\n var filter = this._isSearching ? sortByScore : this.config.sorter;\n\n var appendChoice = function appendChoice(choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this14._isSelectOneElement || !choice.selected : true;\n\n if (shouldRender) {\n var dropdownItem = _this14._getTemplate('choice', choice, _this14.config.itemSelectText);\n\n fragment.appendChild(dropdownItem);\n }\n };\n\n var rendererableChoices = choices;\n\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n } // Split array into placeholders and \"normal\" choices\n\n\n var _rendererableChoices$ = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _rendererableChoices$.placeholderChoices,\n normalChoices = _rendererableChoices$.normalChoices; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n\n var choiceLimit = rendererableChoices.length; // Prepend placeholeder\n\n var sortedChoices = this._isSelectOneElement ? [].concat(placeholderChoices, normalChoices) : normalChoices;\n\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n } // Add each choice to dropdown within range\n\n\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n\n return fragment;\n };\n\n _proto._createItemsFragment = function _createItemsFragment(items, fragment) {\n var _this15 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n // Create fragment to add elements to\n var _this$config2 = this.config,\n shouldSortItems = _this$config2.shouldSortItems,\n sorter = _this$config2.sorter,\n removeItemButton = _this$config2.removeItemButton; // If sorting is enabled, filter items\n\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items;\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n\n var addItemToFragment = function addItemToFragment(item) {\n // Create new list element\n var listItem = _this15._getTemplate('item', item, removeItemButton); // Append it to list\n\n\n fragment.appendChild(listItem);\n }; // Add each list item to list\n\n\n items.forEach(addItemToFragment);\n return fragment;\n };\n\n _proto._triggerChange = function _triggerChange(value) {\n if (value === undefined || value === null) {\n return;\n }\n\n this.passedElement.triggerEvent(EVENTS.change, {\n value: value\n });\n };\n\n _proto._selectPlaceholderChoice = function _selectPlaceholderChoice() {\n var placeholderChoice = this._store.placeholderChoice;\n\n if (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n\n this._triggerChange(placeholderChoice.value);\n }\n };\n\n _proto._handleButtonAction = function _handleButtonAction(activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n var itemId = element.parentNode.getAttribute('data-id');\n var itemToRemove = activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n }); // Remove item associated with button\n\n this._removeItem(itemToRemove);\n\n this._triggerChange(itemToRemove.value);\n\n if (this._isSelectOneElement) {\n this._selectPlaceholderChoice();\n }\n };\n\n _proto._handleItemAction = function _handleItemAction(activeItems, element, hasShiftKey) {\n var _this16 = this;\n\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n\n var passedId = element.getAttribute('data-id'); // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n\n activeItems.forEach(function (item) {\n if (item.id === parseInt(passedId, 10) && !item.highlighted) {\n _this16.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this16.unhighlightItem(item);\n }\n }); // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n\n this.input.focus();\n };\n\n _proto._handleChoiceAction = function _handleChoiceAction(activeItems, element) {\n if (!activeItems || !element) {\n return;\n } // If we are clicking on an option\n\n\n var id = element.dataset.id;\n\n var choice = this._store.getChoiceById(id);\n\n if (!choice) {\n return;\n }\n\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : null;\n var hasActiveDropdown = this.dropdown.isActive; // Update choice keyCode\n\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(EVENTS.choice, {\n choice: choice\n });\n\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n\n this._triggerChange(choice.value);\n }\n }\n\n this.clearInput(); // We want to close the dropdown if we are dealing with a single select box\n\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._handleBackspace = function _handleBackspace(activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n }); // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n\n this._removeItem(lastItem);\n\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n\n this.removeHighlightedItems(true);\n }\n };\n\n _proto._startLoading = function _startLoading() {\n this._store.dispatch(setIsLoading(true));\n };\n\n _proto._stopLoading = function _stopLoading() {\n this._store.dispatch(setIsLoading(false));\n };\n\n _proto._handleLoadingState = function _handleLoadingState(setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n\n var placeholderItem = this.itemList.getChild(\".\" + this.config.classNames.placeholder);\n\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n this.itemList.append(placeholderItem);\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n\n if (this._isSelectOneElement) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n\n _proto._handleSearch = function _handleSearch(value) {\n if (!value || !this.input.isFocussed) {\n return;\n }\n\n var choices = this._store.choices;\n var _this$config3 = this.config,\n searchFloor = _this$config3.searchFloor,\n searchChoices = _this$config3.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n }); // Check that we have a value to search and the input was an alphanumeric character\n\n if (value && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event\n\n this.passedElement.triggerEvent(EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n };\n\n _proto._canAddItem = function _canAddItem(activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n\n if (!this._isSelectOneElement) {\n var isDuplicateValue = existsInArray(activeItems, value);\n\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n\n return {\n response: canAddItem,\n notice: notice\n };\n };\n\n _proto._searchChoices = function _searchChoices(value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n\n if (newValue.length < 1 && newValue === currentValue + \" \") {\n return 0;\n } // If new value matches the desired length and is not the same as the current value with a space\n\n\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n var keys = [].concat(this.config.searchFields);\n var options = Object.assign(this.config.fuseOptions, {\n keys: keys\n });\n var fuse = new fuse_default.a(haystack, options);\n var results = fuse.search(needle);\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n\n this._store.dispatch(choices_filterChoices(results));\n\n return results.length;\n };\n\n _proto._addEventListeners = function _addEventListeners() {\n var _document = document,\n documentElement = _document.documentElement; // capture events - can cancel event processing or propagation\n\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true); // passive events - doesn't call `preventDefault` or `stopPropagation`\n\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n\n this.input.addEventListeners();\n };\n\n _proto._removeEventListeners = function _removeEventListeners() {\n var _document2 = document,\n documentElement = _document2.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n\n this.input.removeEventListeners();\n }\n /**\n * @param {KeyboardEvent} event\n */\n ;\n\n _proto._onKeyDown = function _onKeyDown(event) {\n var _keyDownActions;\n\n var target = event.target,\n keyCode = event.keyCode,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n var BACK_KEY = KEY_CODES.BACK_KEY,\n DELETE_KEY = KEY_CODES.DELETE_KEY,\n\t\tENTER_KEY = KEY_CODES.ENTER_KEY,\n\t\t//SPACE_KEY = KEY_CODES.SPACE_KEY,\n\t\tTAB_KEY = KEY_CODES.TAB_KEY,\n A_KEY = KEY_CODES.A_KEY,\n ESC_KEY = KEY_CODES.ESC_KEY,\n UP_KEY = KEY_CODES.UP_KEY,\n DOWN_KEY = KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If a user is typing and the dropdown is not active\n\n if (!this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {\n this.showDropdown();\n } // Map keys to key actions\n\n\n\tvar keyDownActions = (_keyDownActions = {}\n\t\t, _keyDownActions[A_KEY] = this._onAKey\n\t\t, _keyDownActions[ENTER_KEY] = this._onEnterKey\n\t\t//, _keyDownActions[SPACE_KEY] = this._onEnterKey\n\t\t, _keyDownActions[TAB_KEY] = this._onEnterKey\n\t\t, _keyDownActions[ESC_KEY] = this._onEscapeKey\n\t\t, _keyDownActions[UP_KEY] = this._onDirectionKey\n\t\t, _keyDownActions[PAGE_UP_KEY] = this._onDirectionKey\n\t\t, _keyDownActions[DOWN_KEY] = this._onDirectionKey\n\t\t, _keyDownActions[PAGE_DOWN_KEY] = this._onDirectionKey\n\t\t, _keyDownActions[DELETE_KEY] = this._onDeleteKey\n\t\t, _keyDownActions[BACK_KEY] = this._onDeleteKey\n\t\t, _keyDownActions); // If keycode has a function, run it\n\n if (keyDownActions[keyCode]) {\n keyDownActions[keyCode]({\n event: event,\n target: target,\n keyCode: keyCode,\n metaKey: metaKey,\n activeItems: activeItems,\n hasFocusedInput: hasFocusedInput,\n hasActiveDropdown: hasActiveDropdown,\n hasItems: hasItems,\n hasCtrlDownKeyPressed: hasCtrlDownKeyPressed\n });\n }\n };\n\n _proto._onKeyUp = function _onKeyUp(_ref2) {\n var target = _ref2.target,\n\t\tkeyCode = _ref2.keyCode,\n\t\thasActiveDropdown = _ref2.hasActiveDropdown;\n\n\t//if SPACE key is entered\n\t// equals to 1 if last character is space \" \"\n\tvar value = this.input.value;\n\tvar value_trimmed = value.replace(/\\s+/g, '');\n\n var activeItems = this._store.activeItems;\n\n\tvar canAddItem = this._canAddItem(activeItems, value);\n\t\n\tthis.showDropdown(true);\n\n\tvar lastSpaceFound = value.length - value.lastIndexOf(' ');\n\n\tif (lastSpaceFound == 1 && value_trimmed != \"\") {\n\t\tif (canAddItem.response === true) {\n\t\t\tthis.hideDropdown(true);\n\t\t\tthis._addItem({ value: value_trimmed });\n\t\t\tthis._triggerChange(value_trimmed);\n\t\t\tthis.clearInput();\n\t\t} else {\n\t\t\tthis.input.value = value_trimmed;\n\n\t\t\t// if we have some message to show\n\t\t\tif (canAddItem.notice) {\n\t\t\t\tvar dropdownItem = this._getTemplate('notice', canAddItem.notice);\n\t\t\t\tthis.dropdown.element.innerHTML = dropdownItem.outerHTML;\n\n\t\t\t\tthis.showDropdown(true);\n\t\t\t} else {\n\t\t\t this.hideDropdown(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasActiveDropdown) {\n\t\tvar highlighted = this.dropdown.getChild('.' + this.config.classNames.highlightedState);\n\n\t\t// If we have a highlighted choice\n\t\tif (highlighted) {\n\t\t\t// add enter keyCode value\n\t\t\tif (activeItems[0]) {\n\t\t\t\tactiveItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t\tthis._handleChoiceAction(activeItems, highlighted);\n\t\t}\n\n\t\tevent.preventDefault();\n\t} else if (this._isSelectOneElement) {\n\t\t// Open single select dropdown if it's not active\n\t\tthis.showDropdown();\n\t\tevent.preventDefault();\n\t}\n\n var backKey = KEY_CODES.BACK_KEY,\n deleteKey = KEY_CODES.DELETE_KEY; // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n\n {\n var userHasRemovedValue = (keyCode === backKey || keyCode === deleteKey) && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n } else if (canSearch) {\n this._handleSearch(this.input.value);\n\t }\n\t \n\t this.showDropdown();\n }\n\n\tthis._canSearch = this.config.searchEnabled;\n\tthis.showDropdown();\n };\n\n _proto._onAKey = function _onAKey(_ref3) {\n var hasItems = _ref3.hasItems,\n hasCtrlDownKeyPressed = _ref3.hasCtrlDownKeyPressed;\n\n // If CTRL + A or CMD + A have been pressed and there are items to select\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n\n _proto._onEnterKey = function _onEnterKey(_ref4) {\n var event = _ref4.event,\n target = _ref4.target,\n activeItems = _ref4.activeItems,\n hasActiveDropdown = _ref4.hasActiveDropdown;\n var enterKey = KEY_CODES.ENTER_KEY;\n var targetWasButton = target.hasAttribute('data-button');\n\n if (this._isTextElement && target.value) {\n var value = this.input.value;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n if (canAddItem.response) {\n this.hideDropdown(true);\n\n this._addItem({\n value: value\n });\n\n this._triggerChange(value);\n\n this.clearInput();\n }\n }\n\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n\n event.preventDefault();\n }\n\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\" + this.config.classNames.highlightedState);\n\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n\n _proto._onEscapeKey = function _onEscapeKey(_ref5) {\n var hasActiveDropdown = _ref5.hasActiveDropdown;\n\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._onDirectionKey = function _onDirectionKey(_ref6) {\n var event = _ref6.event,\n hasActiveDropdown = _ref6.hasActiveDropdown,\n keyCode = _ref6.keyCode,\n metaKey = _ref6.metaKey;\n var downKey = KEY_CODES.DOWN_KEY,\n pageUpKey = KEY_CODES.PAGE_UP_KEY,\n pageDownKey = KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options\n\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl;\n\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier + \":last-of-type\");\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\" + this.config.classNames.highlightedState);\n\n if (currentEl) {\n nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!isScrolledIntoView(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n\n this._highlightChoice(nextEl);\n } // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n\n\n event.preventDefault();\n }\n };\n\n _proto._onDeleteKey = function _onDeleteKey(_ref7) {\n var event = _ref7.event,\n target = _ref7.target,\n hasFocusedInput = _ref7.hasFocusedInput,\n activeItems = _ref7.activeItems;\n\n // If backspace or delete key is pressed and the input has no value\n if (hasFocusedInput && !target.value && !this._isSelectOneElement) {\n this._handleBackspace(activeItems);\n\n event.preventDefault();\n }\n };\n\n _proto._onTouchMove = function _onTouchMove() {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n\n _proto._onTouchEnd = function _onTouchEnd(event) {\n var _ref8 = event || event.touches[0],\n target = _ref8.target;\n\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n } // Prevents focus event firing\n\n\n event.stopPropagation();\n }\n\n this._wasTap = true;\n }\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseDown = function _onMouseDown(event) {\n var target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n } // If we have our mouse down on the scrollbar and are on IE11...\n\n\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice =\n /** @type {HTMLElement} */\n this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n\n if (target === this.input.element) {\n return;\n }\n\n var item = target.closest('[data-button],[data-item],[data-choice]');\n\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n\n event.preventDefault();\n }\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseOver = function _onMouseOver(_ref9) {\n var target = _ref9.target;\n\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n\n _proto._onClick = function _onClick(_ref10) {\n var target = _ref10.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n\n _proto._onFocus = function _onFocus(_ref11) {\n var _this17 = this,\n _focusActions;\n\n var target = _ref11.target;\n var focusWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (!focusWasWithinContainer) {\n return;\n }\n\n var focusActions = (_focusActions = {}, _focusActions[TEXT_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions[SELECT_ONE_TYPE] = function () {\n _this17.containerOuter.addFocusState();\n\n if (target === _this17.input.element) {\n _this17.showDropdown(true);\n }\n }, _focusActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.showDropdown(true); // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n\n\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions);\n focusActions[this.passedElement.element.type]();\n };\n\n _proto._onBlur = function _onBlur(_ref12) {\n var _this18 = this;\n\n var target = _ref12.target;\n var blurWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var _blurActions;\n\n var activeItems = this._store.activeItems;\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_blurActions = {}, _blurActions[TEXT_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_ONE_TYPE] = function () {\n _this18.containerOuter.removeFocusState();\n\n if (target === _this18.input.element || target === _this18.containerOuter.element && !_this18._canSearch) {\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n _this18.hideDropdown(true);\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n }\n }, _blurActions);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n\n _proto._onFormReset = function _onFormReset() {\n this._store.dispatch(resetTo(this._initialState));\n };\n\n _proto._highlightChoice = function _highlightChoice(el) {\n var _this19 = this;\n\n if (el === void 0) {\n el = null;\n }\n\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n\n if (!choices.length) {\n return;\n }\n\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\" + this.config.classNames.highlightedState)); // Remove any highlighted choices\n\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this19.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(EVENTS.highlightChoice, {\n el: passedEl\n });\n\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n\n _proto._addItem = function _addItem(_ref13) {\n var value = _ref13.value,\n _ref13$label = _ref13.label,\n label = _ref13$label === void 0 ? null : _ref13$label,\n _ref13$choiceId = _ref13.choiceId,\n choiceId = _ref13$choiceId === void 0 ? -1 : _ref13$choiceId,\n _ref13$groupId = _ref13.groupId,\n groupId = _ref13$groupId === void 0 ? -1 : _ref13$groupId,\n _ref13$customProperti = _ref13.customProperties,\n customProperties = _ref13$customProperti === void 0 ? null : _ref13$customProperti,\n _ref13$placeholder = _ref13.placeholder,\n placeholder = _ref13$placeholder === void 0 ? false : _ref13$placeholder,\n _ref13$keyCode = _ref13.keyCode,\n keyCode = _ref13$keyCode === void 0 ? null : _ref13$keyCode;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var passedKeyCode = keyCode;\n var passedCustomProperties = customProperties;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it\n\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n } // If an appended value has been passed, append it\n\n\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n\n this._store.dispatch(items_addItem({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: passedKeyCode\n }));\n\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n } // Trigger change event\n\n\n this.passedElement.triggerEvent(EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: passedCustomProperties,\n groupValue: group && group.value ? group.value : undefined,\n keyCode: passedKeyCode\n });\n return this;\n };\n\n _proto._removeItem = function _removeItem(item) {\n if (!item || !isType('Object', item)) {\n return this;\n }\n\n var id = item.id,\n value = item.value,\n label = item.label,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_removeItem(id, choiceId));\n\n if (group && group.value) {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group.value\n });\n } else {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label\n });\n }\n\n return this;\n };\n\n _proto._addChoice = function _addChoice(_ref14) {\n var value = _ref14.value,\n _ref14$label = _ref14.label,\n label = _ref14$label === void 0 ? null : _ref14$label,\n _ref14$isSelected = _ref14.isSelected,\n isSelected = _ref14$isSelected === void 0 ? false : _ref14$isSelected,\n _ref14$isDisabled = _ref14.isDisabled,\n isDisabled = _ref14$isDisabled === void 0 ? false : _ref14$isDisabled,\n _ref14$groupId = _ref14.groupId,\n groupId = _ref14$groupId === void 0 ? -1 : _ref14$groupId,\n _ref14$customProperti = _ref14.customProperties,\n customProperties = _ref14$customProperti === void 0 ? null : _ref14$customProperti,\n _ref14$placeholder = _ref14.placeholder,\n placeholder = _ref14$placeholder === void 0 ? false : _ref14$placeholder,\n _ref14$keyCode = _ref14.keyCode,\n keyCode = _ref14$keyCode === void 0 ? null : _ref14$keyCode;\n\n if (typeof value === 'undefined' || value === null) {\n return;\n } // Generate unique id\n\n\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = this._baseId + \"-\" + this._idNames.itemChoice + \"-\" + choiceId;\n\n this._store.dispatch(choices_addChoice({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n\n _proto._addGroup = function _addGroup(_ref15) {\n var _this20 = this;\n\n var group = _ref15.group,\n id = _ref15.id,\n _ref15$valueKey = _ref15.valueKey,\n valueKey = _ref15$valueKey === void 0 ? 'value' : _ref15$valueKey,\n _ref15$labelKey = _ref15.labelKey,\n labelKey = _ref15$labelKey === void 0 ? 'label' : _ref15$labelKey;\n var groupChoices = isType('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n\n if (groupChoices) {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n\n var addGroupChoices = function addGroupChoices(choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n\n _this20._addChoice({\n value: choice[valueKey],\n label: isType('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n\n _proto._getTemplate = function _getTemplate(template) {\n var _this$_templates$temp;\n\n if (!template) {\n return null;\n }\n\n var classNames = this.config.classNames;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return (_this$_templates$temp = this._templates[template]).call.apply(_this$_templates$temp, [this, classNames].concat(args));\n };\n\n _proto._createTemplates = function _createTemplates() {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, strToEl);\n }\n\n this._templates = cjs_default()(TEMPLATES, userTemplates);\n };\n\n _proto._createElements = function _createElements() {\n this.containerOuter = new container_Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new container_Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new input_Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new list_List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new list_List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n\n _proto._createStructure = function _createStructure() {\n // Hide original element\n this.passedElement.conceal(); // Wrap input in container preserving DOM ordering\n\n this.containerInner.wrap(this.passedElement.element); // Wrapper inner container with outer container\n\n this.containerOuter.wrap(this.containerInner.element);\n\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n\n this._startLoading();\n\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n\n this._stopLoading();\n }\n\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n\n _proto._addPredefinedGroups = function _addPredefinedGroups(groups) {\n var _this21 = this;\n\n // If we have a placeholder option\n var placeholderChoice = this.passedElement.placeholderOption;\n\n if (placeholderChoice && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n\n groups.forEach(function (group) {\n return _this21._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n\n _proto._addPredefinedChoices = function _addPredefinedChoices(choices) {\n var _this22 = this;\n\n // If sorting is enabled or the user is searching, filter choices\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var value = choice.value,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n\n if (_this22._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this22._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this22._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: isSelected,\n isDisabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n } else {\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: choice.selected,\n isDisabled: choice.disabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n });\n }\n /**\n * @param {Item[]} items\n */\n ;\n\n _proto._addPredefinedItems = function _addPredefinedItems(items) {\n var _this23 = this;\n\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this23._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n\n if (typeof item === 'string') {\n _this23._addItem({\n value: item\n });\n }\n });\n };\n\n _proto._setChoiceOrItem = function _setChoiceOrItem(item) {\n var _this24 = this;\n\n var itemType = getType(item).toLowerCase();\n var handleType = {\n object: function object() {\n if (!item.value) {\n return;\n } // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n\n\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this24._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function string() {\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this24._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n\n _proto._findAndSelectChoiceByValue = function _findAndSelectChoiceByValue(val) {\n var _this25 = this;\n\n var choices = this._store.choices; // Check 'value' property exists and the choice isn't already selected\n\n var foundChoice = choices.find(function (choice) {\n return _this25.config.valueComparer(choice.value, val);\n });\n\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n\n _proto._generatePlaceholderValue = function _generatePlaceholderValue() {\n if (this._isSelectElement) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : false;\n }\n\n var _this$config4 = this.config,\n placeholder = _this$config4.placeholder,\n placeholderValue = _this$config4.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return false;\n };\n\n return Choices;\n}();\n\n/* harmony default export */ var scripts_choices = __webpack_exports__[\"default\"] = (choices_Choices);\n\n/***/ })\n/******/ ])[\"default\"];\n});","var map = {\n\t\"./al.js\": [\n\t\t3499,\n\t\t736\n\t],\n\t\"./ar.js\": [\n\t\t9468,\n\t\t736\n\t],\n\t\"./bg.js\": [\n\t\t5063,\n\t\t736\n\t],\n\t\"./ca.js\": [\n\t\t3647,\n\t\t736\n\t],\n\t\"./cs.extra.js\": [\n\t\t872,\n\t\t736\n\t],\n\t\"./cs.js\": [\n\t\t2303,\n\t\t736\n\t],\n\t\"./da.js\": [\n\t\t2834,\n\t\t736\n\t],\n\t\"./de.extra.js\": [\n\t\t5587,\n\t\t736\n\t],\n\t\"./de.js\": [\n\t\t4298,\n\t\t736\n\t],\n\t\"./el.extra.js\": [\n\t\t1175,\n\t\t736\n\t],\n\t\"./el.js\": [\n\t\t8151,\n\t\t736\n\t],\n\t\"./en.extra.js\": [\n\t\t161,\n\t\t736\n\t],\n\t\"./en.js\": [\n\t\t5685,\n\t\t736\n\t],\n\t\"./es.js\": [\n\t\t3748,\n\t\t736\n\t],\n\t\"./et.js\": [\n\t\t7296,\n\t\t736\n\t],\n\t\"./eu.js\": [\n\t\t300,\n\t\t736\n\t],\n\t\"./fa.js\": [\n\t\t9045,\n\t\t736\n\t],\n\t\"./fi.extra.js\": [\n\t\t7405,\n\t\t736\n\t],\n\t\"./fi.js\": [\n\t\t4699,\n\t\t736\n\t],\n\t\"./fr.extra.js\": [\n\t\t4862,\n\t\t736\n\t],\n\t\"./fr.js\": [\n\t\t6701,\n\t\t736\n\t],\n\t\"./he.extra.js\": [\n\t\t7965,\n\t\t736\n\t],\n\t\"./he.js\": [\n\t\t6591,\n\t\t736\n\t],\n\t\"./hr.extra.js\": [\n\t\t9655,\n\t\t736\n\t],\n\t\"./hr.js\": [\n\t\t8569,\n\t\t736\n\t],\n\t\"./hu.extra.js\": [\n\t\t8198,\n\t\t736\n\t],\n\t\"./hu.js\": [\n\t\t9056,\n\t\t736\n\t],\n\t\"./id.extra.js\": [\n\t\t4017,\n\t\t736\n\t],\n\t\"./id.js\": [\n\t\t9207,\n\t\t736\n\t],\n\t\"./it.extra.js\": [\n\t\t8257,\n\t\t736\n\t],\n\t\"./it.js\": [\n\t\t2946,\n\t\t736\n\t],\n\t\"./ja.extra.js\": [\n\t\t9530,\n\t\t736\n\t],\n\t\"./ja.js\": [\n\t\t3601,\n\t\t736\n\t],\n\t\"./ko.js\": [\n\t\t3579,\n\t\t736\n\t],\n\t\"./lt.extra.js\": [\n\t\t6075,\n\t\t736\n\t],\n\t\"./lt.js\": [\n\t\t4590,\n\t\t736\n\t],\n\t\"./lv.extra.js\": [\n\t\t4666,\n\t\t736\n\t],\n\t\"./lv.js\": [\n\t\t209,\n\t\t736\n\t],\n\t\"./ms.extra.js\": [\n\t\t5765,\n\t\t736\n\t],\n\t\"./ms.js\": [\n\t\t4660,\n\t\t736\n\t],\n\t\"./nl.extra.js\": [\n\t\t4130,\n\t\t736\n\t],\n\t\"./nl.js\": [\n\t\t8796,\n\t\t736\n\t],\n\t\"./no.js\": [\n\t\t6404,\n\t\t736\n\t],\n\t\"./pl.js\": [\n\t\t5723,\n\t\t736\n\t],\n\t\"./pt-br.js\": [\n\t\t4633,\n\t\t736\n\t],\n\t\"./pt-pt.js\": [\n\t\t2078,\n\t\t736\n\t],\n\t\"./ro.extra.js\": [\n\t\t5345,\n\t\t736\n\t],\n\t\"./ro.js\": [\n\t\t3033,\n\t\t736\n\t],\n\t\"./ru.extra.js\": [\n\t\t2215,\n\t\t736\n\t],\n\t\"./ru.js\": [\n\t\t5081,\n\t\t736\n\t],\n\t\"./sk.extra.js\": [\n\t\t2725,\n\t\t736\n\t],\n\t\"./sk.js\": [\n\t\t6669,\n\t\t736\n\t],\n\t\"./sl.extra.js\": [\n\t\t882,\n\t\t736\n\t],\n\t\"./sl.js\": [\n\t\t8425,\n\t\t736\n\t],\n\t\"./sq.js\": [\n\t\t909,\n\t\t736\n\t],\n\t\"./sr.extra.js\": [\n\t\t8838,\n\t\t736\n\t],\n\t\"./sr.js\": [\n\t\t5455,\n\t\t736\n\t],\n\t\"./sv.extra.js\": [\n\t\t2971,\n\t\t736\n\t],\n\t\"./sv.js\": [\n\t\t5993,\n\t\t736\n\t],\n\t\"./th.extra.js\": [\n\t\t9726,\n\t\t736\n\t],\n\t\"./th.js\": [\n\t\t8886,\n\t\t736\n\t],\n\t\"./tk.js\": [\n\t\t6440,\n\t\t736\n\t],\n\t\"./tr.js\": [\n\t\t7209,\n\t\t736\n\t],\n\t\"./ua.extra.js\": [\n\t\t2679,\n\t\t736\n\t],\n\t\"./ua.js\": [\n\t\t9639,\n\t\t736\n\t],\n\t\"./uk.extra.js\": [\n\t\t155,\n\t\t736\n\t],\n\t\"./uk.js\": [\n\t\t5366,\n\t\t736\n\t],\n\t\"./ur.js\": [\n\t\t4506,\n\t\t736\n\t],\n\t\"./zh_cn.extra.js\": [\n\t\t5769,\n\t\t736\n\t],\n\t\"./zh_cn.js\": [\n\t\t8764,\n\t\t736\n\t],\n\t\"./zh_tw.js\": [\n\t\t785,\n\t\t736\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__.t(id, 7 | 16);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 7820;\nmodule.exports = webpackAsyncContext;","import $ from 'jquery'\r\n\r\nexport let preloader_absolute_hide = (preloader_id) => {\r\n $(preloader_id+\" .status\").fadeOut();\r\n $(preloader_id).delay(5).fadeOut('slow');\r\n}\r\n\r\nexport const current_lang = () => {\r\n return $('html').attr('lang');\r\n};\r\n\r\nexport const current_lang_short = () => {\r\n const lang = current_lang();\r\n return lang.substring(0, (lang.indexOf('-') ?? 2));\r\n};\r\n\r\nexport const datatable_lang_path = () => {\r\n return \"/langs/datatables/\" + current_lang() + \".json\";\r\n};\r\n\r\nexport const apexcharts_lang_file = () => {\r\n var value = $.ajax({ \r\n url: \"/langs/apexcharts/\" + current_lang_short() + \".json\",\r\n // dataType: 'json',\r\n async: false\r\n }).responseJSON;\r\n\r\n return value;\r\n};\r\n\r\nexport const choices_lang_file = () => {\r\n var value = $.ajax({ \r\n url: \"/langs/choices/\" + current_lang_short() + \".json\",\r\n // dataType: 'json',\r\n async: false\r\n }).responseJSON;\r\n\r\n return value;\r\n};\r\n\r\nexport const kFormatter = (num) => {\r\n var value = Math.sign(num)*Math.abs(num);\r\n if (value >= 1000000)\r\n {\r\n value = Math.sign(num)*((Math.abs(num)/(1000*1000)).toFixed(1)) + 'kk'\r\n }\r\n else if (value >= 1000)\r\n {\r\n value = Math.sign(num)*((Math.abs(num)/1000).toFixed(1)) + 'k'\r\n }\r\n else\r\n {\r\n value = Number(value).toFixed(0);\r\n };\r\n\r\n return value;\r\n};\r\n\r\n\r\nexport function fnDynamicLoad () {\r\n\ttry {\r\n\t\tlet is_last_page_element = document.getElementById(\"is_last_page_element\");\r\n\r\n\t\tif (!is_last_page_element) {\r\n\t\t\t$(window).on('scroll', fnScroll);\r\n\t\t}\r\n\r\n\t\tlet is_fetching = false;\r\n\r\n\t\tfunction fnScroll () {\r\n\t\t\t//console.log(`${$(window).scrollTop() + $(window).height()} > ${$(document).height() - 1}`);\r\n\t\t\r\n\t\t\tif($(window).scrollTop() + $(window).height() >= $(document).height() - 5) {\r\n\t\t\t\tGetRecords();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tlet page_number = 1;\r\n\r\n\t\tfunction GetRecords() {\r\n\t\t\tif (is_fetching) {return;}\r\n\r\n\t\t\tis_fetching = true;\r\n\t\t\tpage_number++;\r\n\r\n\t\t\t//console.log(\"GetRecords function calling, page_number: \" + page_number);\r\n\r\n\t\t\tlet lookup_address = $(\"#search_table\").data('url');\r\n\t\t\t\tlookup_address = `${lookup_address}&page_number=${page_number}`\r\n\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: \"GET\",\r\n\t\t\t\turl: lookup_address,\r\n\t\t\t\t//data: data_parameters,\r\n\t\t\t\t//async: false,\r\n\t\t\t\tdataType: \"html\",\r\n\t\t\t\tbeforeSend: function() {\r\n\t\t\t\t\t$(\"#loader\").show();\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: OnSuccess,\r\n\t\t\t\tfailure: function(response) {\r\n\t\t\t\t\tconsole.log(response.d);\r\n\t\t\t\t\t$(\"#loader\").hide();\r\n\t\t\t\t},\r\n\t\t\t\terror: function(response) {\r\n\t\t\t\t\tconsole.log(response.d);\r\n\t\t\t\t\t$(\"#loader\").hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tis_fetching = false;\r\n\t\t}\r\n\t} catch (e) {\r\n\t\tif (e instanceof TypeError) {\r\n\t\t\tprintError(e, true);\r\n\t\t} else {\r\n\t\t\tprintError(e, false);\r\n\t\t}\r\n\t\t\r\n\t\tconsole.error(e.name); // logs 'Error'\r\n\tconsole.error(e.message); // logs 'The message', or a JavaScript error message\r\n\t};\r\n};\r\n\r\nfunction OnSuccess(response) {\r\n\t$(\"#search_table\").append(response);\r\n\r\n\t//parse string to html\r\n\t//convert response to HTML to be able to search last_page_element there\r\n\tlet parser = new DOMParser();\r\n\tlet responseHtml = parser.parseFromString(response, 'text/html');\r\n\tlet is_last_page_element = responseHtml.getElementById(\"is_last_page_element\");\r\n\r\n\t// checking if existing last element in the response\r\n\t// if yes, turn off scrolling\r\n\tif (is_last_page_element) {\r\n\t\t$(window).off('scroll');\r\n\t}\r\n\r\n\t$(\"#loader\").hide();\r\n};\r\n\r\nvar printError = function(error, explicit) {\r\n console.log(`[${explicit ? 'EXPLICIT' : 'INEXPLICIT'}] ${error.name}: ${error.message}`);\r\n};\r\n\r\n\r\n // jquery groupping data\r\n // var groupValues = data.reduce(function (obj, item) {\r\n // obj[item['x']] = obj[item['x']] || [];\r\n // obj[item['x']] = +obj[item['x']] + +item['y']; // add (+) before variable so it's cast to numeric \r\n // return obj;\r\n // }, {});\r\n \r\n // var groupData = Object.keys(groupValues).map(function (key) {\r\n // return [key, groupValues[key]];\r\n // });\r\n \r\n // console.log(groupData);","import * as bootstrap from 'bootstrap'\r\nimport $, {jQuery} from 'jquery'\r\nimport 'select2'\r\n// import 'toastr'\r\n// import 'node-waves'\r\nimport 'owl.carousel'\r\n// import 'inputmask/dist/inputmask/jquery.inputmask'\r\nimport Choices from '../../custom_node_modules/choices.js'\r\nimport {current_lang_short, choices_lang_file} from '../js/modules/common.js'\r\n// import {fn_form_needs_validation_initialization} from '../js/modules/common_validations.js'\r\n\r\nimport 'parsleyjs'\r\nimport(`../../node_modules/parsleyjs/dist/i18n/${current_lang_short()}.js`)\r\n\r\n// custom parsley validator because of localization decimal value separator [,.] issue\r\n// data-parsley-greater-than=\"0.01\"\r\nParsley.addValidator('greaterThan', {\r\n validateString: function(value, requirement) {\r\n if (typeof value === 'string') {\r\n value = value.replace(',', '.');\r\n };\r\n\r\n return parseFloat(value) >= requirement;\r\n },\r\n requirementType: 'string',\r\n messages: {\r\n en: 'This value should be more than %s',\r\n uk: 'Значення повинно бути більше ніж %s'\r\n }\r\n});\r\n\r\n\r\n{\r\n $(\".select2-search-disable\").select2({\r\n minimumResultsForSearch: 1 / 0\r\n });\r\n\r\n // $(\".input-mask\").inputmask();\r\n}\r\n\r\n\r\n//loading partial views\r\n{\r\n document.querySelectorAll('.partial_view').forEach(function(o){\r\n var url = o.getAttribute('data-url');\r\n\r\n $.get(url).done(function (data) {\r\n o.innerHTML = data;\r\n });\r\n });\r\n}\r\n\r\n// modal operations (load / reload)\r\nvar placeholderElement = $('#modal-placeholder');\r\n\r\nif (placeholderElement.length > 0)\r\n{\r\n var modal_placeholder = document.getElementById('modal-placeholder');\r\n\r\n $(document).on('click', 'a[data-toggle=\"ajax-modal\"]', function (event) {\r\n var url = $(this).data('url');\r\n $.get(url).done(function (data) {\r\n placeholderElement.html(data);\r\n\r\n var myModal = new bootstrap.Modal(placeholderElement.find(\".modal\"), {\r\n keyboard: true\r\n });\r\n myModal.show();\r\n });\r\n });\r\n\r\n $(document).on('click', 'a[data-toggle=\"ajax-modal-reload\"]', function (event) {\r\n var url = $(this).data('url');\r\n $.get(url).done(function (data) {\r\n var newBody = $('.modal-content', data);\r\n placeholderElement.find('.modal-content').replaceWith(newBody);\r\n\r\n var scripts_to_reload = placeholderElement.find('.script_to_reload');\r\n fn_scripts_reload(scripts_to_reload);\r\n\r\n placeholderElement.trigger(\"reload.modal\");\r\n });\r\n });\r\n\r\n placeholderElement.on('click', '[data-save=\"modal\"]', function (event) {\r\n var form = $(this).closest(\"form\");\r\n\r\n if (form.length == 0)\r\n {\r\n form = $(this).parents('.modal').find('form');\r\n }\r\n\r\n if ($(form).parsley().validate())\r\n {\r\n var actionUrl = $(this).attr('formaction');\r\n // attribute exists?\r\n if (!(typeof actionUrl !== 'undefined' && actionUrl !== false)) {\r\n actionUrl = form.attr('action');\r\n }\r\n\r\n var dataToSend = decodeURI(form.serialize());\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: actionUrl,\r\n data: dataToSend,\r\n // processData: true,\r\n // dataType: 'json'\r\n // context: document.body\r\n }).done((data) => {\r\n // console.log('post request sent');\r\n var newBody = $('.modal-body', data);\r\n placeholderElement.find('.modal-body').replaceWith(newBody);\r\n\r\n // find IsValid input field and check it's value\r\n // if it's valid then hide modal window\r\n var isValid = newBody.find('[name=\"IsValid\"]').val() == 'True';\r\n\r\n if (isValid) {\r\n var tableElement = $('#refreshable-content');\r\n if (tableElement.length) {\r\n var tableUrl = tableElement.data('url');\r\n\r\n var page_number = tableElement.attr('page_number');\r\n\r\n // attribute exists?\r\n if (page_number) {\r\n var url = new URL(window.location.origin + tableUrl);\r\n url.searchParams.set('page_number', page_number);\r\n tableUrl = url.toString().replace(window.location.origin, \"\");\r\n }\r\n\r\n // refreshing of all refreshable content\r\n $.get(tableUrl).done(function (table) {\r\n tableElement.replaceWith(table);\r\n fn_scripts_reload($('.script_to_reload'));\r\n });\r\n }\r\n\r\n // getting existing created bootstrap modal object\r\n var myModal = bootstrap.Modal.getInstance(placeholderElement.find(\".modal\"));\r\n myModal.hide();\r\n }\r\n else\r\n {\r\n placeholderElement.trigger(\"reload.modal\");\r\n }\r\n });\r\n }\r\n });\r\n\r\n // transaction upsert method handling, is called when modal window is shown\r\n // modal_placeholder.addEventListener('show.bs.modal', function (event) {\r\n\r\n placeholderElement.on(\"reload.modal\", fn_transactions_upsert_modal_initialization);\r\n modal_placeholder.addEventListener('show.bs.modal', fn_transactions_upsert_modal_initialization);\r\n\r\n var partial_placeholder = document.getElementById('partial-placeholder');\r\n if (partial_placeholder)\r\n {\r\n fn_transactions_upsert_modal_initialization();\r\n }\r\n\r\n function fn_transactions_upsert_modal_initialization (event) {\r\n placeholderElement.find('.focused_element').focus();\r\n\r\n try {\r\n var value_from = document.getElementById('InvolvedTransactionAmount');\r\n if (value_from)\r\n {\r\n var value_to = document.getElementById('TransactionAmount');\r\n var currency_rate = document.getElementById('CurrencyRate');\r\n\r\n value_from.addEventListener('keyup', fn_process_to_value);\r\n currency_rate.addEventListener('keyup', fn_process_to_value);\r\n\r\n \r\n\r\n function fn_process_to_value(e) {\r\n var v_from = 0;\r\n if (typeof value_from.value === 'string') {\r\n v_from = value_from.value.replace(',', '.');\r\n } else {\r\n v_from = value_from.value;\r\n }\r\n \r\n // console.log(`value_from.value: ${value_from.value} >>> v_from: ${v_from}`);\r\n\r\n var v_curr_rate = 0;\r\n if (typeof currency_rate.value === 'string') {\r\n v_curr_rate = currency_rate.value.replace(',', '.');\r\n } else {\r\n v_curr_rate = v_curr_rate.value;\r\n }\r\n\r\n // console.log(`currency_rate.value: ${currency_rate.value} >>> v_curr_rate: ${v_curr_rate}`);\r\n\r\n value_to.value = `${(v_from * v_curr_rate).toFixed(2)}`;\r\n }\r\n }\r\n } catch (e) {\r\n if (e instanceof TypeError) {\r\n printError(e, true);\r\n } else {\r\n printError(e, false);\r\n }\r\n \r\n console.error(e.name); // logs 'Error'\r\n console.error(e.message); // logs 'The message', or a JavaScript error message\r\n };\r\n\r\n\r\n try{\r\n let lang_file = choices_lang_file();\r\n\r\n // if element Tags exists, load the data\r\n var tags_element = placeholderElement.find('.modal #Tags');\r\n var item_color = \"\";\r\n\r\n if(tags_element.length > 0)\r\n {\r\n //setting up tag item color\r\n var type_id = placeholderElement.find('#CustomTypeId').val();\r\n switch(type_id) {\r\n case \"0\":\r\n item_color = \"choices__list--blue\";\r\n break;\r\n case \"-1\":\r\n item_color = \"choices__list--red\";\r\n break;\r\n default:\r\n item_color = \"choices__list--green\";\r\n }\r\n\r\n var choices = new Choices('#Tags', {\r\n delimiter: ' ',\r\n paste: false,\r\n editItems: true,\r\n addItems: true,\r\n maxItemCount: -1,\r\n duplicateItemsAllowed: true,\r\n removeItemButton: true,\r\n paste: true,\r\n shouldSort: false,\r\n shouldSortItems: false,\r\n placeholder: false,\r\n searchResultLimit: 3,\r\n renderChoiceLimit: 3,\r\n loadingText: lang_file[\"loadingText\"],\r\n noResultsText: lang_file[\"noResultsText\"],\r\n noChoicesText: lang_file[\"noChoicesText\"],\r\n itemSelectText: lang_file[\"itemSelectText\"],\r\n addItemText: (value) => {\r\n return lang_file[\"addItemText\"].replace(\"{value}\", value);\r\n },\r\n classNames: {\r\n listItems: 'choices__list--multiple' + ' ' + item_color\r\n }\r\n });\r\n\r\n var lookup_address = \"/api/on_get_select_all_lookup_asynch\";\r\n\r\n choices.setChoices(async () => {\r\n try {\r\n const items = await fetch(lookup_address)\r\n .then(response => response.json());\r\n return items;\r\n } catch (err) {\r\n console.error(err);\r\n }\r\n });\r\n }\r\n }\r\n catch (e) {\r\n if (e instanceof TypeError) {\r\n printError(e, true);\r\n } else {\r\n printError(e, false);\r\n }\r\n };\r\n\r\n var printError = function(error, explicit) {\r\n console.log(`[${explicit ? 'EXPLICIT' : 'INEXPLICIT'}] ${error.name}: ${error.message}`);\r\n }\r\n };\r\n\r\n // allow function keys and decimal separators\r\n placeholderElement.on('keydown', 'input.number', function (e) {\r\n if (\r\n // backspace, delete, tab, escape, enter, comma and .\r\n $.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 188, 190]) !== -1 ||\r\n // Ctrl/cmd+A, Ctrl/cmd+C, Ctrl/cmd+X\r\n ($.inArray(e.keyCode, [65, 67, 88]) !== -1 && (e.ctrlKey === true || e.metaKey === true)) ||\r\n // home, end, left, right\r\n (e.keyCode >= 35 && e.keyCode <= 39)) {\r\n\r\n return;\r\n }\r\n // block any non-number\r\n if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {\r\n e.preventDefault();\r\n }\r\n });\r\n};\r\n\r\nfunction fn_scripts_reload (reload_scripts) {\r\n for (var i = 0; i < reload_scripts.length; i++) {\r\n var src = $(reload_scripts[i]).attr(\"src\") + \"?v=\" + fn_random_hash();\r\n\r\n var new_script = $(reload_scripts[i]).removeAttr(\"src\");\r\n reload_scripts[i].remove();\r\n new_script.attr('src', src).appendTo('head');\r\n }\r\n};\r\n\r\nfunction fn_random_hash () {\r\n return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2)\r\n}\r\n\r\n\r\n{ // get transactions details by ID on ANY page\r\n var current_url = window.location.href;\r\n if(current_url.indexOf('#id') != -1 && current_url.indexOf('=') != -1) {\r\n var btn = document.createElement(\"a\"); // Create a